@gooddata/sdk-ui-ext 11.52.0 → 11.53.0-alpha.1
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/NOTICE +59 -9
- package/esm/index.d.ts +3 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -0
- package/esm/insightView/InsightRenderer.d.ts +6 -3
- package/esm/insightView/InsightRenderer.d.ts.map +1 -1
- package/esm/insightView/InsightRenderer.js +142 -165
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionEditor.d.ts +3 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionEditor.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionEditor.js +20 -6
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingDialog.d.ts +11 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingDialog.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingDialog.js +25 -10
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingSection.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingSection.js +64 -5
- package/esm/internal/components/configurationControls/conditionalFormatting/ReorderList.d.ts +3 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/ReorderList.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/ReorderList.js +2 -2
- package/esm/internal/components/configurationControls/conditionalFormatting/conditionalFormattingModel.d.ts +46 -8
- package/esm/internal/components/configurationControls/conditionalFormatting/conditionalFormattingModel.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/conditionalFormattingModel.js +94 -16
- package/esm/internal/components/configurationControls/conditionalFormatting/useCfDateFilterOptions.d.ts +2 -0
- package/esm/internal/components/configurationControls/conditionalFormatting/useCfDateFilterOptions.d.ts.map +1 -1
- package/esm/internal/components/configurationControls/conditionalFormatting/useCfDateFilterOptions.js +2 -0
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/PluggablePivotTableNext.d.ts.map +1 -1
- package/esm/internal/components/pluggableVisualizations/pivotTableNext/PluggablePivotTableNext.js +8 -2
- package/esm/internal/translations/en-US.localization-bundle.d.ts +12 -0
- package/esm/internal/translations/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/internal/translations/en-US.localization-bundle.js +12 -0
- package/esm/locales.d.ts +9 -0
- package/esm/locales.d.ts.map +1 -1
- package/esm/locales.js +3 -0
- package/esm/sdk-ui-ext.d.ts +86 -0
- package/package.json +21 -21
- package/styles/css/main.css +59 -0
- package/styles/css/main.css.map +1 -1
- package/styles/internal/css/conditional_formatting.css +59 -0
- package/styles/internal/css/conditional_formatting.css.map +1 -1
- package/styles/internal/scss/conditional_formatting.scss +78 -0
package/NOTICE
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
The following 3rd-party software packages may be used by or distributed with gooddata-ui-sdk. Any information relevant to third-party vendors listed below are collected using common, reasonable means.
|
|
9
9
|
|
|
10
|
-
Date generated: 2026-8-
|
|
10
|
+
Date generated: 2026-8-13
|
|
11
11
|
|
|
12
|
-
Revision ID:
|
|
12
|
+
Revision ID: 03b276147864f291b2ed2694a19ccbfa1d69ce6b
|
|
13
13
|
|
|
14
14
|
================================================================================
|
|
15
15
|
================================================================================
|
|
@@ -126,6 +126,7 @@ Revision ID: df24fd6388dc31e841cd593b9a048731ec44afec
|
|
|
126
126
|
- @cacheable/utils (2.5.0) [MIT]
|
|
127
127
|
- @codemirror/autocomplete (6.20.0) [MIT]
|
|
128
128
|
- @codemirror/commands (6.10.1) [MIT]
|
|
129
|
+
- @codemirror/lang-json (6.0.2) [MIT]
|
|
129
130
|
- @codemirror/lang-yaml (6.1.3) [MIT]
|
|
130
131
|
- @codemirror/language (6.12.1) [MIT]
|
|
131
132
|
- @codemirror/lint (6.9.2) [MIT]
|
|
@@ -219,6 +220,7 @@ Revision ID: df24fd6388dc31e841cd593b9a048731ec44afec
|
|
|
219
220
|
- @leichtgewicht/ip-codec (2.0.5) [MIT]
|
|
220
221
|
- @lezer/common (1.5.2) [MIT]
|
|
221
222
|
- @lezer/highlight (1.2.3) [MIT]
|
|
223
|
+
- @lezer/json (1.0.3) [MIT]
|
|
222
224
|
- @lezer/lr (1.4.10) [MIT]
|
|
223
225
|
- @lezer/yaml (1.0.4) [MIT]
|
|
224
226
|
- @mapbox/geojson-rewind (0.5.2) [ISC]
|
|
@@ -945,7 +947,7 @@ Revision ID: df24fd6388dc31e841cd593b9a048731ec44afec
|
|
|
945
947
|
- source-map-js (1.2.1) [BSD-3-Clause]
|
|
946
948
|
- source-map-support (0.5.21) [MIT]
|
|
947
949
|
- space-separated-tokens (2.0.2) [MIT]
|
|
948
|
-
- spark-md5 (3.0.2) [Multi-license:
|
|
950
|
+
- spark-md5 (3.0.2) [Multi-license: WTFPL OR MIT]
|
|
949
951
|
- spdy (4.0.2) [MIT]
|
|
950
952
|
- spdy-transport (3.0.0) [MIT]
|
|
951
953
|
- statuses (1.5.0) [MIT]
|
|
@@ -978,7 +980,7 @@ Revision ID: df24fd6388dc31e841cd593b9a048731ec44afec
|
|
|
978
980
|
- tar (7.5.22) [ISC]
|
|
979
981
|
- terser (5.49.0) [BSD-2-Clause]
|
|
980
982
|
- terser-webpack-plugin (5.6.1) [MIT]
|
|
981
|
-
- text-encoding (0.7.0) [Multi-license: Apache-2.0
|
|
983
|
+
- text-encoding (0.7.0) [Multi-license: Unlicense OR Apache-2.0]
|
|
982
984
|
- thingies (2.6.1) [MIT]
|
|
983
985
|
- thunky (1.1.0) [MIT]
|
|
984
986
|
- tinycolor2 (1.6.0) [MIT]
|
|
@@ -999,7 +1001,7 @@ Revision ID: df24fd6388dc31e841cd593b9a048731ec44afec
|
|
|
999
1001
|
- tslib (2.8.1) [ISC]
|
|
1000
1002
|
- tslib (1.14.1) [ISC]
|
|
1001
1003
|
- tsyringe (4.10.0) [MIT]
|
|
1002
|
-
- type-fest (0.21.3) [Multi-license:
|
|
1004
|
+
- type-fest (0.21.3) [Multi-license: CC0-1.0 OR MIT]
|
|
1003
1005
|
- type-is (1.6.18) [MIT]
|
|
1004
1006
|
- typescript (5.9.3) [Apache-2.0, MIT, Unicode-DFS-2020, CC-BY-4.0, BSD-3-Clause, W3C-20150513]
|
|
1005
1007
|
- undici-types (6.21.0) [MIT]
|
|
@@ -2288,6 +2290,18 @@ Package Depth: Direct
|
|
|
2288
2290
|
MIT
|
|
2289
2291
|
|
|
2290
2292
|
|
|
2293
|
+
--------------------------------------------------------------------------------
|
|
2294
|
+
Package Title: @codemirror/lang-json (6.0.2)
|
|
2295
|
+
|
|
2296
|
+
Package Locator: npm+@codemirror/lang-json$6.0.2
|
|
2297
|
+
|
|
2298
|
+
Package Depth: Direct
|
|
2299
|
+
--------------------------------------------------------------------------------
|
|
2300
|
+
|
|
2301
|
+
* Declared Licenses *
|
|
2302
|
+
MIT
|
|
2303
|
+
|
|
2304
|
+
|
|
2291
2305
|
--------------------------------------------------------------------------------
|
|
2292
2306
|
Package Title: @codemirror/lang-yaml (6.1.3)
|
|
2293
2307
|
|
|
@@ -3416,6 +3430,18 @@ Package Depth: Direct
|
|
|
3416
3430
|
MIT
|
|
3417
3431
|
|
|
3418
3432
|
|
|
3433
|
+
--------------------------------------------------------------------------------
|
|
3434
|
+
Package Title: @lezer/json (1.0.3)
|
|
3435
|
+
|
|
3436
|
+
Package Locator: npm+@lezer/json$1.0.3
|
|
3437
|
+
|
|
3438
|
+
Package Depth: Transitive
|
|
3439
|
+
--------------------------------------------------------------------------------
|
|
3440
|
+
|
|
3441
|
+
* Declared Licenses *
|
|
3442
|
+
MIT
|
|
3443
|
+
|
|
3444
|
+
|
|
3419
3445
|
--------------------------------------------------------------------------------
|
|
3420
3446
|
Package Title: @lezer/lr (1.4.10)
|
|
3421
3447
|
|
|
@@ -12217,7 +12243,7 @@ Package Depth: Direct
|
|
|
12217
12243
|
--------------------------------------------------------------------------------
|
|
12218
12244
|
|
|
12219
12245
|
* Declared Licenses *
|
|
12220
|
-
Multi-license:
|
|
12246
|
+
Multi-license: WTFPL OR MIT
|
|
12221
12247
|
|
|
12222
12248
|
|
|
12223
12249
|
--------------------------------------------------------------------------------
|
|
@@ -12613,7 +12639,7 @@ Package Depth: Transitive
|
|
|
12613
12639
|
--------------------------------------------------------------------------------
|
|
12614
12640
|
|
|
12615
12641
|
* Declared Licenses *
|
|
12616
|
-
Multi-license: Apache-2.0
|
|
12642
|
+
Multi-license: Unlicense OR Apache-2.0
|
|
12617
12643
|
|
|
12618
12644
|
|
|
12619
12645
|
--------------------------------------------------------------------------------
|
|
@@ -12869,7 +12895,7 @@ Package Depth: Transitive
|
|
|
12869
12895
|
--------------------------------------------------------------------------------
|
|
12870
12896
|
|
|
12871
12897
|
* Declared Licenses *
|
|
12872
|
-
Multi-license:
|
|
12898
|
+
Multi-license: CC0-1.0 OR MIT
|
|
12873
12899
|
|
|
12874
12900
|
|
|
12875
12901
|
--------------------------------------------------------------------------------
|
|
@@ -22283,6 +22309,30 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
22283
22309
|
THE SOFTWARE.
|
|
22284
22310
|
|
|
22285
22311
|
|
|
22312
|
+
* MIT *
|
|
22313
|
+
|
|
22314
|
+
MIT License
|
|
22315
|
+
|
|
22316
|
+
Copyright (C) 2020 by Marijn Haverbeke <marijn@haverbeke.berlin>, Arun Srinivasan <rulfzid@gmail.com>, and others
|
|
22317
|
+
|
|
22318
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
22319
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
22320
|
+
in the Software without restriction, including without limitation the rights
|
|
22321
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
22322
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
22323
|
+
furnished to do so, subject to the following conditions:
|
|
22324
|
+
|
|
22325
|
+
The above copyright notice and this permission notice shall be included in
|
|
22326
|
+
all copies or substantial portions of the Software.
|
|
22327
|
+
|
|
22328
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22329
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22330
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22331
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22332
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22333
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22334
|
+
THE SOFTWARE.
|
|
22335
|
+
|
|
22286
22336
|
* MIT *
|
|
22287
22337
|
|
|
22288
22338
|
MIT License
|
|
@@ -29357,4 +29407,4 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
29357
29407
|
--------------------------------------------------------------------------------
|
|
29358
29408
|
--------------------------------------------------------------------------------
|
|
29359
29409
|
|
|
29360
|
-
Report Generated by FOSSA on 2026-8-
|
|
29410
|
+
Report Generated by FOSSA on 2026-8-13
|
package/esm/index.d.ts
CHANGED
|
@@ -21,6 +21,9 @@ export { type IInsightViewProps, type IInsightTitleProps };
|
|
|
21
21
|
export { Automations } from "./automations/Automations.js";
|
|
22
22
|
export { InsightPicker } from "./insightPicker/InsightPicker.js";
|
|
23
23
|
export { useInsightPickerState } from "./insightPicker/useInsightPickerState.js";
|
|
24
|
+
export { ConditionalFormattingDialog, type IConditionalFormattingDialogProps, } from "./internal/components/configurationControls/conditionalFormatting/ConditionalFormattingDialog.js";
|
|
25
|
+
export { useCfDateFilterOptions } from "./internal/components/configurationControls/conditionalFormatting/useCfDateFilterOptions.js";
|
|
26
|
+
export type { ITargetOption, ICfDateSettings, ICfDateMeta, } from "./internal/components/configurationControls/conditionalFormatting/conditionalFormattingModel.js";
|
|
24
27
|
export type { IInsightPickerProps, IInsightPickerItem, IInsightPickerMenuAction, IInsightPickerMenuProps, IInsightPickerRenderItemProps, InsightPickerSortBy, InsightPickerSortDirection, } from "./insightPicker/types.js";
|
|
25
28
|
export type { IAutomationsProps, AutomationsType, AutomationsScope, AutomationsColumnName, ScheduleAutomationsColumnName, CommonAutomationsColumnName, AutomationColumnDefinition, AutomationColumnDefinitions, AutomationsFilterName, AutomationsFilterPreselectName, AutomationsFilterPreselectValue, AutomationsPreselectedFilters, AutomationsAvailableFilters, AutomationsOnLoad, IEditAutomation, } from "./automations/types.js";
|
|
26
29
|
export { getComparisonOperatorTitle, getRelativeOperatorTitle } from "./automations/utils.js";
|
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,YAAY,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EACH,sCAAsC,EACtC,yCAAyC,EACzC,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EAErB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,gCAAgC,EAChC,oCAAoC,EACpC,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,KAAK,UAAU,EACf,uBAAuB,EACvB,gCAAgC,EAChC,KAAK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kC,EAClC,KAAK,0CAA0C,GAClD,MAAM,8EAA8E,CAAC;AACtF,OAAO,EACH,kCAAkC,EAClC,KAAK,0CAA0C,GAClD,MAAM,8EAA8E,CAAC;AACtF,OAAO,EACH,mBAAmB,EACnB,KAAK,2BAA2B,GACnC,MAAM,0DAA0D,CAAC;AAClE,OAAO,EACH,+BAA+B,EAC/B,KAAK,uCAAuC,GAC/C,MAAM,+DAA+D,CAAC;AACvE,YAAY,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAE7E;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,QAEzC;AAED,OAAO,EACH,mBAAmB,EACnB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAChC,MAAM,0DAA0D,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/esm/index.js
CHANGED
|
@@ -7,6 +7,8 @@ export { InsightRenderer } from "./insightView/InsightRenderer.js";
|
|
|
7
7
|
export { Automations } from "./automations/Automations.js";
|
|
8
8
|
export { InsightPicker } from "./insightPicker/InsightPicker.js";
|
|
9
9
|
export { useInsightPickerState } from "./insightPicker/useInsightPickerState.js";
|
|
10
|
+
export { ConditionalFormattingDialog, } from "./internal/components/configurationControls/conditionalFormatting/ConditionalFormattingDialog.js";
|
|
11
|
+
export { useCfDateFilterOptions } from "./internal/components/configurationControls/conditionalFormatting/useCfDateFilterOptions.js";
|
|
10
12
|
export { getComparisonOperatorTitle, getRelativeOperatorTitle } from "./automations/utils.js";
|
|
11
13
|
export { COMPARISON_OPERATORS, RELATIVE_OPERATORS, ARITHMETIC_OPERATORS, AI_OPERATORS, AI_OPERATOR, } from "./automations/constants.js";
|
|
12
14
|
// exported for sdk-ui-dashboard
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type WrappedComponentProps } from "react-intl";
|
|
1
2
|
import { type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi";
|
|
2
3
|
import { type IColorPalette, type IInsightDefinition, type IInsightWidget, type ITheme, type IWorkspacePermissions } from "@gooddata/sdk-model";
|
|
3
4
|
import { type ILocale, type ITranslations, type OnError } from "@gooddata/sdk-ui";
|
|
@@ -20,15 +21,17 @@ export interface IInsightRendererProps extends Omit<IInsightViewProps, "insight"
|
|
|
20
21
|
*/
|
|
21
22
|
widget?: IInsightWidget;
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
+
export declare const IntlInsightRenderer: import("react").FC<import("react-intl").WithIntlProps<Omit<IInsightRendererProps & WrappedComponentProps & {
|
|
24
25
|
messages: ITranslations;
|
|
26
|
+
}, "theme" | "themeIsLoading" | "themeStatus">>> & {
|
|
27
|
+
WrappedComponent: import("react").ComponentType<Omit<IInsightRendererProps & WrappedComponentProps & {
|
|
28
|
+
messages: ITranslations;
|
|
29
|
+
}, "theme" | "themeIsLoading" | "themeStatus">>;
|
|
25
30
|
};
|
|
26
|
-
export declare const IntlInsightRenderer: import("react").ComponentType<Omit<InsightRendererCoreProps, "theme" | "themeIsLoading" | "themeStatus">>;
|
|
27
31
|
/**
|
|
28
32
|
* Renders insight passed as a parameter.
|
|
29
33
|
*
|
|
30
34
|
* @internal
|
|
31
35
|
*/
|
|
32
36
|
export declare function InsightRenderer(props: IInsightRendererProps): import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
-
export {};
|
|
34
37
|
//# sourceMappingURL=InsightRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightRenderer.d.ts","sourceRoot":"","sources":["../../src/insightView/InsightRenderer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InsightRenderer.d.ts","sourceRoot":"","sources":["../../src/insightView/InsightRenderer.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,qBAAqB,EAAc,MAAM,YAAY,CAAC;AAOpE,OAAO,EAGH,KAAK,sBAAsB,EAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,qBAAqB,EAM7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAKH,KAAK,OAAO,EACZ,KAAK,aAAa,EAGlB,KAAK,OAAO,EAMf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAGH,KAAK,iBAAiB,EAIzB,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAC/C,iBAAiB,EACjB,SAAS,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,WAAW,CACjE;IACG,OAAO,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAC7C,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,YAAY,EAAE,aAAa,GAAG,SAAS,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CAC3B;AA+RD,eAAO,MAAM,mBAAmB;;;;;;CAA2D,CAAC;AAwB5F;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,qBAAqB,kDAuC3D"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2020-2026 GoodData Corporation
|
|
3
|
-
import {
|
|
3
|
+
import { PureComponent, createRef, useCallback, useEffect, useRef } from "react";
|
|
4
4
|
import { isEqual } from "lodash-es";
|
|
5
5
|
import { createRoot } from "react-dom/client";
|
|
6
|
+
import { injectIntl } from "react-intl";
|
|
6
7
|
import { v4 as uuidv4 } from "uuid";
|
|
7
8
|
import { ExecutionFactoryUpgradingToExecByReference, ExecutionFactoryWithFixedFilters, } from "@gooddata/sdk-backend-base";
|
|
8
9
|
import { insightProperties, insightSetProperties, insightTitle, insightVisualizationType, insightVisualizationUrl, } from "@gooddata/sdk-model";
|
|
@@ -16,95 +17,58 @@ const visualizationUriRootStyle = {
|
|
|
16
17
|
flex: "1 1 auto",
|
|
17
18
|
flexDirection: "column",
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
-
const defaultFilters = [];
|
|
21
|
-
const defaultDrillableItems = [];
|
|
22
|
-
/**
|
|
23
|
-
* Applies the defaults on the props. The values used as defaults are referentially stable so that they do not
|
|
24
|
-
* trigger any unnecessary work down the line.
|
|
25
|
-
*/
|
|
26
|
-
const resolveProps = (props) => ({
|
|
27
|
-
...props,
|
|
28
|
-
ErrorComponent: props.ErrorComponent ?? ErrorComponent,
|
|
29
|
-
filters: props.filters ?? defaultFilters,
|
|
30
|
-
drillableItems: props.drillableItems ?? defaultDrillableItems,
|
|
31
|
-
LoadingComponent: props.LoadingComponent ?? LoadingComponent,
|
|
32
|
-
pushData: props.pushData ?? noop,
|
|
33
|
-
locale: props.locale ?? DefaultLocale,
|
|
34
|
-
afterRender: props.afterRender ?? noop,
|
|
35
|
-
});
|
|
36
|
-
// this needs to be a memoized component as it can happen that this might be rendered multiple times
|
|
20
|
+
// this needs to be a pure component as it can happen that this might be rendered multiple times
|
|
37
21
|
// with the same props (referentially) - this might make the rendered visualization behave unpredictably
|
|
38
22
|
// and is bad for performance so we need to make sure the re-renders are performed only if necessary
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const containerRef = useRef(null);
|
|
23
|
+
class InsightRendererCore extends PureComponent {
|
|
24
|
+
elementId = getElementId();
|
|
25
|
+
visualization;
|
|
26
|
+
containerRef = createRef();
|
|
44
27
|
/**
|
|
45
28
|
* The component may render both visualization and config panel. In React18 we therefore need two
|
|
46
29
|
* roots with their respective render methods. This Map holds the roots for both and provides
|
|
47
30
|
* render and unmount methods whenever needed.
|
|
48
31
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (visualizationRef.current) {
|
|
63
|
-
visualizationRef.current.unmount();
|
|
64
|
-
}
|
|
65
|
-
visualizationRef.current = undefined;
|
|
66
|
-
}, []);
|
|
67
|
-
const getExecutionFactory = useCallback(() => {
|
|
68
|
-
const { backend, workspace, executeByReference, filters } = propsRef.current;
|
|
69
|
-
const factory = backend.workspace(workspace).execution();
|
|
70
|
-
if (executeByReference) {
|
|
71
|
-
/*
|
|
72
|
-
* When executing by reference, decorate the original execution factory so that it
|
|
73
|
-
* transparently routes `forInsight` to `forInsightByRef` AND adds the filters
|
|
74
|
-
* from InsightView props.
|
|
75
|
-
*
|
|
76
|
-
* Code will pass this factory over to the pluggable visualizations - they will do execution
|
|
77
|
-
* `forInsight` and under the covers things will be routed and done differently without the
|
|
78
|
-
* plug viz knowing.
|
|
79
|
-
*/
|
|
80
|
-
return new ExecutionFactoryUpgradingToExecByReference(new ExecutionFactoryWithFixedFilters(factory, filters));
|
|
32
|
+
reactRootsMap = new Map();
|
|
33
|
+
static defaultProps = {
|
|
34
|
+
ErrorComponent,
|
|
35
|
+
filters: [],
|
|
36
|
+
drillableItems: [],
|
|
37
|
+
LoadingComponent,
|
|
38
|
+
pushData: () => { },
|
|
39
|
+
locale: DefaultLocale,
|
|
40
|
+
afterRender: () => { },
|
|
41
|
+
};
|
|
42
|
+
unmountVisualization = () => {
|
|
43
|
+
if (this.visualization) {
|
|
44
|
+
this.visualization.unmount();
|
|
81
45
|
}
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
46
|
+
this.visualization = undefined;
|
|
47
|
+
};
|
|
48
|
+
updateVisualization = () => {
|
|
85
49
|
// if the container no longer exists, update was called after unmount -> do nothing
|
|
86
|
-
if (!
|
|
50
|
+
if (!this.visualization || !this.containerRef.current) {
|
|
87
51
|
return;
|
|
88
52
|
}
|
|
89
|
-
const { insight: insightProp, config = {}, settings, locale, messages, widget, drillableItems, colorPalette, execConfig, theme, } = propsRef.current;
|
|
90
53
|
// if there is no insight, bail early
|
|
91
|
-
if (!
|
|
54
|
+
if (!this.props.insight) {
|
|
92
55
|
return;
|
|
93
56
|
}
|
|
94
|
-
const {
|
|
57
|
+
const { config = {} } = this.props;
|
|
58
|
+
const { responsiveUiDateFormat } = this.props.settings ?? {};
|
|
95
59
|
const visProps = {
|
|
96
|
-
locale,
|
|
97
|
-
messages,
|
|
60
|
+
locale: this.props.locale,
|
|
61
|
+
messages: this.props.messages,
|
|
98
62
|
dateFormat: responsiveUiDateFormat,
|
|
99
|
-
a11yTitle: widget?.title,
|
|
100
|
-
a11yDescription: widget?.description,
|
|
63
|
+
a11yTitle: this.props.widget?.title,
|
|
64
|
+
a11yDescription: this.props.widget?.description,
|
|
101
65
|
custom: {
|
|
102
|
-
drillableItems,
|
|
103
|
-
lastSavedVisClassUrl: insightVisualizationUrl(
|
|
66
|
+
drillableItems: this.props.drillableItems,
|
|
67
|
+
lastSavedVisClassUrl: insightVisualizationUrl(this.props.insight),
|
|
104
68
|
},
|
|
105
69
|
config: {
|
|
106
70
|
separators: config.separators,
|
|
107
|
-
colorPalette,
|
|
71
|
+
colorPalette: this.props.colorPalette,
|
|
108
72
|
mapboxToken: config.mapboxToken,
|
|
109
73
|
agGridToken: config.agGridToken,
|
|
110
74
|
forceDisableDrillOnAxes: config.forceDisableDrillOnAxes,
|
|
@@ -112,13 +76,13 @@ const InsightRendererCore = memo(function InsightRendererCore(props) {
|
|
|
112
76
|
isExportMode: config.isExportMode,
|
|
113
77
|
enableExecutionCancelling: config.enableExecutionCancelling,
|
|
114
78
|
},
|
|
115
|
-
executionConfig: execConfig,
|
|
79
|
+
executionConfig: this.props.execConfig,
|
|
116
80
|
customVisualizationConfig: config,
|
|
117
|
-
theme,
|
|
81
|
+
theme: this.props.theme,
|
|
118
82
|
supportsChartFill: config.supportsChartFill,
|
|
119
83
|
};
|
|
120
|
-
const visClass = insightVisualizationType(
|
|
121
|
-
const filled = fillMissingTitlesWithMessages(
|
|
84
|
+
const visClass = insightVisualizationType(this.props.insight);
|
|
85
|
+
const filled = fillMissingTitlesWithMessages(this.props.insight, this.props.locale, this.props.messages, undefined);
|
|
122
86
|
let insight = fillMissingFormats(filled);
|
|
123
87
|
/**
|
|
124
88
|
* Ignore titles for simple measures in all visualizations except for repeater.
|
|
@@ -131,60 +95,29 @@ const InsightRendererCore = memo(function InsightRendererCore(props) {
|
|
|
131
95
|
if (visClass !== "repeater") {
|
|
132
96
|
insight = ignoreTitlesForSimpleMeasures(insight);
|
|
133
97
|
}
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
if (!element) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
const htmlElement = element;
|
|
141
|
-
if (!reactRootsMapRef.current.get(htmlElement)) {
|
|
142
|
-
reactRootsMapRef.current.set(htmlElement, createRoot(htmlElement));
|
|
143
|
-
}
|
|
144
|
-
reactRootsMapRef.current.get(htmlElement).render(children);
|
|
145
|
-
}, []);
|
|
146
|
-
const reactUnmountFunction = useCallback(() => {
|
|
147
|
-
reactRootsMapRef.current.forEach((root) => root.render(null));
|
|
148
|
-
}, []);
|
|
149
|
-
const onExportReadyDecorator = useCallback((exportFunction) => {
|
|
150
|
-
const { onExportReady } = propsRef.current;
|
|
151
|
-
if (!onExportReady) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
const decorator = (exportConfig) => {
|
|
155
|
-
const { insight } = propsRef.current;
|
|
156
|
-
if (exportConfig.title || !insight) {
|
|
157
|
-
return exportFunction(exportConfig);
|
|
158
|
-
}
|
|
159
|
-
return exportFunction({
|
|
160
|
-
...exportConfig,
|
|
161
|
-
title: insightTitle(insight),
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
onExportReady(decorator);
|
|
165
|
-
}, []);
|
|
166
|
-
const setupVisualization = useCallback(() => {
|
|
167
|
-
const { insight, settings, backend, workspace, permissions, locale, messages, pushData, onDrill, onDataView, onLoadingChanged, afterRender, } = propsRef.current;
|
|
98
|
+
this.visualization?.update(visProps, insight, {}, this.getExecutionFactory());
|
|
99
|
+
};
|
|
100
|
+
setupVisualization = () => {
|
|
168
101
|
// if there is no insight, bail early
|
|
169
|
-
if (!insight) {
|
|
102
|
+
if (!this.props.insight) {
|
|
170
103
|
return;
|
|
171
104
|
}
|
|
172
105
|
// the visualization we may have from earlier is no longer valid -> get rid of it
|
|
173
|
-
unmountVisualization();
|
|
174
|
-
const visualizationFactory = FullVisualizationCatalog.forInsight(insight, settings?.enableNewPivotTable ?? true, settings?.enableNewGeoPushpin ?? false).getFactory();
|
|
175
|
-
|
|
176
|
-
backend: backend,
|
|
106
|
+
this.unmountVisualization();
|
|
107
|
+
const visualizationFactory = FullVisualizationCatalog.forInsight(this.props.insight, this.props.settings?.enableNewPivotTable ?? true, this.props.settings?.enableNewGeoPushpin ?? false).getFactory();
|
|
108
|
+
this.visualization = visualizationFactory({
|
|
109
|
+
backend: this.props.backend,
|
|
177
110
|
callbacks: {
|
|
178
111
|
onError: (error) => {
|
|
179
|
-
|
|
180
|
-
|
|
112
|
+
this.props.onError?.(error);
|
|
113
|
+
this.props.onLoadingChanged?.({ isLoading: false });
|
|
181
114
|
},
|
|
182
|
-
onLoadingChanged,
|
|
183
|
-
pushData,
|
|
184
|
-
onDrill,
|
|
185
|
-
onDataView,
|
|
186
|
-
onExportReady: onExportReadyDecorator,
|
|
187
|
-
afterRender,
|
|
115
|
+
onLoadingChanged: this.props.onLoadingChanged,
|
|
116
|
+
pushData: this.props.pushData,
|
|
117
|
+
onDrill: this.props.onDrill,
|
|
118
|
+
onDataView: this.props.onDataView,
|
|
119
|
+
onExportReady: this.onExportReadyDecorator,
|
|
120
|
+
afterRender: this.props.afterRender,
|
|
188
121
|
},
|
|
189
122
|
// This renderer has no configuration panel of its own — it renders read-only insights.
|
|
190
123
|
// It used to resolve the panel with a document-wide lookup of the well-known
|
|
@@ -197,63 +130,107 @@ const InsightRendererCore = memo(function InsightRendererCore(props) {
|
|
|
197
130
|
// fix STL-3184
|
|
198
131
|
configPanelElement: () => null,
|
|
199
132
|
element: () => {
|
|
200
|
-
const rootNode = containerRef.current?.getRootNode() ?? document;
|
|
201
|
-
return rootNode.querySelector(`#${elementId}`);
|
|
133
|
+
const rootNode = this.containerRef.current?.getRootNode() ?? document;
|
|
134
|
+
return rootNode.querySelector(`#${this.elementId}`);
|
|
202
135
|
},
|
|
203
136
|
environment: "dashboards", // TODO get rid of this
|
|
204
|
-
locale,
|
|
205
|
-
messages,
|
|
206
|
-
projectId: workspace,
|
|
207
|
-
visualizationProperties: insightProperties(insight),
|
|
208
|
-
featureFlags: settings,
|
|
209
|
-
permissions,
|
|
210
|
-
renderFun:
|
|
211
|
-
unmountFun:
|
|
137
|
+
locale: this.props.locale,
|
|
138
|
+
messages: this.props.messages,
|
|
139
|
+
projectId: this.props.workspace,
|
|
140
|
+
visualizationProperties: insightProperties(this.props.insight),
|
|
141
|
+
featureFlags: this.props.settings,
|
|
142
|
+
permissions: this.props.permissions,
|
|
143
|
+
renderFun: this.getReactRenderFunction(),
|
|
144
|
+
unmountFun: this.getReactUnmountFunction(),
|
|
212
145
|
});
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
146
|
+
};
|
|
147
|
+
getReactRenderFunction = () => {
|
|
148
|
+
return (children, element) => {
|
|
149
|
+
if (!element) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const htmlElement = element;
|
|
153
|
+
if (!this.reactRootsMap.get(htmlElement)) {
|
|
154
|
+
this.reactRootsMap.set(htmlElement, createRoot(htmlElement));
|
|
155
|
+
}
|
|
156
|
+
this.reactRootsMap.get(htmlElement).render(children);
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
getReactUnmountFunction = () => {
|
|
160
|
+
return () => this.reactRootsMap.forEach((root) => root.render(null));
|
|
161
|
+
};
|
|
162
|
+
onExportReadyDecorator = (exportFunction) => {
|
|
163
|
+
if (!this.props.onExportReady) {
|
|
223
164
|
return;
|
|
224
165
|
}
|
|
166
|
+
const decorator = (exportConfig) => {
|
|
167
|
+
if (exportConfig.title || !this.props.insight) {
|
|
168
|
+
return exportFunction(exportConfig);
|
|
169
|
+
}
|
|
170
|
+
return exportFunction({
|
|
171
|
+
...exportConfig,
|
|
172
|
+
title: insightTitle(this.props.insight),
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
this.props.onExportReady(decorator);
|
|
176
|
+
};
|
|
177
|
+
getExecutionFactory = () => {
|
|
178
|
+
const factory = this.props.backend.workspace(this.props.workspace).execution();
|
|
179
|
+
if (this.props.executeByReference) {
|
|
180
|
+
/*
|
|
181
|
+
* When executing by reference, decorate the original execution factory so that it
|
|
182
|
+
* transparently routes `forInsight` to `forInsightByRef` AND adds the filters
|
|
183
|
+
* from InsightView props.
|
|
184
|
+
*
|
|
185
|
+
* Code will pass this factory over to the pluggable visualizations - they will do execution
|
|
186
|
+
* `forInsight` and under the covers things will be routed and done differently without the
|
|
187
|
+
* plug viz knowing.
|
|
188
|
+
*/
|
|
189
|
+
return new ExecutionFactoryUpgradingToExecByReference(new ExecutionFactoryWithFixedFilters(factory, this.props.filters));
|
|
190
|
+
}
|
|
191
|
+
return factory;
|
|
192
|
+
};
|
|
193
|
+
componentDidMountInner = () => {
|
|
194
|
+
this.setupVisualization();
|
|
195
|
+
return this.updateVisualization();
|
|
196
|
+
};
|
|
197
|
+
componentDidMount() {
|
|
198
|
+
this.componentDidMountInner();
|
|
199
|
+
}
|
|
200
|
+
componentDidUpdateInner = (prevProps) => {
|
|
225
201
|
/**
|
|
226
202
|
* Ignore properties when comparing insights to determine if a new setup is needed: changes to properties
|
|
227
203
|
* only will be handled using the updateVisualization without unnecessary new setup just fine.
|
|
228
204
|
*/
|
|
229
205
|
const prevInsightForCompare = prevProps.insight && insightSetProperties(prevProps.insight, {});
|
|
230
|
-
const newInsightForCompare =
|
|
206
|
+
const newInsightForCompare = this.props.insight && insightSetProperties(this.props.insight, {});
|
|
231
207
|
const needsNewSetup = !isEqual(newInsightForCompare, prevInsightForCompare) ||
|
|
232
|
-
!isEqual(
|
|
233
|
-
!isEqual(
|
|
234
|
-
|
|
208
|
+
!isEqual(this.props.filters, prevProps.filters) ||
|
|
209
|
+
!isEqual(this.props.settings, prevProps.settings) ||
|
|
210
|
+
this.props.workspace !== prevProps.workspace;
|
|
235
211
|
if (needsNewSetup) {
|
|
236
|
-
setupVisualization();
|
|
212
|
+
this.setupVisualization();
|
|
237
213
|
}
|
|
238
|
-
updateVisualization();
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
|
|
214
|
+
return this.updateVisualization();
|
|
215
|
+
};
|
|
216
|
+
componentDidUpdate(prevProps) {
|
|
217
|
+
this.componentDidUpdateInner(prevProps);
|
|
218
|
+
}
|
|
219
|
+
componentWillUnmount() {
|
|
220
|
+
this.unmountVisualization();
|
|
221
|
+
// In order to avoid race conditions when mounting and unmounting synchronously,
|
|
222
|
+
// we use timeout for React18.
|
|
223
|
+
// https://github.com/facebook/react/issues/25675
|
|
224
|
+
this.reactRootsMap.forEach((root) => setTimeout(() => root.unmount(), 0));
|
|
225
|
+
}
|
|
226
|
+
render() {
|
|
227
|
+
return (
|
|
228
|
+
// never ever dynamically change the props of this div, otherwise bad things will happen
|
|
229
|
+
// e.g. visualization being rendered multiple times, etc.
|
|
230
|
+
_jsx("div", { className: "visualization-uri-root", id: this.elementId, ref: this.containerRef, style: visualizationUriRootStyle }));
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
export const IntlInsightRenderer = injectIntl(withTheme(withContexts(InsightRendererCore)));
|
|
257
234
|
/**
|
|
258
235
|
* Updated callback (callback with a different reference) is not properly propagated to the "visualization" instance
|
|
259
236
|
* (because it only takes the callbacks provided on the first render)
|
package/esm/internal/components/configurationControls/conditionalFormatting/ConditionEditor.d.ts
CHANGED
|
@@ -14,8 +14,10 @@ export interface IConditionEditorProps {
|
|
|
14
14
|
dateSettings: ICfDateSettings | undefined;
|
|
15
15
|
removable: boolean;
|
|
16
16
|
slot: IReorderSlot;
|
|
17
|
+
/** A read-only rule may carry an operator/value the editor doesn't curate for this target. */
|
|
18
|
+
readOnly?: boolean;
|
|
17
19
|
onChange: (condition: IConditionalFormattingCondition) => void;
|
|
18
20
|
onRemove: () => void;
|
|
19
21
|
}
|
|
20
|
-
export declare function ConditionEditor({ condition, kind, isPercent, separators, suggestions, date, dateFilterOptions, dateSettings, removable, slot, onChange, onRemove }: IConditionEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ConditionEditor({ condition, kind, isPercent, separators, suggestions, date, dateFilterOptions, dateSettings, removable, slot, readOnly, onChange, onRemove }: IConditionEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
//# sourceMappingURL=ConditionEditor.d.ts.map
|
package/esm/internal/components/configurationControls/conditionalFormatting/ConditionEditor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionEditor.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/configurationControls/conditionalFormatting/ConditionEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAiBzE,OAAO,EACH,KAAK,2BAA2B,EAEhC,KAAK,+BAA+B,EAEvC,MAAM,6BAA6B,CAAC;AAarC,OAAO,EAGH,KAAK,WAAW,EAChB,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"ConditionEditor.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/configurationControls/conditionalFormatting/ConditionEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAiBzE,OAAO,EACH,KAAK,2BAA2B,EAEhC,KAAK,+BAA+B,EAEvC,MAAM,6BAA6B,CAAC;AAarC,OAAO,EAGH,KAAK,WAAW,EAChB,KAAK,eAAe,EAavB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAkYrD,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,+BAA+B,CAAC;IAC3C,IAAI,EAAE,2BAA2B,CAAC,MAAM,CAAC,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,WAAW,GAAG,SAAS,CAAC;IACpC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,IAAI,EAAE,WAAW,GAAG,SAAS,CAAC;IAC9B,iBAAiB,EAAE,wBAAwB,GAAG,SAAS,CAAC;IACxD,YAAY,EAAE,eAAe,GAAG,SAAS,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,SAAS,EAAE,+BAA+B,KAAK,IAAI,CAAC;IAC/D,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,wBAAgB,eAAe,CAAC,EAC5B,SAAS,EACT,IAAI,EACJ,SAAS,EACT,UAAU,EACV,WAAW,EACX,IAAI,EACJ,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,IAAI,EACJ,QAAgB,EAChB,QAAQ,EACR,QAAQ,EACX,EAAE,qBAAqB,2CA8FvB"}
|