@gooddata/sdk-ui-kit 11.55.0-alpha.3 → 11.55.0-alpha.5
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/@ui/UiBreadcrumb/UiBreadcrumb.d.ts +5 -0
- package/esm/@ui/UiBreadcrumb/UiBreadcrumb.d.ts.map +1 -1
- package/esm/@ui/UiBreadcrumb/UiBreadcrumb.js +2 -2
- package/esm/@ui/UiPagedVirtualList/UiPagedVirtualList.d.ts.map +1 -1
- package/esm/@ui/UiPagedVirtualList/UiPagedVirtualList.js +27 -1
- package/esm/Bubble/Bubble.d.ts +2 -2
- package/esm/Bubble/Bubble.d.ts.map +1 -1
- package/esm/Bubble/Bubble.js +1 -1
- package/esm/Datepicker/Datepicker.d.ts +2 -2
- package/esm/Datepicker/Datepicker.d.ts.map +1 -1
- package/esm/Dialog/ConfirmDialog.d.ts +2 -1
- package/esm/Dialog/ConfirmDialog.d.ts.map +1 -1
- package/esm/Dialog/ShareDialog/types.d.ts.map +1 -1
- package/esm/FilterLabel/FilterLabel.d.ts +2 -1
- package/esm/FilterLabel/FilterLabel.d.ts.map +1 -1
- package/esm/FilterLabel/FilterLabel.js +2 -2
- package/esm/Form/Checkbox.d.ts +2 -1
- package/esm/Form/Checkbox.d.ts.map +1 -1
- package/esm/Form/InputWithNumberFormat.d.ts +2 -2
- package/esm/Form/InputWithNumberFormat.d.ts.map +1 -1
- package/esm/Form/InputWithNumberFormat.js +1 -1
- package/esm/List/LegacyMultiSelectListItem.d.ts +2 -1
- package/esm/List/LegacyMultiSelectListItem.d.ts.map +1 -1
- package/esm/List/LegacyMultiSelectListItem.js +1 -1
- package/esm/List/MultiSelectListItem.d.ts +2 -1
- package/esm/List/MultiSelectListItem.d.ts.map +1 -1
- package/esm/Overlay/ErrorOverlay.d.ts +2 -2
- package/esm/Overlay/ErrorOverlay.d.ts.map +1 -1
- package/esm/ParameterControl/AllowedValuesParameterControlDropdown.d.ts +6 -5
- package/esm/ParameterControl/AllowedValuesParameterControlDropdown.d.ts.map +1 -1
- package/esm/ParameterControl/AllowedValuesParameterControlDropdown.js +5 -4
- package/esm/ParameterControl/NumberParameterControlDropdown.d.ts +9 -10
- package/esm/ParameterControl/NumberParameterControlDropdown.d.ts.map +1 -1
- package/esm/ParameterControl/NumberParameterControlDropdown.js +11 -4
- package/esm/ParameterControl/ParameterControl.d.ts +13 -8
- package/esm/ParameterControl/ParameterControl.d.ts.map +1 -1
- package/esm/ParameterControl/ParameterControl.js +19 -6
- package/esm/ParameterControl/ParameterControlDropdown.d.ts +6 -3
- package/esm/ParameterControl/ParameterControlDropdown.d.ts.map +1 -1
- package/esm/ParameterControl/ParameterControlDropdown.js +5 -4
- package/esm/ParameterControl/StringParameterControlDropdown.d.ts +9 -10
- package/esm/ParameterControl/StringParameterControlDropdown.d.ts.map +1 -1
- package/esm/ParameterControl/StringParameterControlDropdown.js +11 -4
- package/esm/ParameterControl/submitMode.d.ts +18 -0
- package/esm/ParameterControl/submitMode.d.ts.map +1 -0
- package/esm/ParameterControl/submitMode.js +2 -0
- package/esm/Spinner/Spinner.d.ts +2 -1
- package/esm/Spinner/Spinner.d.ts.map +1 -1
- package/esm/Spinner/Spinner.js +2 -2
- package/esm/Timepicker/Timepicker.d.ts +3 -2
- package/esm/Timepicker/Timepicker.d.ts.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/measureNumberFormat/MeasureNumberFormat.d.ts +2 -2
- package/esm/measureNumberFormat/MeasureNumberFormat.d.ts.map +1 -1
- package/esm/sdk-ui-kit.d.ts +34 -8
- package/package.json +14 -15
- package/src/@ui/UiBreadcrumb/UiBreadcrumb.scss +17 -0
- package/styles/css/UiControlButton.css.map +1 -1
- package/styles/css/chartSorting.css.map +1 -1
- package/styles/css/datepicker.css.map +1 -1
- package/styles/css/descriptionPanel.css.map +1 -1
- package/styles/css/dialog.css.map +1 -1
- package/styles/css/dialogList.css.map +1 -1
- package/styles/css/dropdown.css.map +1 -1
- package/styles/css/form.css.map +1 -1
- package/styles/css/header.css.map +1 -1
- package/styles/css/hyperlink.css.map +1 -1
- package/styles/css/invertableSelect.css.map +1 -1
- package/styles/css/list.css.map +1 -1
- package/styles/css/main.css +10 -0
- package/styles/css/main.css.map +1 -1
- package/styles/css/measureNumberFormat.css.map +1 -1
- package/styles/css/menu.css.map +1 -1
- package/styles/css/messages.css.map +1 -1
- package/styles/css/overlay.css.map +1 -1
- package/styles/css/richText.css.map +1 -1
- package/styles/css/settingWidget.css.map +1 -1
- package/styles/css/shareDialog.css.map +1 -1
- package/styles/css/shareDialogSelectControl.css.map +1 -1
- package/styles/css/stylingEditorDialog.css.map +1 -1
- package/styles/css/syntaxHighlightingInput.css.map +1 -1
- package/styles/css/tabs.css.map +1 -1
- package/styles/css/typo.css.map +1 -1
- package/styles/scss/variables.scss +1 -4
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type IAccessibilityConfigBase } from "../../typings/accessibility.js";
|
|
3
|
+
import { type SizeLarge, type SizeMedium } from "../@types/size.js";
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*/
|
|
@@ -16,6 +17,10 @@ export interface IUiBreadcrumbProps {
|
|
|
16
17
|
id?: string;
|
|
17
18
|
label: string;
|
|
18
19
|
items: IUiBreadcrumbItem[];
|
|
20
|
+
/**
|
|
21
|
+
* Type scale of the trail. "large" pairs with a page's own heading, "medium" sits inside a dialog.
|
|
22
|
+
*/
|
|
23
|
+
size?: SizeMedium | SizeLarge;
|
|
19
24
|
onSelect?: (item: IUiBreadcrumbItem) => void;
|
|
20
25
|
dataId?: string;
|
|
21
26
|
dataTestId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiBreadcrumb.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiBreadcrumb/UiBreadcrumb.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE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=> {
|
|
|
13
13
|
/**
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
16
|
-
export const UiBreadcrumb = forwardRef(({ id, label, tabIndex = 0, dataId, dataTestId, accessibilityConfig, maxWidth, items, onSelect }, ref) => {
|
|
16
|
+
export const UiBreadcrumb = forwardRef(({ id, label, tabIndex = 0, dataId, dataTestId, accessibilityConfig, maxWidth, items, size = "medium", onSelect, }, ref) => {
|
|
17
17
|
const refs = useRef([]);
|
|
18
18
|
const testId = dataTestId || getGeneratedTestId(label, accessibilityConfig?.ariaLabel ?? "");
|
|
19
19
|
const onKeyDown = makeKeyboardNavigation({
|
|
@@ -23,7 +23,7 @@ export const UiBreadcrumb = forwardRef(({ id, label, tabIndex = 0, dataId, dataT
|
|
|
23
23
|
e.target.click();
|
|
24
24
|
},
|
|
25
25
|
});
|
|
26
|
-
return (_jsx("nav", { id: id, ref: ref, className: b(), onKeyDown: onKeyDown, tabIndex: tabIndex, "data-id": dataId, "data-testid": testId, "aria-label": accessibilityConfig?.ariaLabel, "aria-labelledby": accessibilityConfig?.ariaLabelledBy, "aria-describedby": accessibilityConfig?.ariaDescribedBy, "aria-expanded": accessibilityConfig?.ariaExpanded, "aria-description": accessibilityConfig?.ariaDescription, "aria-controls": accessibilityConfig?.ariaControls, "aria-haspopup": accessibilityConfig?.ariaHaspopup, "aria-current": "true", style: { maxWidth }, children: _jsx("ol", { children: items.map((item, index) => (_jsxs("li", { children: [
|
|
26
|
+
return (_jsx("nav", { id: id, ref: ref, className: b({ size }), onKeyDown: onKeyDown, tabIndex: tabIndex, "data-id": dataId, "data-testid": testId, "aria-label": accessibilityConfig?.ariaLabel, "aria-labelledby": accessibilityConfig?.ariaLabelledBy, "aria-describedby": accessibilityConfig?.ariaDescribedBy, "aria-expanded": accessibilityConfig?.ariaExpanded, "aria-description": accessibilityConfig?.ariaDescription, "aria-controls": accessibilityConfig?.ariaControls, "aria-haspopup": accessibilityConfig?.ariaHaspopup, "aria-current": "true", style: { maxWidth }, children: _jsx("ol", { children: items.map((item, index) => (_jsxs("li", { children: [
|
|
27
27
|
_jsx("button", { ref: (item) => {
|
|
28
28
|
refs.current[index] = item;
|
|
29
29
|
}, className: e("item"), "aria-label": item.accessibilityConfig?.ariaLabel ?? item.label, "aria-labelledby": item.accessibilityConfig?.ariaLabelledBy, "aria-describedby": item.accessibilityConfig?.ariaDescribedBy, "aria-expanded": item.accessibilityConfig?.ariaExpanded, "aria-description": item.accessibilityConfig?.ariaDescription, "aria-controls": item.accessibilityConfig?.ariaControls, "aria-haspopup": item.accessibilityConfig?.ariaHaspopup, "aria-current": index === items.length - 1, onClick: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiPagedVirtualList.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiPagedVirtualList/UiPagedVirtualList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,SAAS,EAQjB,MAAM,OAAO,CAAC;AAcf;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACjD,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,+BAA+B,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC1E,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IACpC,gBAAgB,CA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E,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,KAAK,OAAO,CAAC;IACxG,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,SAAS,CAAC;IACxD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,aAAa,CAAC,oCAAoC,CAAC,CAAC;IACnE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,CAAC,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IACxC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC,CAAC,CAAC;IAClD,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;CACnC;AAkND;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAnNO,CAAC,0HAmN+C,CAAC"}
|
|
@@ -42,6 +42,15 @@ function UiPagedVirtualListNotWrapped(props, ref) {
|
|
|
42
42
|
const makeId = ScopedIdStore.useContextStoreOptional((ctx) => ctx.makeId);
|
|
43
43
|
const focusedItemIndex = focusedItem ? items?.indexOf(focusedItem) : 0;
|
|
44
44
|
const finalFocusedIndex = focusedItem ? focusedItemIndex : focusedIndex;
|
|
45
|
+
const activeDescendantId = getActiveDescendantId({
|
|
46
|
+
representAs,
|
|
47
|
+
tabIndex,
|
|
48
|
+
customKeyboardNavigationHandler,
|
|
49
|
+
focusedIndex: finalFocusedIndex,
|
|
50
|
+
items,
|
|
51
|
+
virtualItems,
|
|
52
|
+
makeId,
|
|
53
|
+
});
|
|
45
54
|
// Scroll to focused item when it changes via keyboard navigation
|
|
46
55
|
// and trigger pagination if the focused item is near the end of loaded items
|
|
47
56
|
// Only scroll if the focus change was caused by keyboard navigation, not by items loading
|
|
@@ -76,7 +85,7 @@ function UiPagedVirtualListNotWrapped(props, ref) {
|
|
|
76
85
|
? "listbox"
|
|
77
86
|
: representAs === "list"
|
|
78
87
|
? "list"
|
|
79
|
-
: undefined, ...listboxProps, children: virtualItems.map((virtualRow) => {
|
|
88
|
+
: undefined, "aria-activedescendant": activeDescendantId, ...listboxProps, children: virtualItems.map((virtualRow) => {
|
|
80
89
|
const item = items?.[virtualRow.index];
|
|
81
90
|
const isSkeletonItem = virtualRow.index > itemsCount - 1;
|
|
82
91
|
const baseItemHeight = virtualRow.index >= itemsCount
|
|
@@ -337,6 +346,23 @@ function useVirtualListKeyboardNavigation(items, onKeyDownSelect, onKeyDownConfi
|
|
|
337
346
|
isKeyboardNavigationRef,
|
|
338
347
|
};
|
|
339
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Id of the option to name in `aria-activedescendant`, so screen readers can tell which row the
|
|
351
|
+
* keyboard is on. Returns `undefined` when there is nothing to name: the list is not a listbox,
|
|
352
|
+
* the keyboard navigation belongs to the consumer, or the active row is not rendered right now.
|
|
353
|
+
*/
|
|
354
|
+
function getActiveDescendantId({ representAs, tabIndex, customKeyboardNavigationHandler, focusedIndex, items, virtualItems, makeId, }) {
|
|
355
|
+
const ownsKeyboardNavigation = tabIndex >= 0 && !customKeyboardNavigationHandler;
|
|
356
|
+
if (representAs !== "listbox" || !ownsKeyboardNavigation || focusedIndex === undefined) {
|
|
357
|
+
return undefined;
|
|
358
|
+
}
|
|
359
|
+
const activeItem = items?.[focusedIndex];
|
|
360
|
+
const isActiveRowRendered = virtualItems.some((row) => row.index === focusedIndex);
|
|
361
|
+
if (!activeItem || !isActiveRowRendered) {
|
|
362
|
+
return undefined;
|
|
363
|
+
}
|
|
364
|
+
return makeId?.({ item: activeItem, specifier: SELECT_ITEM_ACTION });
|
|
365
|
+
}
|
|
340
366
|
function checkIsSameScrollTarget(prevItem, currentItem, keyExtractor) {
|
|
341
367
|
if (prevItem === undefined) {
|
|
342
368
|
return false;
|
package/esm/Bubble/Bubble.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CSSProperties, type ReactNode } from "react";
|
|
1
|
+
import { type CSSProperties, type NamedExoticComponent, type ReactNode } from "react";
|
|
2
2
|
import { type OverlayPositionType } from "../typings/overlay.js";
|
|
3
3
|
import { type IAlignPoint } from "../typings/positioning.js";
|
|
4
4
|
import { type ArrowDirections, type ArrowOffsets } from "./typings.js";
|
|
@@ -51,5 +51,5 @@ export interface IBubbleState {
|
|
|
51
51
|
/**
|
|
52
52
|
* @internal
|
|
53
53
|
*/
|
|
54
|
-
export declare const Bubble:
|
|
54
|
+
export declare const Bubble: NamedExoticComponent<IBubbleProps>;
|
|
55
55
|
//# sourceMappingURL=Bubble.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bubble.d.ts","sourceRoot":"","sources":["../../src/Bubble/Bubble.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"Bubble.d.ts","sourceRoot":"","sources":["../../src/Bubble/Bubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EAKjB,MAAM,OAAO,CAAC;AAOf,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,KAAK,e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kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAsBD;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,oBAAoB,CAAC,YAAY,CA0JrD,CAAC"}
|
package/esm/Bubble/Bubble.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2020-2026 GoodData Corporation
|
|
3
|
-
import { memo, useCallback, useMemo, useState } from "react";
|
|
3
|
+
import { memo, useCallback, useMemo, useState, } from "react";
|
|
4
4
|
import cx from "classnames";
|
|
5
5
|
import { cloneDeep, result } from "lodash-es";
|
|
6
6
|
import isReactEqual from "react-fast-compare";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type KeyboardEvent as ReactKeyboardEvent } from "react";
|
|
1
|
+
import { type NamedExoticComponent, type KeyboardEvent as ReactKeyboardEvent } from "react";
|
|
2
2
|
import { type WeekStart } from "@gooddata/sdk-model";
|
|
3
3
|
import { type IAccessibilityConfigBase } from "../typings/accessibility.js";
|
|
4
4
|
import { type IAlignPoint } from "../typings/positioning.js";
|
|
@@ -29,6 +29,6 @@ export declare const WrappedDatePicker: import("react").MemoExoticComponent<type
|
|
|
29
29
|
/**
|
|
30
30
|
* @internal
|
|
31
31
|
*/
|
|
32
|
-
export declare const Datepicker:
|
|
32
|
+
export declare const Datepicker: NamedExoticComponent<IDatePickerProps>;
|
|
33
33
|
export {};
|
|
34
34
|
//# sourceMappingURL=Datepicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Datepicker.d.ts","sourceRoot":"","sources":["../../src/Datepicker/Datepicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,aAAa,IAAI,kBAAkB,EAS3C,MAAM,OAAO,CAAC;AAkCf,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,6BAA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AAE,CAAC,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC1E;AAuCD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAuB3E;AA2BD,iBAAS,qBAAqB,CAAC,EAC3B,mBAAmB,EACnB,IAAI,EAAE,QAAQ,EACd,SAAc,EACd,WAAgB,EAChB,QAAQ,EACR,MAAM,EACN,eAAe,EACf,mBAA2B,EAC3B,IAAS,EACT,QAAY,EACZ,WAAW,EAAE,eAAe,EAC5B,OAAO,EACP,UAAU,EAAE,cAAc,EAC1B,SAAS,EAAE,aAAa,EACxB,kBAAkB,EACrB,EAAE,gBAAgB,2CAuQlB;AAED,eAAO,MAAM,iBAAiB,mEAA8B,CAAC;AAG7D;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,oBAAoB,CAAC,gBAAgB,CAQ5D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type NamedExoticComponent } from "react";
|
|
1
2
|
import { type IConfirmDialogBaseProps } from "./typings.js";
|
|
2
3
|
/**
|
|
3
4
|
* @internal
|
|
4
5
|
*/
|
|
5
|
-
export declare const ConfirmDialog:
|
|
6
|
+
export declare const ConfirmDialog: NamedExoticComponent<IConfirmDialogBaseProps>;
|
|
6
7
|
//# sourceMappingURL=ConfirmDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/ConfirmDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/ConfirmDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,oBAAoB,EAAQ,MAAM,OAAO,CAAC;AAKxD,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,oBAAoB,CAAC,uBAAuB,CAkBtE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Dialog/ShareDialog/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,WAAW,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Dialog/ShareDialog/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,WAAW,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;KAE7B,UAAU,IACJ,6BAA6B,GAC7B,uBAAuB,GACvB,8BAA8B,GAC9B,wBAAwB,GACxB,uBAAuB,GAC9B,OAAO;CACb,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,oBAAoB,EAAE,OAAO,CAAC;IAC9B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AE,OAAO,CAAC;IAClC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAChC,qBAAqB,GACrB,qBAAqB,GACrB,oBAAoB,GACpB,0CAA0C,GAC1C,kCAAkC,GAClC,8BAA8B,GAC9B,4BAA4B,GAC5B,4CAA4C,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,iCAAiC;IAClF,IAAI,EAAE,0BAA0B,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,wBAAwB,CAAC;IAChD,6BAA6B,EAAE,OAAO,CAAC;IACvC,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kBAAkB,EAAE,WAAW,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC5C,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC/B,0BAA0B,CAAC,EAAE,wBAAwB,CAAC;IACtD,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACtC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { type NamedExoticComponent } from "react";
|
|
1
2
|
import { type IFilterLabelProps } from "./typings.js";
|
|
2
3
|
/**
|
|
3
4
|
* @internal
|
|
4
5
|
*/
|
|
5
|
-
export declare const FilterLabel:
|
|
6
|
+
export declare const FilterLabel: NamedExoticComponent<IFilterLabelProps>;
|
|
6
7
|
//# sourceMappingURL=FilterLabel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterLabel.d.ts","sourceRoot":"","sources":["../../src/FilterLabel/FilterLabel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterLabel.d.ts","sourceRoot":"","sources":["../../src/FilterLabel/FilterLabel.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,oBAAoB,EAQ5B,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,oBAAoB,CAAC,iBAAiB,CAgF9D,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2007-
|
|
3
|
-
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
// (C) 2007-2026 GoodData Corporation
|
|
3
|
+
import { memo, useCallback, useEffect, useMemo, useRef, useState, } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
package/esm/Form/Checkbox.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type NamedExoticComponent } from "react";
|
|
1
2
|
import { type LabelSize } from "./typings.js";
|
|
2
3
|
/**
|
|
3
4
|
* @internal
|
|
@@ -15,5 +16,5 @@ export interface ICheckboxProps {
|
|
|
15
16
|
/**
|
|
16
17
|
* @internal
|
|
17
18
|
*/
|
|
18
|
-
export declare const Checkbox:
|
|
19
|
+
export declare const Checkbox: NamedExoticComponent<ICheckboxProps>;
|
|
19
20
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/Form/Checkbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/Form/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA8B,KAAK,oBAAoB,EAA8B,MAAM,OAAO,CAAC;AAI1G,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;GAEG;AAEH,MAAM,WAAW,cAAc;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AAEH,eAAO,MAAM,QAAQ,EAAE,oBAAoB,CAAC,cAAc,CA2CxD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ChangeEvent } from "react";
|
|
1
|
+
import { type ChangeEvent, type NamedExoticComponent } from "react";
|
|
2
2
|
import { type IInputPureProps } from "./InputPure.js";
|
|
3
3
|
import { type Separators } from "./typings.js";
|
|
4
4
|
/**
|
|
@@ -24,5 +24,5 @@ export interface IInputWithNumberFormatProps extends IInputWithNumberFormatOwnPr
|
|
|
24
24
|
/**
|
|
25
25
|
* @internal
|
|
26
26
|
*/
|
|
27
|
-
export declare const InputWithNumberFormat:
|
|
27
|
+
export declare const InputWithNumberFormat: NamedExoticComponent<IInputWithNumberFormatProps>;
|
|
28
28
|
//# sourceMappingURL=InputWithNumberFormat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputWithNumberFormat.d.ts","sourceRoot":"","sources":["../../src/Form/InputWithNumberFormat.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"InputWithNumberFormat.d.ts","sourceRoot":"","sources":["../../src/Form/InputWithNumberFormat.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,WAAW,EAEhB,KAAK,oBAAoB,EAK5B,MAAM,OAAO,CAAC;AAIf,OAAO,EAAyB,KAAK,eAAe,EAAa,MAAM,gBAAgB,CAAC;AAExF,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAmD/C;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B;AAED;;GAEG;AAEH,MAAM,WAAW,2BAA2B;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AAEH,MAAM,WAAW,2BACb,SAAQ,8BAA8B,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;IACzE,qGAAqG;IACrG,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAChF;AAUD;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,oBAAoB,CAAC,2BAA2B,CAwEnF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
|
-
import { memo, useEffect, useRef, useState } from "react";
|
|
3
|
+
import { memo, useEffect, useRef, useState, } from "react";
|
|
4
4
|
import { memoize } from "lodash-es";
|
|
5
5
|
import { InputPure } from "./InputPure.js";
|
|
6
6
|
import { DEFAULT_SEPARATORS, formatNumberWithSeparators } from "./numberFormat.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type NamedExoticComponent } from "react";
|
|
1
2
|
/**
|
|
2
3
|
* @internal
|
|
3
4
|
*/
|
|
@@ -14,5 +15,5 @@ export interface ILegacyMultiSelectListItemProps {
|
|
|
14
15
|
* @internal
|
|
15
16
|
* @deprecated This component is deprecated use MultiSelectListItem instead
|
|
16
17
|
*/
|
|
17
|
-
export declare const LegacyMultiSelectListItem:
|
|
18
|
+
export declare const LegacyMultiSelectListItem: NamedExoticComponent<ILegacyMultiSelectListItemProps>;
|
|
18
19
|
//# sourceMappingURL=LegacyMultiSelectListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegacyMultiSelectListItem.d.ts","sourceRoot":"","sources":["../../src/List/LegacyMultiSelectListItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LegacyMultiSelectListItem.d.ts","sourceRoot":"","sources":["../../src/List/LegacyMultiSelectListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,oBAAoB,EAK5B,MAAM,OAAO,CAAC;AAOf;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,GAAG,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,oBAAoB,CAAC,+BAA+B,CA+D3F,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
|
-
import { memo, useCallback, useMemo } from "react";
|
|
3
|
+
import { memo, useCallback, useMemo, } from "react";
|
|
4
4
|
import cx from "classnames";
|
|
5
5
|
import { FormattedMessage } from "react-intl";
|
|
6
6
|
import { simplifyText } from "@gooddata/util";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type NamedExoticComponent } from "react";
|
|
1
2
|
/**
|
|
2
3
|
* @internal
|
|
3
4
|
*/
|
|
@@ -12,5 +13,5 @@ export interface IMultiSelectListItemProps {
|
|
|
12
13
|
/**
|
|
13
14
|
* @internal
|
|
14
15
|
*/
|
|
15
|
-
export declare const MultiSelectListItem:
|
|
16
|
+
export declare const MultiSelectListItem: NamedExoticComponent<IMultiSelectListItemProps>;
|
|
16
17
|
//# sourceMappingURL=MultiSelectListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelectListItem.d.ts","sourceRoot":"","sources":["../../src/List/MultiSelectListItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MultiSelectListItem.d.ts","sourceRoot":"","sources":["../../src/List/MultiSelectListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,oBAAoB,EAA8B,MAAM,OAAO,CAAC;AAO/F;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,oBAAoB,CAAC,yBAAyB,CA8C/E,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import { type NamedExoticComponent, type ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* @internal
|
|
4
4
|
*/
|
|
@@ -16,5 +16,5 @@ export interface IErrorOverlayProps {
|
|
|
16
16
|
/**
|
|
17
17
|
* @internal
|
|
18
18
|
*/
|
|
19
|
-
export declare const ErrorOverlay:
|
|
19
|
+
export declare const ErrorOverlay: NamedExoticComponent<IErrorOverlayProps>;
|
|
20
20
|
//# sourceMappingURL=ErrorOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorOverlay.d.ts","sourceRoot":"","sources":["../../src/Overlay/ErrorOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorOverlay.d.ts","sourceRoot":"","sources":["../../src/Overlay/ErrorOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAajF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AA0DD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,oBAAoB,CAAC,kBAAkB,CAQhE,CAAC"}
|
|
@@ -9,14 +9,15 @@ export interface IAllowedValuesParameterControlDropdownProps {
|
|
|
9
9
|
defaultValue: string;
|
|
10
10
|
allowedValues: IParameterAllowedValue[];
|
|
11
11
|
ariaAttributes?: IDropdownBodyRenderProps["ariaAttributes"];
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
onSelect: (value: string) => void;
|
|
13
|
+
onClose: () => void;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Dropdown panel
|
|
17
|
-
* titles only and
|
|
16
|
+
* Dropdown panel to select a string parameter value from its allowed values. It shows the
|
|
17
|
+
* effective titles only, and sends the value through `onSelect` on click. There is no draft, and
|
|
18
|
+
* therefore no footer. The caller decides if a selection commits or stages the value.
|
|
18
19
|
*
|
|
19
20
|
* @internal
|
|
20
21
|
*/
|
|
21
|
-
export declare function AllowedValuesParameterControlDropdown({ name, value, defaultValue, allowedValues, ariaAttributes,
|
|
22
|
+
export declare function AllowedValuesParameterControlDropdown({ name, value, defaultValue, allowedValues, ariaAttributes, onSelect, onClose }: IAllowedValuesParameterControlDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
22
23
|
//# sourceMappingURL=AllowedValuesParameterControlDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllowedValuesParameterControlDropdown.d.ts","sourceRoot":"","sources":["../../src/ParameterControl/AllowedValuesParameterControlDropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,sBAAsB,EAAiC,MAAM,qBAAqB,CAAC;AAGjG,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAcxE;;GAEG;AACH,MAAM,WAAW,2CAA2C;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,sBAAsB,EAAE,CAAC;IACxC,cAAc,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,
|
|
1
|
+
{"version":3,"file":"AllowedValuesParameterControlDropdown.d.ts","sourceRoot":"","sources":["../../src/ParameterControl/AllowedValuesParameterControlDropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,sBAAsB,EAAiC,MAAM,qBAAqB,CAAC;AAGjG,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAcxE;;GAEG;AACH,MAAM,WAAW,2CAA2C;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,sBAAsB,EAAE,CAAC;IACxC,cAAc,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CAAC,EAClD,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,aAAa,EACb,cAAc,EACd,QAAQ,EACR,OAAO,EACV,EAAE,2CAA2C,2CAuC7C"}
|
|
@@ -14,18 +14,19 @@ const messages = defineMessages({
|
|
|
14
14
|
defaultSuffix: { id: "parameter_filter.dropdown.default_suffix" },
|
|
15
15
|
});
|
|
16
16
|
/**
|
|
17
|
-
* Dropdown panel
|
|
18
|
-
* titles only and
|
|
17
|
+
* Dropdown panel to select a string parameter value from its allowed values. It shows the
|
|
18
|
+
* effective titles only, and sends the value through `onSelect` on click. There is no draft, and
|
|
19
|
+
* therefore no footer. The caller decides if a selection commits or stages the value.
|
|
19
20
|
*
|
|
20
21
|
* @internal
|
|
21
22
|
*/
|
|
22
|
-
export function AllowedValuesParameterControlDropdown({ name, value, defaultValue, allowedValues, ariaAttributes,
|
|
23
|
+
export function AllowedValuesParameterControlDropdown({ name, value, defaultValue, allowedValues, ariaAttributes, onSelect, onClose, }) {
|
|
23
24
|
const intl = useIntl();
|
|
24
25
|
const [search, setSearch] = useState("");
|
|
25
26
|
const showSearch = allowedValues.length > SEARCH_THRESHOLD;
|
|
26
27
|
const items = useMemo(() => filterAllowedValuesByTitle(allowedValues, search), [allowedValues, search]);
|
|
27
28
|
const isCurrentValue = (item) => item.value === value;
|
|
28
|
-
return (_jsx("div", { ...ariaAttributes, className: `${b({ dropdown: true, "allowed-values": true })} overlay gd-dialog gd-dropdown`, "data-testid": "parameter-control-allowed-values-dropdown", children: _jsx(DropdownList, { items: items, itemTitleGetter: getParameterAllowedValueTitle, showSearch: showSearch, searchPlaceholder: intl.formatMessage(messages.searchPlaceholder), searchLabel: intl.formatMessage(messages.searchLabel), onSearch: setSearch, closeDropdown:
|
|
29
|
+
return (_jsx("div", { ...ariaAttributes, className: `${b({ dropdown: true, "allowed-values": true })} overlay gd-dialog gd-dropdown`, "data-testid": "parameter-control-allowed-values-dropdown", children: _jsx(DropdownList, { items: items, itemTitleGetter: getParameterAllowedValueTitle, showSearch: showSearch, searchPlaceholder: intl.formatMessage(messages.searchPlaceholder), searchLabel: intl.formatMessage(messages.searchLabel), onSearch: setSearch, closeDropdown: onClose, accessibilityConfig: { role: "listbox", ariaLabel: name }, getIsItemSelected: isCurrentValue, onKeyDownSelect: (item) => onSelect(item.value), renderItem: ({ item, isSelected }) => (_jsx(SingleSelectListItem, { title: getParameterAllowedValueTitle(item), isSelected: isSelected, onClick: () => onSelect(item.value), suffix: item.value === defaultValue
|
|
29
30
|
? intl.formatMessage(messages.defaultSuffix)
|
|
30
31
|
: undefined })) }) }));
|
|
31
32
|
}
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import { type MessageDescriptor } from "react-intl";
|
|
2
2
|
import { type INumberParameterConstraints } from "@gooddata/sdk-model";
|
|
3
3
|
import { type IDropdownBodyRenderProps } from "../Dropdown/Dropdown.js";
|
|
4
|
+
import { type ParameterSubmitModeProps } from "./submitMode.js";
|
|
4
5
|
/**
|
|
5
6
|
* @internal
|
|
6
7
|
*/
|
|
7
|
-
export
|
|
8
|
+
export type INumberParameterControlDropdownProps = {
|
|
8
9
|
name: string;
|
|
9
10
|
value: number;
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
-
* `undefined
|
|
13
|
-
* draft input only; the user must click Apply to commit.
|
|
12
|
+
* The workspace default value for the Reset link. The control hides Reset when this value is
|
|
13
|
+
* `undefined`, or when it is equal to the current valid draft.
|
|
14
14
|
*/
|
|
15
15
|
resetValue?: number;
|
|
16
16
|
constraints?: INumberParameterConstraints;
|
|
17
17
|
inputId?: string;
|
|
18
18
|
ariaAttributes?: IDropdownBodyRenderProps["ariaAttributes"];
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
} & ParameterSubmitModeProps<number>;
|
|
22
21
|
/**
|
|
23
|
-
* Dropdown panel
|
|
24
|
-
* and
|
|
22
|
+
* Dropdown panel to edit a numeric parameter value. It keeps the draft, does the inline
|
|
23
|
+
* validation, and shows the Reset link.
|
|
25
24
|
*
|
|
26
25
|
* @internal
|
|
27
26
|
*/
|
|
28
|
-
export declare function NumberParameterControlDropdown(
|
|
27
|
+
export declare function NumberParameterControlDropdown(props: INumberParameterControlDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
29
28
|
/**
|
|
30
29
|
* Returns the message to show for an invalid draft, or `undefined` when the draft is a valid
|
|
31
30
|
* in-range number. The single source of truth the dropdown derives its error row, input style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberParameterControlDropdown.d.ts","sourceRoot":"","sources":["../../src/ParameterControl/NumberParameterControlDropdown.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,iBAAiB,EAAkB,MAAM,YAAY,CAAC;AAEtF,OAAO,EAAE,KAAK,2BAA2B,EAA+B,MAAM,qBAAqB,CAAC;AAEpG,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"NumberParameterControlDropdown.d.ts","sourceRoot":"","sources":["../../src/ParameterControl/NumberParameterControlDropdown.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,iBAAiB,EAAkB,MAAM,YAAY,CAAC;AAEtF,OAAO,EAAE,KAAK,2BAA2B,EAA+B,MAAM,qBAAqB,CAAC;AAEpG,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAGxE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAShE;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,2BAA2B,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAErC;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,oCAAoC,2CAmCzF;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,2BAA2B,GAC1C,iBAAiB,GAAG,SAAS,CAgB/B"}
|
|
@@ -11,17 +11,24 @@ const messages = defineMessages({
|
|
|
11
11
|
errorOutOfRangeMax: { id: "parameter_filter.dropdown.error.outOfRange.max" },
|
|
12
12
|
});
|
|
13
13
|
/**
|
|
14
|
-
* Dropdown panel
|
|
15
|
-
* and
|
|
14
|
+
* Dropdown panel to edit a numeric parameter value. It keeps the draft, does the inline
|
|
15
|
+
* validation, and shows the Reset link.
|
|
16
16
|
*
|
|
17
17
|
* @internal
|
|
18
18
|
*/
|
|
19
|
-
export function NumberParameterControlDropdown(
|
|
19
|
+
export function NumberParameterControlDropdown(props) {
|
|
20
|
+
const { name, value, resetValue, constraints, inputId, ariaAttributes, onClose } = props;
|
|
20
21
|
const [draft, setDraft] = useState(String(value));
|
|
21
22
|
const error = getDraftValidationError(draft, constraints);
|
|
22
23
|
const effectiveValue = error ? value : parseDraft(draft);
|
|
23
24
|
const showReset = resetValue !== undefined && effectiveValue !== resetValue;
|
|
24
|
-
|
|
25
|
+
function updateDraft(next) {
|
|
26
|
+
setDraft(next);
|
|
27
|
+
if (props.mode === "staged" && !getDraftValidationError(next, constraints)) {
|
|
28
|
+
props.onStage(parseDraft(next));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return (_jsx(ParameterControlDropdown, { name: name, draft: draft, onDraftChange: updateDraft, inputType: "number", min: constraints?.min, max: constraints?.max, inputId: inputId, ariaAttributes: ariaAttributes, errorMessage: error ? (_jsx(FormattedMessage, { ...error, values: { min: constraints?.min, max: constraints?.max } })) : undefined, onReset: showReset ? () => updateDraft(String(resetValue)) : undefined, onApply: props.mode === "commit" ? () => props.onCommit(parseDraft(draft)) : undefined, onClose: onClose }));
|
|
25
32
|
}
|
|
26
33
|
/**
|
|
27
34
|
* Returns the message to show for an invalid draft, or `undefined` when the draft is a valid
|
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
import { type IParameterDefinition, type ParameterValue } from "@gooddata/sdk-model";
|
|
2
2
|
import { type IDropdownBodyRenderProps } from "../Dropdown/Dropdown.js";
|
|
3
|
+
import { type ParameterSubmitModeProps } from "./submitMode.js";
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*/
|
|
6
|
-
export
|
|
7
|
+
export type IParameterControlProps = {
|
|
7
8
|
name: string;
|
|
8
9
|
definition: IParameterDefinition;
|
|
9
10
|
value: ParameterValue;
|
|
10
11
|
resetValue?: ParameterValue;
|
|
11
12
|
inputId?: string;
|
|
12
13
|
ariaAttributes?: IDropdownBodyRenderProps["ariaAttributes"];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The control calls this itself after a commit-mode Apply, and after the user selects an
|
|
16
|
+
* allowed value. The footer Cancel or Close button also calls this. Close does not remove the
|
|
17
|
+
* staged value.
|
|
18
|
+
*/
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
} & ParameterSubmitModeProps<ParameterValue>;
|
|
16
21
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* here.
|
|
22
|
+
* Controls the full parameter edit session. It selects the control variant from `definition.type`
|
|
23
|
+
* and the constraint shape, then gives the commit or staged mode to that variant. To add a
|
|
24
|
+
* variant, add a sibling control and a new case here.
|
|
20
25
|
*
|
|
21
26
|
* @internal
|
|
22
27
|
*/
|
|
23
|
-
export declare function ParameterControl(
|
|
28
|
+
export declare function ParameterControl(props: IParameterControlProps): import("react/jsx-runtime").JSX.Element;
|
|
24
29
|
//# sourceMappingURL=ParameterControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterControl.d.ts","sourceRoot":"","sources":["../../src/ParameterControl/ParameterControl.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,cAAc,EAGtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"ParameterControl.d.ts","sourceRoot":"","sources":["../../src/ParameterControl/ParameterControl.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,cAAc,EAGtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAKxE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,oBAAoB,CAAC;IACjC,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IAC5D;;;;OAIG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,GAAG,wBAAwB,CAAC,cAAc,CAAC,CAAC;AAE7C;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,sBAAsB,2CA2D7D"}
|
|
@@ -5,19 +5,32 @@ import { AllowedValuesParameterControlDropdown } from "./AllowedValuesParameterC
|
|
|
5
5
|
import { NumberParameterControlDropdown } from "./NumberParameterControlDropdown.js";
|
|
6
6
|
import { StringParameterControlDropdown } from "./StringParameterControlDropdown.js";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* here.
|
|
8
|
+
* Controls the full parameter edit session. It selects the control variant from `definition.type`
|
|
9
|
+
* and the constraint shape, then gives the commit or staged mode to that variant. To add a
|
|
10
|
+
* variant, add a sibling control and a new case here.
|
|
11
11
|
*
|
|
12
12
|
* @internal
|
|
13
13
|
*/
|
|
14
|
-
export function ParameterControl(
|
|
14
|
+
export function ParameterControl(props) {
|
|
15
|
+
const { name, definition, value, resetValue, inputId, ariaAttributes, onClose } = props;
|
|
16
|
+
function submitAndClose(nextValue) {
|
|
17
|
+
if (props.mode === "staged") {
|
|
18
|
+
props.onStage(nextValue);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
props.onCommit(nextValue);
|
|
22
|
+
}
|
|
23
|
+
onClose();
|
|
24
|
+
}
|
|
25
|
+
const scalarSubmitProps = props.mode === "staged"
|
|
26
|
+
? { mode: "staged", onStage: props.onStage }
|
|
27
|
+
: { mode: "commit", onCommit: submitAndClose };
|
|
15
28
|
switch (definition.type) {
|
|
16
29
|
case "NUMBER":
|
|
17
|
-
return (_jsx(NumberParameterControlDropdown, { name: name, value: Number(value), resetValue: resetValue === undefined ? undefined : Number(resetValue), constraints: definition.constraints, inputId: inputId, ariaAttributes: ariaAttributes,
|
|
30
|
+
return (_jsx(NumberParameterControlDropdown, { name: name, value: Number(value), resetValue: resetValue === undefined ? undefined : Number(resetValue), constraints: definition.constraints, inputId: inputId, ariaAttributes: ariaAttributes, ...scalarSubmitProps, onClose: onClose }));
|
|
18
31
|
case "STRING": {
|
|
19
32
|
const allowedValues = getParameterAllowedValues(definition);
|
|
20
|
-
return allowedValues ? (_jsx(AllowedValuesParameterControlDropdown, { name: name, value: String(value), defaultValue: resetValue === undefined ? definition.defaultValue : String(resetValue), allowedValues: allowedValues, ariaAttributes: ariaAttributes,
|
|
33
|
+
return allowedValues ? (_jsx(AllowedValuesParameterControlDropdown, { name: name, value: String(value), defaultValue: resetValue === undefined ? definition.defaultValue : String(resetValue), allowedValues: allowedValues, ariaAttributes: ariaAttributes, onSelect: submitAndClose, onClose: onClose })) : (_jsx(StringParameterControlDropdown, { name: name, value: String(value), resetValue: resetValue === undefined ? undefined : String(resetValue), constraints: definition.constraints, inputId: inputId, ariaAttributes: ariaAttributes, ...scalarSubmitProps, onClose: onClose }));
|
|
21
34
|
}
|
|
22
35
|
default:
|
|
23
36
|
return throwUnexpected(definition);
|
|
@@ -16,8 +16,11 @@ export interface IParameterControlDropdownProps {
|
|
|
16
16
|
errorMessage?: ReactNode;
|
|
17
17
|
previewValue?: ParameterValue;
|
|
18
18
|
onReset?: () => void;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Commits the draft. Without this callback, the footer shows only Close.
|
|
21
|
+
*/
|
|
22
|
+
onApply?: () => void;
|
|
23
|
+
onClose: () => void;
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
* Presentational dropdown shared by the parameter control variants; variants own the draft state,
|
|
@@ -25,5 +28,5 @@ export interface IParameterControlDropdownProps {
|
|
|
25
28
|
*
|
|
26
29
|
* @internal
|
|
27
30
|
*/
|
|
28
|
-
export declare function ParameterControlDropdown({ name, draft, onDraftChange, inputType, min, max, inputId: inputIdProp, ariaAttributes, errorMessage, previewValue, onReset, onApply,
|
|
31
|
+
export declare function ParameterControlDropdown({ name, draft, onDraftChange, inputType, min, max, inputId: inputIdProp, ariaAttributes, errorMessage, previewValue, onReset, onApply, onClose }: IParameterControlDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
29
32
|
//# sourceMappingURL=ParameterControlDropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterControlDropdown.d.ts","sourceRoot":"","sources":["../../src/ParameterControl/ParameterControlDropdown.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"ParameterControlDropdown.d.ts","sourceRoot":"","sources":["../../src/ParameterControl/ParameterControlDropdown.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAkBxE;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,IAAI,EACJ,KAAK,EACL,aAAa,EACb,SAAS,EACT,GAAG,EACH,GAAG,EACH,OAAO,EAAE,WAAW,EACpB,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,OAAO,EACP,OAAO,EACV,EAAE,8BAA8B,2CAyGhC"}
|