@gooddata/sdk-ui-dashboard 11.67.0-alpha.2 → 11.67.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.
Files changed (148) hide show
  1. package/NOTICE +798 -2473
  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/dashboard/changeDashboardDefinitionHandler.d.ts.map +1 -1
  10. package/esm/model/commandHandlers/dashboard/changeDashboardDefinitionHandler.js +3 -1
  11. package/esm/model/commandHandlers/dashboard/common/filterViews.js +10 -3
  12. package/esm/model/commandHandlers/dashboard/common/overrideFiltersAcrossTabs.d.ts +46 -0
  13. package/esm/model/commandHandlers/dashboard/common/overrideFiltersAcrossTabs.d.ts.map +1 -0
  14. package/esm/model/commandHandlers/dashboard/common/overrideFiltersAcrossTabs.js +155 -0
  15. package/esm/model/commandHandlers/dashboard/common/stateInitializers.d.ts +4 -2
  16. package/esm/model/commandHandlers/dashboard/common/stateInitializers.d.ts.map +1 -1
  17. package/esm/model/commandHandlers/dashboard/common/stateInitializers.js +14 -10
  18. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
  19. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +9 -5
  20. package/esm/model/commandHandlers/dashboard/resetDashboardHandler.js +1 -1
  21. package/esm/model/commandHandlers/drill/common/mergeFilters.js +2 -2
  22. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.d.ts.map +1 -1
  23. package/esm/model/commandHandlers/filterContext/tabSync/tabSyncRules.js +114 -23
  24. package/esm/model/commandHandlers/parameters/loadParameterDependencies.d.ts +1 -1
  25. package/esm/model/commandHandlers/parameters/loadParameterDependencies.js +1 -1
  26. package/esm/model/commandHandlers/tabs/createDashboardTabHandler.d.ts.map +1 -1
  27. package/esm/model/commandHandlers/tabs/createDashboardTabHandler.js +3 -27
  28. package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
  29. package/esm/model/react/useInitializeDashboardStore.js +0 -5
  30. package/esm/model/store/config/configReducers.d.ts +0 -4
  31. package/esm/model/store/config/configReducers.d.ts.map +1 -1
  32. package/esm/model/store/config/configReducers.js +0 -6
  33. package/esm/model/store/config/configSelectors.d.ts +0 -6
  34. package/esm/model/store/config/configSelectors.d.ts.map +1 -1
  35. package/esm/model/store/config/configSelectors.js +0 -6
  36. package/esm/model/store/config/index.d.ts +0 -1
  37. package/esm/model/store/config/index.d.ts.map +1 -1
  38. package/esm/model/store/tabs/filterContext/filterSync.d.ts +6 -22
  39. package/esm/model/store/tabs/filterContext/filterSync.d.ts.map +1 -1
  40. package/esm/model/store/tabs/filterContext/filterSync.js +42 -40
  41. package/esm/model/types/commonTypes.d.ts +6 -15
  42. package/esm/model/types/commonTypes.d.ts.map +1 -1
  43. package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts +3 -3
  44. package/esm/presentation/automations/shared/automationFilters/automationParameters.js +3 -3
  45. package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts +1 -1
  46. package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.js +1 -1
  47. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DeleteInsightDialog.d.ts.map +1 -1
  48. package/esm/presentation/dashboard/DashboardSidebar/DraggableInsightList/DeleteInsightDialog.js +26 -7
  49. package/esm/presentation/dashboard/components/DashboardInner.d.ts.map +1 -1
  50. package/esm/presentation/dashboard/components/DashboardInner.js +1 -2
  51. package/esm/presentation/dashboard/components/DensityInitializer.d.ts +1 -1
  52. package/esm/presentation/dashboard/components/DensityInitializer.js +1 -1
  53. package/esm/presentation/dashboard/types.d.ts +0 -5
  54. package/esm/presentation/dashboard/types.d.ts.map +1 -1
  55. package/esm/presentation/filterBar/measureValueFilter/useDashboardMeasureValueFilterData.d.ts +1 -1
  56. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +0 -2
  57. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
  58. package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +0 -2
  59. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +0 -2
  60. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
  61. package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +0 -2
  62. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +0 -2
  63. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
  64. package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +0 -2
  65. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +16 -8
  66. package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
  67. package/esm/presentation/localization/bundles/en-US.localization-bundle.js +20 -12
  68. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +0 -2
  69. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
  70. package/esm/presentation/localization/bundles/es-419.localization-bundle.js +0 -2
  71. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +0 -2
  72. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
  73. package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +0 -2
  74. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +0 -2
  75. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
  76. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +0 -2
  77. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +0 -2
  78. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
  79. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +0 -2
  80. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +0 -2
  81. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
  82. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +0 -2
  83. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +0 -2
  84. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
  85. package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +0 -2
  86. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +0 -2
  87. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
  88. package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +0 -2
  89. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +0 -2
  90. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
  91. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +0 -2
  92. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +0 -2
  93. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
  94. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +0 -2
  95. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +0 -2
  96. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
  97. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +0 -2
  98. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +0 -2
  99. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
  100. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +0 -2
  101. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +0 -2
  102. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
  103. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +0 -2
  104. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +0 -2
  105. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
  106. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +0 -2
  107. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +0 -2
  108. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
  109. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +0 -2
  110. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +0 -2
  111. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
  112. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +0 -2
  113. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +0 -2
  114. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
  115. package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +0 -2
  116. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +0 -2
  117. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
  118. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +0 -2
  119. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +0 -2
  120. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
  121. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +0 -2
  122. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +0 -2
  123. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
  124. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +0 -2
  125. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +0 -2
  126. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
  127. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +0 -2
  128. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +0 -2
  129. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
  130. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +0 -2
  131. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +0 -2
  132. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
  133. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +0 -2
  134. package/esm/sdk-ui-dashboard.d.ts +6 -27
  135. package/esm/types.d.ts +1 -1
  136. package/esm/types.js +1 -1
  137. package/package.json +29 -29
  138. package/styles/css/dashboard.css +0 -72
  139. package/styles/css/dashboard.css.map +1 -1
  140. package/styles/css/main.css +1 -72
  141. package/styles/css/main.css.map +1 -1
  142. package/styles/scss/dashboard.scss +0 -84
  143. package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.d.ts +0 -4
  144. package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.d.ts.map +0 -1
  145. package/esm/presentation/dashboard/components/DashboardAiComposingOverlay.js +0 -151
  146. package/esm/presentation/dashboard/components/DashboardInteractionComposing.d.ts +0 -8
  147. package/esm/presentation/dashboard/components/DashboardInteractionComposing.d.ts.map +0 -1
  148. 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
- }