@gooddata/sdk-ui-kit 11.55.0-alpha.2 → 11.55.0-alpha.4
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/@types/icon.d.ts +1 -1
- package/esm/@ui/@types/icon.d.ts.map +1 -1
- package/esm/@ui/UiColorPicker/UiColorPicker.d.ts +6 -0
- package/esm/@ui/UiColorPicker/UiColorPicker.d.ts.map +1 -0
- package/esm/@ui/UiColorPicker/UiColorPicker.js +49 -0
- package/esm/@ui/UiColorPicker/colorValue.d.ts +58 -0
- package/esm/@ui/UiColorPicker/colorValue.d.ts.map +1 -0
- package/esm/@ui/UiColorPicker/colorValue.js +90 -0
- package/esm/@ui/UiColorPicker/components/UiColorSlider.d.ts +19 -0
- package/esm/@ui/UiColorPicker/components/UiColorSlider.d.ts.map +1 -0
- package/esm/@ui/UiColorPicker/components/UiColorSlider.js +35 -0
- package/esm/@ui/UiColorPicker/components/UiColorValueField.d.ts +12 -0
- package/esm/@ui/UiColorPicker/components/UiColorValueField.d.ts.map +1 -0
- package/esm/@ui/UiColorPicker/components/UiColorValueField.js +40 -0
- package/esm/@ui/UiColorPicker/components/UiColorWheel.d.ts +9 -0
- package/esm/@ui/UiColorPicker/components/UiColorWheel.d.ts.map +1 -0
- package/esm/@ui/UiColorPicker/components/UiColorWheel.js +43 -0
- package/esm/@ui/UiColorPicker/types.d.ts +70 -0
- package/esm/@ui/UiColorPicker/types.d.ts.map +1 -0
- package/esm/@ui/UiColorPicker/types.js +2 -0
- package/esm/@ui/UiFloatingElement/UiFloatingElement.d.ts +1 -1
- package/esm/@ui/UiFloatingElement/UiFloatingElement.d.ts.map +1 -1
- package/esm/@ui/UiFloatingElement/UiFloatingElement.js +3 -1
- package/esm/@ui/UiFloatingElement/types.d.ts +19 -0
- package/esm/@ui/UiFloatingElement/types.d.ts.map +1 -1
- package/esm/@ui/UiFloatingElement/types.js +1 -1
- package/esm/@ui/UiFloatingElement/useFloatingPosition.d.ts +1 -1
- package/esm/@ui/UiFloatingElement/useFloatingPosition.d.ts.map +1 -1
- package/esm/@ui/UiFloatingElement/useFloatingPosition.js +17 -4
- package/esm/@ui/UiIcon/icons.d.ts.map +1 -1
- package/esm/@ui/UiIcon/icons.js +27 -0
- package/esm/@ui/hooks/useCloseOnOutsideClick.d.ts.map +1 -1
- package/esm/@ui/hooks/useCloseOnOutsideClick.js +2 -1
- package/esm/@ui/hooks/usePointerTrack.d.ts +23 -0
- package/esm/@ui/hooks/usePointerTrack.d.ts.map +1 -0
- package/esm/@ui/hooks/usePointerTrack.js +45 -0
- 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/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 +4 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -0
- package/esm/measureNumberFormat/MeasureNumberFormat.d.ts +2 -2
- package/esm/measureNumberFormat/MeasureNumberFormat.d.ts.map +1 -1
- package/esm/sdk-ui-kit.d.ts +156 -11
- package/package.json +13 -14
- package/src/@ui/UiColorPicker/UiColorPicker.scss +120 -0
- package/src/@ui/index.scss +1 -0
- package/styles/css/main.css +81 -0
- package/styles/css/main.css.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
2
|
import { useCallback, useMemo, useRef } from "react";
|
|
3
|
-
import { arrow, autoUpdate, flip, offset, shift, size, useFloating, } from "@floating-ui/react";
|
|
3
|
+
import { arrow, autoUpdate, flip, limitShift, offset, shift, size, useFloating, } from "@floating-ui/react";
|
|
4
4
|
import { useOverlayZIndexWithRegister } from "../../Overlay/OverlayContext.js";
|
|
5
5
|
import { alignPointsToFallbackPlacements, alignPointsToPlacement, getOffsetFromAlignPoint } from "./utils.js";
|
|
6
6
|
// Stable empty array to avoid re-creating on every render
|
|
@@ -10,7 +10,7 @@ const EMPTY_MIDDLEWARE = [];
|
|
|
10
10
|
*
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
export function useFloatingPosition({ isOpen, onOpenChange, placement: placementProp = "bottom-start", alignPoints, strategy = "absolute", offset: offsetProp, autoFlip = true, fallbackPlacements: fallbackPlacementsProp, arrowRef, customMiddleware = EMPTY_MIDDLEWARE, maxWidth, maxHeight, zIndex: zIndexProp, shiftPadding = 8, }) {
|
|
13
|
+
export function useFloatingPosition({ isOpen, onOpenChange, placement: placementProp = "bottom-start", alignPoints, strategy = "absolute", offset: offsetProp, autoFlip = true, allowOverlapAnchor = false, overflowBoundary, fallbackPlacements: fallbackPlacementsProp, arrowRef, customMiddleware = EMPTY_MIDDLEWARE, maxWidth, maxHeight, zIndex: zIndexProp, shiftPadding = 8, }) {
|
|
14
14
|
const floatingRef = useRef(null);
|
|
15
15
|
const registeredZIndex = useOverlayZIndexWithRegister();
|
|
16
16
|
const placement = useMemo(() => {
|
|
@@ -41,13 +41,24 @@ export function useFloatingPosition({ isOpen, onOpenChange, placement: placement
|
|
|
41
41
|
const mw = [offset(computedOffset), ...customMiddleware];
|
|
42
42
|
if (autoFlip) {
|
|
43
43
|
mw.push(flip({
|
|
44
|
+
boundary: overflowBoundary,
|
|
44
45
|
fallbackPlacements,
|
|
45
|
-
|
|
46
|
+
// When no placement fits, the side with the least overflow is all that keeps the
|
|
47
|
+
// element on the screen. An element allowed to cover its anchor is slid back
|
|
48
|
+
// into view by shift whichever side it is on, so that one keeps the side asked
|
|
49
|
+
// for instead.
|
|
50
|
+
fallbackStrategy: allowOverlapAnchor ? "initialPlacement" : "bestFit",
|
|
46
51
|
}));
|
|
47
52
|
}
|
|
48
|
-
mw.push(shift({
|
|
53
|
+
mw.push(shift({
|
|
54
|
+
boundary: overflowBoundary,
|
|
55
|
+
padding: shiftPadding,
|
|
56
|
+
crossAxis: allowOverlapAnchor,
|
|
57
|
+
limiter: allowOverlapAnchor ? limitShift() : undefined,
|
|
58
|
+
}));
|
|
49
59
|
if (maxWidth !== undefined || maxHeight !== undefined) {
|
|
50
60
|
mw.push(size({
|
|
61
|
+
boundary: overflowBoundary,
|
|
51
62
|
apply({ availableWidth, availableHeight, elements }) {
|
|
52
63
|
const maxW = typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth;
|
|
53
64
|
const maxH = typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight;
|
|
@@ -66,6 +77,8 @@ export function useFloatingPosition({ isOpen, onOpenChange, placement: placement
|
|
|
66
77
|
computedOffset,
|
|
67
78
|
customMiddleware,
|
|
68
79
|
autoFlip,
|
|
80
|
+
allowOverlapAnchor,
|
|
81
|
+
overflowBoundary,
|
|
69
82
|
shiftPadding,
|
|
70
83
|
maxWidth,
|
|
71
84
|
maxHeight,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiIcon/icons.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiIcon/icons.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,SAAS,CAsjCjD,CAAC"}
|
package/esm/@ui/UiIcon/icons.js
CHANGED
|
@@ -3,6 +3,33 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
* @internal
|
|
4
4
|
*/
|
|
5
5
|
export const iconPaths = {
|
|
6
|
+
// A frame with the whole image inside it, the same image overflowing it, and the image as the
|
|
7
|
+
// frame itself: what each fitting does to an image too large for the area it is drawn in.
|
|
8
|
+
imageContain: (_jsxs(_Fragment, { children: [
|
|
9
|
+
_jsx("path", { fillRule: "evenodd", d: "M2 3h16v14H2V3zm1.8 1.8v10.4h12.4V4.8H3.8z" }), _jsx("rect", { x: "5.5", y: "7", width: "9", height: "6", rx: "1" })
|
|
10
|
+
] })),
|
|
11
|
+
imageCover: (_jsxs(_Fragment, { children: [
|
|
12
|
+
_jsx("path", { fillRule: "evenodd", d: "M2 3h16v14H2V3zm1.8 1.8v10.4h12.4V4.8H3.8z" }), _jsx("rect", { x: "6", y: "1", width: "13", height: "13", rx: "1" })
|
|
13
|
+
] })),
|
|
14
|
+
imageFill: _jsx("rect", { x: "2", y: "3", width: "16", height: "14", rx: "1" }),
|
|
15
|
+
alignLeft: (_jsxs(_Fragment, { children: [
|
|
16
|
+
_jsx("rect", { x: "3", y: "2", width: "1.5", height: "16", rx: "0.75" }), _jsx("rect", { x: "6", y: "6", width: "11", height: "3", rx: "1" }), _jsx("rect", { x: "6", y: "11", width: "7", height: "3", rx: "1" })
|
|
17
|
+
] })),
|
|
18
|
+
alignCenter: (_jsxs(_Fragment, { children: [
|
|
19
|
+
_jsx("rect", { x: "9.25", y: "2", width: "1.5", height: "16", rx: "0.75" }), _jsx("rect", { x: "3", y: "6", width: "14", height: "3", rx: "1" }), _jsx("rect", { x: "5", y: "11", width: "10", height: "3", rx: "1" })
|
|
20
|
+
] })),
|
|
21
|
+
alignRight: (_jsxs(_Fragment, { children: [
|
|
22
|
+
_jsx("rect", { x: "15.5", y: "2", width: "1.5", height: "16", rx: "0.75" }), _jsx("rect", { x: "3", y: "6", width: "11", height: "3", rx: "1" }), _jsx("rect", { x: "7", y: "11", width: "7", height: "3", rx: "1" })
|
|
23
|
+
] })),
|
|
24
|
+
alignTop: (_jsxs(_Fragment, { children: [
|
|
25
|
+
_jsx("rect", { x: "2", y: "3", width: "16", height: "1.5", rx: "0.75" }), _jsx("rect", { x: "6", y: "6", width: "3", height: "11", rx: "1" }), _jsx("rect", { x: "11", y: "6", width: "3", height: "7", rx: "1" })
|
|
26
|
+
] })),
|
|
27
|
+
alignMiddle: (_jsxs(_Fragment, { children: [
|
|
28
|
+
_jsx("rect", { x: "2", y: "9.25", width: "16", height: "1.5", rx: "0.75" }), _jsx("rect", { x: "6", y: "3", width: "3", height: "14", rx: "1" }), _jsx("rect", { x: "11", y: "5", width: "3", height: "10", rx: "1" })
|
|
29
|
+
] })),
|
|
30
|
+
alignBottom: (_jsxs(_Fragment, { children: [
|
|
31
|
+
_jsx("rect", { x: "2", y: "15.5", width: "16", height: "1.5", rx: "0.75" }), _jsx("rect", { x: "6", y: "3", width: "3", height: "11", rx: "1" }), _jsx("rect", { x: "11", y: "7", width: "3", height: "7", rx: "1" })
|
|
32
|
+
] })),
|
|
6
33
|
brain: (_jsxs(_Fragment, { children: [
|
|
7
34
|
_jsx("path", { d: "M11.1219 1.40916C11.3854 1.40917 11.6465 1.45114 11.8953 1.5322L11.8943 1.53318C11.9371 1.54639 11.9799 1.56333 12.0193 1.58884C12.2505 1.73892 12.3162 2.04871 12.1668 2.28025C12.0269 2.49636 11.9459 2.85832 11.9109 3.22654C11.8946 3.39938 11.89 3.55545 11.8895 3.66795C11.8892 3.72377 11.8896 3.7691 11.8904 3.79881C11.8908 3.81305 11.8921 3.82411 11.8924 3.83103V3.83884L11.8875 3.94041C11.8529 4.17007 11.6596 4.35213 11.4187 4.36521C11.1778 4.37762 10.9676 4.21686 10.909 3.99216L10.8934 3.89158V3.88572C10.8932 3.88244 10.8926 3.87738 10.8924 3.87205C10.8919 3.86091 10.8919 3.84453 10.8914 3.82517C10.8904 3.78622 10.8891 3.73112 10.8895 3.66404C10.8901 3.52941 10.8959 3.34178 10.9158 3.13181C10.9357 2.92255 10.9718 2.66694 11.0418 2.40916H8.15996C8.00804 2.40917 7.85669 2.43213 7.71172 2.47752L4.55937 3.46482C4.55646 3.46574 4.55349 3.46682 4.55058 3.46775C4.42831 4.21863 4.89289 4.95502 5.64336 5.15623C5.90981 5.22785 6.06823 5.50197 5.99687 5.76853C5.92531 6.03495 5.65107 6.19323 5.38457 6.12205C4.43804 5.86834 3.76614 5.10336 3.58281 4.20408L1.43242 6.38377C1.10868 6.71192 0.953881 7.17165 1.0125 7.62888L1.21758 9.23142C1.28419 9.7503 1.6168 10.1979 2.09453 10.4111L3.6209 11.0918C3.64174 11.1011 3.66187 11.1122 3.68242 11.122C3.97467 10.4477 4.55181 9.9314 5.26445 9.7197L12.0389 7.70701C12.4553 7.5832 12.7846 7.26146 12.9168 6.84763C13.001 6.58496 13.2819 6.43961 13.5447 6.52341C13.8075 6.60757 13.9528 6.88944 13.8689 7.15232C13.6361 7.88117 13.0574 8.44796 12.324 8.66599L9.55254 9.48826C9.46669 9.57341 9.40576 9.64478 9.36797 9.69334C9.34722 9.72001 9.33261 9.73979 9.325 9.75095C9.32148 9.75615 9.31914 9.7617 9.31914 9.7617L9.32109 9.75779C9.31707 9.76449 9.31272 9.77083 9.3084 9.77732L9.30937 9.77634C9.30937 9.77634 9.30647 9.78007 9.30449 9.78318C9.29983 9.79057 9.29195 9.80351 9.28203 9.82029C9.26178 9.85456 9.23211 9.90747 9.19902 9.97361C9.1319 10.1079 9.05386 10.2917 9.00273 10.4961C8.89905 10.9108 8.92165 11.3222 9.2459 11.6465C9.44078 11.8417 9.44081 12.1583 9.2459 12.3535C9.05071 12.5483 8.73405 12.5484 8.53886 12.3535C7.86332 11.678 7.88583 10.8391 8.03203 10.2539C8.06295 10.1303 8.1011 10.0139 8.14043 9.9072L5.54863 10.6777C5.07307 10.8191 4.69859 11.1875 4.54765 11.6601L4.51347 11.7646C4.56755 11.8288 4.61921 11.8952 4.66679 11.9648L5.6873 13.459C5.96681 13.8678 6.43127 14.1132 6.92656 14.1133H8.67168C9.40856 14.1134 10.1079 14.4385 10.5828 15.0019L11.8875 16.5488V15.4248C11.8875 15.2132 11.9189 15.0023 11.9803 14.7998C12.1305 14.3041 12.4465 13.897 12.8533 13.6279C12.3677 13.1719 12.0634 12.5254 12.0633 11.8066C12.0633 11.5306 12.2873 11.3068 12.5633 11.3066C12.8392 11.3069 13.0633 11.5306 13.0633 11.8066C13.0634 12.5469 13.6008 13.1634 14.3064 13.2851C14.3097 13.2857 14.313 13.2865 14.3162 13.2871L15.3094 13.4043C15.8802 13.4709 16.4398 13.2052 16.7488 12.7207L17.7059 11.2197C17.9203 10.8834 17.992 10.4751 17.9051 10.0859L17.3904 7.78416C17.7123 7.63713 18.0018 7.41544 18.2264 7.11716C18.2786 7.2457 18.3239 7.37757 18.3543 7.51365L18.8807 9.86716C19.0257 10.516 18.9061 11.1962 18.5486 11.7568L17.5916 13.2588C17.0764 14.0662 16.1445 14.5086 15.1932 14.3974L14.1756 14.2783C13.6209 14.2137 13.0993 14.5554 12.9373 15.0898C12.9045 15.1983 12.8875 15.3115 12.8875 15.4248V17.9189C12.8873 18.1287 12.7564 18.3166 12.5594 18.3886C12.3624 18.4605 12.141 18.4013 12.0057 18.2412L9.81816 15.6465C9.53324 15.3085 9.11373 15.1134 8.67168 15.1133H6.92656C6.101 15.1132 5.32798 14.705 4.86211 14.0234L3.84062 12.5293C3.68405 12.3002 3.46707 12.118 3.21367 12.0049L1.6873 11.3242C0.891088 10.9689 0.336467 10.2241 0.225388 9.35935L0.0203099 7.75584C-0.0773924 6.99372 0.180862 6.22855 0.720505 5.68162L3.22832 3.1406C3.51562 2.84947 3.87024 2.63301 4.26054 2.51072L7.41289 1.52341C7.6546 1.44773 7.90667 1.40918 8.15996 1.40916H11.1219Z" }), _jsx("path", { d: "M16.0965 0.249001C16.1517 -0.0830329 16.6311 -0.0829675 16.6863 0.249001C16.8939 1.50917 17.8813 2.49768 19.1414 2.70603C19.4743 2.76078 19.4743 3.23903 19.1414 3.29392C17.8812 3.50208 16.894 4.49149 16.6863 5.75193C16.631 6.08372 16.1518 6.08379 16.0965 5.75193C15.8888 4.49128 14.9019 3.50179 13.6414 3.29392C13.3091 3.23873 13.3091 2.7611 13.6414 2.70603C14.9019 2.49796 15.8888 1.50938 16.0965 0.249001Z" })
|
|
8
35
|
] })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCloseOnOutsideClick.d.ts","sourceRoot":"","sources":["../../../src/@ui/hooks/useCloseOnOutsideClick.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA0B,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAOxD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAarE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAO1F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACrC,WAAW,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,EAC/C,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC,GAChD,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CASpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,EAAE,WAAW,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAWpG;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,WAAW,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC3C,SAAS,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAC3C,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,WAAW,CAAC,CAAC;IAC7C,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;CAClD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,IAAI,EACnB,OAAO,EAAE,8BAA8B,GACxC,IAAI,
|
|
1
|
+
{"version":3,"file":"useCloseOnOutsideClick.d.ts","sourceRoot":"","sources":["../../../src/@ui/hooks/useCloseOnOutsideClick.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA0B,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAOxD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAarE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAO1F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACrC,WAAW,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,EAC/C,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC,GAChD,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CASpC;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,EAAE,WAAW,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAWpG;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,WAAW,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC3C,SAAS,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAC3C,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,WAAW,CAAC,CAAC;IAC7C,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC;CAClD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,IAAI,EACnB,OAAO,EAAE,8BAA8B,GACxC,IAAI,CAkCN"}
|
|
@@ -95,7 +95,8 @@ export function useCloseOnOutsideClick(isOpen, onClose, options) {
|
|
|
95
95
|
if (isClickInsideOwnSubtree(target, floatingRef.current)) {
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
const anchorElement = anchorRef.current instanceof Element ? anchorRef.current : null;
|
|
99
|
+
if (anchorElement?.contains(target)) {
|
|
99
100
|
return;
|
|
100
101
|
}
|
|
101
102
|
if (isClickOnIgnoredElement(target, ignoreClicksOn)) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type PointerEvent as ReactPointerEvent } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export interface IPointerTrackHandlers {
|
|
6
|
+
onPointerDown: (event: ReactPointerEvent<HTMLElement>) => void;
|
|
7
|
+
onPointerMove: (event: ReactPointerEvent<HTMLElement>) => void;
|
|
8
|
+
onPointerUp: (event: ReactPointerEvent<HTMLElement>) => void;
|
|
9
|
+
onPointerCancel: (event: ReactPointerEvent<HTMLElement>) => void;
|
|
10
|
+
onLostPointerCapture: (event: ReactPointerEvent<HTMLElement>) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Follows a press and everything it drags through.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* The handlers must be spread on the element the gesture is measured against: they report
|
|
17
|
+
* `currentTarget`, and a caller that reads a child's or a parent's size instead will place the value
|
|
18
|
+
* somewhere the pointer is not.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare function usePointerTrack(track: (event: ReactPointerEvent<HTMLElement>) => void): IPointerTrackHandlers;
|
|
23
|
+
//# sourceMappingURL=usePointerTrack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePointerTrack.d.ts","sourceRoot":"","sources":["../../../src/@ui/hooks/usePointerTrack.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,IAAI,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC/D,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC/D,WAAW,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC7D,eAAe,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACjE,oBAAoB,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACzE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC3B,KAAK,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,GACvD,qBAAqB,CAkCvB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Follows a press and everything it drags through.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The handlers must be spread on the element the gesture is measured against: they report
|
|
8
|
+
* `currentTarget`, and a caller that reads a child's or a parent's size instead will place the value
|
|
9
|
+
* somewhere the pointer is not.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export function usePointerTrack(track) {
|
|
14
|
+
const isTracking = useRef(false);
|
|
15
|
+
const stop = () => {
|
|
16
|
+
isTracking.current = false;
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
onPointerDown: (event) => {
|
|
20
|
+
if (event.button !== 0) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
isTracking.current = true;
|
|
24
|
+
// Capturing keeps the gesture on this element, so a drag that leaves it keeps reporting
|
|
25
|
+
// and ends wherever it is released, with no window listeners to lose to a re-render.
|
|
26
|
+
event.currentTarget.setPointerCapture?.(event.pointerId);
|
|
27
|
+
track(event);
|
|
28
|
+
},
|
|
29
|
+
onPointerMove: (event) => {
|
|
30
|
+
if (!isTracking.current) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
// A move with nothing held is a plain hover: the press ended somewhere this element was
|
|
34
|
+
// not told about, and following it would change the value without being touched.
|
|
35
|
+
if (event.buttons === 0) {
|
|
36
|
+
stop();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
track(event);
|
|
40
|
+
},
|
|
41
|
+
onPointerUp: stop,
|
|
42
|
+
onPointerCancel: stop,
|
|
43
|
+
onLostPointerCapture: stop,
|
|
44
|
+
};
|
|
45
|
+
}
|
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,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAgBvE,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,OAAO,KAAK,CAAC;AAwB1B;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,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,6BAA6B,CAAC;AAC5E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAO7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,KAAK,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,kBAAkB,CAAC,EAAE,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,
|
|
1
|
+
{"version":3,"file":"Datepicker.d.ts","sourceRoot":"","sources":["../../src/Datepicker/Datepicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,oBAAoB,EACzB,KAAK,aAAa,IAAI,kBAAkB,EAS3C,MAAM,OAAO,CAAC;AAkCf,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAO7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,KAAK,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,kBAAkB,CAAC,EAAE,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,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"}
|