@kubex/zinc 1.0.105 → 1.0.107
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.
- package/dist/custom-elements.json +386 -156
- package/dist/vscode.html-custom-data.json +32 -21
- package/dist/web-types.json +85 -67
- package/dist/zn.d.ts +87 -34
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +1042 -1910
- package/docs/pages/components/chart.md +134 -8
- package/docs/pages/components/simple-chart.md +20 -5
- package/docs/pages/components/stat.md +531 -401
- package/docs/pages/components/translation-group.md +25 -0
- package/docs/pages/components/translations.md +17 -1
- package/package.json +5 -6
- package/src/components/chart/builders.test.ts +211 -0
- package/src/components/chart/builders.ts +221 -0
- package/src/components/chart/chart.component.ts +182 -173
- package/src/components/chart/chart.scss +0 -1
- package/src/components/chart/chart.test.ts +48 -4
- package/src/components/editor/modules/context-menu/context-menu.ts +2 -1
- package/src/components/inline-edit/inline-edit.component.ts +2 -1
- package/src/components/inline-edit/inline-edit.scss +9 -11
- package/src/components/rating/rating.component.ts +2 -1
- package/src/components/simple-chart/simple-chart.component.ts +72 -180
- package/src/components/textarea/textarea.component.ts +1 -1
- package/src/components/translation-group/translation-group.component.ts +113 -2
- package/src/components/translations/translations.component.ts +120 -3
|
@@ -13,6 +13,17 @@
|
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
"name": "zn-action-bar",
|
|
18
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
19
|
+
"attributes": [],
|
|
20
|
+
"references": [
|
|
21
|
+
{
|
|
22
|
+
"name": "Documentation",
|
|
23
|
+
"url": "https://zinc.style/components/action-bar"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
16
27
|
{
|
|
17
28
|
"name": "zn-alert",
|
|
18
29
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -48,17 +59,6 @@
|
|
|
48
59
|
}
|
|
49
60
|
]
|
|
50
61
|
},
|
|
51
|
-
{
|
|
52
|
-
"name": "zn-action-bar",
|
|
53
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
54
|
-
"attributes": [],
|
|
55
|
-
"references": [
|
|
56
|
-
{
|
|
57
|
-
"name": "Documentation",
|
|
58
|
-
"url": "https://zinc.style/components/action-bar"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
62
|
{
|
|
63
63
|
"name": "zn-animated-button",
|
|
64
64
|
"description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -321,15 +321,19 @@
|
|
|
321
321
|
},
|
|
322
322
|
{
|
|
323
323
|
"name": "zn-chart",
|
|
324
|
-
"description": "
|
|
324
|
+
"description": "Chart component powered by Apache ECharts.\n---\n\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
325
325
|
"attributes": [
|
|
326
|
+
{ "name": "type", "values": [{ "name": "ChartType" }] },
|
|
327
|
+
{ "name": "data", "values": [{ "name": "SeriesItem[]" }] },
|
|
328
|
+
{ "name": "categories", "values": [{ "name": "string[]" }] },
|
|
326
329
|
{
|
|
327
|
-
"name": "
|
|
328
|
-
"values": [
|
|
330
|
+
"name": "xaxis",
|
|
331
|
+
"values": [
|
|
332
|
+
{ "name": "datetime" },
|
|
333
|
+
{ "name": "category" },
|
|
334
|
+
{ "name": "numeric" }
|
|
335
|
+
]
|
|
329
336
|
},
|
|
330
|
-
{ "name": "data", "values": [{ "name": "any[]" }] },
|
|
331
|
-
{ "name": "categories", "values": [{ "name": "string[]" }] },
|
|
332
|
-
{ "name": "xAxis", "values": [] },
|
|
333
337
|
{ "name": "d-size", "values": [] },
|
|
334
338
|
{ "name": "stacked", "values": [] },
|
|
335
339
|
{ "name": "live", "values": [] },
|
|
@@ -337,7 +341,11 @@
|
|
|
337
341
|
{ "name": "live-interval", "values": [] },
|
|
338
342
|
{ "name": "height", "values": [] },
|
|
339
343
|
{ "name": "enable-animations", "values": [] },
|
|
340
|
-
{ "name": "y-axis-append", "values": [] }
|
|
344
|
+
{ "name": "y-axis-append", "values": [] },
|
|
345
|
+
{ "name": "colors", "values": [{ "name": "string[]" }] },
|
|
346
|
+
{ "name": "sync-group", "values": [] },
|
|
347
|
+
{ "name": "smooth", "values": [] },
|
|
348
|
+
{ "name": "scale", "values": [] }
|
|
341
349
|
],
|
|
342
350
|
"references": [
|
|
343
351
|
{
|
|
@@ -1557,6 +1565,7 @@
|
|
|
1557
1565
|
{ "name": "textarea" }
|
|
1558
1566
|
]
|
|
1559
1567
|
},
|
|
1568
|
+
{ "name": "textarea-rows", "values": [{ "name": "1" }] },
|
|
1560
1569
|
{
|
|
1561
1570
|
"name": "options",
|
|
1562
1571
|
"values": [{ "name": "{ [key: string]: string }" }]
|
|
@@ -2989,10 +2998,11 @@
|
|
|
2989
2998
|
},
|
|
2990
2999
|
{
|
|
2991
3000
|
"name": "zn-simple-chart",
|
|
2992
|
-
"description": "
|
|
3001
|
+
"description": "A simple, pre-styled bar chart.\n---\n",
|
|
2993
3002
|
"attributes": [
|
|
2994
|
-
{ "name": "datasets", "values": [{ "name": "
|
|
2995
|
-
{ "name": "labels", "values": [{ "name": "
|
|
3003
|
+
{ "name": "datasets", "values": [{ "name": "{ data: number[] }[]" }] },
|
|
3004
|
+
{ "name": "labels", "values": [{ "name": "string[]" }] },
|
|
3005
|
+
{ "name": "enable-animations", "values": [] }
|
|
2996
3006
|
],
|
|
2997
3007
|
"references": [
|
|
2998
3008
|
{
|
|
@@ -3639,6 +3649,7 @@
|
|
|
3639
3649
|
{ "name": "textarea" }
|
|
3640
3650
|
]
|
|
3641
3651
|
},
|
|
3652
|
+
{ "name": "textarea-rows", "values": [] },
|
|
3642
3653
|
{
|
|
3643
3654
|
"name": "grouped",
|
|
3644
3655
|
"description": "When true, hides the individual language navbar and defers language control to a parent zn-translation-group.",
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@kubex/zinc",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.107",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,6 +15,28 @@
|
|
|
15
15
|
"events": [],
|
|
16
16
|
"js": { "properties": [], "events": [] }
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
"name": "zn-action-bar",
|
|
20
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
21
|
+
"doc-url": "",
|
|
22
|
+
"attributes": [],
|
|
23
|
+
"slots": [
|
|
24
|
+
{ "name": "", "description": "The default slot." },
|
|
25
|
+
{ "name": "example", "description": "An example slot." }
|
|
26
|
+
],
|
|
27
|
+
"events": [
|
|
28
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
29
|
+
],
|
|
30
|
+
"js": {
|
|
31
|
+
"properties": [],
|
|
32
|
+
"events": [
|
|
33
|
+
{
|
|
34
|
+
"name": "zn-event-name",
|
|
35
|
+
"description": "Emitted as an example."
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
18
40
|
{
|
|
19
41
|
"name": "zn-alert",
|
|
20
42
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -70,28 +92,6 @@
|
|
|
70
92
|
]
|
|
71
93
|
}
|
|
72
94
|
},
|
|
73
|
-
{
|
|
74
|
-
"name": "zn-action-bar",
|
|
75
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
76
|
-
"doc-url": "",
|
|
77
|
-
"attributes": [],
|
|
78
|
-
"slots": [
|
|
79
|
-
{ "name": "", "description": "The default slot." },
|
|
80
|
-
{ "name": "example", "description": "An example slot." }
|
|
81
|
-
],
|
|
82
|
-
"events": [
|
|
83
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
84
|
-
],
|
|
85
|
-
"js": {
|
|
86
|
-
"properties": [],
|
|
87
|
-
"events": [
|
|
88
|
-
{
|
|
89
|
-
"name": "zn-event-name",
|
|
90
|
-
"description": "Emitted as an example."
|
|
91
|
-
}
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
95
|
{
|
|
96
96
|
"name": "zn-animated-button",
|
|
97
97
|
"description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -606,19 +606,25 @@
|
|
|
606
606
|
},
|
|
607
607
|
{
|
|
608
608
|
"name": "zn-chart",
|
|
609
|
-
"description": "
|
|
609
|
+
"description": "Chart component powered by Apache ECharts.\n---\n\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
610
610
|
"doc-url": "",
|
|
611
611
|
"attributes": [
|
|
612
612
|
{
|
|
613
613
|
"name": "type",
|
|
614
|
-
"value": { "type": "
|
|
614
|
+
"value": { "type": "ChartType", "default": "'bar'" }
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"name": "data",
|
|
618
|
+
"value": { "type": "SeriesItem[]", "default": "[]" }
|
|
615
619
|
},
|
|
616
|
-
{ "name": "data", "value": { "type": "any[]", "default": "[]" } },
|
|
617
620
|
{
|
|
618
621
|
"name": "categories",
|
|
619
|
-
"value": { "type": "string
|
|
622
|
+
"value": { "type": "string[]", "default": "[]" }
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
"name": "xaxis",
|
|
626
|
+
"value": { "type": "'datetime' | 'category' | 'numeric'" }
|
|
620
627
|
},
|
|
621
|
-
{ "name": "xAxis", "value": { "type": "string" } },
|
|
622
628
|
{ "name": "d-size", "value": { "type": "number", "default": "1" } },
|
|
623
629
|
{
|
|
624
630
|
"name": "stacked",
|
|
@@ -642,38 +648,44 @@
|
|
|
642
648
|
},
|
|
643
649
|
{
|
|
644
650
|
"name": "enable-animations",
|
|
651
|
+
"value": { "type": "boolean | number", "default": "false" }
|
|
652
|
+
},
|
|
653
|
+
{ "name": "y-axis-append", "value": { "type": "string" } },
|
|
654
|
+
{ "name": "colors", "value": { "type": "string[] | undefined" } },
|
|
655
|
+
{ "name": "sync-group", "value": { "type": "string | undefined" } },
|
|
656
|
+
{
|
|
657
|
+
"name": "smooth",
|
|
645
658
|
"value": { "type": "boolean", "default": "false" }
|
|
646
659
|
},
|
|
647
|
-
{
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
{ "name": "example", "description": "An example slot." }
|
|
652
|
-
],
|
|
653
|
-
"events": [
|
|
654
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
660
|
+
{
|
|
661
|
+
"name": "scale",
|
|
662
|
+
"value": { "type": "boolean | number", "default": "false" }
|
|
663
|
+
}
|
|
655
664
|
],
|
|
665
|
+
"events": [],
|
|
656
666
|
"js": {
|
|
657
667
|
"properties": [
|
|
658
|
-
{ "name": "type", "type": "
|
|
659
|
-
{ "name": "data", "type": "
|
|
660
|
-
{ "name": "categories", "type": "string
|
|
661
|
-
{
|
|
668
|
+
{ "name": "type", "type": "ChartType" },
|
|
669
|
+
{ "name": "data", "type": "SeriesItem[]" },
|
|
670
|
+
{ "name": "categories", "type": "string[]" },
|
|
671
|
+
{
|
|
672
|
+
"name": "xAxis",
|
|
673
|
+
"type": "'datetime' | 'category' | 'numeric'"
|
|
674
|
+
},
|
|
662
675
|
{ "name": "datapointSize", "type": "number" },
|
|
663
676
|
{ "name": "stacked", "type": "boolean" },
|
|
664
677
|
{ "name": "live", "type": "boolean" },
|
|
665
678
|
{ "name": "dataUrl", "type": "string" },
|
|
666
679
|
{ "name": "liveInterval", "type": "number" },
|
|
667
680
|
{ "name": "height", "type": "number" },
|
|
668
|
-
{ "name": "enableAnimations", "type": "boolean" },
|
|
669
|
-
{ "name": "yAxisAppend", "type": "string" }
|
|
681
|
+
{ "name": "enableAnimations", "type": "boolean | number" },
|
|
682
|
+
{ "name": "yAxisAppend", "type": "string" },
|
|
683
|
+
{ "name": "colors", "type": "string[] | undefined" },
|
|
684
|
+
{ "name": "syncGroup", "type": "string | undefined" },
|
|
685
|
+
{ "name": "smooth", "type": "boolean" },
|
|
686
|
+
{ "name": "scale", "type": "boolean | number" }
|
|
670
687
|
],
|
|
671
|
-
"events": [
|
|
672
|
-
{
|
|
673
|
-
"name": "zn-event-name",
|
|
674
|
-
"description": "Emitted as an example."
|
|
675
|
-
}
|
|
676
|
-
]
|
|
688
|
+
"events": []
|
|
677
689
|
}
|
|
678
690
|
},
|
|
679
691
|
{
|
|
@@ -3593,6 +3605,7 @@
|
|
|
3593
3605
|
"default": "'text'"
|
|
3594
3606
|
}
|
|
3595
3607
|
},
|
|
3608
|
+
{ "name": "textarea-rows", "value": { "type": "1" } },
|
|
3596
3609
|
{
|
|
3597
3610
|
"name": "options",
|
|
3598
3611
|
"value": { "type": "{ [key: string]: string }", "default": "{}" }
|
|
@@ -3671,6 +3684,7 @@
|
|
|
3671
3684
|
"name": "inputType",
|
|
3672
3685
|
"type": "'select' | 'text' | 'data-select' | 'number' | 'textarea'"
|
|
3673
3686
|
},
|
|
3687
|
+
{ "name": "textareaRows", "type": "1" },
|
|
3674
3688
|
{ "name": "options", "type": "{ [key: string]: string }" },
|
|
3675
3689
|
{ "name": "selectProvider", "type": "string" },
|
|
3676
3690
|
{ "name": "iconPosition", "type": "'start' | 'end' | 'none'" },
|
|
@@ -6895,31 +6909,30 @@
|
|
|
6895
6909
|
},
|
|
6896
6910
|
{
|
|
6897
6911
|
"name": "zn-simple-chart",
|
|
6898
|
-
"description": "
|
|
6912
|
+
"description": "A simple, pre-styled bar chart.\n---\n",
|
|
6899
6913
|
"doc-url": "",
|
|
6900
6914
|
"attributes": [
|
|
6901
|
-
{
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
{ "name": "", "
|
|
6906
|
-
{
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6915
|
+
{
|
|
6916
|
+
"name": "datasets",
|
|
6917
|
+
"value": { "type": "{ data: number[] }[] | undefined" }
|
|
6918
|
+
},
|
|
6919
|
+
{ "name": "labels", "value": { "type": "string[] | undefined" } },
|
|
6920
|
+
{
|
|
6921
|
+
"name": "enable-animations",
|
|
6922
|
+
"value": { "type": "boolean | number", "default": "false" }
|
|
6923
|
+
}
|
|
6910
6924
|
],
|
|
6925
|
+
"events": [],
|
|
6911
6926
|
"js": {
|
|
6912
6927
|
"properties": [
|
|
6913
|
-
{ "name": "datasets", "type": "any[]" },
|
|
6914
|
-
{ "name": "labels", "type": "any[]" },
|
|
6915
|
-
{ "name": "myChart", "type": "Chart" }
|
|
6916
|
-
],
|
|
6917
|
-
"events": [
|
|
6918
6928
|
{
|
|
6919
|
-
"name": "
|
|
6920
|
-
"
|
|
6921
|
-
}
|
|
6922
|
-
|
|
6929
|
+
"name": "datasets",
|
|
6930
|
+
"type": "{ data: number[] }[] | undefined"
|
|
6931
|
+
},
|
|
6932
|
+
{ "name": "labels", "type": "string[] | undefined" },
|
|
6933
|
+
{ "name": "enableAnimations", "type": "boolean | number" }
|
|
6934
|
+
],
|
|
6935
|
+
"events": []
|
|
6923
6936
|
}
|
|
6924
6937
|
},
|
|
6925
6938
|
{
|
|
@@ -8466,6 +8479,10 @@
|
|
|
8466
8479
|
"default": "'text'"
|
|
8467
8480
|
}
|
|
8468
8481
|
},
|
|
8482
|
+
{
|
|
8483
|
+
"name": "textarea-rows",
|
|
8484
|
+
"value": { "type": "number | undefined" }
|
|
8485
|
+
},
|
|
8469
8486
|
{
|
|
8470
8487
|
"name": "grouped",
|
|
8471
8488
|
"description": "When true, hides the individual language navbar and defers language control to a parent zn-translation-group.",
|
|
@@ -8496,6 +8513,7 @@
|
|
|
8496
8513
|
"name": "inputType",
|
|
8497
8514
|
"type": "'select' | 'text' | 'number' | 'textarea'"
|
|
8498
8515
|
},
|
|
8516
|
+
{ "name": "textareaRows", "type": "number | undefined" },
|
|
8499
8517
|
{
|
|
8500
8518
|
"name": "grouped",
|
|
8501
8519
|
"description": "When true, hides the individual language navbar and defers language control to a parent zn-translation-group.",
|
package/dist/zn.d.ts
CHANGED
|
@@ -3400,43 +3400,83 @@ declare module "components/tile-property/index" {
|
|
|
3400
3400
|
}
|
|
3401
3401
|
}
|
|
3402
3402
|
}
|
|
3403
|
+
declare module "components/chart/builders" {
|
|
3404
|
+
import type { EChartsOption } from 'echarts';
|
|
3405
|
+
export type ChartType = 'area' | 'bar' | 'line' | 'sankey';
|
|
3406
|
+
export interface SeriesItem {
|
|
3407
|
+
name: string;
|
|
3408
|
+
data: any[];
|
|
3409
|
+
color?: string;
|
|
3410
|
+
}
|
|
3411
|
+
export interface SankeyEdge {
|
|
3412
|
+
source: string;
|
|
3413
|
+
target: string;
|
|
3414
|
+
value: number;
|
|
3415
|
+
}
|
|
3416
|
+
export interface BuilderProps {
|
|
3417
|
+
type: ChartType;
|
|
3418
|
+
data: SeriesItem[];
|
|
3419
|
+
categories: string[];
|
|
3420
|
+
xAxisType?: 'datetime' | 'category' | 'numeric';
|
|
3421
|
+
yAxisAppend?: string;
|
|
3422
|
+
stacked: boolean;
|
|
3423
|
+
enableAnimations: boolean | number;
|
|
3424
|
+
datapointSize: number;
|
|
3425
|
+
colors?: string[];
|
|
3426
|
+
theme: 'light' | 'dark';
|
|
3427
|
+
smooth?: boolean;
|
|
3428
|
+
scale?: boolean | number;
|
|
3429
|
+
textColor?: string;
|
|
3430
|
+
borderColor?: string;
|
|
3431
|
+
}
|
|
3432
|
+
export function buildBarOption(props: BuilderProps): EChartsOption;
|
|
3433
|
+
export function buildLineOption(props: BuilderProps): EChartsOption;
|
|
3434
|
+
export function buildAreaOption(props: BuilderProps): EChartsOption;
|
|
3435
|
+
export function buildSankeyOption(props: BuilderProps): EChartsOption;
|
|
3436
|
+
}
|
|
3403
3437
|
declare module "components/chart/chart.component" {
|
|
3438
|
+
import { type ChartType, type SeriesItem } from "components/chart/builders";
|
|
3404
3439
|
import { type CSSResultGroup, type PropertyValues } from 'lit';
|
|
3405
3440
|
import ZincElement from "internal/zinc-element";
|
|
3406
3441
|
/**
|
|
3407
|
-
* @summary
|
|
3442
|
+
* @summary Chart component powered by Apache ECharts.
|
|
3408
3443
|
* @documentation https://zinc.style/components/data-chart
|
|
3409
3444
|
* @status experimental
|
|
3410
3445
|
* @since 1.0
|
|
3411
3446
|
*
|
|
3412
|
-
* @dependency zn-example
|
|
3413
|
-
*
|
|
3414
|
-
* @event zn-event-name - Emitted as an example.
|
|
3415
|
-
*
|
|
3416
|
-
* @slot - The default slot.
|
|
3417
|
-
* @slot example - An example slot.
|
|
3418
|
-
*
|
|
3419
3447
|
* @csspart base - The component's base wrapper.
|
|
3420
|
-
*
|
|
3421
|
-
* @cssproperty --example - An example CSS custom property.
|
|
3422
3448
|
*/
|
|
3423
3449
|
export default class ZnChart extends ZincElement {
|
|
3424
3450
|
static styles: CSSResultGroup;
|
|
3425
|
-
type:
|
|
3426
|
-
data:
|
|
3427
|
-
categories: string
|
|
3428
|
-
xAxis:
|
|
3451
|
+
type: ChartType;
|
|
3452
|
+
data: SeriesItem[];
|
|
3453
|
+
categories: string[];
|
|
3454
|
+
xAxis: 'datetime' | 'category' | 'numeric';
|
|
3429
3455
|
datapointSize: number;
|
|
3430
3456
|
stacked: boolean;
|
|
3431
3457
|
live: boolean;
|
|
3432
3458
|
dataUrl: string;
|
|
3433
3459
|
liveInterval: number;
|
|
3434
3460
|
height: number;
|
|
3435
|
-
enableAnimations: boolean;
|
|
3461
|
+
enableAnimations: boolean | number;
|
|
3436
3462
|
yAxisAppend: string;
|
|
3437
|
-
|
|
3463
|
+
colors?: string[];
|
|
3464
|
+
syncGroup?: string;
|
|
3465
|
+
smooth: boolean;
|
|
3466
|
+
scale: boolean | number;
|
|
3467
|
+
private chart?;
|
|
3468
|
+
private resizeObserver?;
|
|
3469
|
+
private liveTimer?;
|
|
3438
3470
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
3471
|
+
private getTheme;
|
|
3472
|
+
private getTextColor;
|
|
3473
|
+
private getBorderColor;
|
|
3474
|
+
private buildOption;
|
|
3475
|
+
private initChart;
|
|
3476
|
+
private startLive;
|
|
3477
|
+
private reinit;
|
|
3439
3478
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
3479
|
+
disconnectedCallback(): void;
|
|
3440
3480
|
protected render(): unknown;
|
|
3441
3481
|
}
|
|
3442
3482
|
}
|
|
@@ -3452,32 +3492,24 @@ declare module "components/chart/index" {
|
|
|
3452
3492
|
}
|
|
3453
3493
|
declare module "components/simple-chart/simple-chart.component" {
|
|
3454
3494
|
import { type CSSResultGroup } from 'lit';
|
|
3455
|
-
import { Chart } from "chart.js";
|
|
3456
3495
|
import ZincElement from "internal/zinc-element";
|
|
3457
3496
|
/**
|
|
3458
|
-
* @summary
|
|
3497
|
+
* @summary A simple, pre-styled bar chart.
|
|
3459
3498
|
* @documentation https://zinc.style/components/simple-chart
|
|
3460
3499
|
* @status experimental
|
|
3461
3500
|
* @since 1.0
|
|
3462
|
-
*
|
|
3463
|
-
* @dependency zn-example
|
|
3464
|
-
*
|
|
3465
|
-
* @event zn-event-name - Emitted as an example.
|
|
3466
|
-
*
|
|
3467
|
-
* @slot - The default slot.
|
|
3468
|
-
* @slot example - An example slot.
|
|
3469
|
-
*
|
|
3470
|
-
* @csspart base - The component's base wrapper.
|
|
3471
|
-
*
|
|
3472
|
-
* @cssproperty --example - An example CSS custom property.
|
|
3473
3501
|
*/
|
|
3474
3502
|
export default class ZnSimpleChart extends ZincElement {
|
|
3475
3503
|
static styles: CSSResultGroup;
|
|
3476
|
-
datasets
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3504
|
+
datasets?: {
|
|
3505
|
+
data: number[];
|
|
3506
|
+
}[];
|
|
3507
|
+
labels?: string[];
|
|
3508
|
+
enableAnimations: boolean | number;
|
|
3509
|
+
private chart?;
|
|
3510
|
+
private resizeObserver?;
|
|
3480
3511
|
firstUpdated(): void;
|
|
3512
|
+
disconnectedCallback(): void;
|
|
3481
3513
|
render(): import("lit").TemplateResult<1>;
|
|
3482
3514
|
}
|
|
3483
3515
|
}
|
|
@@ -3769,6 +3801,7 @@ declare module "components/inline-edit/inline-edit.component" {
|
|
|
3769
3801
|
max: string | number;
|
|
3770
3802
|
step: number | 'any';
|
|
3771
3803
|
inputType: 'select' | 'text' | 'data-select' | 'number' | 'textarea';
|
|
3804
|
+
textareaRows: 1;
|
|
3772
3805
|
options: {
|
|
3773
3806
|
[key: string]: string;
|
|
3774
3807
|
};
|
|
@@ -6007,8 +6040,8 @@ declare module "components/radio/index" {
|
|
|
6007
6040
|
}
|
|
6008
6041
|
declare module "components/rating/rating.component" {
|
|
6009
6042
|
import { type CSSResultGroup } from 'lit';
|
|
6010
|
-
import type { ZincFormControl } from "internal/zinc-element";
|
|
6011
6043
|
import ZincElement from "internal/zinc-element";
|
|
6044
|
+
import type { ZincFormControl } from "internal/zinc-element";
|
|
6012
6045
|
/**
|
|
6013
6046
|
* @summary Short summary of the component's intended use.
|
|
6014
6047
|
* @documentation https://zinc.style/components/rating
|
|
@@ -7275,11 +7308,16 @@ declare module "components/translations/translations.component" {
|
|
|
7275
7308
|
required: boolean;
|
|
7276
7309
|
flush: boolean;
|
|
7277
7310
|
inputType: 'select' | 'text' | 'number' | 'textarea';
|
|
7311
|
+
textareaRows: number | undefined;
|
|
7278
7312
|
/** When true, hides the individual language navbar and defers language control to a parent zn-translation-group. */
|
|
7279
7313
|
grouped: boolean;
|
|
7280
7314
|
languages: Record<string, string>;
|
|
7281
7315
|
values: Record<string, string>;
|
|
7282
7316
|
private _activeLanguage;
|
|
7317
|
+
private _overflowIndex;
|
|
7318
|
+
private _resizeObserver?;
|
|
7319
|
+
private _lastObservedWidth;
|
|
7320
|
+
private _measureRafId;
|
|
7283
7321
|
get validity(): ValidityState;
|
|
7284
7322
|
get validationMessage(): string;
|
|
7285
7323
|
checkValidity(): boolean;
|
|
@@ -7294,9 +7332,15 @@ declare module "components/translations/translations.component" {
|
|
|
7294
7332
|
addLanguageKey(languageCode: string): void;
|
|
7295
7333
|
/** Returns all language codes that have values. */
|
|
7296
7334
|
getValueLanguages(): string[];
|
|
7335
|
+
connectedCallback(): void;
|
|
7336
|
+
disconnectedCallback(): void;
|
|
7297
7337
|
protected firstUpdated(): void;
|
|
7338
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
7339
|
+
private _scheduleLangOverflow;
|
|
7340
|
+
private _computeLangOverflow;
|
|
7298
7341
|
willUpdate(changedProperties: PropertyValues): void;
|
|
7299
7342
|
private handleLanguageAdd;
|
|
7343
|
+
private handleOverflowSelect;
|
|
7300
7344
|
private switchLanguage;
|
|
7301
7345
|
private handleValueUpdate;
|
|
7302
7346
|
private updateValue;
|
|
@@ -7488,8 +7532,16 @@ declare module "components/translation-group/translation-group.component" {
|
|
|
7488
7532
|
private _activeLanguage;
|
|
7489
7533
|
/** Tracks all language codes that have been activated across children. */
|
|
7490
7534
|
private _activatedLanguages;
|
|
7535
|
+
private _overflowIndex;
|
|
7536
|
+
private _resizeObserver?;
|
|
7537
|
+
private _lastObservedWidth;
|
|
7538
|
+
private _measureRafId;
|
|
7539
|
+
connectedCallback(): void;
|
|
7540
|
+
disconnectedCallback(): void;
|
|
7491
7541
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
7492
7542
|
protected updated(changedProperties: PropertyValues): void;
|
|
7543
|
+
private _scheduleLangOverflow;
|
|
7544
|
+
private _computeLangOverflow;
|
|
7493
7545
|
private getAllTranslations;
|
|
7494
7546
|
/** Sync grouped state, languages, and active language to all children. */
|
|
7495
7547
|
private syncChildren;
|
|
@@ -7497,6 +7549,7 @@ declare module "components/translation-group/translation-group.component" {
|
|
|
7497
7549
|
private handleSlotChange;
|
|
7498
7550
|
private switchLanguage;
|
|
7499
7551
|
private handleLanguageAdd;
|
|
7552
|
+
private handleOverflowSelect;
|
|
7500
7553
|
render(): import("lit").TemplateResult<1>;
|
|
7501
7554
|
}
|
|
7502
7555
|
}
|