Skip to content

Restricting chart.js to 3.8.2 #468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
- run: yarn check-format

js-dist-current:
# always skip check for now - building is too inefficient and large for CI
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand Down
2 changes: 1 addition & 1 deletion src/Chartjs/Resources/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@hotwired/stimulus": "^3.0.0",
"@types/chart.js": "^2.9.34",
"chart.js": "^3.4.1",
"chart.js": "^3.4.1 <3.9",
"jest-canvas-mock": "^2.3.0",
"resize-observer-polyfill": "^1.5.1"
}
Expand Down
19 changes: 19 additions & 0 deletions src/Typed/Resources/assets/src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ export default class extends Controller {
contentType: { type: String, default: 'html' },
};

readonly stringsValue!: string[];
readonly typeSpeedValue: number;
readonly smartBackspaceValue: boolean;
readonly startDelayValue?: number;
readonly backSpeedValue?: number;
readonly shuffleValue?: boolean;
readonly backDelayValue: number;
readonly fadeOutValue?: boolean;
readonly fadeOutClassValue: string;
readonly fadeOutDelayValue: number;
readonly loopValue?: boolean;
readonly loopCountValue: number;
readonly showCursorValue: boolean;
readonly cursorCharValue: string;
readonly autoInsertCssValue: boolean;
readonly attrValue?: string;
readonly bindInputFocusEventsValue?: boolean;
readonly contentTypeValue: string;

connect() {
const options = {
strings: this.stringsValue,
Expand Down
2 changes: 1 addition & 1 deletion src/Vue/Resources/assets/dist/register_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function registerVueControllerComponents(context) {
window.resolveVueComponent = (name) => {
const component = vueControllers[`./${name}.vue`];
if (typeof component === 'undefined') {
throw new Error('Vue controller "' + name + '" does not exist');
throw new Error(`Vue controller "${name}" does not exist`);
}
return component;
};
Expand Down
15 changes: 14 additions & 1 deletion src/Vue/Resources/assets/dist/render_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,21 @@ class default_1 extends Controller {
this._dispatchEvent('vue:connect', { componentName: this.componentValue, props: this.props });
const component = window.resolveVueComponent(this.componentValue);
this.app = createApp(component, this.props);
if (this.element.__vue_app__ !== undefined) {
this.element.__vue_app__.unmount();
}
this._dispatchEvent('vue:before-mount', {
componentName: this.componentValue,
component: component,
props: this.props,
app: this.app,
});
this.app.mount(this.element);
this._dispatchEvent('vue:mount', { componentName: this.componentValue, component: component, props: this.props });
this._dispatchEvent('vue:mount', {
componentName: this.componentValue,
component: component,
props: this.props,
});
}
disconnect() {
this.app.unmount();
Expand Down