@ev-core/aurelia-v1-chartjs 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ import { ChartType, ChartOptions, Plugin } from 'chart.js';
2
+ import { ChartHostData } from '@ev-core/au-core-chartjs';
3
+ export declare class ChartJsComponent {
4
+ container: HTMLDivElement;
5
+ canvas: HTMLCanvasElement;
6
+ plugins?: Plugin[];
7
+ private readonly host;
8
+ type: ChartType;
9
+ css: Partial<CSSStyleDeclaration>;
10
+ class: string;
11
+ options?: ChartOptions;
12
+ data: ChartHostData;
13
+ observe: boolean;
14
+ dataChanged(): void;
15
+ bind(): void;
16
+ attached(): void;
17
+ detached(): void;
18
+ setup(): void;
19
+ refresh(): void;
20
+ dispose(): void;
21
+ }
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChartJsComponent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const aurelia_framework_1 = require("aurelia-framework");
6
+ const au_core_chartjs_1 = require("@ev-core/au-core-chartjs");
7
+ let ChartJsComponent = class ChartJsComponent {
8
+ constructor() {
9
+ this.host = new au_core_chartjs_1.ChartHost();
10
+ this.observe = false;
11
+ }
12
+ dataChanged() {
13
+ this.refresh();
14
+ }
15
+ bind() { }
16
+ attached() {
17
+ this.setup();
18
+ }
19
+ detached() {
20
+ this.dispose();
21
+ }
22
+ setup() {
23
+ this.host.setup(this.canvas, {
24
+ type: this.type,
25
+ data: this.data,
26
+ plugins: this.plugins
27
+ });
28
+ }
29
+ refresh() {
30
+ this.host.refresh(this.data);
31
+ }
32
+ dispose() {
33
+ this.host.dispose();
34
+ }
35
+ };
36
+ exports.ChartJsComponent = ChartJsComponent;
37
+ tslib_1.__decorate([
38
+ aurelia_framework_1.bindable,
39
+ tslib_1.__metadata("design:type", String)
40
+ ], ChartJsComponent.prototype, "type", void 0);
41
+ tslib_1.__decorate([
42
+ aurelia_framework_1.bindable,
43
+ tslib_1.__metadata("design:type", Object)
44
+ ], ChartJsComponent.prototype, "css", void 0);
45
+ tslib_1.__decorate([
46
+ aurelia_framework_1.bindable,
47
+ tslib_1.__metadata("design:type", String)
48
+ ], ChartJsComponent.prototype, "class", void 0);
49
+ tslib_1.__decorate([
50
+ aurelia_framework_1.bindable,
51
+ tslib_1.__metadata("design:type", Object)
52
+ ], ChartJsComponent.prototype, "options", void 0);
53
+ tslib_1.__decorate([
54
+ aurelia_framework_1.bindable,
55
+ tslib_1.__metadata("design:type", Object)
56
+ ], ChartJsComponent.prototype, "data", void 0);
57
+ tslib_1.__decorate([
58
+ aurelia_framework_1.bindable,
59
+ tslib_1.__metadata("design:type", Boolean)
60
+ ], ChartJsComponent.prototype, "observe", void 0);
61
+ exports.ChartJsComponent = ChartJsComponent = tslib_1.__decorate([
62
+ (0, aurelia_framework_1.inlineView)(`<template>
63
+ <div ref="container"
64
+ css.bind="css"
65
+ class.bind="class"
66
+ style="display:block;min-width:0;">
67
+ <canvas ref="canvas"
68
+ class="h-100 w-100"
69
+ style="margin:auto;">
70
+ </canvas>
71
+ </div>
72
+ </template>`),
73
+ (0, aurelia_framework_1.customElement)('chart')
74
+ ], ChartJsComponent);
75
+
76
+ //# sourceMappingURL=chart-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/elements/chart-element.ts"],"names":[],"mappings":";;;;AAAA,yDAAwE;AAExE,8DAAoE;AAc7D,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAAtB;QAIY,SAAI,GAAG,IAAI,2BAAS,EAAE,CAAC;QAO9B,YAAO,GAAY,KAAK,CAAC;IA+BrC,CAAC;IA7BC,WAAW;QACT,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,IAAI,KAAK,CAAC;IAEV,QAAQ;QACN,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO;QACL,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;CACF,CAAA;AA1CY,4CAAgB;AAMjB;IAAT,4BAAQ;;8CAAiB;AAChB;IAAT,4BAAQ;;6CAAmC;AAClC;IAAT,4BAAQ;;+CAAe;AACd;IAAT,4BAAQ;;iDAAwB;AACvB;IAAT,4BAAQ;;8CAAqB;AACpB;IAAT,4BAAQ;;iDAA0B;2BAXxB,gBAAgB;IAZ5B,IAAA,8BAAU,EAAC;;;;;;;;;;YAUA,CAAC;IACZ,IAAA,iCAAa,EAAC,OAAO,CAAC;GACV,gBAAgB,CA0C5B","file":"chart-element.js","sourceRoot":"../../../src/"}
@@ -0,0 +1,2 @@
1
+ import { FrameworkConfiguration } from 'aurelia-framework';
2
+ export declare function configure(config: FrameworkConfiguration): void;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.configure = configure;
4
+ const aurelia_pal_1 = require("aurelia-pal");
5
+ function configure(config) {
6
+ config.globalResources([
7
+ aurelia_pal_1.PLATFORM.moduleName('./elements/chart-element')
8
+ ]);
9
+ }
10
+
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;AAGA,8BAKC;AAPD,6CAAuC;AAEvC,SAAgB,SAAS,CAAC,MAA8B;IACtD,MAAM,CAAC,eAAe,CAAC;QACrB,sBAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;KAEhD,CAAC,CAAC;AACL,CAAC","file":"index.js","sourceRoot":"../../src/"}
@@ -0,0 +1 @@
1
+ export type { IChartCombined } from '@ev-core/au-core-chartjs';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+
4
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourceRoot":"../../src/"}
@@ -0,0 +1,21 @@
1
+ import { ChartType, ChartOptions, Plugin } from 'chart.js';
2
+ import { ChartHostData } from '@ev-core/au-core-chartjs';
3
+ export declare class ChartJsComponent {
4
+ container: HTMLDivElement;
5
+ canvas: HTMLCanvasElement;
6
+ plugins?: Plugin[];
7
+ private readonly host;
8
+ type: ChartType;
9
+ css: Partial<CSSStyleDeclaration>;
10
+ class: string;
11
+ options?: ChartOptions;
12
+ data: ChartHostData;
13
+ observe: boolean;
14
+ dataChanged(): void;
15
+ bind(): void;
16
+ attached(): void;
17
+ detached(): void;
18
+ setup(): void;
19
+ refresh(): void;
20
+ dispose(): void;
21
+ }
@@ -0,0 +1,73 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { customElement, bindable, inlineView } from 'aurelia-framework';
3
+ import { ChartHost } from '@ev-core/au-core-chartjs';
4
+ let ChartJsComponent = class ChartJsComponent {
5
+ constructor() {
6
+ this.host = new ChartHost();
7
+ this.observe = false;
8
+ }
9
+ dataChanged() {
10
+ this.refresh();
11
+ }
12
+ bind() { }
13
+ attached() {
14
+ this.setup();
15
+ }
16
+ detached() {
17
+ this.dispose();
18
+ }
19
+ setup() {
20
+ this.host.setup(this.canvas, {
21
+ type: this.type,
22
+ data: this.data,
23
+ plugins: this.plugins
24
+ });
25
+ }
26
+ refresh() {
27
+ this.host.refresh(this.data);
28
+ }
29
+ dispose() {
30
+ this.host.dispose();
31
+ }
32
+ };
33
+ __decorate([
34
+ bindable,
35
+ __metadata("design:type", String)
36
+ ], ChartJsComponent.prototype, "type", void 0);
37
+ __decorate([
38
+ bindable,
39
+ __metadata("design:type", Object)
40
+ ], ChartJsComponent.prototype, "css", void 0);
41
+ __decorate([
42
+ bindable,
43
+ __metadata("design:type", String)
44
+ ], ChartJsComponent.prototype, "class", void 0);
45
+ __decorate([
46
+ bindable,
47
+ __metadata("design:type", Object)
48
+ ], ChartJsComponent.prototype, "options", void 0);
49
+ __decorate([
50
+ bindable,
51
+ __metadata("design:type", Object)
52
+ ], ChartJsComponent.prototype, "data", void 0);
53
+ __decorate([
54
+ bindable,
55
+ __metadata("design:type", Boolean)
56
+ ], ChartJsComponent.prototype, "observe", void 0);
57
+ ChartJsComponent = __decorate([
58
+ inlineView(`<template>
59
+ <div ref="container"
60
+ css.bind="css"
61
+ class.bind="class"
62
+ style="display:block;min-width:0;">
63
+ <canvas ref="canvas"
64
+ class="h-100 w-100"
65
+ style="margin:auto;">
66
+ </canvas>
67
+ </div>
68
+ </template>`),
69
+ customElement('chart')
70
+ ], ChartJsComponent);
71
+ export { ChartJsComponent };
72
+
73
+ //# sourceMappingURL=chart-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/elements/chart-element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,SAAS,EAAiB,MAAM,0BAA0B,CAAC;AAc7D,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAAtB;QAIY,SAAI,GAAG,IAAI,SAAS,EAAE,CAAC;QAO9B,YAAO,GAAY,KAAK,CAAC;IA+BrC,CAAC;IA7BC,WAAW;QACT,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,IAAI,KAAK,CAAC;IAEV,QAAQ;QACN,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO;QACL,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;CACF,CAAA;AApCW;IAAT,QAAQ;;8CAAiB;AAChB;IAAT,QAAQ;;6CAAmC;AAClC;IAAT,QAAQ;;+CAAe;AACd;IAAT,QAAQ;;iDAAwB;AACvB;IAAT,QAAQ;;8CAAqB;AACpB;IAAT,QAAQ;;iDAA0B;AAXxB,gBAAgB;IAZ5B,UAAU,CAAC;;;;;;;;;;YAUA,CAAC;IACZ,aAAa,CAAC,OAAO,CAAC;GACV,gBAAgB,CA0C5B","file":"chart-element.js","sourceRoot":"../../../src/"}
@@ -0,0 +1,2 @@
1
+ import { FrameworkConfiguration } from 'aurelia-framework';
2
+ export declare function configure(config: FrameworkConfiguration): void;
@@ -0,0 +1,8 @@
1
+ import { PLATFORM } from 'aurelia-pal';
2
+ export function configure(config) {
3
+ config.globalResources([
4
+ PLATFORM.moduleName('./elements/chart-element')
5
+ ]);
6
+ }
7
+
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,UAAU,SAAS,CAAC,MAA8B;IACtD,MAAM,CAAC,eAAe,CAAC;QACrB,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;KAEhD,CAAC,CAAC;AACL,CAAC","file":"index.js","sourceRoot":"../../src/"}
@@ -0,0 +1 @@
1
+ export type { IChartCombined } from '@ev-core/au-core-chartjs';
@@ -0,0 +1,3 @@
1
+ export {};
2
+
3
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourceRoot":"../../src/"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@ev-core/aurelia-v1-chartjs",
3
- "description": "An Aurelia plugin project.",
4
- "version": "1.0.0",
3
+ "description": "Aurelia v1 Chart.js element plugin.",
4
+ "version": "2.0.0",
5
5
  "dependencies": {
6
- "chart.js": "^4.0.0",
7
- "@ev-core/aurelia-v1-resources": "1.0.0"
6
+ "@ev-core/au-core-chartjs": "2.0.0",
7
+ "chart.js": "^4.0.0"
8
8
  },
9
9
  "peerDependencies": {
10
10
  "aurelia-binding": "^1.0.0 || ^2.0.0",
@@ -43,7 +43,7 @@
43
43
  "server-destroy": "^1.0.1",
44
44
  "socket.io": "^4.8.1",
45
45
  "text": "requirejs/text",
46
- "typescript": "^5.9.2",
46
+ "typescript": "^5.9.3",
47
47
  "typescript-eslint": "^8.38.0"
48
48
  },
49
49
  "overrides": {
@@ -52,13 +52,14 @@
52
52
  "glob-parent": "^6.0.0",
53
53
  "micromatch": "^4.0.0"
54
54
  },
55
+ "types": "dist/native-modules/index.d.ts",
55
56
  "main": "dist/commonjs/index.js",
56
57
  "module": "dist/native-modules/index.js",
57
58
  "files": [
58
59
  "dist"
59
60
  ],
60
61
  "scripts": {
61
- "build": "echo 'Build skipped - already built'",
62
+ "build": "au build-plugin --env prod",
62
63
  "build:o": "au build-plugin --env prod",
63
64
  "clean": "rimraf dist",
64
65
  "start": "au run",