@gooddata/sdk-ui-dashboard 11.67.0-alpha.1 → 11.67.0-alpha.3

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.
Files changed (54) hide show
  1. package/NOTICE +943 -2401
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/index.d.ts +1 -1
  5. package/esm/index.d.ts.map +1 -1
  6. package/esm/index.js +1 -1
  7. package/esm/kdaDialog/composition/KdaAttributesSelectItem.d.ts.map +1 -1
  8. package/esm/kdaDialog/composition/KdaAttributesSelectItem.js +4 -2
  9. package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeFilterSelectionHandler.d.ts.map +1 -1
  10. package/esm/model/commandHandlers/filterContext/attributeFilter/changeAttributeFilterSelectionHandler.js +4 -2
  11. package/esm/model/commands/filters.d.ts +20 -0
  12. package/esm/model/commands/filters.d.ts.map +1 -1
  13. package/esm/model/commands/filters.js +24 -0
  14. package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
  15. package/esm/model/react/useInitializeDashboardStore.js +0 -5
  16. package/esm/model/store/config/configReducers.d.ts +0 -4
  17. package/esm/model/store/config/configReducers.d.ts.map +1 -1
  18. package/esm/model/store/config/configReducers.js +0 -6
  19. package/esm/model/store/config/configSelectors.d.ts +0 -6
  20. package/esm/model/store/config/configSelectors.d.ts.map +1 -1
  21. package/esm/model/store/config/configSelectors.js +0 -6
  22. package/esm/model/store/config/index.d.ts +0 -1
  23. package/esm/model/store/config/index.d.ts.map +1 -1
  24. package/esm/model/types/commonTypes.d.ts +3 -15
  25. package/esm/model/types/commonTypes.d.ts.map +1 -1
  26. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
  27. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +4 -1
  28. package/esm/presentation/automations/contexts/AutomationsContext.d.ts +6 -0
  29. package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
  30. package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.d.ts.map +1 -1
  31. package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.js +7 -1
  32. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DeleteInsightDialog.d.ts.map +1 -1
  33. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DeleteInsightDialog.js +26 -7
  34. package/esm/presentation/dashboard/components/DashboardInner.d.ts.map +1 -1
  35. package/esm/presentation/dashboard/components/DashboardInner.js +1 -2
  36. package/esm/presentation/dashboard/types.d.ts +0 -5
  37. package/esm/presentation/dashboard/types.d.ts.map +1 -1
  38. package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useSelectionModeConfiguration.js +2 -2
  39. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +16 -8
  40. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  41. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +20 -12
  42. package/esm/sdk-ui-dashboard.d.ts +16 -27
  43. package/package.json +26 -26
  44. package/styles/css/dashboard.css +0 -72
  45. package/styles/css/dashboard.css.map +1 -1
  46. package/styles/css/main.css +2 -72
  47. package/styles/css/main.css.map +1 -1
  48. package/styles/scss/dashboard.scss +0 -84
  49. package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.d.ts +0 -4
  50. package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.d.ts.map +0 -1
  51. package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.js +0 -151
  52. package/esm/presentation/dashboard/components/DashboardInteractionComposing.d.ts +0 -8
  53. package/esm/presentation/dashboard/components/DashboardInteractionComposing.d.ts.map +0 -1
  54. package/esm/presentation/dashboard/components/DashboardInteractionComposing.js +0 -23
@@ -39,90 +39,6 @@ $headline-compact-margin-bottom: 5px;
39
39
  opacity: 0.5;
40
40
  }
41
41
 
42
- .gd-dashboard-interaction-composing__status {
43
- position: absolute;
44
- display: flex;
45
- align-items: center;
46
- pointer-events: all;
47
- gap: var(--gd-spacing-10px);
48
- opacity: 1;
49
- top: var(--gd-spacing-20px);
50
- left: 50%;
51
- z-index: zIndexes.$dashboard-ai-building-banner;
52
- box-sizing: border-box;
53
- min-width: 400px;
54
- max-width: calc(100% - 2 * var(--gd-spacing-10px));
55
- padding: var(--gd-spacing-10px) var(--gd-spacing-20px);
56
- border: 1px solid var(--gd-palette-complementary-3);
57
- border-radius: var(--gd-modal-borderRadius);
58
- box-shadow:
59
- var(--gd-shadow-color) 0 2px 9px,
60
- var(--gd-shadow-color) 0 1px 3px;
61
- background: var(--gd-palette-complementary-0);
62
- color: var(--gd-palette-complementary-8);
63
- text-align: left;
64
- overflow-wrap: anywhere;
65
- transform: translateX(-50%);
66
- transition:
67
- opacity 0.3s ease-in-out,
68
- top 0.3s ease-in-out;
69
-
70
- &.hidden {
71
- opacity: 0;
72
- top: -100px;
73
- }
74
- }
75
-
76
- .gd-dashboard-interaction-composing__message {
77
- flex: 1 1 auto;
78
- min-width: 0;
79
- font-weight: 700;
80
- }
81
-
82
- .gd-dashboard-ai-composing-overlay {
83
- position: absolute;
84
- inset: 0;
85
- z-index: zIndexes.$dashboard-ai-composing-overlay;
86
- pointer-events: none;
87
-
88
- svg {
89
- position: absolute;
90
- inset: 0;
91
- width: 100%;
92
- height: 100%;
93
- overflow: visible;
94
- }
95
-
96
- rect {
97
- fill: none;
98
- stroke: var(--gd-palette-primary-base);
99
- stroke-width: 2px;
100
- stroke-linecap: round;
101
- }
102
-
103
- &__bloom {
104
- filter: blur(14px);
105
- opacity: 0.5;
106
-
107
- rect {
108
- stroke-width: 12px;
109
- }
110
- }
111
-
112
- &__glow {
113
- filter: blur(5px);
114
- opacity: 0.55;
115
-
116
- rect {
117
- stroke-width: 6px;
118
- }
119
- }
120
-
121
- &__tail {
122
- opacity: 0.35;
123
- }
124
- }
125
-
126
42
  // this must be used on the body element in gdc-dashboards
127
43
  .gd-dashboards-root {
128
44
  background: variables.$gd-dashboards-content-backgroundColor;
@@ -1,4 +0,0 @@
1
- export declare function DashboardAiComposingOverlay({ isWaiting }: {
2
- isWaiting: boolean;
3
- }): import("react/jsx-runtime").JSX.Element;
4
- //# sourceMappingURL=DashboardAiComposingOverlay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DashboardAiComposingOverlay.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/components/DashboardAiComposingOverlay.tsx"],"names":[],"mappings":"AAmBA,wBAAgB,2BAA2B,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,2CAuKhF"}
@@ -1,151 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- // (C) 2026 GoodData Corporation
3
- import { useLayoutEffect, useRef } from "react";
4
- const speed = 1 / 3.6;
5
- const springAt = 0.05;
6
- const stiffness = 7;
7
- const damping = 0.55;
8
- export function DashboardAiComposingOverlay({ isWaiting }) {
9
- const overlayRef = useRef(null);
10
- const stateRef = useRef(null);
11
- useLayoutEffect(() => {
12
- const overlay = overlayRef.current;
13
- if (!overlay) {
14
- return;
15
- }
16
- const rects = Array.from(overlay.querySelectorAll("rect"));
17
- const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
18
- let state = stateRef.current;
19
- let width = 0;
20
- let perimeter = 0;
21
- let previousTime;
22
- let frame;
23
- const segment = (rect, start, length) => {
24
- rect.style.strokeDasharray = `${length} ${Math.max(0, perimeter - length)}`;
25
- rect.style.strokeDashoffset = String(-(((start % perimeter) + perimeter) % perimeter));
26
- };
27
- const animate = (time) => {
28
- frame = undefined;
29
- if (!state || !perimeter) {
30
- return;
31
- }
32
- const dt = Math.min(0.05, (time - (previousTime ?? time)) / 1000);
33
- previousTime = time;
34
- const top = width / 2 / perimeter;
35
- const runningLength = Math.min(600, perimeter * 0.25);
36
- const waitingLength = Math.min(120, runningLength);
37
- let settled = false;
38
- if (isWaiting && state.mode === "run") {
39
- state.mode = "cruise";
40
- state.lap = Math.ceil(state.center + springAt - top);
41
- }
42
- else if (!isWaiting && state.mode !== "run") {
43
- state.mode = "run";
44
- state.speed = 0;
45
- }
46
- if (reducedMotion.matches) {
47
- state.center = top;
48
- state.length = isWaiting ? waitingLength : runningLength;
49
- state.head = isWaiting ? 0 : 1;
50
- state.lap = 0;
51
- state.velocity = 0;
52
- state.speed = 0;
53
- state.mode = isWaiting ? "spring" : "run";
54
- settled = true;
55
- }
56
- else if (state.mode === "cruise") {
57
- state.center += speed * dt;
58
- if (state.lap + top - state.center <= springAt) {
59
- state.mode = "spring";
60
- state.velocity = speed;
61
- }
62
- }
63
- else if (state.mode === "spring") {
64
- // Keep the spring target aligned with the top center while the dashboard resizes.
65
- const target = state.lap + top;
66
- const steps = Math.max(1, Math.ceil(dt * 240));
67
- const step = dt / steps;
68
- for (let i = 0; i < steps; i++) {
69
- const acceleration = -stiffness * stiffness * (state.center - target) -
70
- 2 * damping * stiffness * state.velocity;
71
- state.velocity += acceleration * step;
72
- state.center += state.velocity * step;
73
- }
74
- const easing = 1 - Math.exp(-dt * 3.2);
75
- state.length += (waitingLength - state.length) * easing;
76
- state.head += -state.head * easing;
77
- settled =
78
- Math.abs(state.center - target) < 0.00001 &&
79
- Math.abs(state.velocity) < 0.00001 &&
80
- Math.abs(state.length - waitingLength) < 0.01 &&
81
- state.head < 0.0001;
82
- if (settled) {
83
- state.center = target;
84
- state.length = waitingLength;
85
- state.head = 0;
86
- }
87
- }
88
- else {
89
- state.speed = Math.min(1, state.speed + dt / 0.9);
90
- state.center += speed * dt * state.speed * state.speed;
91
- const easing = 1 - Math.exp(-dt * 2.5);
92
- state.length += (runningLength - state.length) * easing;
93
- state.head += (1 - state.head) * easing;
94
- }
95
- const start = state.center * perimeter - state.length / 2;
96
- const coreLength = state.length * 0.55;
97
- const coreStart = start + (state.length - coreLength) * (0.5 + 0.5 * state.head);
98
- const [bloom, glow, tail, core] = rects;
99
- segment(tail, start, state.length);
100
- for (const rect of [bloom, glow, core]) {
101
- segment(rect, coreStart, coreLength);
102
- }
103
- if (!settled) {
104
- frame = requestAnimationFrame(animate);
105
- }
106
- };
107
- const refresh = () => {
108
- if (frame !== undefined) {
109
- cancelAnimationFrame(frame);
110
- }
111
- previousTime = undefined;
112
- animate(performance.now());
113
- };
114
- const fit = () => {
115
- width = Math.max(0, overlay.clientWidth - 2);
116
- const height = Math.max(0, overlay.clientHeight - 2);
117
- perimeter = width && height ? 2 * (width + height) : 0;
118
- for (const rect of rects) {
119
- rect.setAttribute("width", String(width));
120
- rect.setAttribute("height", String(height));
121
- }
122
- if (!state && perimeter) {
123
- state = {
124
- center: isWaiting ? width / 2 / perimeter : 0.62,
125
- length: isWaiting ? Math.min(120, perimeter * 0.25) : Math.min(600, perimeter * 0.25),
126
- head: isWaiting ? 0 : 1,
127
- speed: 1,
128
- mode: isWaiting ? "spring" : "run",
129
- lap: 0,
130
- velocity: 0,
131
- };
132
- stateRef.current = state;
133
- }
134
- refresh();
135
- };
136
- const observer = typeof ResizeObserver === "undefined" ? undefined : new ResizeObserver(fit);
137
- observer?.observe(overlay);
138
- window.addEventListener("resize", fit);
139
- reducedMotion.addEventListener("change", refresh);
140
- fit();
141
- return () => {
142
- if (frame !== undefined) {
143
- cancelAnimationFrame(frame);
144
- }
145
- observer?.disconnect();
146
- window.removeEventListener("resize", fit);
147
- reducedMotion.removeEventListener("change", refresh);
148
- };
149
- }, [isWaiting]);
150
- return (_jsx("div", { "data-testid": "gd-dashboard-ai-composing-overlay", className: "gd-dashboard-ai-composing-overlay", ref: overlayRef, "aria-hidden": "true", children: ["bloom", "glow", "tail", "core"].map((layer) => (_jsx("svg", { className: `gd-dashboard-ai-composing-overlay__${layer}`, focusable: "false", children: _jsx("rect", { x: "1", y: "1", width: "0", height: "0" }) }, layer))) }));
151
- }
@@ -1,8 +0,0 @@
1
- import { type ReactNode } from "react";
2
- interface IDashboardInteractionComposingProps {
3
- children: ReactNode;
4
- onReplyInChat?: () => void;
5
- }
6
- export declare function DashboardInteractionComposing({ children, onReplyInChat, }: IDashboardInteractionComposingProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
8
- //# sourceMappingURL=DashboardInteractionComposing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DashboardInteractionComposing.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/components/DashboardInteractionComposing.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAqBvC,UAAU,mCAAmC;IACzC,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,wBAAgB,6BAA6B,CAAC,EAC1C,QAAQ,EACR,aAAa,GAChB,EAAE,mCAAmC,2CA8CrC"}
@@ -1,23 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import cx from "classnames";
3
- import { FormattedMessage, defineMessages, useIntl } from "react-intl";
4
- import { UiButton } from "@gooddata/sdk-ui-kit";
5
- import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
6
- import { selectAiReasoningTitle, selectIsAiBuilding, selectIsAiGenerating, selectIsAiWaiting, } from "../../../model/store/config/configSelectors.js";
7
- import { DashboardAiComposingOverlay } from "./DashboardAiComposingOverlay.js";
8
- const messages = defineMessages({
9
- replyNow: { id: "dashboard.ai.composing.replyNow", defaultMessage: "Reply now" },
10
- });
11
- export function DashboardInteractionComposing({ children, onReplyInChat, }) {
12
- const intl = useIntl();
13
- const isAiGenerating = useDashboardSelector(selectIsAiGenerating);
14
- const isAiBuilding = useDashboardSelector(selectIsAiBuilding);
15
- const isAiWaiting = useDashboardSelector(selectIsAiWaiting);
16
- const aiReasoningTitle = useDashboardSelector(selectAiReasoningTitle);
17
- const isAiActive = isAiBuilding || isAiWaiting || isAiGenerating;
18
- const showReasoningTitle = (isAiGenerating || isAiBuilding) && !!aiReasoningTitle;
19
- const showStatus = isAiWaiting || showReasoningTitle;
20
- return (_jsxs(_Fragment, { children: [children, isAiActive ? (_jsx("div", { children: _jsx(DashboardAiComposingOverlay, { isWaiting: isAiWaiting }) })) : null, _jsxs("div", { className: cx("gd-dashboard-interaction-composing__status", {
21
- hidden: !showStatus,
22
- }), "aria-hidden": !showStatus, children: [_jsx("div", { className: "gd-dashboard-interaction-composing__message", role: showStatus ? "status" : undefined, "aria-hidden": !showStatus, children: isAiWaiting || !showReasoningTitle ? (_jsx(FormattedMessage, { id: "dashboard.ai.composing.waiting" })) : (aiReasoningTitle) }), isAiWaiting && onReplyInChat ? (_jsx(UiButton, { variant: "tertiary", label: intl.formatMessage(messages.replyNow), onClick: onReplyInChat })) : null] })] }));
23
- }