@gooddata/sdk-ui-vis-commons 10.27.0-alpha.1 → 10.27.0-alpha.2
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/esm/compactSize/HeadlinePagination.d.ts +4 -0
- package/esm/compactSize/HeadlinePagination.d.ts.map +1 -1
- package/esm/compactSize/HeadlinePagination.js +7 -3
- package/esm/compactSize/HeadlinePagination.js.map +1 -1
- package/esm/compactSize/HeadlinePaginationRenderer.d.ts +4 -0
- package/esm/compactSize/HeadlinePaginationRenderer.d.ts.map +1 -1
- package/esm/compactSize/HeadlinePaginationRenderer.js +7 -4
- package/esm/compactSize/HeadlinePaginationRenderer.js.map +1 -1
- package/esm/sdk-ui-vis-commons.d.ts +4 -0
- package/package.json +8 -8
|
@@ -5,6 +5,10 @@ import React from "react";
|
|
|
5
5
|
export interface IHeadlinePaginationProps {
|
|
6
6
|
renderSecondaryItem: () => JSX.Element;
|
|
7
7
|
renderTertiaryItem: () => JSX.Element;
|
|
8
|
+
accessibilityConfig?: {
|
|
9
|
+
nextAriaLabel?: string;
|
|
10
|
+
previousAriaLabel?: string;
|
|
11
|
+
};
|
|
8
12
|
}
|
|
9
13
|
/**
|
|
10
14
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadlinePagination.d.ts","sourceRoot":"","sources":["../../src/compactSize/HeadlinePagination.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,mBAAmB,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC;IACvC,kBAAkB,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"HeadlinePagination.d.ts","sourceRoot":"","sources":["../../src/compactSize/HeadlinePagination.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,mBAAmB,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC;IACvC,kBAAkB,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC;IACtC,mBAAmB,CAAC,EAAE;QAClB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CACL;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA2BjE,CAAC"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
// (C) 2021 GoodData Corporation
|
|
1
|
+
// (C) 2021-2025 GoodData Corporation
|
|
2
2
|
import React, { useState } from "react";
|
|
3
3
|
import { HeadlinePaginationRenderer } from "./HeadlinePaginationRenderer.js";
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export const HeadlinePagination = ({ renderSecondaryItem, renderTertiaryItem, }) => {
|
|
7
|
+
export const HeadlinePagination = ({ renderSecondaryItem, renderTertiaryItem, accessibilityConfig, }) => {
|
|
8
|
+
const { nextAriaLabel, previousAriaLabel } = accessibilityConfig ?? {};
|
|
8
9
|
const [item, setItem] = useState(1);
|
|
9
10
|
const showNextItem = () => setItem(item + 1);
|
|
10
11
|
const showPrevItem = () => setItem(item - 1);
|
|
11
12
|
return (React.createElement(React.Fragment, null,
|
|
12
|
-
React.createElement(HeadlinePaginationRenderer, { item: item, showNextItem: showNextItem, showPrevItem: showPrevItem
|
|
13
|
+
React.createElement(HeadlinePaginationRenderer, { item: item, showNextItem: showNextItem, showPrevItem: showPrevItem, accessibilityConfig: {
|
|
14
|
+
nextAriaLabel,
|
|
15
|
+
previousAriaLabel,
|
|
16
|
+
} }),
|
|
13
17
|
item === 1 && renderSecondaryItem(),
|
|
14
18
|
item === 2 && renderTertiaryItem()));
|
|
15
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadlinePagination.js","sourceRoot":"","sources":["../../src/compactSize/HeadlinePagination.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"HeadlinePagination.js","sourceRoot":"","sources":["../../src/compactSize/HeadlinePagination.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAc7E;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAuC,CAAC,EACnE,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,GACtB,EAAE,EAAE;IACD,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,mBAAmB,IAAI,EAAE,CAAC;IACvE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,GAAS,EAAE,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAEnD,MAAM,YAAY,GAAG,GAAS,EAAE,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;IAEnD,OAAO,CACH;QACI,oBAAC,0BAA0B,IACvB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE;gBACjB,aAAa;gBACb,iBAAiB;aACpB,GACH;QACD,IAAI,KAAK,CAAC,IAAI,mBAAmB,EAAE;QACnC,IAAI,KAAK,CAAC,IAAI,kBAAkB,EAAE,CACpC,CACN,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadlinePaginationRenderer.d.ts","sourceRoot":"","sources":["../../src/compactSize/HeadlinePaginationRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,wBAAwB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"HeadlinePaginationRenderer.d.ts","sourceRoot":"","sources":["../../src/compactSize/HeadlinePaginationRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,wBAAwB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,CAAC,EAAE;QAClB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;IACF,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA8BzE,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
// (C) 2021 GoodData Corporation
|
|
1
|
+
// (C) 2021-2025 GoodData Corporation
|
|
2
2
|
import React from "react";
|
|
3
|
-
export const HeadlinePaginationRenderer = ({ item, showPrevItem, showNextItem, }) => {
|
|
3
|
+
export const HeadlinePaginationRenderer = ({ item, accessibilityConfig, showPrevItem, showNextItem, }) => {
|
|
4
|
+
const { nextAriaLabel, previousAriaLabel } = accessibilityConfig ?? {};
|
|
4
5
|
const commonClassNames = "gd-button-link gd-button-icon-only pagination";
|
|
6
|
+
const isFirstItemDisabled = item === 1;
|
|
7
|
+
const isSecondItemDisabled = item === 2;
|
|
5
8
|
return (React.createElement("div", { className: "headline-pagination" },
|
|
6
|
-
React.createElement("button", { className: `${commonClassNames} first-item gd-icon-chevron-left`, onClick: showPrevItem, disabled:
|
|
7
|
-
React.createElement("button", { className: `${commonClassNames} second-item gd-icon-chevron-right`, onClick: showNextItem, disabled:
|
|
9
|
+
React.createElement("button", { className: `${commonClassNames} first-item gd-icon-chevron-left`, onClick: showPrevItem, disabled: isFirstItemDisabled, "aria-disabled": isFirstItemDisabled, "aria-label": previousAriaLabel }),
|
|
10
|
+
React.createElement("button", { className: `${commonClassNames} second-item gd-icon-chevron-right`, onClick: showNextItem, disabled: isSecondItemDisabled, "aria-disabled": isSecondItemDisabled, "aria-label": nextAriaLabel })));
|
|
8
11
|
};
|
|
9
12
|
//# sourceMappingURL=HeadlinePaginationRenderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadlinePaginationRenderer.js","sourceRoot":"","sources":["../../src/compactSize/HeadlinePaginationRenderer.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"HeadlinePaginationRenderer.js","sourceRoot":"","sources":["../../src/compactSize/HeadlinePaginationRenderer.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,MAAM,CAAC,MAAM,0BAA0B,GAAuC,CAAC,EAC3E,IAAI,EACJ,mBAAmB,EACnB,YAAY,EACZ,YAAY,GACf,EAAE,EAAE;IACD,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,mBAAmB,IAAI,EAAE,CAAC;IACvE,MAAM,gBAAgB,GAAG,+CAA+C,CAAC;IAEzE,MAAM,mBAAmB,GAAG,IAAI,KAAK,CAAC,CAAC;IACvC,MAAM,oBAAoB,GAAG,IAAI,KAAK,CAAC,CAAC;IAExC,OAAO,CACH,6BAAK,SAAS,EAAC,qBAAqB;QAChC,gCACI,SAAS,EAAE,GAAG,gBAAgB,kCAAkC,EAChE,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,mBAAmB,mBACd,mBAAmB,gBACtB,iBAAiB,GAC/B;QACF,gCACI,SAAS,EAAE,GAAG,gBAAgB,oCAAoC,EAClE,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,oBAAoB,mBACf,oBAAoB,gBACvB,aAAa,GAC3B,CACA,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -299,6 +299,10 @@ export declare interface IGeoChartLegendData {
|
|
|
299
299
|
export declare interface IHeadlinePaginationProps {
|
|
300
300
|
renderSecondaryItem: () => JSX.Element;
|
|
301
301
|
renderTertiaryItem: () => JSX.Element;
|
|
302
|
+
accessibilityConfig?: {
|
|
303
|
+
nextAriaLabel?: string;
|
|
304
|
+
previousAriaLabel?: string;
|
|
305
|
+
};
|
|
302
306
|
}
|
|
303
307
|
|
|
304
308
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-vis-commons",
|
|
3
|
-
"version": "10.27.0-alpha.
|
|
3
|
+
"version": "10.27.0-alpha.2",
|
|
4
4
|
"description": "GoodData.UI SDK - common functionality for different types of visualizations",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"react-intl": "^6.4.1",
|
|
37
37
|
"react-measure": "^2.5.2",
|
|
38
38
|
"tslib": "^2.5.0",
|
|
39
|
-
"@gooddata/sdk-backend-spi": "10.27.0-alpha.
|
|
40
|
-
"@gooddata/sdk-ui
|
|
41
|
-
"@gooddata/sdk-model": "10.27.0-alpha.
|
|
42
|
-
"@gooddata/sdk-ui": "10.27.0-alpha.
|
|
43
|
-
"@gooddata/sdk-ui-
|
|
39
|
+
"@gooddata/sdk-backend-spi": "10.27.0-alpha.2",
|
|
40
|
+
"@gooddata/sdk-ui": "10.27.0-alpha.2",
|
|
41
|
+
"@gooddata/sdk-model": "10.27.0-alpha.2",
|
|
42
|
+
"@gooddata/sdk-ui-theme-provider": "10.27.0-alpha.2",
|
|
43
|
+
"@gooddata/sdk-ui-kit": "10.27.0-alpha.2"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": "^16.10.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"typescript": "5.3.3",
|
|
86
86
|
"vitest": "3.0.8",
|
|
87
87
|
"vitest-dom": "0.1.1",
|
|
88
|
-
"@gooddata/reference-workspace": "10.27.0-alpha.
|
|
89
|
-
"@gooddata/sdk-backend-mockingbird": "10.27.0-alpha.
|
|
88
|
+
"@gooddata/reference-workspace": "10.27.0-alpha.2",
|
|
89
|
+
"@gooddata/sdk-backend-mockingbird": "10.27.0-alpha.2"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"clean": "rm -rf ci dist esm coverage styles/css *.log tsconfig.tsbuildinfo",
|