@limetech/lime-elements 40.20.0 → 40.21.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.
- package/CHANGELOG.md +19 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-chart.cjs.entry.js +52 -28
- package/dist/cjs/limel-markdown.cjs.entry.js +2 -2
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{markdown-exporter-BWS2EBxq.js → markdown-exporter-CGNfjGr9.js} +80 -897
- package/dist/cjs/{markdown-parser-toAp9-Eq.js → markdown-parser-C14XF_G3.js} +994 -38
- package/dist/collection/components/chart/chart.css +27 -6
- package/dist/collection/components/chart/chart.js +29 -12
- package/dist/collection/components/chart/options.js +15 -19
- package/dist/collection/components/chart/scale.js +1 -1
- package/dist/collection/components/chart/theme.js +13 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-chart.entry.js +52 -28
- package/dist/esm/limel-markdown.entry.js +2 -2
- package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{markdown-exporter-B2vFxSLw.js → markdown-exporter-DcFcD699.js} +80 -897
- package/dist/esm/{markdown-parser-Cw8iW5R9.js → markdown-parser-8aHA9IYo.js} +991 -33
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-8514480b.entry.js → p-7d6a12fe.entry.js} +2 -2
- package/dist/lime-elements/{p-1d9bc526.entry.js → p-9edd79a8.entry.js} +1 -1
- package/dist/lime-elements/p-C9gctvIB.js +1 -0
- package/dist/lime-elements/{p-c2f993cc.entry.js → p-a891f3e8.entry.js} +1 -1
- package/dist/lime-elements/p-kiQd8Ntf.js +7 -0
- package/dist/types/components/chart/chart.d.ts +7 -3
- package/dist/types/components/chart/chart.types.d.ts +4 -1
- package/dist/types/components/chart/options.d.ts +4 -3
- package/dist/types/components/chart/scale.d.ts +8 -3
- package/dist/types/components/chart/theme.d.ts +2 -2
- package/dist/types/components.d.ts +12 -12
- package/package.json +3 -3
- package/dist/lime-elements/p-Bd37Vplf.js +0 -7
- package/dist/lime-elements/p-CvHpvp0f.js +0 -1
|
@@ -6,7 +6,7 @@ import { ChartItem, ChartType } from './chart.types';
|
|
|
6
6
|
* visual symbols such as such bars, dots, lines, or slices, represent
|
|
7
7
|
* each data point, in comparison to others.
|
|
8
8
|
*
|
|
9
|
-
* @exampleComponent limel-example-chart-
|
|
9
|
+
* @exampleComponent limel-example-chart-type-proportion-bar
|
|
10
10
|
* @exampleComponent limel-example-chart-orientation
|
|
11
11
|
* @exampleComponent limel-example-chart-max-value
|
|
12
12
|
* @exampleComponent limel-example-chart-display-item-percentage
|
|
@@ -77,7 +77,7 @@ export declare class Chart {
|
|
|
77
77
|
* Set to `false` to hide the percentage in item tooltips.
|
|
78
78
|
* The percentage is an item's value or range extent as a share of the
|
|
79
79
|
* whole. The whole is `maxValue` when set and the combined items otherwise.
|
|
80
|
-
* Applies to `
|
|
80
|
+
* Applies to `proportion-bar`, `pie`, `doughnut`, and `ring` charts.
|
|
81
81
|
*/
|
|
82
82
|
displayItemPercentage: boolean;
|
|
83
83
|
/**
|
|
@@ -87,6 +87,8 @@ export declare class Chart {
|
|
|
87
87
|
items: ChartItem[];
|
|
88
88
|
/**
|
|
89
89
|
* Defines how items are visualized in the chart.
|
|
90
|
+
* `stacked-bar` is the old name of `proportion-bar`. It still works, but
|
|
91
|
+
* logs a warning.
|
|
90
92
|
*/
|
|
91
93
|
type?: ChartType;
|
|
92
94
|
/**
|
|
@@ -96,7 +98,7 @@ export declare class Chart {
|
|
|
96
98
|
orientation?: 'landscape' | 'portrait';
|
|
97
99
|
/**
|
|
98
100
|
* Sets the value used to scale item values.
|
|
99
|
-
* For `
|
|
101
|
+
* For `proportion-bar`, `pie`, `doughnut`, and `ring`, it is the denominator
|
|
100
102
|
* used as the whole. It defaults to the combined item values or range
|
|
101
103
|
* extents. The combined size can exceed `maxValue` and produce a total
|
|
102
104
|
* above 100%.
|
|
@@ -143,6 +145,8 @@ export declare class Chart {
|
|
|
143
145
|
componentDidRender(): void;
|
|
144
146
|
disconnectedCallback(): void;
|
|
145
147
|
protected warnAboutAxisIncrement(): void;
|
|
148
|
+
protected warnAboutOldTypeName(): void;
|
|
149
|
+
private get chartType();
|
|
146
150
|
private getAxisIncrementWarning;
|
|
147
151
|
render(): any;
|
|
148
152
|
private renderCaption;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Color } from '../../global/shared-types/color.types';
|
|
2
2
|
/**
|
|
3
3
|
* The kinds of chart that `limel-chart` can draw.
|
|
4
|
+
*
|
|
5
|
+
* `stacked-bar` is the old name of `proportion-bar`. It still works, but
|
|
6
|
+
* logs a warning.
|
|
4
7
|
* @beta
|
|
5
8
|
*/
|
|
6
|
-
export type ChartType = 'area' | 'bar' | 'doughnut' | 'line' | 'nps' | 'pie' | 'ring' | 'dot' | 'scatter' | 'stacked-bar';
|
|
9
|
+
export type ChartType = 'area' | 'bar' | 'doughnut' | 'line' | 'nps' | 'pie' | 'ring' | 'dot' | 'scatter' | 'proportion-bar' | 'stacked-bar';
|
|
7
10
|
/**
|
|
8
11
|
* Chart component props.
|
|
9
12
|
* @beta
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { BarSeriesOption, GaugeSeriesOption, LineSeriesOption, PieSeriesOption, ScatterSeriesOption } from 'echarts/charts';
|
|
2
2
|
import type { GridComponentOption, PolarComponentOption, TooltipComponentOption } from 'echarts/components';
|
|
3
3
|
import { type ComposeOption } from 'echarts/core';
|
|
4
|
-
import { ChartItem
|
|
4
|
+
import { ChartItem } from './chart.types';
|
|
5
|
+
import { DrawnChartType } from './scale';
|
|
5
6
|
import { ChartTheme } from './theme';
|
|
6
7
|
type SeriesOption = BarSeriesOption | GaugeSeriesOption | LineSeriesOption | PieSeriesOption | ScatterSeriesOption;
|
|
7
8
|
export type ChartOption = ComposeOption<SeriesOption | GridComponentOption | PolarComponentOption | TooltipComponentOption>;
|
|
@@ -11,7 +12,7 @@ export type ChartOption = ComposeOption<SeriesOption | GridComponentOption | Pol
|
|
|
11
12
|
export interface ChartSettings {
|
|
12
13
|
/** The items, each with its color resolved by the theme. */
|
|
13
14
|
items: ChartItem[];
|
|
14
|
-
type:
|
|
15
|
+
type: DrawnChartType;
|
|
15
16
|
orientation: 'landscape' | 'portrait';
|
|
16
17
|
maxValue?: number;
|
|
17
18
|
axisIncrement?: number;
|
|
@@ -31,7 +32,7 @@ export interface ChartDrawing {
|
|
|
31
32
|
option: ChartOption;
|
|
32
33
|
/** The series that draws the items, when they are not series of their own. */
|
|
33
34
|
seriesIndex: number;
|
|
34
|
-
/** Whether every item is a series of its own, as in a
|
|
35
|
+
/** Whether every item is a series of its own, as in a proportion bar. */
|
|
35
36
|
itemsAreSeries: boolean;
|
|
36
37
|
/** The axis that shows the texts of the items, when they are shown on one. */
|
|
37
38
|
itemTextAxis?: 'xAxis' | 'yAxis';
|
|
@@ -3,6 +3,11 @@ import { ChartItem, ChartType } from './chart.types';
|
|
|
3
3
|
* The most steps that an `axisIncrement` may divide a value axis into.
|
|
4
4
|
*/
|
|
5
5
|
export declare const MAX_AXIS_STEPS = 100;
|
|
6
|
+
/**
|
|
7
|
+
* The chart types that are drawn. `stacked-bar` is only an old name, which
|
|
8
|
+
* `limel-chart` turns into `proportion-bar` before drawing.
|
|
9
|
+
*/
|
|
10
|
+
export type DrawnChartType = Exclude<ChartType, 'stacked-bar'>;
|
|
6
11
|
export interface AxisRange {
|
|
7
12
|
minValue: number;
|
|
8
13
|
maxValue: number;
|
|
@@ -14,13 +19,13 @@ export interface AxisRange {
|
|
|
14
19
|
* Whether the items of a chart of this type are parts of one whole.
|
|
15
20
|
* @param type - the chart type
|
|
16
21
|
*/
|
|
17
|
-
export declare function isPartOfWhole(type:
|
|
22
|
+
export declare function isPartOfWhole(type: DrawnChartType): boolean;
|
|
18
23
|
/**
|
|
19
24
|
* Whether a chart of this type draws its value axis in steps of
|
|
20
25
|
* `axisIncrement`.
|
|
21
26
|
* @param type - the chart type
|
|
22
27
|
*/
|
|
23
|
-
export declare function usesAxisIncrement(type:
|
|
28
|
+
export declare function usesAxisIncrement(type: DrawnChartType): boolean;
|
|
24
29
|
/**
|
|
25
30
|
* Whether the item has a `[start, end]` range, or an `[x, y]` point in a
|
|
26
31
|
* `scatter` chart, as its value.
|
|
@@ -97,5 +102,5 @@ export declare function getShare(item: ChartItem, whole: AxisRange): number;
|
|
|
97
102
|
* @param item - the item
|
|
98
103
|
* @param type - the chart type
|
|
99
104
|
*/
|
|
100
|
-
export declare function formatValue(item: ChartItem, type:
|
|
105
|
+
export declare function formatValue(item: ChartItem, type: DrawnChartType): string;
|
|
101
106
|
//# sourceMappingURL=scale.d.ts.map
|
|
@@ -12,8 +12,8 @@ export interface ChartTheme {
|
|
|
12
12
|
backgroundColor: string;
|
|
13
13
|
dividerColor: string;
|
|
14
14
|
surfaceColor: string;
|
|
15
|
-
/** In pixels. */
|
|
16
|
-
itemBorderRadius: number;
|
|
15
|
+
/** In pixels, clockwise from the top left corner. */
|
|
16
|
+
itemBorderRadius: [number, number, number, number];
|
|
17
17
|
/** In pixels. */
|
|
18
18
|
scatterItemSize: number;
|
|
19
19
|
fontFamily: string;
|
|
@@ -524,7 +524,7 @@ export namespace Components {
|
|
|
524
524
|
* A chart is a graphical representation of data, in which
|
|
525
525
|
* visual symbols such as such bars, dots, lines, or slices, represent
|
|
526
526
|
* each data point, in comparison to others.
|
|
527
|
-
* @exampleComponent limel-example-chart-
|
|
527
|
+
* @exampleComponent limel-example-chart-type-proportion-bar
|
|
528
528
|
* @exampleComponent limel-example-chart-orientation
|
|
529
529
|
* @exampleComponent limel-example-chart-max-value
|
|
530
530
|
* @exampleComponent limel-example-chart-display-item-percentage
|
|
@@ -572,7 +572,7 @@ export namespace Components {
|
|
|
572
572
|
*/
|
|
573
573
|
"displayAxisLabels": boolean;
|
|
574
574
|
/**
|
|
575
|
-
* Set to `false` to hide the percentage in item tooltips. The percentage is an item's value or range extent as a share of the whole. The whole is `maxValue` when set and the combined items otherwise. Applies to `
|
|
575
|
+
* Set to `false` to hide the percentage in item tooltips. The percentage is an item's value or range extent as a share of the whole. The whole is `maxValue` when set and the combined items otherwise. Applies to `proportion-bar`, `pie`, `doughnut`, and `ring` charts.
|
|
576
576
|
* @default true
|
|
577
577
|
*/
|
|
578
578
|
"displayItemPercentage": boolean;
|
|
@@ -601,7 +601,7 @@ export namespace Components {
|
|
|
601
601
|
*/
|
|
602
602
|
"loading": boolean;
|
|
603
603
|
/**
|
|
604
|
-
* Sets the value used to scale item values. For `
|
|
604
|
+
* Sets the value used to scale item values. For `proportion-bar`, `pie`, `doughnut`, and `ring`, it is the denominator used as the whole. It defaults to the combined item values or range extents. The combined size can exceed `maxValue` and produce a total above 100%. For `bar`, `dot`, `area`, and `line`, it is the requested upper bound. The chart can round that bound up to the next `axisIncrement`. Has no effect on `nps` or `scatter`.
|
|
605
605
|
*/
|
|
606
606
|
"maxValue"?: number;
|
|
607
607
|
/**
|
|
@@ -610,8 +610,8 @@ export namespace Components {
|
|
|
610
610
|
*/
|
|
611
611
|
"orientation"?: 'landscape' | 'portrait';
|
|
612
612
|
/**
|
|
613
|
-
* Defines how items are visualized in the chart.
|
|
614
|
-
* @default '
|
|
613
|
+
* Defines how items are visualized in the chart. `stacked-bar` is the old name of `proportion-bar`. It still works, but logs a warning.
|
|
614
|
+
* @default 'proportion-bar'
|
|
615
615
|
*/
|
|
616
616
|
"type"?: ChartType;
|
|
617
617
|
}
|
|
@@ -4985,7 +4985,7 @@ declare global {
|
|
|
4985
4985
|
* A chart is a graphical representation of data, in which
|
|
4986
4986
|
* visual symbols such as such bars, dots, lines, or slices, represent
|
|
4987
4987
|
* each data point, in comparison to others.
|
|
4988
|
-
* @exampleComponent limel-example-chart-
|
|
4988
|
+
* @exampleComponent limel-example-chart-type-proportion-bar
|
|
4989
4989
|
* @exampleComponent limel-example-chart-orientation
|
|
4990
4990
|
* @exampleComponent limel-example-chart-max-value
|
|
4991
4991
|
* @exampleComponent limel-example-chart-display-item-percentage
|
|
@@ -7758,7 +7758,7 @@ declare namespace LocalJSX {
|
|
|
7758
7758
|
* A chart is a graphical representation of data, in which
|
|
7759
7759
|
* visual symbols such as such bars, dots, lines, or slices, represent
|
|
7760
7760
|
* each data point, in comparison to others.
|
|
7761
|
-
* @exampleComponent limel-example-chart-
|
|
7761
|
+
* @exampleComponent limel-example-chart-type-proportion-bar
|
|
7762
7762
|
* @exampleComponent limel-example-chart-orientation
|
|
7763
7763
|
* @exampleComponent limel-example-chart-max-value
|
|
7764
7764
|
* @exampleComponent limel-example-chart-display-item-percentage
|
|
@@ -7806,7 +7806,7 @@ declare namespace LocalJSX {
|
|
|
7806
7806
|
*/
|
|
7807
7807
|
"displayAxisLabels"?: boolean;
|
|
7808
7808
|
/**
|
|
7809
|
-
* Set to `false` to hide the percentage in item tooltips. The percentage is an item's value or range extent as a share of the whole. The whole is `maxValue` when set and the combined items otherwise. Applies to `
|
|
7809
|
+
* Set to `false` to hide the percentage in item tooltips. The percentage is an item's value or range extent as a share of the whole. The whole is `maxValue` when set and the combined items otherwise. Applies to `proportion-bar`, `pie`, `doughnut`, and `ring` charts.
|
|
7810
7810
|
* @default true
|
|
7811
7811
|
*/
|
|
7812
7812
|
"displayItemPercentage"?: boolean;
|
|
@@ -7835,7 +7835,7 @@ declare namespace LocalJSX {
|
|
|
7835
7835
|
*/
|
|
7836
7836
|
"loading"?: boolean;
|
|
7837
7837
|
/**
|
|
7838
|
-
* Sets the value used to scale item values. For `
|
|
7838
|
+
* Sets the value used to scale item values. For `proportion-bar`, `pie`, `doughnut`, and `ring`, it is the denominator used as the whole. It defaults to the combined item values or range extents. The combined size can exceed `maxValue` and produce a total above 100%. For `bar`, `dot`, `area`, and `line`, it is the requested upper bound. The chart can round that bound up to the next `axisIncrement`. Has no effect on `nps` or `scatter`.
|
|
7839
7839
|
*/
|
|
7840
7840
|
"maxValue"?: number;
|
|
7841
7841
|
/**
|
|
@@ -7848,8 +7848,8 @@ declare namespace LocalJSX {
|
|
|
7848
7848
|
*/
|
|
7849
7849
|
"orientation"?: 'landscape' | 'portrait';
|
|
7850
7850
|
/**
|
|
7851
|
-
* Defines how items are visualized in the chart.
|
|
7852
|
-
* @default '
|
|
7851
|
+
* Defines how items are visualized in the chart. `stacked-bar` is the old name of `proportion-bar`. It still works, but logs a warning.
|
|
7852
|
+
* @default 'proportion-bar'
|
|
7853
7853
|
*/
|
|
7854
7854
|
"type"?: ChartType;
|
|
7855
7855
|
}
|
|
@@ -12965,7 +12965,7 @@ declare module "@stencil/core" {
|
|
|
12965
12965
|
* A chart is a graphical representation of data, in which
|
|
12966
12966
|
* visual symbols such as such bars, dots, lines, or slices, represent
|
|
12967
12967
|
* each data point, in comparison to others.
|
|
12968
|
-
* @exampleComponent limel-example-chart-
|
|
12968
|
+
* @exampleComponent limel-example-chart-type-proportion-bar
|
|
12969
12969
|
* @exampleComponent limel-example-chart-orientation
|
|
12970
12970
|
* @exampleComponent limel-example-chart-max-value
|
|
12971
12971
|
* @exampleComponent limel-example-chart-display-item-percentage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-elements",
|
|
3
|
-
"version": "40.
|
|
3
|
+
"version": "40.21.0",
|
|
4
4
|
"description": "Lime Elements",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@commitlint/cli": "^21.2.4",
|
|
56
56
|
"@commitlint/config-conventional": "^21.2.4",
|
|
57
57
|
"@limetech/eslint-config": "^5.0.3",
|
|
58
|
-
"@microsoft/api-extractor": "^7.
|
|
58
|
+
"@microsoft/api-extractor": "^7.60.0",
|
|
59
59
|
"@playwright/test": "1.64.1",
|
|
60
60
|
"@popperjs/core": "^2.11.8",
|
|
61
61
|
"@rjsf/core": "^6.11.0",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"kompendium": "npm:@limetech/kompendium@^1.4.1",
|
|
90
90
|
"lodash-es": "^4.17.23",
|
|
91
91
|
"material-components-web": "^13.0.0",
|
|
92
|
-
"mdast-util-to-markdown": "^2.2.
|
|
92
|
+
"mdast-util-to-markdown": "^2.2.1",
|
|
93
93
|
"moment": "^2.31.0",
|
|
94
94
|
"morphdom": "^2.7.8",
|
|
95
95
|
"number-abbreviate": "^2.0.0",
|