@gooddata/sdk-ui-dashboard 11.68.0-alpha.5 → 11.68.0-alpha.7
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 +11689 -60396
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/slideshow/containerSwitcherSlideTransformer.d.ts.map +1 -1
- package/esm/_staging/slideshow/containerSwitcherSlideTransformer.js +2 -2
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/kdaDialog/composition/hooks/usePeriodChangeHandler.js +11 -9
- package/esm/kdaDialog/types.d.ts +5 -0
- package/esm/kdaDialog/types.d.ts.map +1 -1
- package/esm/kdaDialog/utils.d.ts.map +1 -1
- package/esm/kdaDialog/utils.js +4 -1
- package/esm/model/DashboardTester.d.ts.map +1 -1
- package/esm/model/DashboardTester.js +2 -0
- package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.d.ts.map +1 -1
- package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.js +23 -6
- package/esm/model/commandHandlers/dashboard/common/stateInitializers.js +3 -3
- package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/resolveDrillToCustomUrl.js +31 -3
- package/esm/model/commandHandlers/parameters/customUrlDrillParametersWorker.d.ts +3 -0
- package/esm/model/commandHandlers/parameters/customUrlDrillParametersWorker.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/customUrlDrillParametersWorker.js +15 -0
- package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
- package/esm/model/react/useInitializeDashboardStore.js +7 -0
- package/esm/model/store/dashboardStore.d.ts +4 -0
- package/esm/model/store/dashboardStore.d.ts.map +1 -1
- package/esm/model/store/dashboardStore.js +9 -3
- package/esm/model/store/meta/metaSelectors.d.ts +16 -1
- package/esm/model/store/meta/metaSelectors.d.ts.map +1 -1
- package/esm/model/store/meta/metaSelectors.js +51 -0
- package/esm/model/store/tabs/filterContext/filterContextReducers.d.ts.map +1 -1
- package/esm/model/store/tabs/filterContext/filterContextReducers.js +5 -5
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +7 -0
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.js +31 -9
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +21 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +26 -1
- package/esm/model/types/layoutTypes.d.ts.map +1 -1
- package/esm/model/types/layoutTypes.js +4 -5
- package/esm/plugins/customizationApis/fluidLayoutCustomizer.d.ts.map +1 -1
- package/esm/plugins/customizationApis/fluidLayoutCustomizer.js +3 -4
- package/esm/presentation/automations/alerting/state/useAlertDraftFilterWrites.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/state/useAlertDraftFilterWrites.js +9 -5
- package/esm/presentation/automations/alerting/utils/items.d.ts.map +1 -1
- package/esm/presentation/automations/alerting/utils/items.js +20 -23
- package/esm/presentation/dashboard/defaultDashboardThemeModifier.d.ts.map +1 -1
- package/esm/presentation/dashboard/defaultDashboardThemeModifier.js +2 -3
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.d.ts.map +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +30 -6
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParameters.d.ts +3 -2
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParameters.d.ts.map +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParameters.js +3 -2
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/ParameterParametersSection.d.ts +7 -0
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/ParameterParametersSection.d.ts.map +1 -0
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/ParameterParametersSection.js +20 -0
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/ParameterDetails/ParameterDetail.d.ts +2 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/ParameterDetails/ParameterDetail.d.ts.map +1 -1
- package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/ParameterDetails/ParameterDetail.js +5 -2
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts +20 -0
- package/esm/presentation/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-US.localization-bundle.js +20 -0
- package/esm/presentation/widget/insight/configuration/DrillTargets/useInvalidFilteringParametersIdentifiers.d.ts +1 -1
- package/esm/presentation/widget/insight/configuration/DrillTargets/useInvalidFilteringParametersIdentifiers.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/DrillTargets/useInvalidFilteringParametersIdentifiers.js +5 -2
- package/esm/presentation/widget/insight/configuration/InsightDrillConfigItem.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDrillConfigItem.js +2 -3
- package/esm/sdk-ui-dashboard.d.ts +23 -0
- package/package.json +24 -23
- package/styles/css/drillConfigPanel.css +5 -0
- package/styles/css/drillConfigPanel.css.map +1 -1
- package/styles/css/main.css +5 -0
- package/styles/css/main.css.map +1 -1
- package/styles/scss/drillConfigPanel.scss +6 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import { cloneDeep } from "lodash-es";
|
|
3
2
|
import { idRef, isDashboardLayout, isWidget, } from "@gooddata/sdk-model";
|
|
4
|
-
import { _isEmpty } from "@gooddata/util";
|
|
3
|
+
import { _cloneDeep, _isEmpty } from "@gooddata/util";
|
|
5
4
|
/**
|
|
6
5
|
* Creates a new custom widget.
|
|
7
6
|
*
|
|
@@ -13,7 +12,7 @@ import { _isEmpty } from "@gooddata/util";
|
|
|
13
12
|
* @public
|
|
14
13
|
*/
|
|
15
14
|
export function newCustomWidget(identifier, customType, extras) {
|
|
16
|
-
const extrasCopy = extras ?
|
|
15
|
+
const extrasCopy = extras ? _cloneDeep(extras) : {};
|
|
17
16
|
return {
|
|
18
17
|
type: "customWidget",
|
|
19
18
|
customType,
|
|
@@ -90,7 +89,7 @@ export function newDashboardItem(widget, sizeOrColSize) {
|
|
|
90
89
|
return {
|
|
91
90
|
type: "IDashboardLayoutItem",
|
|
92
91
|
size,
|
|
93
|
-
widget:
|
|
92
|
+
widget: _cloneDeep(widget),
|
|
94
93
|
};
|
|
95
94
|
}
|
|
96
95
|
function getOrCreateSectionHeader(titleOrHeader) {
|
|
@@ -118,7 +117,7 @@ function getOrCreateSectionHeader(titleOrHeader) {
|
|
|
118
117
|
*/
|
|
119
118
|
export function newDashboardSection(titleOrHeader, ...items) {
|
|
120
119
|
const header = getOrCreateSectionHeader(titleOrHeader);
|
|
121
|
-
const itemsClone =
|
|
120
|
+
const itemsClone = _cloneDeep(items);
|
|
122
121
|
return {
|
|
123
122
|
type: "IDashboardLayoutSection",
|
|
124
123
|
items: itemsClone,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidLayoutCustomizer.d.ts","sourceRoot":"","sources":["../../../src/plugins/customizationApis/fluidLayoutCustomizer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fluidLayoutCustomizer.d.ts","sourceRoot":"","sources":["../../../src/plugins/customizationApis/fluidLayoutCustomizer.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAE/B,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,KAAK,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACpG,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAY7D,qBAAa,qBAAsB,YAAW,sBAAsB;IAK5D,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,eAAe;IALpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAsB;IAEpD,YACqB,MAAM,EAAE,6BAA6B,EACrC,eAAe,EAAE,0BAA0B,EAC5D;IAEG,OAAO,CACV,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,oBAAoB,CAAC,aAAa,CAAC,GAC1C,sBAAsB,CAExB;IAEM,aAAa,CAChB,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,oBAAoB,CAAC,aAAa,CAAC,GAC1C,sBAAsB,CAgBxB;IAEM,UAAU,CACb,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,uBAAuB,CAAC,aAAa,CAAC,GAChD,sBAAsB,CAExB;IAEM,gBAAgB,CACnB,WAAW,EAAE,kBAAkB,EAC/B,OAAO,EAAE,uBAAuB,CAAC,aAAa,CAAC,GAChD,sBAAsB,CA0BxB;IAEM,oBAAoB,WACf,gBAAgB,CAAC,uBAAuB,CAAC,KAClD,gBAAgB,CAAC,uBAAuB,CAAC,CAqD1C;CACL"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
|
-
import { cloneDeep } from "lodash-es";
|
|
3
2
|
import { objRefToString, } from "@gooddata/sdk-model";
|
|
4
|
-
import { _isEmpty } from "@gooddata/util";
|
|
3
|
+
import { _cloneDeep, _isEmpty } from "@gooddata/util";
|
|
5
4
|
import { DashboardLayoutBuilder } from "../../_staging/dashboard/flexibleLayout/builder/layout.js";
|
|
6
5
|
export class FluidLayoutCustomizer {
|
|
7
6
|
logger;
|
|
@@ -22,7 +21,7 @@ export class FluidLayoutCustomizer {
|
|
|
22
21
|
}
|
|
23
22
|
this.addItemOps.push({
|
|
24
23
|
itemPath,
|
|
25
|
-
item:
|
|
24
|
+
item: _cloneDeep(item),
|
|
26
25
|
});
|
|
27
26
|
return this;
|
|
28
27
|
}
|
|
@@ -41,7 +40,7 @@ export class FluidLayoutCustomizer {
|
|
|
41
40
|
}
|
|
42
41
|
this.addSectionOps.push({
|
|
43
42
|
sectionPath,
|
|
44
|
-
section:
|
|
43
|
+
section: _cloneDeep(section),
|
|
45
44
|
});
|
|
46
45
|
return this;
|
|
47
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAlertDraftFilterWrites.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/useAlertDraftFilterWrites.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAwB,MAAM,OAAO,CAAC;AAEjF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,SAAS,EACjB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC5C,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,mCAAmC,GAAG,SAAS,CAAC,CAAC,CAAC;IAC/F,6FAA6F;IAC7F,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IAC1E,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,mBAAmB,EAAE,cAAc,EAAE,CAAC;IACtC,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,eAAe,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,iBAAiB,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,EACtC,mBAAmB,EACnB,WAAW,EACX,sBAAsB,EACtB,kBAAkB,EAClB,MAAM,EACN,OAAO,EACP,gCAAgC,EAChC,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,QAAQ,GACX,EAAE,+BAA+B,GAAG;IAAE,mBAAmB,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"useAlertDraftFilterWrites.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/state/useAlertDraftFilterWrites.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAwB,MAAM,OAAO,CAAC;AAEjF,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAC7B,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,SAAS,EACjB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC5C,mBAAmB,EAAE,QAAQ,CAAC,cAAc,CAAC,mCAAmC,GAAG,SAAS,CAAC,CAAC,CAAC;IAC/F,6FAA6F;IAC7F,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,gCAAgC,CAAC,EAAE,wBAAwB,EAAE,GAAG,SAAS,CAAC;IAC1E,iBAAiB,EAAE,WAAW,EAAE,CAAC;IACjC,mBAAmB,EAAE,cAAc,EAAE,CAAC;IACtC,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,eAAe,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,iBAAiB,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,EACtC,mBAAmB,EACnB,WAAW,EACX,sBAAsB,EACtB,kBAAkB,EAClB,MAAM,EACN,OAAO,EACP,gCAAgC,EAChC,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,QAAQ,GACX,EAAE,+BAA+B,GAAG;IAAE,mBAAmB,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAA;CAAE,CAmGnG"}
|
|
@@ -37,11 +37,15 @@ export function useAlertDraftFilterWrites({ setEditedAutomation, alertToEdit, da
|
|
|
37
37
|
visibleFilters,
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
|
-
const updatedAutomationWithAttribute = transformAlertByAttribute(supportedAttributes, updatedAutomationWithFilters, selectedAttribute,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
const updatedAutomationWithAttribute = transformAlertByAttribute(supportedAttributes, updatedAutomationWithFilters, selectedAttribute,
|
|
41
|
+
// No value means All; "" would filter to an empty value.
|
|
42
|
+
selectedValue === undefined
|
|
43
|
+
? undefined
|
|
44
|
+
: {
|
|
45
|
+
name: selectedValue ?? "",
|
|
46
|
+
title: "",
|
|
47
|
+
value: "",
|
|
48
|
+
});
|
|
45
49
|
return selectedMeasure
|
|
46
50
|
? transformAlertByMetric(supportedMeasures, updatedAutomationWithAttribute, selectedMeasure, measureFormatMap, weekStart, timezone)
|
|
47
51
|
: updatedAutomationWithAttribute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/utils/items.ts"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,yBAAyB,EAE9B,KAAK,iBAAiB,EAEtB,KAAK,mBAAmB,EAExB,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/alerting/utils/items.ts"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,yBAAyB,EAE9B,KAAK,iBAAiB,EAEtB,KAAK,mBAAmB,EAExB,KAAK,QAAQ,EAuBhB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAA6B,MAAM,aAAa,CAAC;AAgE/F;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAChD,OAAO,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,EACpC,YAAY,GAAE,mBAAmB,EAAO,EACxC,KAAK,CAAC,EAAE,yBAAyB,GAClC,WAAW,EAAE,CAoCf;AA4BD;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CAClD,OAAO,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,EACpC,UAAU,EAAE,iBAAiB,EAAE,EAC/B,YAAY,GAAE,mBAAmB,EAAO,EACxC,KAAK,CAAC,EAAE,yBAAyB,GAClC,cAAc,EAAE,CAMlB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2022-2026 GoodData Corporation
|
|
2
|
-
import { DateGranularity, areObjRefsEqual, bucketAttributes, bucketMeasures, insightBucket, insightFilters, insightVisualizationType, isArithmeticMeasure, isPoPMeasure, isPoPMeasureDefinition, isPreviousPeriodMeasure, isPreviousPeriodMeasureDefinition, isRelativeDateFilter, isSimpleMeasure, newAttribute, newMeasure, newPopMeasure, newPreviousPeriodMeasure, } from "@gooddata/sdk-model";
|
|
2
|
+
import { DateGranularity, areObjRefsEqual, bucketAttributes, bucketMeasures, insightBucket, insightFilters, insightVisualizationType, isArithmeticMeasure, isPoPMeasure, isPoPMeasureDefinition, isPreviousPeriodMeasure, isPreviousPeriodMeasureDefinition, isRelativeDateFilter, isSimpleMeasure, measureLocalId, modifyMeasure, newAttribute, newMeasure, newPopMeasure, newPreviousPeriodMeasure, } from "@gooddata/sdk-model";
|
|
3
3
|
import { BucketNames } from "@gooddata/sdk-ui";
|
|
4
4
|
import { AlertMetricComparatorType } from "../types.js";
|
|
5
5
|
import { getCatalogAttribute, getFiltersAttribute } from "./getters.js";
|
|
@@ -198,41 +198,26 @@ function collectAllMetric(insight, alert) {
|
|
|
198
198
|
}
|
|
199
199
|
if (alert) {
|
|
200
200
|
if (alert.alert?.condition.type === "relative") {
|
|
201
|
-
const left = alert.alert
|
|
202
|
-
const right = alert.alert?.condition.measure.right;
|
|
201
|
+
const { left, right } = alert.alert.condition.measure;
|
|
203
202
|
return {
|
|
204
203
|
primaries: [
|
|
205
|
-
...(left
|
|
206
|
-
|
|
207
|
-
newMeasure(left.id, (a) => a.format(left.format).title(left.title).localId(left.id)),
|
|
208
|
-
]
|
|
209
|
-
: []),
|
|
210
|
-
...(right
|
|
211
|
-
? [
|
|
212
|
-
newMeasure(right.id, (a) => a.format(right.format).title(right.title).localId(right.id)),
|
|
213
|
-
]
|
|
214
|
-
: []),
|
|
204
|
+
...(left ? [alertOperandMeasure(alert, left)] : []),
|
|
205
|
+
...(right ? [alertOperandMeasure(alert, right)] : []),
|
|
215
206
|
],
|
|
216
207
|
others: [],
|
|
217
208
|
};
|
|
218
209
|
}
|
|
219
210
|
if (alert.alert?.condition.type === "comparison") {
|
|
220
|
-
const left = alert.alert
|
|
211
|
+
const left = alert.alert.condition.left;
|
|
221
212
|
return {
|
|
222
|
-
primaries: left
|
|
223
|
-
? [newMeasure(left.id, (a) => a.format(left.format).title(left.title).localId(left.id))]
|
|
224
|
-
: [],
|
|
213
|
+
primaries: left ? [alertOperandMeasure(alert, left)] : [],
|
|
225
214
|
others: [],
|
|
226
215
|
};
|
|
227
216
|
}
|
|
228
217
|
if (alert.alert?.condition.type === "anomalyDetection") {
|
|
229
|
-
const measure = alert.alert
|
|
218
|
+
const measure = alert.alert.condition.measure;
|
|
230
219
|
return {
|
|
231
|
-
primaries: measure
|
|
232
|
-
? [
|
|
233
|
-
newMeasure(measure.id, (a) => a.format(measure.format).title(measure.title).localId(measure.id)),
|
|
234
|
-
]
|
|
235
|
-
: [],
|
|
220
|
+
primaries: measure ? [alertOperandMeasure(alert, measure)] : [],
|
|
236
221
|
others: [],
|
|
237
222
|
};
|
|
238
223
|
}
|
|
@@ -242,6 +227,18 @@ function collectAllMetric(insight, alert) {
|
|
|
242
227
|
others: [],
|
|
243
228
|
};
|
|
244
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* The alert's stored measure for a condition operand. A measure made from the operand's local identifier
|
|
232
|
+
* alone would be sent as a fact that does not exist.
|
|
233
|
+
*/
|
|
234
|
+
function alertOperandMeasure(alert, operand) {
|
|
235
|
+
const execution = alert.alert?.execution;
|
|
236
|
+
const stored = [...(execution?.measures ?? []), ...(execution?.auxMeasures ?? [])].find((measure) => measureLocalId(measure) === operand.id);
|
|
237
|
+
if (stored) {
|
|
238
|
+
return modifyMeasure(stored, (m) => m.format(operand.format).title(operand.title));
|
|
239
|
+
}
|
|
240
|
+
return newMeasure(operand.id, (m) => m.format(operand.format).title(operand.title).localId(operand.id));
|
|
241
|
+
}
|
|
245
242
|
function collectAllAttributes(insight, attributes, alert) {
|
|
246
243
|
if (insight) {
|
|
247
244
|
const insightType = insight ? insightVisualizationType(insight) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultDashboardThemeModifier.d.ts","sourceRoot":"","sources":["../../../src/presentation/dashboard/defaultDashboardThemeModifier.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultDashboardThemeModifier.d.ts","sourceRoot":"","sources":["../../../src/presentation/dashboard/defaultDashboardThemeModifier.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,UAAW,MAAM,KAAG,MAkC7D,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
// (C) 2020-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
3
|
-
import { _isEmpty } from "@gooddata/util";
|
|
2
|
+
import { _cloneDeep, _isEmpty } from "@gooddata/util";
|
|
4
3
|
/**
|
|
5
4
|
* Default modifier applied to any theme passed to Dashboard component
|
|
6
5
|
* @param theme - theme to modify
|
|
7
6
|
* @beta
|
|
8
7
|
*/
|
|
9
8
|
export const defaultDashboardThemeModifier = (theme) => {
|
|
10
|
-
const modifiedTheme =
|
|
9
|
+
const modifiedTheme = _cloneDeep(theme);
|
|
11
10
|
if (theme?.dashboards?.content?.kpiWidget?.kpi) {
|
|
12
11
|
// duplicate dashboard specific kpi customization to the generic kpi key
|
|
13
12
|
modifiedTheme.kpi = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomUrlEditor.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAoB,KAAK,SAAS,EAAW,MAAM,YAAY,CAAC;AAEvE,OAAO,EAKH,KAAK,MAAM,EAYd,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomUrlEditor.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAoB,KAAK,SAAS,EAAW,MAAM,YAAY,CAAC;AAEvE,OAAO,EAKH,KAAK,MAAM,EAYd,MAAM,qBAAqB,CAAC;AAoC7B,OAAO,EAAE,KAAK,cAAc,EAA4B,MAAM,gBAAgB,CAAC;AAG/E,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,uBAAuB,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5C,IAAI,EAAE,SAAS,CAAC;CACnB;AAsCD,wBAAgB,QAAQ,CAAC,EACrB,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,uBAAuB,GAC1B,EAAE,cAAc,kDAoBhB;AAsID,UAAU,eAAe;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AA+LD,MAAM,WAAW,qBAAqB;IAClC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,qBAAqB,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACpD,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,sCAAsC,EAAE,MAAM,EAAE,CAAC;IACjD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,EAAE,OAAO,CAAC;IACjC,4BAA4B,EAAE,OAAO,CAAC;IACtC,uBAAuB,EAAE,OAAO,CAAC;IACjC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;CACrB;AA2HD,wBAAgB,eAAe,CAAC,KAAK,EAAE,qBAAqB,2CAkB3D"}
|
|
@@ -6,7 +6,7 @@ import { Tag } from "@lezer/highlight";
|
|
|
6
6
|
import { compact, escapeRegExp, uniqBy } from "lodash-es";
|
|
7
7
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
8
8
|
import { dashboardAttributeFilterItemToAttributeFilter, filterObjRef, insightFilters as insightDefinitionFilters, isArbitraryAttributeFilter, isAttributeFilter, isMatchAttributeFilter, isMeasureValueFilter, isNegativeAttributeFilter, isPositiveAttributeFilter, objRefToString, serializeObjRef, } from "@gooddata/sdk-model";
|
|
9
|
-
import { attributeIdentifierToPlaceholder, dashboardAttributeFilterToPlaceholder, displayFormPlaceholderRef, insightAttributeFilterToPlaceholder, } from "@gooddata/sdk-model/internal";
|
|
9
|
+
import { attributeIdentifierToPlaceholder, dashboardAttributeFilterToPlaceholder, displayFormPlaceholderRef, insightAttributeFilterToPlaceholder, parameterIdentifierToPlaceholder, } from "@gooddata/sdk-model/internal";
|
|
10
10
|
import { ConfirmDialogBase, DefaultSyntaxHighlightingInput, FullScreenOverlay, Overlay, OverlayController, OverlayControllerProvider, useMediaQuery, } from "@gooddata/sdk-ui-kit";
|
|
11
11
|
import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
|
|
12
12
|
import { selectAllCatalogDisplayFormsMap, selectAllCatalogMeasuresMap, } from "../../../../model/store/catalog/catalogSelectors.js";
|
|
@@ -14,6 +14,7 @@ import { selectEnableMeasureValueFilterKD, selectIsWhiteLabeled, } from "../../.
|
|
|
14
14
|
import { selectInsightByWidgetRef } from "../../../../model/store/insights/insightsSelectors.js";
|
|
15
15
|
import { selectAttributeFilterConfigsOverrides } from "../../../../model/store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
|
|
16
16
|
import { selectFilterContextAttributeFilterItems, selectFilterContextMeasureValueFilters, } from "../../../../model/store/tabs/filterContext/filterContextSelectors.js";
|
|
17
|
+
import { selectWidgetParameterValues } from "../../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
17
18
|
import { DASHBOARD_HEADER_OVERLAYS_Z_INDEX } from "../../../constants/zIndex.js";
|
|
18
19
|
import { useInvalidFilteringParametersIdentifiers } from "../../../widget/insight/configuration/DrillTargets/useInvalidFilteringParametersIdentifiers.js";
|
|
19
20
|
import { isDrillToCustomUrlConfig } from "../../types.js";
|
|
@@ -128,6 +129,18 @@ const buildValidInsightMvfFormattingRule = (measureIdentifiers) => {
|
|
|
128
129
|
token: customTags.filter.toString(),
|
|
129
130
|
};
|
|
130
131
|
};
|
|
132
|
+
const buildValidParametersFormattingRule = (dashboardParameterIdentifiers) => {
|
|
133
|
+
if (dashboardParameterIdentifiers.length === 0) {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
const validParameterPlaceholders = dashboardParameterIdentifiers
|
|
137
|
+
.map((identifier) => escapeRegExp(parameterIdentifierToPlaceholder(identifier)))
|
|
138
|
+
.join("|");
|
|
139
|
+
return {
|
|
140
|
+
regex: new RegExp(`^(?:${validParameterPlaceholders})`),
|
|
141
|
+
token: customTags.filter.toString(),
|
|
142
|
+
};
|
|
143
|
+
};
|
|
131
144
|
const IDENTIFIER_RULE = {
|
|
132
145
|
regex: /^\{workspace_id\}|\{project_id\}|\{visualization_id\}|\{widget_id\}|\{dashboard_id\}|\{client_id\}|\{data_product_id\}/,
|
|
133
146
|
token: customTags.identifier.toString(),
|
|
@@ -153,31 +166,38 @@ const INVALID_INSIGHT_ATTRIBUTE_FILTER_RULE = {
|
|
|
153
166
|
regex: /^\{attribute_filter_selection\(.*?\)\}/,
|
|
154
167
|
token: customTags.invalidFilter.toString(),
|
|
155
168
|
};
|
|
169
|
+
const INVALID_PARAMETER_RULE = {
|
|
170
|
+
regex: /^\{parameter(?:\(.*?\))?\}/,
|
|
171
|
+
token: customTags.invalidFilter.toString(),
|
|
172
|
+
};
|
|
156
173
|
const DEFAULT_RULES = [
|
|
157
174
|
INVALID_DISPLAY_FORMS_RULE,
|
|
158
175
|
INVALID_DASHBOARD_ATTRIBUTE_FILTER_RULE,
|
|
159
176
|
INVALID_DASHBOARD_MVF_RULE,
|
|
160
177
|
INVALID_INSIGHT_MVF_RULE,
|
|
161
178
|
INVALID_INSIGHT_ATTRIBUTE_FILTER_RULE,
|
|
179
|
+
INVALID_PARAMETER_RULE,
|
|
162
180
|
IDENTIFIER_RULE,
|
|
163
181
|
INVALID_IDENTIFIER_RULE,
|
|
164
182
|
];
|
|
165
|
-
const buildFormattingRules = (attributeDisplayForms, dashboardFilters, insightFilters, dashboardMeasureIdentifiers, insightMeasureIdentifiers, attributeFilterConfigs) => {
|
|
183
|
+
const buildFormattingRules = (attributeDisplayForms, dashboardFilters, insightFilters, dashboardMeasureIdentifiers, insightMeasureIdentifiers, dashboardParameterIdentifiers, attributeFilterConfigs) => {
|
|
166
184
|
const validDisplayFormsRule = buildValidDisplayFormsFormattingRule(attributeDisplayForms);
|
|
167
185
|
const validInsightFiltersRule = buildValidInsightFiltersFormattingRule(insightFilters);
|
|
168
186
|
const validDashboardFiltersRule = buildValidDashboardFiltersFormattingRule(dashboardFilters, attributeFilterConfigs);
|
|
169
187
|
const validDashboardMvfRule = buildValidDashboardMvfFormattingRule(dashboardMeasureIdentifiers);
|
|
170
188
|
const validInsightMvfRule = buildValidInsightMvfFormattingRule(insightMeasureIdentifiers);
|
|
189
|
+
const validParametersRule = buildValidParametersFormattingRule(dashboardParameterIdentifiers);
|
|
171
190
|
return compact([
|
|
172
191
|
validDisplayFormsRule,
|
|
173
192
|
validDashboardFiltersRule,
|
|
174
193
|
validDashboardMvfRule,
|
|
175
194
|
validInsightFiltersRule,
|
|
176
195
|
validInsightMvfRule,
|
|
196
|
+
validParametersRule,
|
|
177
197
|
...DEFAULT_RULES,
|
|
178
198
|
]);
|
|
179
199
|
};
|
|
180
|
-
function UrlInputPanel({ currentUrlValue, onChange, onCursor, documentationLink, attributeDisplayForms, intl, insightFilters, dashboardFilters, dashboardMeasureValueFilters, insightMeasureValueFilters, enableInsightMeasureValueFilters, attributeFilterConfigs, }) {
|
|
200
|
+
function UrlInputPanel({ currentUrlValue, onChange, onCursor, documentationLink, attributeDisplayForms, intl, insightFilters, dashboardFilters, dashboardMeasureValueFilters, insightMeasureValueFilters, enableInsightMeasureValueFilters, attributeFilterConfigs, dashboardParameterIdentifiers, }) {
|
|
181
201
|
const isWhiteLabeled = useDashboardSelector(selectIsWhiteLabeled);
|
|
182
202
|
const catalogMeasuresMap = useDashboardSelector(selectAllCatalogMeasuresMap);
|
|
183
203
|
const dashboardMeasureIdentifiers = useMemo(() => {
|
|
@@ -196,13 +216,14 @@ function UrlInputPanel({ currentUrlValue, onChange, onCursor, documentationLink,
|
|
|
196
216
|
insightFilters &&
|
|
197
217
|
dashboardFilters &&
|
|
198
218
|
dashboardMeasureValueFilters &&
|
|
199
|
-
buildFormattingRules(attributeDisplayForms, dashboardFilters, insightFilters, dashboardMeasureIdentifiers, insightMeasureIdentifiers, attributeFilterConfigs), [
|
|
219
|
+
buildFormattingRules(attributeDisplayForms, dashboardFilters, insightFilters, dashboardMeasureIdentifiers, insightMeasureIdentifiers, dashboardParameterIdentifiers, attributeFilterConfigs), [
|
|
200
220
|
attributeDisplayForms,
|
|
201
221
|
insightFilters,
|
|
202
222
|
dashboardFilters,
|
|
203
223
|
dashboardMeasureValueFilters,
|
|
204
224
|
dashboardMeasureIdentifiers,
|
|
205
225
|
insightMeasureIdentifiers,
|
|
226
|
+
dashboardParameterIdentifiers,
|
|
206
227
|
attributeFilterConfigs,
|
|
207
228
|
]);
|
|
208
229
|
return (_jsxs("div", { children: [_jsx("label", { className: "gd-label", children: _jsx(FormattedMessage, { id: "configurationPanel.drillIntoUrl.editor.textAreaLabel" }) }), _jsx(UrlInput, { onChange: onChange, onCursor: onCursor, currentUrlValue: currentUrlValue, syntaxHighlightingRules: syntaxHighlightingRules, intl: intl }), !isWhiteLabeled && documentationLink ? _jsx(HelpLink, { link: documentationLink }) : null] }));
|
|
@@ -218,6 +239,7 @@ const URL_START_RULES = [
|
|
|
218
239
|
/^\{attribute_filter_selection\(/,
|
|
219
240
|
/^\{dash_attribute_filter_selection\(/,
|
|
220
241
|
/^\{dash_mvf_condition\(/,
|
|
242
|
+
/^\{parameter\(/,
|
|
221
243
|
];
|
|
222
244
|
const INSIGHT_MVF_URL_START_RULE = /^\{mvf_condition\(/;
|
|
223
245
|
const assertValidUrl = (url, enableInsightMeasureValueFilters) => {
|
|
@@ -238,7 +260,9 @@ function CustomUrlEditorDialog({ urlDrillTarget, documentationLink, onSelect, on
|
|
|
238
260
|
const dashboardFilters = useSanitizedDashboardFilters();
|
|
239
261
|
const dashboardMeasureValueFilters = useDashboardSelector(selectFilterContextMeasureValueFilters);
|
|
240
262
|
const attributeFilterConfigs = useDashboardSelector(selectAttributeFilterConfigsOverrides);
|
|
241
|
-
const
|
|
263
|
+
const dashboardParameters = useDashboardSelector(selectWidgetParameterValues(widgetRef));
|
|
264
|
+
const dashboardParameterIdentifiers = useMemo(() => dashboardParameters.map(({ identifier }) => identifier), [dashboardParameters]);
|
|
265
|
+
const invalidFilteringParametersIdentifiers = useInvalidFilteringParametersIdentifiers(urlDrillTarget, insightFilters, dashboardFilters, dashboardMeasureValueFilters, enableInsightMeasureValueFilters ? insightMeasureValueFilters : undefined, enableInsightMeasureValueFilters, attributeFilterConfigs, dashboardParameterIdentifiers);
|
|
242
266
|
const invalidParameters = useMemo(() => {
|
|
243
267
|
return [...invalidAttributeDisplayFormIdentifiers, ...invalidFilteringParametersIdentifiers];
|
|
244
268
|
}, [invalidAttributeDisplayFormIdentifiers, invalidFilteringParametersIdentifiers]);
|
|
@@ -259,7 +283,7 @@ function CustomUrlEditorDialog({ urlDrillTarget, documentationLink, onSelect, on
|
|
|
259
283
|
id: "configurationPanel.drillIntoUrl.editor.cancelButtonLabel",
|
|
260
284
|
}), submitButtonText: intl.formatMessage({
|
|
261
285
|
id: "configurationPanel.drillIntoUrl.editor.applyButtonLabel",
|
|
262
|
-
}), isSubmitDisabled: !isApplyEnabled, submitOnEnterKey: false, onCancel: onClose, onSubmit: apply, warning: editorWarningText, children: [_jsx(UrlInputPanel, { onChange: handleOnChange, onCursor: handleCursorPosition, documentationLink: documentationLink, currentUrlValue: currentValue, attributeDisplayForms: attributeDisplayForms, insightFilters: insightFilters, dashboardFilters: dashboardFilters, dashboardMeasureValueFilters: dashboardMeasureValueFilters, insightMeasureValueFilters: insightMeasureValueFilters, enableInsightMeasureValueFilters: enableInsightMeasureValueFilters, attributeFilterConfigs: attributeFilterConfigs, intl: intl }), _jsx(ParametersPanel, { insightFilters: insightFilters, dashboardFilters: dashboardFilters, dashboardMeasureValueFilters: dashboardMeasureValueFilters, insightMeasureValueFilters: insightMeasureValueFilters, attributeFilterConfigs: attributeFilterConfigs, attributeDisplayForms: attributeDisplayForms, loadingAttributeDisplayForms: loadingAttributeDisplayForms, enableClientIdParameter: enableClientIdParameter, enableDataProductIdParameter: enableDataProductIdParameter, enableWidgetIdParameter: enableWidgetIdParameter, onAdd: handleOnAdd, intl: intl, widgetRef: widgetRef })] }));
|
|
286
|
+
}), isSubmitDisabled: !isApplyEnabled, submitOnEnterKey: false, onCancel: onClose, onSubmit: apply, warning: editorWarningText, children: [_jsx(UrlInputPanel, { onChange: handleOnChange, onCursor: handleCursorPosition, documentationLink: documentationLink, currentUrlValue: currentValue, attributeDisplayForms: attributeDisplayForms, insightFilters: insightFilters, dashboardFilters: dashboardFilters, dashboardMeasureValueFilters: dashboardMeasureValueFilters, insightMeasureValueFilters: insightMeasureValueFilters, enableInsightMeasureValueFilters: enableInsightMeasureValueFilters, attributeFilterConfigs: attributeFilterConfigs, dashboardParameterIdentifiers: dashboardParameterIdentifiers, intl: intl }), _jsx(ParametersPanel, { insightFilters: insightFilters, dashboardFilters: dashboardFilters, dashboardMeasureValueFilters: dashboardMeasureValueFilters, insightMeasureValueFilters: insightMeasureValueFilters, attributeFilterConfigs: attributeFilterConfigs, dashboardParameters: dashboardParameters, attributeDisplayForms: attributeDisplayForms, loadingAttributeDisplayForms: loadingAttributeDisplayForms, enableClientIdParameter: enableClientIdParameter, enableDataProductIdParameter: enableDataProductIdParameter, enableWidgetIdParameter: enableWidgetIdParameter, onAdd: handleOnAdd, intl: intl, widgetRef: widgetRef })] }));
|
|
263
287
|
}
|
|
264
288
|
const overlayController = OverlayController.getInstance(DASHBOARD_HEADER_OVERLAYS_Z_INDEX);
|
|
265
289
|
export function CustomUrlEditor(props) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type IDashboardParametersSectionProps } from "./CustomUrlEditorParametersSections/DashboardParametersSection.js";
|
|
2
2
|
import { type IInsightParametersSectionProps } from "./CustomUrlEditorParametersSections/InsightParametersSection.js";
|
|
3
|
+
import { type IParameterParametersSectionProps } from "./CustomUrlEditorParametersSections/ParameterParametersSection.js";
|
|
3
4
|
import { type IIdentifierParametersSectionProps } from "./types.js";
|
|
4
|
-
type IParametersPanelProps = IInsightParametersSectionProps & IIdentifierParametersSectionProps & IDashboardParametersSectionProps;
|
|
5
|
-
export declare function ParametersPanel({ attributeDisplayForms, loadingAttributeDisplayForms, enableClientIdParameter, enableDataProductIdParameter, enableWidgetIdParameter, onAdd, intl, dashboardFilters, dashboardMeasureValueFilters, insightMeasureValueFilters, attributeFilterConfigs, insightFilters, widgetRef, }: IParametersPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
type IParametersPanelProps = IInsightParametersSectionProps & IIdentifierParametersSectionProps & IDashboardParametersSectionProps & IParameterParametersSectionProps;
|
|
6
|
+
export declare function ParametersPanel({ attributeDisplayForms, loadingAttributeDisplayForms, enableClientIdParameter, enableDataProductIdParameter, enableWidgetIdParameter, onAdd, intl, dashboardFilters, dashboardMeasureValueFilters, insightMeasureValueFilters, attributeFilterConfigs, dashboardParameters, insightFilters, widgetRef, }: IParametersPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
7
8
|
//# sourceMappingURL=CustomUrlEditorParameters.d.ts.map
|
package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParameters.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomUrlEditorParameters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParameters.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEH,KAAK,gCAAgC,EACxC,MAAM,mEAAmE,CAAC;AAE3E,OAAO,EACH,KAAK,8BAA8B,EAEtC,MAAM,iEAAiE,CAAC;AACzE,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,YAAY,CAAC;AAEpE,KAAK,qBAAqB,GAAG,8BAA8B,GACvD,iCAAiC,GACjC,gCAAgC,CAAC;AAErC,wBAAgB,eAAe,CAAC,EAC5B,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,KAAK,EACL,IAAI,EACJ,gBAAgB,EAChB,4BAA4B,EAC5B,0BAA0B,EAC1B,sBAAsB,EACtB,cAAc,EACd,SAAS,GACZ,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"CustomUrlEditorParameters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParameters.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEH,KAAK,gCAAgC,EACxC,MAAM,mEAAmE,CAAC;AAE3E,OAAO,EACH,KAAK,8BAA8B,EAEtC,MAAM,iEAAiE,CAAC;AACzE,OAAO,EACH,KAAK,gCAAgC,EAExC,MAAM,mEAAmE,CAAC;AAC3E,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,YAAY,CAAC;AAEpE,KAAK,qBAAqB,GAAG,8BAA8B,GACvD,iCAAiC,GACjC,gCAAgC,GAChC,gCAAgC,CAAC;AAErC,wBAAgB,eAAe,CAAC,EAC5B,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,KAAK,EACL,IAAI,EACJ,gBAAgB,EAChB,4BAA4B,EAC5B,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACd,SAAS,GACZ,EAAE,qBAAqB,2CA6CvB"}
|
|
@@ -5,6 +5,7 @@ import { Bubble, BubbleHoverTrigger } from "@gooddata/sdk-ui-kit";
|
|
|
5
5
|
import { DashboardParametersSection, } from "./CustomUrlEditorParametersSections/DashboardParametersSection.js";
|
|
6
6
|
import { IdentifierParametersSection } from "./CustomUrlEditorParametersSections/IdentifierParametersSection.js";
|
|
7
7
|
import { InsightParametersSection, } from "./CustomUrlEditorParametersSections/InsightParametersSection.js";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import { ParameterParametersSection, } from "./CustomUrlEditorParametersSections/ParameterParametersSection.js";
|
|
9
|
+
export function ParametersPanel({ attributeDisplayForms, loadingAttributeDisplayForms, enableClientIdParameter, enableDataProductIdParameter, enableWidgetIdParameter, onAdd, intl, dashboardFilters, dashboardMeasureValueFilters, insightMeasureValueFilters, attributeFilterConfigs, dashboardParameters, insightFilters, widgetRef, }) {
|
|
10
|
+
return (_jsxs("div", { children: [_jsxs("label", { className: "gd-label", children: [_jsx(FormattedMessage, { id: "configurationPanel.drillIntoUrl.editor.parametersPanelLabel" }), _jsxs(BubbleHoverTrigger, { className: "gd-list-item-tooltip", showDelay: 0, hideDelay: 0, children: [_jsx("span", { className: "gd-icon-circle-question gd-list-item-tooltip-icon" }), _jsx(Bubble, { className: "bubble-primary", alignPoints: [{ align: "cr cl" }], children: _jsx(FormattedMessage, { id: "configurationPanel.drillIntoUrl.editor.parametersPanelTooltip" }) })] })] }), _jsxs("div", { className: "gd-drill-to-url-parameters gd-drill-to-url-list", children: [_jsx(InsightParametersSection, { attributeDisplayForms: attributeDisplayForms, loadingAttributeDisplayForms: loadingAttributeDisplayForms, onAdd: onAdd, intl: intl, insightFilters: insightFilters, insightMeasureValueFilters: insightMeasureValueFilters, widgetRef: widgetRef }), _jsx(DashboardParametersSection, { intl: intl, onAdd: onAdd, dashboardFilters: dashboardFilters, dashboardMeasureValueFilters: dashboardMeasureValueFilters, attributeFilterConfigs: attributeFilterConfigs }), _jsx(ParameterParametersSection, { dashboardParameters: dashboardParameters, onAdd: onAdd, intl: intl }), _jsx(IdentifierParametersSection, { enableClientIdParameter: enableClientIdParameter, enableDataProductIdParameter: enableDataProductIdParameter, enableWidgetIdParameter: enableWidgetIdParameter, onAdd: onAdd, intl: intl, widgetRef: widgetRef })] })] }));
|
|
10
11
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type IWidgetParameterValue } from "../../../../../model/store/tabs/parameters/parametersSelectors.js";
|
|
2
|
+
import { type IParametersPanelSectionsCommonProps } from "../types.js";
|
|
3
|
+
export interface IParameterParametersSectionProps extends IParametersPanelSectionsCommonProps {
|
|
4
|
+
dashboardParameters: IWidgetParameterValue[];
|
|
5
|
+
}
|
|
6
|
+
export declare function ParameterParametersSection({ dashboardParameters, onAdd, intl, }: IParameterParametersSectionProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=ParameterParametersSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParameterParametersSection.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditorParametersSections/ParameterParametersSection.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,mEAAmE,CAAC;AAG/G,OAAO,EAAE,KAAK,mCAAmC,EAAE,MAAM,aAAa,CAAC;AAIvE,MAAM,WAAW,gCAAiC,SAAQ,mCAAmC;IACzF,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;CAChD;AAOD,wBAAgB,0BAA0B,CAAC,EACvC,mBAAmB,EACnB,KAAK,EACL,IAAI,GACP,EAAE,gCAAgC,kDAqClC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { FormattedMessage, defineMessages } from "react-intl";
|
|
4
|
+
import { parameterIdentifierToPlaceholder } from "@gooddata/sdk-model/internal";
|
|
5
|
+
import { useDashboardSelector } from "../../../../../model/react/DashboardStoreProvider.js";
|
|
6
|
+
import { selectEnableParameters } from "../../../../../model/store/config/configSelectors.js";
|
|
7
|
+
import { DropdownSectionHeader } from "../DropdownSectionHeader.js";
|
|
8
|
+
import { ParameterDetail } from "../ParameterDetails/ParameterDetail.js";
|
|
9
|
+
import { Parameter } from "./Parameter.js";
|
|
10
|
+
const parameterTypeMessages = defineMessages({
|
|
11
|
+
NUMBER: { id: "configurationPanel.drillIntoUrl.editor.numberParameterTypeLabel" },
|
|
12
|
+
STRING: { id: "configurationPanel.drillIntoUrl.editor.stringParameterTypeLabel" },
|
|
13
|
+
});
|
|
14
|
+
export function ParameterParametersSection({ dashboardParameters, onAdd, intl, }) {
|
|
15
|
+
const isEnabled = useDashboardSelector(selectEnableParameters);
|
|
16
|
+
if (!isEnabled) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return (_jsxs(_Fragment, { children: [_jsx(DropdownSectionHeader, { children: _jsx(FormattedMessage, { id: "configurationPanel.drillIntoUrl.editor.parameterParametersSectionLabel" }) }), dashboardParameters.length === 0 ? (_jsx("div", { className: "gd-drill-to-url-section-empty s-drill-to-url-parameters-empty", children: _jsx(FormattedMessage, { id: "configurationPanel.drillIntoUrl.editor.parameterParametersSectionEmpty" }) })) : (dashboardParameters.map(({ identifier, parameterType, title, value }) => (_jsx(Parameter, { name: title, detailContent: _jsx(ParameterDetail, { title: title, identifier: identifier, typeName: intl.formatMessage(parameterTypeMessages[parameterType]), values: value === undefined ? [] : [String(value)] }), iconClassName: "gd-icon-sharp", onAdd: () => onAdd(parameterIdentifierToPlaceholder(identifier)), intl: intl }, identifier))))] }));
|
|
20
|
+
}
|
package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/ParameterDetails/ParameterDetail.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface IParameterDetailProps {
|
|
2
2
|
title: string;
|
|
3
|
+
identifier?: string;
|
|
3
4
|
typeName: string;
|
|
4
5
|
label?: string;
|
|
5
6
|
isLoading?: boolean;
|
|
@@ -7,6 +8,6 @@ interface IParameterDetailProps {
|
|
|
7
8
|
values: string[];
|
|
8
9
|
additionalValues?: number;
|
|
9
10
|
}
|
|
10
|
-
export declare function ParameterDetail({ title, typeName, label, isLoading, useEllipsis, values, additionalValues, }: IParameterDetailProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function ParameterDetail({ title, identifier, typeName, label, isLoading, useEllipsis, values, additionalValues, }: IParameterDetailProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
12
13
|
//# sourceMappingURL=ParameterDetail.d.ts.map
|
package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/ParameterDetails/ParameterDetail.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ParameterDetail.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/drill/DrillConfigPanel/DrillToUrl/ParameterDetails/ParameterDetail.tsx"],"names":[],"mappings":"AAUA,UAAU,qBAAqB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,WAAW,EACX,MAAM,EACN,gBAAgB,GACnB,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ParameterDetail.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/drill/DrillConfigPanel/DrillToUrl/ParameterDetails/ParameterDetail.tsx"],"names":[],"mappings":"AAUA,UAAU,qBAAqB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,QAAQ,EACR,KAAK,EACL,SAAS,EACT,WAAW,EACX,MAAM,EACN,gBAAgB,GACnB,EAAE,qBAAqB,2CAiBvB"}
|
package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/ParameterDetails/ParameterDetail.js
CHANGED
|
@@ -5,8 +5,11 @@ import { FormattedMessage } from "react-intl";
|
|
|
5
5
|
import { LoadingMask } from "@gooddata/sdk-ui-kit";
|
|
6
6
|
import { _isEmpty } from "@gooddata/util";
|
|
7
7
|
const LOADING_MASK_HEIGHT = 60;
|
|
8
|
-
export function ParameterDetail({ title, typeName, label, isLoading, useEllipsis, values, additionalValues, }) {
|
|
9
|
-
return (_jsxs("div", { className: "gd-drill-to-url-editor-parameter-detail s-parameter-detail", children: [_jsx("div", { className: "gd-parameter-detail-title", children: title }), _jsx(ParameterTypeSection, { typeName: typeName }), label ? _jsx(ParameterLabelSection, { label: label }) : null, !_isEmpty(values) && (_jsx(ParameterValuesSection, { isLoading: isLoading, useEllipsis: useEllipsis, values: values, additionalValues: additionalValues }))] }));
|
|
8
|
+
export function ParameterDetail({ title, identifier, typeName, label, isLoading, useEllipsis, values, additionalValues, }) {
|
|
9
|
+
return (_jsxs("div", { className: "gd-drill-to-url-editor-parameter-detail s-parameter-detail", children: [_jsx("div", { className: "gd-parameter-detail-title", children: title }), identifier ? _jsx(ParameterIdentifierSection, { identifier: identifier }) : null, _jsx(ParameterTypeSection, { typeName: typeName }), label ? _jsx(ParameterLabelSection, { label: label }) : null, !_isEmpty(values) && (_jsx(ParameterValuesSection, { isLoading: isLoading, useEllipsis: useEllipsis, values: values, additionalValues: additionalValues }))] }));
|
|
10
|
+
}
|
|
11
|
+
function ParameterIdentifierSection({ identifier }) {
|
|
12
|
+
return (_jsxs("div", { className: "gd-parameter-detail-section", children: [_jsx("div", { className: "gd-parameter-detail-subtitle", children: _jsx(FormattedMessage, { id: "configurationPanel.drillIntoUrl.editor.parameterDetailIdentifier" }) }), _jsx("div", { children: identifier })] }));
|
|
10
13
|
}
|
|
11
14
|
function ParameterTypeSection({ typeName }) {
|
|
12
15
|
return (_jsxs("div", { className: "gd-parameter-detail-section", children: [_jsx("div", { className: "gd-parameter-detail-subtitle", children: _jsx(FormattedMessage, { id: "configurationPanel.drillIntoUrl.editor.parameterDetailType" }) }), _jsx("div", { children: typeName })] }));
|
|
@@ -2379,6 +2379,10 @@ export declare const en_US: {
|
|
|
2379
2379
|
text: string;
|
|
2380
2380
|
crowdinContext: string;
|
|
2381
2381
|
};
|
|
2382
|
+
"configurationPanel.drillIntoUrl.editor.parameterDetailIdentifier": {
|
|
2383
|
+
text: string;
|
|
2384
|
+
crowdinContext: string;
|
|
2385
|
+
};
|
|
2382
2386
|
"configurationPanel.drillIntoUrl.editor.parameterDetailValues": {
|
|
2383
2387
|
text: string;
|
|
2384
2388
|
crowdinContext: string;
|
|
@@ -2419,6 +2423,14 @@ export declare const en_US: {
|
|
|
2419
2423
|
text: string;
|
|
2420
2424
|
crowdinContext: string;
|
|
2421
2425
|
};
|
|
2426
|
+
"configurationPanel.drillIntoUrl.editor.numberParameterTypeLabel": {
|
|
2427
|
+
text: string;
|
|
2428
|
+
crowdinContext: string;
|
|
2429
|
+
};
|
|
2430
|
+
"configurationPanel.drillIntoUrl.editor.stringParameterTypeLabel": {
|
|
2431
|
+
text: string;
|
|
2432
|
+
crowdinContext: string;
|
|
2433
|
+
};
|
|
2422
2434
|
"configurationPanel.drillIntoUrl.editor.insightParametersSectionLabel": {
|
|
2423
2435
|
text: string;
|
|
2424
2436
|
crowdinContext: string;
|
|
@@ -2431,6 +2443,14 @@ export declare const en_US: {
|
|
|
2431
2443
|
text: string;
|
|
2432
2444
|
crowdinContext: string;
|
|
2433
2445
|
};
|
|
2446
|
+
"configurationPanel.drillIntoUrl.editor.parameterParametersSectionLabel": {
|
|
2447
|
+
text: string;
|
|
2448
|
+
crowdinContext: string;
|
|
2449
|
+
};
|
|
2450
|
+
"configurationPanel.drillIntoUrl.editor.parameterParametersSectionEmpty": {
|
|
2451
|
+
text: string;
|
|
2452
|
+
crowdinContext: string;
|
|
2453
|
+
};
|
|
2434
2454
|
"configurationPanel.drillIntoUrl.editor.applyButtonLabel": {
|
|
2435
2455
|
text: string;
|
|
2436
2456
|
crowdinContext: string;
|