@cloudscape-design/chart-components 1.0.163 → 1.0.164
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/core/chart-api/chart-extra-pointer.d.ts +3 -2
- package/core/chart-api/chart-extra-pointer.js +15 -6
- package/core/chart-api/chart-extra-pointer.js.map +1 -1
- package/core/chart-api/chart-extra-zoom.d.ts +58 -1
- package/core/chart-api/chart-extra-zoom.js +451 -23
- package/core/chart-api/chart-extra-zoom.js.map +1 -1
- package/core/chart-api/index.d.ts +11 -2
- package/core/chart-api/index.js +25 -9
- package/core/chart-api/index.js.map +1 -1
- package/core/chart-core.js +11 -5
- package/core/chart-core.js.map +1 -1
- package/core/chart-zoom/zoom-state-machine.d.ts +65 -0
- package/core/chart-zoom/zoom-state-machine.js +77 -0
- package/core/chart-zoom/zoom-state-machine.js.map +1 -0
- package/core/chart-zoom/zoom-utils.d.ts +8 -0
- package/core/chart-zoom/zoom-utils.js +47 -0
- package/core/chart-zoom/zoom-utils.js.map +1 -0
- package/core/components/{core-zoom.d.ts → core-zoom-controls.d.ts} +0 -3
- package/core/components/core-zoom-controls.js +30 -0
- package/core/components/core-zoom-controls.js.map +1 -0
- package/core/components/core-zoom-cursor.d.ts +7 -0
- package/core/components/core-zoom-cursor.js +10 -0
- package/core/components/core-zoom-cursor.js.map +1 -0
- package/core/components/core-zoom-live-region.d.ts +4 -0
- package/core/components/core-zoom-live-region.js +11 -0
- package/core/components/core-zoom-live-region.js.map +1 -0
- package/core/i18n-utils.d.ts +8 -0
- package/core/i18n-utils.js +15 -4
- package/core/i18n-utils.js.map +1 -1
- package/core/styles.css.js +24 -22
- package/core/styles.scoped.css +62 -22
- package/core/styles.selectors.js +24 -22
- package/core/test-classes/styles.css.js +38 -33
- package/core/test-classes/styles.scoped.css +38 -33
- package/core/test-classes/styles.selectors.js +38 -33
- package/core/utils.d.ts +1 -0
- package/core/utils.js +6 -0
- package/core/utils.js.map +1 -1
- package/internal/chart-styles.d.ts +12 -0
- package/internal/chart-styles.js +13 -1
- package/internal/chart-styles.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/core/components/core-zoom.js +0 -20
- package/core/components/core-zoom.js.map +0 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { MIN_ZOOM_POINTS } from "./zoom-utils";
|
|
4
|
+
export const INACTIVE_ZOOM_STATE = { type: "inactive" };
|
|
5
|
+
export function zoomReducer(state, event, { valuesCount }) {
|
|
6
|
+
if (state.type === "inactive") {
|
|
7
|
+
return event.type === "enter" ? enter(state, valuesCount) : transition(state);
|
|
8
|
+
}
|
|
9
|
+
switch (event.type) {
|
|
10
|
+
case "cancel":
|
|
11
|
+
return cancel(event.reason);
|
|
12
|
+
case "move":
|
|
13
|
+
return move(state, event.index, valuesCount);
|
|
14
|
+
case "commit":
|
|
15
|
+
return commit(state);
|
|
16
|
+
case "rendered":
|
|
17
|
+
return rendered(state, event.stopMapper, valuesCount);
|
|
18
|
+
default:
|
|
19
|
+
return transition(state);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function enter(state, valuesCount) {
|
|
23
|
+
if (!canZoomInto(valuesCount)) {
|
|
24
|
+
return transition(state);
|
|
25
|
+
}
|
|
26
|
+
return transition({ type: "pendingFirstInput", cursorIndex: 0 }, [
|
|
27
|
+
{ type: "announce", announcement: { type: "zoomModeEntered", index: 0 } },
|
|
28
|
+
{ type: "focus", target: "cursor" },
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
// Focus returns to the Zoom button, unless the user left zoom mode by moving the focus away.
|
|
32
|
+
function cancel(reason) {
|
|
33
|
+
const effects = [{ type: "announce", announcement: { type: "zoomModeExited" } }];
|
|
34
|
+
if (reason !== "blur") {
|
|
35
|
+
effects.push({ type: "focus", target: "zoomButton" });
|
|
36
|
+
}
|
|
37
|
+
return transition(INACTIVE_ZOOM_STATE, effects);
|
|
38
|
+
}
|
|
39
|
+
function move(state, index, valuesCount) {
|
|
40
|
+
const cursorIndex = Math.min(Math.max(index, 0), valuesCount - 1);
|
|
41
|
+
return transition(cursorIndex === state.cursorIndex ? state : { ...state, cursorIndex });
|
|
42
|
+
}
|
|
43
|
+
function commit(state) {
|
|
44
|
+
if (state.type === "pendingFirstInput") {
|
|
45
|
+
return transition({ type: "pendingSecondInput", startIndex: state.cursorIndex, cursorIndex: state.cursorIndex }, [
|
|
46
|
+
{ type: "announce", announcement: { type: "startPointSet", index: state.cursorIndex } },
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
if (Math.abs(state.cursorIndex - state.startIndex) + 1 < MIN_ZOOM_POINTS) {
|
|
50
|
+
return transition(state, [{ type: "announce", announcement: { type: "startPointSet", index: state.startIndex } }]);
|
|
51
|
+
}
|
|
52
|
+
return transition(INACTIVE_ZOOM_STATE, [
|
|
53
|
+
{ type: "applyZoom", fromIndex: state.startIndex, toIndex: state.cursorIndex },
|
|
54
|
+
{ type: "focus", target: "resetButton" },
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
function rendered(state, stopMapper, valuesCount) {
|
|
58
|
+
if (valuesCount === 0) {
|
|
59
|
+
return cancel("noStops");
|
|
60
|
+
}
|
|
61
|
+
const cursorIndex = stopMapper.nearest(state.cursorIndex);
|
|
62
|
+
const startIndex = state.type === "pendingSecondInput" ? stopMapper.exact(state.startIndex) : null;
|
|
63
|
+
return transition(startIndex === null
|
|
64
|
+
? { type: "pendingFirstInput", cursorIndex }
|
|
65
|
+
: { type: "pendingSecondInput", startIndex, cursorIndex });
|
|
66
|
+
}
|
|
67
|
+
function transition(state, effects = NO_EFFECTS) {
|
|
68
|
+
return { state, effects };
|
|
69
|
+
}
|
|
70
|
+
const NO_EFFECTS = [];
|
|
71
|
+
export function canZoomInto(valuesCount) {
|
|
72
|
+
return valuesCount > MIN_ZOOM_POINTS;
|
|
73
|
+
}
|
|
74
|
+
export function isZooming(state) {
|
|
75
|
+
return state.type !== "inactive";
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=zoom-state-machine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom-state-machine.js","sourceRoot":"","sources":["../../../../src/core/chart-zoom/zoom-state-machine.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAmB/C,MAAM,CAAC,MAAM,mBAAmB,GAAc,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAqCnE,MAAM,UAAU,WAAW,CAAC,KAAgB,EAAE,KAAgB,EAAE,EAAE,WAAW,EAAe;IAC1F,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAChF,CAAC;IACD,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC9B,KAAK,MAAM;YACT,OAAO,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAC/C,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,KAAK,UAAU;YACb,OAAO,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QACxD;YACE,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC;AAED,SAAS,KAAK,CAAC,KAAoB,EAAE,WAAmB;IACtD,IAAI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jB,CAAC,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE;QAC5C,CAAC,CAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,UAAU,EAAE,WAAW,EAAE,CAC5D,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,KAAgB,EAAE,UAAiC,UAAU;IAC/E,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,GAA0B,EAAE,CAAC;AAE7C,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,OAAO,WAAW,GAAG,eAAe,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAgB;IACxC,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACnC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { MIN_ZOOM_POINTS } from \"./zoom-utils\";\n\ninterface InactiveState {\n type: \"inactive\";\n}\n\ninterface PendingFirstInputState {\n type: \"pendingFirstInput\";\n cursorIndex: number;\n}\n\ninterface PendingSecondInputState {\n type: \"pendingSecondInput\";\n startIndex: number;\n cursorIndex: number;\n}\n\nexport type ZoomState = InactiveState | PendingFirstInputState | PendingSecondInputState;\n\nexport const INACTIVE_ZOOM_STATE: ZoomState = { type: \"inactive\" };\n\nexport type ZoomEvent =\n | { type: \"enter\" }\n | { type: \"cancel\"; reason: ZoomCancelReason }\n | { type: \"move\"; index: number }\n | { type: \"commit\" }\n | { type: \"rendered\"; stopMapper: ZoomStopMapper };\n\nexport interface ZoomStopMapper {\n nearest(index: number): number;\n exact(index: number): null | number;\n}\n\nexport type ZoomCancelReason = \"escape\" | \"toggle\" | \"blur\" | \"noStops\";\n\nexport type ZoomFocusTarget = \"cursor\" | \"zoomButton\" | \"resetButton\";\n\nexport type ZoomAnnouncement =\n | { type: \"zoomModeEntered\"; index: number }\n | { type: \"startPointSet\"; index: number }\n | { type: \"zoomModeExited\" };\n\nexport type ZoomEffect =\n | { type: \"announce\"; announcement: ZoomAnnouncement }\n | { type: \"focus\"; target: ZoomFocusTarget }\n | { type: \"applyZoom\"; fromIndex: number; toIndex: number };\n\nexport interface ZoomTransition {\n state: ZoomState;\n effects: readonly ZoomEffect[];\n}\n\nexport interface ZoomContext {\n valuesCount: number;\n}\n\nexport function zoomReducer(state: ZoomState, event: ZoomEvent, { valuesCount }: ZoomContext): ZoomTransition {\n if (state.type === \"inactive\") {\n return event.type === \"enter\" ? enter(state, valuesCount) : transition(state);\n }\n switch (event.type) {\n case \"cancel\":\n return cancel(event.reason);\n case \"move\":\n return move(state, event.index, valuesCount);\n case \"commit\":\n return commit(state);\n case \"rendered\":\n return rendered(state, event.stopMapper, valuesCount);\n default:\n return transition(state);\n }\n}\n\nfunction enter(state: InactiveState, valuesCount: number): ZoomTransition {\n if (!canZoomInto(valuesCount)) {\n return transition(state);\n }\n return transition({ type: \"pendingFirstInput\", cursorIndex: 0 }, [\n { type: \"announce\", announcement: { type: \"zoomModeEntered\", index: 0 } },\n { type: \"focus\", target: \"cursor\" },\n ]);\n}\n\n// Focus returns to the Zoom button, unless the user left zoom mode by moving the focus away.\nfunction cancel(reason: ZoomCancelReason): ZoomTransition {\n const effects: ZoomEffect[] = [{ type: \"announce\", announcement: { type: \"zoomModeExited\" } }];\n if (reason !== \"blur\") {\n effects.push({ type: \"focus\", target: \"zoomButton\" });\n }\n return transition(INACTIVE_ZOOM_STATE, effects);\n}\n\nfunction move(\n state: PendingFirstInputState | PendingSecondInputState,\n index: number,\n valuesCount: number,\n): ZoomTransition {\n const cursorIndex = Math.min(Math.max(index, 0), valuesCount - 1);\n return transition(cursorIndex === state.cursorIndex ? state : { ...state, cursorIndex });\n}\n\nfunction commit(state: PendingFirstInputState | PendingSecondInputState): ZoomTransition {\n if (state.type === \"pendingFirstInput\") {\n return transition({ type: \"pendingSecondInput\", startIndex: state.cursorIndex, cursorIndex: state.cursorIndex }, [\n { type: \"announce\", announcement: { type: \"startPointSet\", index: state.cursorIndex } },\n ]);\n }\n if (Math.abs(state.cursorIndex - state.startIndex) + 1 < MIN_ZOOM_POINTS) {\n return transition(state, [{ type: \"announce\", announcement: { type: \"startPointSet\", index: state.startIndex } }]);\n }\n return transition(INACTIVE_ZOOM_STATE, [\n { type: \"applyZoom\", fromIndex: state.startIndex, toIndex: state.cursorIndex },\n { type: \"focus\", target: \"resetButton\" },\n ]);\n}\n\nfunction rendered(\n state: PendingFirstInputState | PendingSecondInputState,\n stopMapper: ZoomStopMapper,\n valuesCount: number,\n): ZoomTransition {\n if (valuesCount === 0) {\n return cancel(\"noStops\");\n }\n const cursorIndex = stopMapper.nearest(state.cursorIndex);\n const startIndex = state.type === \"pendingSecondInput\" ? stopMapper.exact(state.startIndex) : null;\n return transition(\n startIndex === null\n ? { type: \"pendingFirstInput\", cursorIndex }\n : { type: \"pendingSecondInput\", startIndex, cursorIndex },\n );\n}\n\nfunction transition(state: ZoomState, effects: readonly ZoomEffect[] = NO_EFFECTS): ZoomTransition {\n return { state, effects };\n}\n\nconst NO_EFFECTS: readonly ZoomEffect[] = [];\n\nexport function canZoomInto(valuesCount: number): boolean {\n return valuesCount > MIN_ZOOM_POINTS;\n}\n\nexport function isZooming(state: ZoomState): boolean {\n return state.type !== \"inactive\";\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type Highcharts from "highcharts";
|
|
2
|
+
import type { ChartExtraContext } from "../chart-api/chart-extra-context";
|
|
3
|
+
import type { ZoomStopMapper } from "./zoom-state-machine";
|
|
4
|
+
export declare const MIN_ZOOM_POINTS = 2;
|
|
5
|
+
export declare function getCursorStops({ allX, getPointsByX }: Pick<ChartExtraContext.DerivedState, "allX" | "getPointsByX">, xAxis: null | Highcharts.Axis): number[];
|
|
6
|
+
export declare function findNearestIndex(values: readonly number[], target: number): number;
|
|
7
|
+
export declare function getPageStep(valuesCount: number): number;
|
|
8
|
+
export declare function createStopMapper(previous: readonly number[], current: readonly number[]): ZoomStopMapper;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { isXThreshold, isYThreshold } from "../utils";
|
|
4
|
+
export const MIN_ZOOM_POINTS = 2;
|
|
5
|
+
function isZoomableSeries(series) {
|
|
6
|
+
return series.type !== "errorbar" && !isXThreshold(series) && !isYThreshold(series);
|
|
7
|
+
}
|
|
8
|
+
export function getCursorStops({ allX, getPointsByX }, xAxis) {
|
|
9
|
+
if (!xAxis) {
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
return allX.filter((x) => getPointsByX(x).some((point) => point.series.xAxis === xAxis && isZoomableSeries(point.series)));
|
|
13
|
+
}
|
|
14
|
+
export function findNearestIndex(values, target) {
|
|
15
|
+
if (values.length === 0) {
|
|
16
|
+
return -1;
|
|
17
|
+
}
|
|
18
|
+
let lo = 0;
|
|
19
|
+
let hi = values.length - 1;
|
|
20
|
+
while (lo < hi) {
|
|
21
|
+
const mid = (lo + hi) >> 1;
|
|
22
|
+
if (values[mid] < target) {
|
|
23
|
+
lo = mid + 1;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
hi = mid;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (lo > 0 && Math.abs(values[lo - 1] - target) <= Math.abs(values[lo] - target)) {
|
|
30
|
+
return lo - 1;
|
|
31
|
+
}
|
|
32
|
+
return lo;
|
|
33
|
+
}
|
|
34
|
+
export function getPageStep(valuesCount) {
|
|
35
|
+
return Math.max(1, Math.floor(valuesCount / 10));
|
|
36
|
+
}
|
|
37
|
+
export function createStopMapper(previous, current) {
|
|
38
|
+
const nearest = (index) => findNearestIndex(current, previous[index]);
|
|
39
|
+
return {
|
|
40
|
+
nearest,
|
|
41
|
+
exact: (index) => {
|
|
42
|
+
const currentIndex = nearest(index);
|
|
43
|
+
return current[currentIndex] === previous[index] ? currentIndex : null;
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=zoom-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom-utils.js","sourceRoot":"","sources":["../../../../src/core/chart-zoom/zoom-utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAKtC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGtD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAEjC,SAAS,gBAAgB,CAAC,MAAyB;IACjD,OAAO,MAAM,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACtF,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,EAAE,IAAI,EAAE,YAAY,EAAiE,EACrF,KAA6B;IAE7B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACvB,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,IAAI,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAChG,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,MAAyB,EAAE,MAAc;IACxE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;IACD,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,IAAI,EAAE,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3B,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,CAAC;YACzB,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;QACf,CAAC;aAAM,CAAC;YACN,EAAE,GAAG,GAAG,CAAC;QACX,CAAC;IACH,CAAC;IACD,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC;QACjF,OAAO,EAAE,GAAG,CAAC,CAAC;IAChB,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,WAAmB;IAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,QAA2B,EAAE,OAA0B;IACtF,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9E,OAAO;QACL,OAAO;QACP,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;YACf,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;YACpC,OAAO,OAAO,CAAC,YAAY,CAAC,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;QACzE,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type Highcharts from \"highcharts\";\n\nimport type { ChartExtraContext } from \"../chart-api/chart-extra-context\";\nimport { isXThreshold, isYThreshold } from \"../utils\";\nimport type { ZoomStopMapper } from \"./zoom-state-machine\";\n\nexport const MIN_ZOOM_POINTS = 2;\n\nfunction isZoomableSeries(series: Highcharts.Series) {\n return series.type !== \"errorbar\" && !isXThreshold(series) && !isYThreshold(series);\n}\n\nexport function getCursorStops(\n { allX, getPointsByX }: Pick<ChartExtraContext.DerivedState, \"allX\" | \"getPointsByX\">,\n xAxis: null | Highcharts.Axis,\n): number[] {\n if (!xAxis) {\n return [];\n }\n return allX.filter((x) =>\n getPointsByX(x).some((point) => point.series.xAxis === xAxis && isZoomableSeries(point.series)),\n );\n}\n\nexport function findNearestIndex(values: readonly number[], target: number): number {\n if (values.length === 0) {\n return -1;\n }\n let lo = 0;\n let hi = values.length - 1;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n if (values[mid] < target) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n if (lo > 0 && Math.abs(values[lo - 1] - target) <= Math.abs(values[lo] - target)) {\n return lo - 1;\n }\n return lo;\n}\n\nexport function getPageStep(valuesCount: number): number {\n return Math.max(1, Math.floor(valuesCount / 10));\n}\n\nexport function createStopMapper(previous: readonly number[], current: readonly number[]): ZoomStopMapper {\n const nearest = (index: number) => findNearestIndex(current, previous[index]);\n return {\n nearest,\n exact: (index) => {\n const currentIndex = nearest(index);\n return current[currentIndex] === previous[index] ? currentIndex : null;\n },\n };\n}\n"]}
|
|
@@ -3,7 +3,4 @@ import { ChartLabels } from "../i18n-utils";
|
|
|
3
3
|
export declare function ChartZoomControls({ api, labels }: {
|
|
4
4
|
api: ChartAPI;
|
|
5
5
|
labels: ChartLabels;
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export declare function ChartZoomLiveRegion({ api }: {
|
|
8
|
-
api: ChartAPI;
|
|
9
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import Button from "@cloudscape-design/components/button";
|
|
5
|
+
import ToggleButton from "@cloudscape-design/components/toggle-button";
|
|
6
|
+
import { useSelector } from "../../internal/utils/async-store";
|
|
7
|
+
import styles from "../styles.css.js";
|
|
8
|
+
import testClasses from "../test-classes/styles.css.js";
|
|
9
|
+
export function ChartZoomControls({ api, labels }) {
|
|
10
|
+
const zooming = useSelector(api.zoomStore, (s) => s.zooming);
|
|
11
|
+
const zoomed = useSelector(api.zoomStore, (s) => s.zoomed);
|
|
12
|
+
const canZoom = useSelector(api.zoomStore, (s) => s.canZoom);
|
|
13
|
+
return (_jsxs("div", { ref: api.setZoomControls, role: "region", "aria-label": labels.zoomControlsAriaLabel, className: styles["chart-zoom-controls"], onBlur: api.onZoomBlur, children: [_jsx("div", { hidden: !zoomed || zooming, children: _jsx(Button, { nativeButtonAttributes: {
|
|
14
|
+
ref: (button) => {
|
|
15
|
+
if (button) {
|
|
16
|
+
api.setResetZoomButton({
|
|
17
|
+
focus: () => {
|
|
18
|
+
button.parentElement.hidden = false;
|
|
19
|
+
button.focus();
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
api.setResetZoomButton(null);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
}, variant: "link", formAction: "none", onClick: api.resetZoom, ariaLabel: labels.resetZoomButtonAriaLabel, className: testClasses["reset-zoom-button"], children: labels.resetZoomButtonText }) }), _jsx(ToggleButton, { ref: api.setZoomButton, pressed: zooming, iconName: "zoom-in", pressedIconSvg: zoomModeIcon, disabled: !canZoom && !zooming, disabledReason: labels.zoomButtonDisabledReason, onChange: ({ detail }) => (detail.pressed ? api.enterZoomMode() : api.exitZoomMode()), className: zooming ? testClasses["exit-zoom-button"] : testClasses["zoom-button"], children: labels.enterZoomModeButtonText })] }));
|
|
28
|
+
}
|
|
29
|
+
const zoomModeIcon = (_jsxs("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", focusable: "false", children: [_jsx("path", { d: "M11 11L15 15" }), _jsx("path", { className: "filled no-stroke", d: "M7 1C10.3137 1 13 3.68629 13 7C13 10.3137 10.3137 13 7 13C3.68629 13 1 10.3137 1 7C1 3.68629 3.68629 1 7 1ZM6.25 4V6.25H4V7.75H6.25V10H7.75V7.75H10V6.25H7.75V4H6.25Z" }), _jsx("circle", { cx: "7", cy: "7", r: "6" })] }));
|
|
30
|
+
//# sourceMappingURL=core-zoom-controls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-zoom-controls.js","sourceRoot":"","sources":["../../../../src/core/components/core-zoom-controls.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,MAAM,MAAM,sCAAsC,CAAC;AAC1D,OAAO,YAAY,MAAM,6CAA6C,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAI/D,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,WAAW,MAAM,+BAA+B,CAAC;AAExD,MAAM,UAAU,iBAAiB,CAAC,EAAE,GAAG,EAAE,MAAM,EAA0C;IACvF,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC3D,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAE7D,O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rF,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,YAEhF,MAAM,CAAC,uBAAuB,GAClB,IACX,CACP,CAAC;AACJ,CAAC;AAED,MAAM,YAAY,GAAG,CACnB,eAAK,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,EAAC,SAAS,EAAC,OAAO,aAC3E,eAAM,CAAC,EAAC,cAAc,GAAG,EACzB,eACE,SAAS,EAAC,kBAAkB,EAC5B,CAAC,EAAC,uKAAuK,GACzK,EACF,iBAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,GAAG,IAC1B,CACP,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport Button from \"@cloudscape-design/components/button\";\nimport ToggleButton from \"@cloudscape-design/components/toggle-button\";\n\nimport { useSelector } from \"../../internal/utils/async-store\";\nimport { ChartAPI } from \"../chart-api\";\nimport { ChartLabels } from \"../i18n-utils\";\n\nimport styles from \"../styles.css.js\";\nimport testClasses from \"../test-classes/styles.css.js\";\n\nexport function ChartZoomControls({ api, labels }: { api: ChartAPI; labels: ChartLabels }) {\n const zooming = useSelector(api.zoomStore, (s) => s.zooming);\n const zoomed = useSelector(api.zoomStore, (s) => s.zoomed);\n const canZoom = useSelector(api.zoomStore, (s) => s.canZoom);\n\n return (\n <div\n ref={api.setZoomControls}\n role=\"region\"\n aria-label={labels.zoomControlsAriaLabel}\n className={styles[\"chart-zoom-controls\"]}\n onBlur={api.onZoomBlur}\n >\n {/* The Reset button is shown before it takes the focus, as the helper focuses it before the zoomed state renders. */}\n <div hidden={!zoomed || zooming}>\n <Button\n nativeButtonAttributes={{\n ref: (button) => {\n if (button) {\n api.setResetZoomButton({\n focus: () => {\n button.parentElement!.hidden = false;\n button.focus();\n },\n });\n } else {\n api.setResetZoomButton(null);\n }\n },\n }}\n variant=\"link\"\n formAction=\"none\"\n onClick={api.resetZoom}\n ariaLabel={labels.resetZoomButtonAriaLabel}\n className={testClasses[\"reset-zoom-button\"]}\n >\n {labels.resetZoomButtonText}\n </Button>\n </div>\n <ToggleButton\n ref={api.setZoomButton}\n pressed={zooming}\n iconName=\"zoom-in\"\n pressedIconSvg={zoomModeIcon}\n disabled={!canZoom && !zooming}\n disabledReason={labels.zoomButtonDisabledReason}\n onChange={({ detail }) => (detail.pressed ? api.enterZoomMode() : api.exitZoomMode())}\n className={zooming ? testClasses[\"exit-zoom-button\"] : testClasses[\"zoom-button\"]}\n >\n {labels.enterZoomModeButtonText}\n </ToggleButton>\n </div>\n );\n}\n\nconst zoomModeIcon = (\n <svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\">\n <path d=\"M11 11L15 15\" />\n <path\n className=\"filled no-stroke\"\n d=\"M7 1C10.3137 1 13 3.68629 13 7C13 10.3137 10.3137 13 7 13C3.68629 13 1 10.3137 1 7C1 3.68629 3.68629 1 7 1ZM6.25 4V6.25H4V7.75H6.25V10H7.75V7.75H10V6.25H7.75V4H6.25Z\"\n />\n <circle cx=\"7\" cy=\"7\" r=\"6\" />\n </svg>\n);\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import styles from "../styles.css.js";
|
|
6
|
+
import testClasses from "../test-classes/styles.css.js";
|
|
7
|
+
export function ChartZoomCursor({ api, labels, inverted }) {
|
|
8
|
+
return (_jsx("div", { ref: api.setZoomCursor, role: "slider", tabIndex: 0, "aria-label": labels.zoomCursorAriaLabel, "aria-orientation": inverted ? "vertical" : "horizontal", className: clsx(styles["chart-zoom-cursor"], testClasses["zoom-cursor"]), onKeyDown: api.onZoomCursorKeyDown, onBlur: api.onZoomBlur }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=core-zoom-cursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-zoom-cursor.js","sourceRoot":"","sources":["../../../../src/core/components/core-zoom-cursor.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAKxB,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,WAAW,MAAM,+BAA+B,CAAC;AAExD,MAAM,UAAU,eAAe,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAA6D;IAClH,OAAO,CACL,cACE,GAAG,EAAE,GAAG,CAAC,aAAa,EACtB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,CAAC,gBACC,MAAM,CAAC,mBAAmB,sBACpB,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,EACtD,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,EACxE,SAAS,EAAE,GAAG,CAAC,mBAAmB,EAClC,MAAM,EAAE,GAAG,CAAC,UAAU,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport clsx from \"clsx\";\n\nimport { ChartAPI } from \"../chart-api\";\nimport { ChartLabels } from \"../i18n-utils\";\n\nimport styles from \"../styles.css.js\";\nimport testClasses from \"../test-classes/styles.css.js\";\n\nexport function ChartZoomCursor({ api, labels, inverted }: { api: ChartAPI; labels: ChartLabels; inverted: boolean }) {\n return (\n <div\n ref={api.setZoomCursor}\n role=\"slider\"\n tabIndex={0}\n aria-label={labels.zoomCursorAriaLabel}\n aria-orientation={inverted ? \"vertical\" : \"horizontal\"}\n className={clsx(styles[\"chart-zoom-cursor\"], testClasses[\"zoom-cursor\"])}\n onKeyDown={api.onZoomCursorKeyDown}\n onBlur={api.onZoomBlur}\n />\n );\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import LiveRegion from "@cloudscape-design/components/live-region";
|
|
5
|
+
import { useSelector } from "../../internal/utils/async-store";
|
|
6
|
+
export function ChartZoomLiveRegion({ api }) {
|
|
7
|
+
const announcement = useSelector(api.zoomStore, (s) => s.announcement);
|
|
8
|
+
const announcementKey = useSelector(api.zoomStore, (s) => s.announcementKey);
|
|
9
|
+
return (_jsx(LiveRegion, { hidden: true, children: announcement }, announcementKey));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=core-zoom-live-region.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-zoom-live-region.js","sourceRoot":"","sources":["../../../../src/core/components/core-zoom-live-region.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,UAAU,MAAM,2CAA2C,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG/D,MAAM,UAAU,mBAAmB,CAAC,EAAE,GAAG,EAAqB;IAC5D,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACvE,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAC7E,OAAO,CACL,KAAC,UAAU,IAAuB,MAAM,EAAE,IAAI,YAC3C,YAAY,IADE,eAAe,CAEnB,CACd,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport LiveRegion from \"@cloudscape-design/components/live-region\";\n\nimport { useSelector } from \"../../internal/utils/async-store\";\nimport { ChartAPI } from \"../chart-api\";\n\nexport function ChartZoomLiveRegion({ api }: { api: ChartAPI }) {\n const announcement = useSelector(api.zoomStore, (s) => s.announcement);\n const announcementKey = useSelector(api.zoomStore, (s) => s.announcementKey);\n return (\n <LiveRegion key={announcementKey} hidden={true}>\n {announcement}\n </LiveRegion>\n );\n}\n"]}
|
package/core/i18n-utils.d.ts
CHANGED
|
@@ -8,9 +8,17 @@ export interface ChartLabels {
|
|
|
8
8
|
chartYAxisLabel?: string;
|
|
9
9
|
chartSegmentLabel?: string;
|
|
10
10
|
itemMarkerLabel?: (status?: ChartSeriesMarkerStatus) => string | undefined;
|
|
11
|
+
enterZoomModeButtonText?: string;
|
|
12
|
+
zoomButtonDisabledReason?: string;
|
|
11
13
|
resetZoomButtonText?: string;
|
|
12
14
|
resetZoomButtonAriaLabel?: string;
|
|
13
15
|
zoomControlsAriaLabel?: string;
|
|
16
|
+
zoomCursorAriaLabel?: string;
|
|
17
|
+
zoomModeEnteredAnnouncementText?: (value: string) => string;
|
|
18
|
+
zoomStartPointAnnouncementText?: (value: string) => string;
|
|
19
|
+
zoomRangeChangeAnnouncementText?: (startValue: string, endValue: string) => string;
|
|
20
|
+
zoomSelectionAnnouncementText?: (startValue: string, endValue: string) => string;
|
|
21
|
+
zoomModeExitedAnnouncementText?: string;
|
|
14
22
|
zoomResetAnnouncementText?: string;
|
|
15
23
|
}
|
|
16
24
|
export declare function useChartI18n({ ariaLabel, ariaDescription, i18nStrings, }: {
|
package/core/i18n-utils.js
CHANGED
|
@@ -6,6 +6,9 @@ export function useChartI18n({ ariaLabel, ariaDescription, i18nStrings, }) {
|
|
|
6
6
|
const i18nPie = useInternalI18n("pie-chart");
|
|
7
7
|
// The zoom messages are not part of the typed "[charts]" namespace of the components package yet.
|
|
8
8
|
const i18nZoom = i18n;
|
|
9
|
+
const zoomText = (key) => i18nZoom(`i18nStrings.${key}`, undefined);
|
|
10
|
+
const zoomValueText = (key) => i18nZoom(`i18nStrings.${key}`, undefined, (format) => (value) => format({ value }));
|
|
11
|
+
const zoomRangeText = (key) => i18nZoom(`i18nStrings.${key}`, undefined, (format) => (startValue, endValue) => format({ startValue, endValue }));
|
|
9
12
|
return {
|
|
10
13
|
chartLabel: ariaLabel,
|
|
11
14
|
chartDescription: ariaDescription,
|
|
@@ -15,10 +18,18 @@ export function useChartI18n({ ariaLabel, ariaDescription, i18nStrings, }) {
|
|
|
15
18
|
chartXAxisLabel: i18n("i18nStrings.xAxisAriaRoleDescription", i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.xAxisRoleDescription),
|
|
16
19
|
chartYAxisLabel: i18n("i18nStrings.yAxisAriaRoleDescription", i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.yAxisRoleDescription),
|
|
17
20
|
chartSegmentLabel: i18nPie("i18nStrings.segmentAriaRoleDescription", i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.segmentRoleDescription),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
enterZoomModeButtonText: zoomText("enterZoomModeButtonText"),
|
|
22
|
+
zoomButtonDisabledReason: zoomText("zoomButtonDisabledReason"),
|
|
23
|
+
resetZoomButtonText: zoomText("resetZoomButtonText"),
|
|
24
|
+
resetZoomButtonAriaLabel: zoomText("resetZoomButtonAriaLabel"),
|
|
25
|
+
zoomControlsAriaLabel: zoomText("zoomControlsAriaLabel"),
|
|
26
|
+
zoomCursorAriaLabel: zoomText("zoomCursorAriaLabel"),
|
|
27
|
+
zoomModeEnteredAnnouncementText: zoomValueText("zoomModeEnteredAnnouncementText"),
|
|
28
|
+
zoomStartPointAnnouncementText: zoomValueText("zoomStartPointAnnouncementText"),
|
|
29
|
+
zoomRangeChangeAnnouncementText: zoomRangeText("zoomRangeChangeAnnouncementText"),
|
|
30
|
+
zoomSelectionAnnouncementText: zoomRangeText("zoomSelectionAnnouncementText"),
|
|
31
|
+
zoomModeExitedAnnouncementText: zoomText("zoomModeExitedAnnouncementText"),
|
|
32
|
+
zoomResetAnnouncementText: zoomText("zoomResetAnnouncementText"),
|
|
22
33
|
itemMarkerLabel: (status = "default") => {
|
|
23
34
|
var _a;
|
|
24
35
|
switch (status) {
|
package/core/i18n-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-utils.js","sourceRoot":"","sources":["../../../src/core/i18n-utils.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;
|
|
1
|
+
{"version":3,"file":"i18n-utils.js","sourceRoot":"","sources":["../../../src/core/i18n-utils.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AAiCzF,MAAM,UAAU,YAAY,CAAC,EAC3B,SAAS,EACT,eAAe,EACf,WAAW,GAKZ;IACC,MAAM,IAAI,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAC7C,kGAAkG;IAClG,MAAM,QAAQ,GAAG,IAAqC,CAAC;IACvD,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,QAAQ,CAAS,eAAe,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;IACpF,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE,CACpC,QAAQ,CAAC,eAAe,GAAG,EAAE,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,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8B,EAAE,QAAQ,CAAC,gCAAgC,CAAC;QAC1E,yBAAyB,EAAE,QAAQ,CAAC,2BAA2B,CAAC;QAChE,eAAe,EAAE,CAAC,MAAM,GAAG,SAAS,EAAE,EAAE;;YACtC,QAAQ,MAAM,EAAE,CAAC;gBACf,KAAK,SAAS;oBACZ,OAAO,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,yBAAyB,4DAAG,MAAM,CAAC,CAAC;gBAC1D;oBACE,OAAO,SAAS,CAAC;YACrB,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { useInternalI18n } from \"@cloudscape-design/components/internal/do-not-use/i18n\";\n\nimport { ChartSeriesMarkerStatus } from \"../internal/components/series-marker/interfaces\";\nimport { CoreChartProps } from \"./interfaces\";\n\nexport interface ChartLabels {\n chartLabel?: string;\n chartDescription?: string;\n chartContainerLabel?: string;\n chartXAxisLabel?: string;\n chartYAxisLabel?: string;\n chartSegmentLabel?: string;\n itemMarkerLabel?: (status?: ChartSeriesMarkerStatus) => string | undefined;\n enterZoomModeButtonText?: string;\n zoomButtonDisabledReason?: string;\n resetZoomButtonText?: string;\n resetZoomButtonAriaLabel?: string;\n zoomControlsAriaLabel?: string;\n zoomCursorAriaLabel?: string;\n zoomModeEnteredAnnouncementText?: (value: string) => string;\n zoomStartPointAnnouncementText?: (value: string) => string;\n zoomRangeChangeAnnouncementText?: (startValue: string, endValue: string) => string;\n zoomSelectionAnnouncementText?: (startValue: string, endValue: string) => string;\n zoomModeExitedAnnouncementText?: string;\n zoomResetAnnouncementText?: string;\n}\n\ntype ZoomFormatFunction = <T>(\n key: string,\n provided: undefined,\n handler?: (format: (args: Record<string, string>) => string) => T,\n) => undefined | T;\n\nexport function useChartI18n({\n ariaLabel,\n ariaDescription,\n i18nStrings,\n}: {\n ariaLabel?: string;\n ariaDescription?: string;\n i18nStrings?: CoreChartProps.I18nStrings;\n}): ChartLabels {\n const i18n = useInternalI18n(\"[charts]\");\n const i18nPie = useInternalI18n(\"pie-chart\");\n // The zoom messages are not part of the typed \"[charts]\" namespace of the components package yet.\n const i18nZoom = i18n as unknown as ZoomFormatFunction;\n const zoomText = (key: string) => i18nZoom<string>(`i18nStrings.${key}`, undefined);\n const zoomValueText = (key: string) =>\n i18nZoom(`i18nStrings.${key}`, undefined, (format) => (value: string) => format({ value }));\n const zoomRangeText = (key: string) =>\n i18nZoom(\n `i18nStrings.${key}`,\n undefined,\n (format) => (startValue: string, endValue: string) => format({ startValue, endValue }),\n );\n return {\n chartLabel: ariaLabel,\n chartDescription: ariaDescription,\n // We reuse existing translations as passing for now, but it is possible to introduce new i18n strings that\n // are parametrized with axes names, and more.\n chartContainerLabel: i18n(\"i18nStrings.chartAriaRoleDescription\", i18nStrings?.chartRoleDescription),\n chartXAxisLabel: i18n(\"i18nStrings.xAxisAriaRoleDescription\", i18nStrings?.xAxisRoleDescription),\n chartYAxisLabel: i18n(\"i18nStrings.yAxisAriaRoleDescription\", i18nStrings?.yAxisRoleDescription),\n chartSegmentLabel: i18nPie(\"i18nStrings.segmentAriaRoleDescription\", i18nStrings?.segmentRoleDescription),\n enterZoomModeButtonText: zoomText(\"enterZoomModeButtonText\"),\n zoomButtonDisabledReason: zoomText(\"zoomButtonDisabledReason\"),\n resetZoomButtonText: zoomText(\"resetZoomButtonText\"),\n resetZoomButtonAriaLabel: zoomText(\"resetZoomButtonAriaLabel\"),\n zoomControlsAriaLabel: zoomText(\"zoomControlsAriaLabel\"),\n zoomCursorAriaLabel: zoomText(\"zoomCursorAriaLabel\"),\n zoomModeEnteredAnnouncementText: zoomValueText(\"zoomModeEnteredAnnouncementText\"),\n zoomStartPointAnnouncementText: zoomValueText(\"zoomStartPointAnnouncementText\"),\n zoomRangeChangeAnnouncementText: zoomRangeText(\"zoomRangeChangeAnnouncementText\"),\n zoomSelectionAnnouncementText: zoomRangeText(\"zoomSelectionAnnouncementText\"),\n zoomModeExitedAnnouncementText: zoomText(\"zoomModeExitedAnnouncementText\"),\n zoomResetAnnouncementText: zoomText(\"zoomResetAnnouncementText\"),\n itemMarkerLabel: (status = \"default\") => {\n switch (status) {\n case \"warning\":\n return i18nStrings?.itemMarkerStatusAriaLabel?.(status);\n default:\n return undefined;\n }\n },\n };\n}\n"]}
|
package/core/styles.css.js
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"no-data": "awsui_no-
|
|
9
|
-
"no-data
|
|
10
|
-
"no-data-
|
|
11
|
-
"
|
|
12
|
-
"chart-
|
|
13
|
-
"chart-filters
|
|
14
|
-
"
|
|
15
|
-
"axis-vertical-title
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"chart-container-
|
|
20
|
-
"chart-container-
|
|
21
|
-
"chart-
|
|
22
|
-
"chart-plot-wrapper": "awsui_chart-plot-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
4
|
+
"focus-outline": "awsui_focus-outline_113qp_14oxf_11",
|
|
5
|
+
"root": "awsui_root_113qp_14oxf_15",
|
|
6
|
+
"highcharts-grid-line": "awsui_highcharts-grid-line_113qp_14oxf_18",
|
|
7
|
+
"root-fit-height": "awsui_root-fit-height_113qp_14oxf_22",
|
|
8
|
+
"no-data-container": "awsui_no-data-container_113qp_14oxf_26",
|
|
9
|
+
"no-data": "awsui_no-data_113qp_14oxf_26",
|
|
10
|
+
"no-data-wrapper": "awsui_no-data-wrapper_113qp_14oxf_44",
|
|
11
|
+
"no-data-empty": "awsui_no-data-empty_113qp_14oxf_52",
|
|
12
|
+
"chart-zoom-controls": "awsui_chart-zoom-controls_113qp_14oxf_56",
|
|
13
|
+
"chart-filters": "awsui_chart-filters_113qp_14oxf_63",
|
|
14
|
+
"chart-filters-series": "awsui_chart-filters-series_113qp_14oxf_69",
|
|
15
|
+
"axis-vertical-title": "awsui_axis-vertical-title_113qp_14oxf_73",
|
|
16
|
+
"axis-vertical-title-item": "awsui_axis-vertical-title-item_113qp_14oxf_81",
|
|
17
|
+
"error-range": "awsui_error-range_113qp_14oxf_88",
|
|
18
|
+
"tooltip-default-header": "awsui_tooltip-default-header_113qp_14oxf_94",
|
|
19
|
+
"chart-container-root": "awsui_chart-container-root_113qp_14oxf_100",
|
|
20
|
+
"chart-container-fit-height": "awsui_chart-container-fit-height_113qp_14oxf_104",
|
|
21
|
+
"chart-container-min-width": "awsui_chart-container-min-width_113qp_14oxf_110",
|
|
22
|
+
"chart-plot-and-legend-wrapper": "awsui_chart-plot-and-legend-wrapper_113qp_14oxf_114",
|
|
23
|
+
"chart-plot-wrapper": "awsui_chart-plot-wrapper_113qp_14oxf_118",
|
|
24
|
+
"bottom-legend-container": "awsui_bottom-legend-container_113qp_14oxf_123",
|
|
25
|
+
"side-legend-container": "awsui_side-legend-container_113qp_14oxf_130",
|
|
26
|
+
"application": "awsui_application_113qp_14oxf_139",
|
|
27
|
+
"chart-zoom-cursor": "awsui_chart-zoom-cursor_113qp_14oxf_143"
|
|
26
28
|
};
|
|
27
29
|
|
package/core/styles.scoped.css
CHANGED
|
@@ -2,18 +2,28 @@
|
|
|
2
2
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
/*
|
|
6
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
|
+
SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
*/
|
|
9
|
+
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
10
|
+
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
11
|
+
body[data-awsui-focus-visible=true] .awsui_focus-outline_113qp_14oxf_11:not(#\9) {
|
|
12
|
+
stroke: var(--color-border-item-focused-sb1fs0, #006ce0);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.awsui_root_113qp_14oxf_15:not(#\9) {
|
|
6
16
|
position: relative;
|
|
7
17
|
}
|
|
8
|
-
.
|
|
18
|
+
.awsui_root_113qp_14oxf_15 .awsui_highcharts-grid-line_113qp_14oxf_18:not(#\9) {
|
|
9
19
|
pointer-events: none;
|
|
10
20
|
}
|
|
11
21
|
|
|
12
|
-
.awsui_root-fit-
|
|
22
|
+
.awsui_root-fit-height_113qp_14oxf_22:not(#\9) {
|
|
13
23
|
block-size: 100%;
|
|
14
24
|
}
|
|
15
25
|
|
|
16
|
-
.awsui_no-data-
|
|
26
|
+
.awsui_no-data-container_113qp_14oxf_26:not(#\9) {
|
|
17
27
|
position: absolute;
|
|
18
28
|
inset: 0;
|
|
19
29
|
display: flex;
|
|
@@ -21,7 +31,7 @@
|
|
|
21
31
|
justify-content: center;
|
|
22
32
|
}
|
|
23
33
|
|
|
24
|
-
.awsui_no-
|
|
34
|
+
.awsui_no-data_113qp_14oxf_26:not(#\9) {
|
|
25
35
|
overflow-x: auto;
|
|
26
36
|
overflow-y: hidden;
|
|
27
37
|
padding-block: var(--space-static-xs-b6kz15, 8px);
|
|
@@ -31,7 +41,7 @@
|
|
|
31
41
|
border: 1px solid var(--color-border-divider-default-8vuq97, #c6c6cd);
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
.awsui_no-data-
|
|
44
|
+
.awsui_no-data-wrapper_113qp_14oxf_44:not(#\9) {
|
|
35
45
|
overflow: hidden;
|
|
36
46
|
padding-block: var(--space-static-xxs-0tl528, 4px);
|
|
37
47
|
padding-inline: var(--space-static-xxs-0tl528, 4px);
|
|
@@ -39,27 +49,28 @@
|
|
|
39
49
|
background-color: var(--color-background-container-content-0odjoo, #ffffff);
|
|
40
50
|
}
|
|
41
51
|
|
|
42
|
-
.awsui_no-data-
|
|
52
|
+
.awsui_no-data-empty_113qp_14oxf_52:not(#\9) {
|
|
43
53
|
color: var(--color-text-empty-a5zixv, #656871);
|
|
44
54
|
}
|
|
45
55
|
|
|
46
|
-
.awsui_chart-zoom-
|
|
56
|
+
.awsui_chart-zoom-controls_113qp_14oxf_56:not(#\9) {
|
|
47
57
|
display: flex;
|
|
48
58
|
justify-content: flex-end;
|
|
59
|
+
gap: var(--space-static-s-cqc8os, 12px);
|
|
49
60
|
padding-block-end: var(--space-scaled-xxs-54nfiu, 4px);
|
|
50
61
|
}
|
|
51
62
|
|
|
52
|
-
.awsui_chart-
|
|
63
|
+
.awsui_chart-filters_113qp_14oxf_63:not(#\9) {
|
|
53
64
|
padding-block-end: var(--space-scaled-l-kalwlg, 20px);
|
|
54
65
|
display: flex;
|
|
55
66
|
flex-wrap: wrap;
|
|
56
67
|
gap: var(--space-scaled-l-kalwlg, 20px);
|
|
57
68
|
}
|
|
58
|
-
.awsui_chart-filters-
|
|
69
|
+
.awsui_chart-filters-series_113qp_14oxf_69:not(#\9) {
|
|
59
70
|
flex: 280px 0 1;
|
|
60
71
|
}
|
|
61
72
|
|
|
62
|
-
.awsui_axis-vertical-
|
|
73
|
+
.awsui_axis-vertical-title_113qp_14oxf_73:not(#\9) {
|
|
63
74
|
display: flex;
|
|
64
75
|
gap: var(--space-static-xs-b6kz15, 8px);
|
|
65
76
|
justify-content: space-between;
|
|
@@ -67,56 +78,56 @@
|
|
|
67
78
|
margin-bottom: 4px;
|
|
68
79
|
}
|
|
69
80
|
|
|
70
|
-
.awsui_axis-vertical-title-
|
|
81
|
+
.awsui_axis-vertical-title-item_113qp_14oxf_81:not(#\9) {
|
|
71
82
|
font-weight: bold;
|
|
72
83
|
overflow: hidden;
|
|
73
84
|
white-space: nowrap;
|
|
74
85
|
text-overflow: ellipsis;
|
|
75
86
|
}
|
|
76
87
|
|
|
77
|
-
.awsui_error-
|
|
88
|
+
.awsui_error-range_113qp_14oxf_88:not(#\9) {
|
|
78
89
|
display: flex;
|
|
79
90
|
justify-content: space-between;
|
|
80
91
|
gap: var(--space-scaled-s-srzhhj, 12px);
|
|
81
92
|
}
|
|
82
93
|
|
|
83
|
-
.awsui_tooltip-default-
|
|
94
|
+
.awsui_tooltip-default-header_113qp_14oxf_94:not(#\9) {
|
|
84
95
|
display: inline-flex;
|
|
85
96
|
align-items: center;
|
|
86
97
|
gap: var(--space-static-xxs-0tl528, 4px);
|
|
87
98
|
}
|
|
88
99
|
|
|
89
|
-
.awsui_chart-container-
|
|
100
|
+
.awsui_chart-container-root_113qp_14oxf_100:not(#\9) {
|
|
90
101
|
block-size: 100%;
|
|
91
102
|
}
|
|
92
103
|
|
|
93
|
-
.awsui_chart-container-fit-
|
|
104
|
+
.awsui_chart-container-fit-height_113qp_14oxf_104:not(#\9) {
|
|
94
105
|
overflow-x: auto;
|
|
95
106
|
position: absolute;
|
|
96
107
|
inset: 0;
|
|
97
108
|
}
|
|
98
109
|
|
|
99
|
-
.awsui_chart-container-min-
|
|
110
|
+
.awsui_chart-container-min-width_113qp_14oxf_110:not(#\9) {
|
|
100
111
|
overflow-x: auto;
|
|
101
112
|
}
|
|
102
113
|
|
|
103
|
-
.awsui_chart-plot-and-legend-
|
|
114
|
+
.awsui_chart-plot-and-legend-wrapper_113qp_14oxf_114:not(#\9) {
|
|
104
115
|
display: flex;
|
|
105
116
|
}
|
|
106
117
|
|
|
107
|
-
.awsui_chart-plot-
|
|
118
|
+
.awsui_chart-plot-wrapper_113qp_14oxf_118:not(#\9) {
|
|
108
119
|
position: relative;
|
|
109
120
|
flex: 1;
|
|
110
121
|
}
|
|
111
122
|
|
|
112
|
-
.awsui_bottom-legend-
|
|
123
|
+
.awsui_bottom-legend-container_113qp_14oxf_123:not(#\9) {
|
|
113
124
|
display: flex;
|
|
114
125
|
overflow: auto;
|
|
115
126
|
gap: var(--space-scaled-xxl-pn6ur6, 32px);
|
|
116
127
|
justify-content: space-between;
|
|
117
128
|
}
|
|
118
129
|
|
|
119
|
-
.awsui_side-legend-
|
|
130
|
+
.awsui_side-legend-container_113qp_14oxf_130:not(#\9) {
|
|
120
131
|
flex: 0;
|
|
121
132
|
display: flex;
|
|
122
133
|
flex-direction: column;
|
|
@@ -125,6 +136,35 @@
|
|
|
125
136
|
max-inline-size: 30%;
|
|
126
137
|
}
|
|
127
138
|
|
|
128
|
-
.
|
|
139
|
+
.awsui_application_113qp_14oxf_139:not(#\9) {
|
|
129
140
|
outline: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.awsui_chart-zoom-cursor_113qp_14oxf_143:not(#\9) {
|
|
144
|
+
position: absolute;
|
|
145
|
+
visibility: hidden;
|
|
146
|
+
background-color: var(--color-border-item-selected-foxnds, #006ce0);
|
|
147
|
+
pointer-events: none;
|
|
148
|
+
}
|
|
149
|
+
.awsui_chart-zoom-cursor_113qp_14oxf_143:not(#\9):focus {
|
|
150
|
+
outline: none;
|
|
151
|
+
}
|
|
152
|
+
body[data-awsui-focus-visible=true] .awsui_chart-zoom-cursor_113qp_14oxf_143:not(#\9):focus {
|
|
153
|
+
position: relative;
|
|
154
|
+
box-sizing: border-box;
|
|
155
|
+
outline: 2px dotted transparent;
|
|
156
|
+
outline-offset: calc(var(--space-static-xxs-0tl528, 4px) - 1px);
|
|
157
|
+
position: absolute;
|
|
158
|
+
}
|
|
159
|
+
body[data-awsui-focus-visible=true] .awsui_chart-zoom-cursor_113qp_14oxf_143:not(#\9):focus::before {
|
|
160
|
+
content: " ";
|
|
161
|
+
display: block;
|
|
162
|
+
position: absolute;
|
|
163
|
+
box-sizing: border-box;
|
|
164
|
+
inset-inline-start: calc(-1 * var(--space-static-xxs-0tl528, 4px));
|
|
165
|
+
inset-block-start: calc(-1 * var(--space-static-xxs-0tl528, 4px));
|
|
166
|
+
inline-size: calc(100% + 2 * var(--space-static-xxs-0tl528, 4px));
|
|
167
|
+
block-size: calc(100% + 2 * var(--space-static-xxs-0tl528, 4px));
|
|
168
|
+
border-radius: var(--border-radius-control-default-focus-ring-hkazgq, 4px);
|
|
169
|
+
border: 2px solid var(--color-border-item-focused-sb1fs0, #006ce0);
|
|
130
170
|
}
|