@gooddata/sdk-ui-ext 11.54.0-alpha.4 → 11.54.0-alpha.6

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 (82) hide show
  1. package/NOTICE +93513 -17188
  2. package/esm/dataLoaders/dataLoaders.test.helpers.d.ts +4 -0
  3. package/esm/dataLoaders/dataLoaders.test.helpers.d.ts.map +1 -0
  4. package/esm/dataLoaders/dataLoaders.test.helpers.js +52 -0
  5. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/{utils.fixture.d.ts → utils.test.helpers.d.ts} +1 -1
  6. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.test.helpers.d.ts.map +1 -0
  7. package/esm/internal/components/configurationControls/colors/coloredItemsList/{mock.d.ts → coloredItemsList.test.helpers.d.ts} +1 -1
  8. package/esm/internal/components/configurationControls/colors/coloredItemsList/coloredItemsList.test.helpers.d.ts.map +1 -0
  9. package/esm/internal/components/pluggableVisualizations/{heatMap/getInsightWithDrillDownAppliedMock.d.ts → areaChart/getInsightWithDrillDownAppliedMock.test.helpers.d.ts} +1 -1
  10. package/esm/internal/components/pluggableVisualizations/areaChart/getInsightWithDrillDownAppliedMock.test.helpers.d.ts.map +1 -0
  11. package/esm/internal/components/pluggableVisualizations/areaChart/getInsightWithDrillDownAppliedMock.test.helpers.js +119 -0
  12. package/esm/internal/components/pluggableVisualizations/baseChart/getInsightWithDrillDownAppliedMock.test.helpers.d.ts +7 -0
  13. package/esm/internal/components/pluggableVisualizations/baseChart/getInsightWithDrillDownAppliedMock.test.helpers.d.ts.map +1 -0
  14. package/esm/internal/components/pluggableVisualizations/baseChart/getInsightWithDrillDownAppliedMock.test.helpers.js +98 -0
  15. package/esm/internal/components/pluggableVisualizations/bulletChart/getInsightWithDrillDownAppliedMock.test.helpers.d.ts +8 -0
  16. package/esm/internal/components/pluggableVisualizations/bulletChart/getInsightWithDrillDownAppliedMock.test.helpers.d.ts.map +1 -0
  17. package/esm/internal/components/pluggableVisualizations/bulletChart/getInsightWithDrillDownAppliedMock.test.helpers.js +110 -0
  18. package/esm/internal/components/pluggableVisualizations/geoCommon/viewportSync.test.helpers.d.ts +45 -0
  19. package/esm/internal/components/pluggableVisualizations/geoCommon/viewportSync.test.helpers.d.ts.map +1 -0
  20. package/esm/internal/components/pluggableVisualizations/geoCommon/viewportSync.test.helpers.js +48 -0
  21. package/esm/internal/components/pluggableVisualizations/getInsightWithDrillDownAppliedMock.test.helpers.d.ts +13 -0
  22. package/esm/internal/components/pluggableVisualizations/getInsightWithDrillDownAppliedMock.test.helpers.d.ts.map +1 -0
  23. package/esm/internal/components/pluggableVisualizations/getInsightWithDrillDownAppliedMock.test.helpers.js +132 -0
  24. package/esm/internal/components/pluggableVisualizations/heatMap/getInsightWithDrillDownAppliedMock.test.helpers.d.ts +8 -0
  25. package/esm/internal/components/pluggableVisualizations/heatMap/getInsightWithDrillDownAppliedMock.test.helpers.d.ts.map +1 -0
  26. package/esm/internal/components/pluggableVisualizations/mekko/MekkoDescriptor.js +1 -1
  27. package/esm/internal/components/pluggableVisualizations/pivotTable/{getInsightWithDrillDownAppliedMock.d.ts → getInsightWithDrillDownAppliedMock.test.helpers.d.ts} +1 -1
  28. package/esm/internal/components/pluggableVisualizations/pivotTable/getInsightWithDrillDownAppliedMock.test.helpers.d.ts.map +1 -0
  29. package/esm/internal/components/pluggableVisualizations/pivotTable/{mockReferencePoint.d.ts → mockReferencePoint.test.helpers.d.ts} +1 -1
  30. package/esm/internal/components/pluggableVisualizations/pivotTable/mockReferencePoint.test.helpers.d.ts.map +1 -0
  31. package/esm/internal/components/pluggableVisualizations/pivotTable/{sortMocks.d.ts → sortMocks.test.helpers.d.ts} +1 -1
  32. package/esm/internal/components/pluggableVisualizations/pivotTable/sortMocks.test.helpers.d.ts.map +1 -0
  33. package/esm/internal/components/pluggableVisualizations/pivotTable/{widthItemsMock.d.ts → widthItemsMock.test.helpers.d.ts} +1 -1
  34. package/esm/internal/components/pluggableVisualizations/pivotTable/widthItemsMock.test.helpers.d.ts.map +1 -0
  35. package/esm/internal/components/pluggableVisualizations/pluggableVisualizations.test.helpers.d.ts +16 -0
  36. package/esm/internal/components/pluggableVisualizations/pluggableVisualizations.test.helpers.d.ts.map +1 -0
  37. package/esm/internal/components/pluggableVisualizations/pluggableVisualizations.test.helpers.js +39 -0
  38. package/esm/internal/components/pluggableVisualizations/reverseAndTrimIntersectionMock.test.helpers.d.ts +10 -0
  39. package/esm/internal/components/pluggableVisualizations/reverseAndTrimIntersectionMock.test.helpers.d.ts.map +1 -0
  40. package/esm/internal/components/pluggableVisualizations/reverseAndTrimIntersectionMock.test.helpers.js +94 -0
  41. package/esm/internal/components/visConstruct.test.helpers.d.ts +17 -0
  42. package/esm/internal/components/visConstruct.test.helpers.d.ts.map +1 -0
  43. package/esm/internal/components/visConstruct.test.helpers.js +18 -0
  44. package/esm/internal/constants/bucket.d.ts +1 -0
  45. package/esm/internal/constants/bucket.d.ts.map +1 -1
  46. package/esm/internal/constants/bucket.js +2 -1
  47. package/esm/internal/constants/supportedProperties.d.ts.map +1 -1
  48. package/esm/internal/constants/supportedProperties.js +1 -0
  49. package/esm/internal/constants/uiConfig.js +8 -8
  50. package/esm/internal/index.d.ts +1 -1
  51. package/esm/internal/index.d.ts.map +1 -1
  52. package/esm/internal/index.js +1 -1
  53. package/esm/internal/interfaces/typeGuards.test.helpers.d.ts +6 -0
  54. package/esm/internal/interfaces/typeGuards.test.helpers.d.ts.map +1 -0
  55. package/esm/internal/interfaces/typeGuards.test.helpers.js +21 -0
  56. package/esm/internal/testDataProvider.d.ts +16 -0
  57. package/esm/internal/testDataProvider.d.ts.map +1 -0
  58. package/esm/internal/testDataProvider.js +36 -0
  59. package/esm/internal/testIntlProvider.d.ts.map +1 -0
  60. package/esm/internal/{tests/testIntlProvider.js → testIntlProvider.js} +2 -2
  61. package/esm/internal/translations/pt-BR.localization-bundle.js +2 -2
  62. package/esm/internal/translations/pt-PT.localization-bundle.js +2 -2
  63. package/esm/internal/utils/uiConfigMocks.test.helpers.d.ts +17 -0
  64. package/esm/internal/utils/uiConfigMocks.test.helpers.d.ts.map +1 -0
  65. package/esm/internal/utils/uiConfigMocks.test.helpers.js +125 -0
  66. package/package.json +22 -22
  67. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.fixture.d.ts.map +0 -1
  68. package/esm/internal/components/configurationControls/colors/coloredItemsList/mock.d.ts.map +0 -1
  69. package/esm/internal/components/pluggableVisualizations/heatMap/getInsightWithDrillDownAppliedMock.d.ts.map +0 -1
  70. package/esm/internal/components/pluggableVisualizations/pivotTable/getInsightWithDrillDownAppliedMock.d.ts.map +0 -1
  71. package/esm/internal/components/pluggableVisualizations/pivotTable/mockReferencePoint.d.ts.map +0 -1
  72. package/esm/internal/components/pluggableVisualizations/pivotTable/sortMocks.d.ts.map +0 -1
  73. package/esm/internal/components/pluggableVisualizations/pivotTable/widthItemsMock.d.ts.map +0 -1
  74. package/esm/internal/tests/testIntlProvider.d.ts.map +0 -1
  75. /package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/{utils.fixture.js → utils.test.helpers.js} +0 -0
  76. /package/esm/internal/components/configurationControls/colors/coloredItemsList/{mock.js → coloredItemsList.test.helpers.js} +0 -0
  77. /package/esm/internal/components/pluggableVisualizations/heatMap/{getInsightWithDrillDownAppliedMock.js → getInsightWithDrillDownAppliedMock.test.helpers.js} +0 -0
  78. /package/esm/internal/components/pluggableVisualizations/pivotTable/{getInsightWithDrillDownAppliedMock.js → getInsightWithDrillDownAppliedMock.test.helpers.js} +0 -0
  79. /package/esm/internal/components/pluggableVisualizations/pivotTable/{mockReferencePoint.js → mockReferencePoint.test.helpers.js} +0 -0
  80. /package/esm/internal/components/pluggableVisualizations/pivotTable/{sortMocks.js → sortMocks.test.helpers.js} +0 -0
  81. /package/esm/internal/components/pluggableVisualizations/pivotTable/{widthItemsMock.js → widthItemsMock.test.helpers.js} +0 -0
  82. /package/esm/internal/{tests/testIntlProvider.d.ts → testIntlProvider.d.ts} +0 -0
@@ -0,0 +1,4 @@
1
+ import { type IWorkspaceDashboardsService, type IWorkspaceInsightsService } from "@gooddata/sdk-backend-spi";
2
+ export declare const noopWorkspaceInsightsService: IWorkspaceInsightsService;
3
+ export declare const noopWorkspaceDashboardsService: IWorkspaceDashboardsService;
4
+ //# sourceMappingURL=dataLoaders.test.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataLoaders.test.helpers.d.ts","sourceRoot":"","sources":["../../src/dataLoaders/dataLoaders.test.helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,2BAA2B,EAAE,KAAK,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE7G,eAAO,MAAM,4BAA4B,EAAE,yBAYb,CAAC;AAE/B,eAAO,MAAM,8BAA8B,EAAE,2BAqCb,CAAC"}
@@ -0,0 +1,52 @@
1
+ // (C) 2020-2026 GoodData Corporation
2
+ export const noopWorkspaceInsightsService = {
3
+ createInsight: (() => { }),
4
+ deleteInsight: (() => { }),
5
+ getInsight: (() => { }),
6
+ getInsightReferencedObjects: (() => { }),
7
+ getInsightReferencingObjects: (() => { }),
8
+ getInsightWithAddedFilters: (() => { }),
9
+ getInsights: (() => { }),
10
+ getInsightsQuery: (() => { }),
11
+ getVisualizationClass: (() => { }),
12
+ getVisualizationClasses: (() => { }),
13
+ updateInsight: (() => { }),
14
+ };
15
+ export const noopWorkspaceDashboardsService = {
16
+ createDashboard: (() => { }),
17
+ createScheduledMail: (() => { }),
18
+ updateScheduledMail: (() => { }),
19
+ createWidgetAlert: (() => { }),
20
+ deleteDashboard: (() => { }),
21
+ deleteWidgetAlert: (() => { }),
22
+ deleteWidgetAlerts: (() => { }),
23
+ deleteScheduledMail: (() => { }),
24
+ exportDashboardToPdf: (() => { }),
25
+ exportDashboardToPresentation: (() => { }),
26
+ getDashboard: (() => { }),
27
+ getDashboardWidgetAlertsForCurrentUser: (() => { }),
28
+ getDashboardWithReferences: (() => { }),
29
+ getDashboardReferencedObjects: (() => { }),
30
+ getAllWidgetAlertsForCurrentUser: (() => { }),
31
+ getDashboards: (() => { }),
32
+ getDashboardsQuery: (() => { }),
33
+ getResolvedFiltersForWidget: (() => { }),
34
+ getScheduledMailsForDashboard: (() => { }),
35
+ getScheduledMailsCountForDashboard: (() => { }),
36
+ getWidgetAlertsCountForWidgets: (() => { }),
37
+ getWidgetReferencedObjects: (() => { }),
38
+ updateDashboard: (() => { }),
39
+ updateWidgetAlert: (() => { }),
40
+ createDashboardPlugin: (() => { }),
41
+ deleteDashboardPlugin: (() => { }),
42
+ getDashboardPlugin: (() => { }),
43
+ getDashboardPlugins: (() => { }),
44
+ getDashboardPermissions: (() => { }),
45
+ validateDashboardsExistence: (() => { }),
46
+ getResolvedFiltersForWidgetWithMultipleDateFilters: (() => { }),
47
+ getFilterViewsForCurrentUser: (() => { }),
48
+ createFilterView: (() => { }),
49
+ deleteFilterView: (() => { }),
50
+ setFilterViewAsDefault: (() => { }),
51
+ workspace: "workspace",
52
+ };
@@ -1,4 +1,4 @@
1
1
  export declare const attributesData: any;
2
2
  export declare const catalogAttributes: any;
3
3
  export declare const catalogDateDatasets: any;
4
- //# sourceMappingURL=utils.fixture.d.ts.map
4
+ //# sourceMappingURL=utils.test.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.test.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.test.helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,EAAE,GAyC5B,CAAC;AACF,eAAO,MAAM,iBAAiB,EAAE,GAk1F/B,CAAC;AACF,eAAO,MAAM,mBAAmB,EAAE,GA09GjC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { type IColoredItem } from "../../../../interfaces/Colors.js";
2
2
  export declare const inputItemsMock: IColoredItem[];
3
- //# sourceMappingURL=mock.d.ts.map
3
+ //# sourceMappingURL=coloredItemsList.test.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coloredItemsList.test.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/configurationControls/colors/coloredItemsList/coloredItemsList.test.helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,eAAO,MAAM,cAAc,EAAE,YAAY,EAyIxC,CAAC"}
@@ -5,4 +5,4 @@ export declare const intersection: IDrillEventIntersectionElement[];
5
5
  export declare const sourceInsightDef: IInsightDefinition;
6
6
  export declare const expectedInsightDefRegion: IInsightDefinition;
7
7
  export declare const expectedInsightDefDepartment: IInsightDefinition;
8
- //# sourceMappingURL=getInsightWithDrillDownAppliedMock.d.ts.map
8
+ //# sourceMappingURL=getInsightWithDrillDownAppliedMock.test.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInsightWithDrillDownAppliedMock.test.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/pluggableVisualizations/areaChart/getInsightWithDrillDownAppliedMock.test.helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,KAAK,kBAAkB,EAO1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAQvE,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC,eAAO,MAAM,YAAY,EAAE,8BAA8B,EAgExD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,kBAS7B,CAAC;AAUH,eAAO,MAAM,wBAAwB,EAAE,kBAoBtC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,kBAiB1C,CAAC"}
@@ -0,0 +1,119 @@
1
+ // (C) 2020-2026 GoodData Corporation
2
+ import { ReferenceData, ReferenceMd } from "@gooddata/reference-workspace";
3
+ import { newAttribute, newBucket, newInsightDefinition, newNegativeAttributeFilter, newPositiveAttributeFilter, uriRef, } from "@gooddata/sdk-model";
4
+ const regionUri = "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/1024";
5
+ const departmentUri = "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/1027";
6
+ const westCoastUri = ReferenceData.Region.WestCoast.uri;
7
+ const directSalesUri = ReferenceData.Department.DirectSales.uri;
8
+ const { Department, Region, Won } = ReferenceMd;
9
+ export const targetUri = "target-uri";
10
+ export const intersection = [
11
+ {
12
+ header: {
13
+ attributeHeaderItem: {
14
+ name: "Direct Sales",
15
+ uri: directSalesUri,
16
+ },
17
+ attributeHeader: {
18
+ name: Department.Default.attribute.alias,
19
+ localIdentifier: Department.Default.attribute.localIdentifier,
20
+ uri: departmentUri,
21
+ ref: {
22
+ uri: departmentUri,
23
+ },
24
+ identifier: "mock-identifier",
25
+ formOf: {
26
+ identifier: "mock-attribute",
27
+ name: "Mock Attribute",
28
+ ref: { uri: departmentUri },
29
+ uri: departmentUri,
30
+ },
31
+ primaryLabel: {
32
+ uri: departmentUri,
33
+ },
34
+ },
35
+ },
36
+ },
37
+ {
38
+ header: {
39
+ attributeHeaderItem: {
40
+ name: "West Coast",
41
+ uri: westCoastUri,
42
+ },
43
+ attributeHeader: {
44
+ name: Region.Default.attribute.alias,
45
+ localIdentifier: Region.Default.attribute.localIdentifier,
46
+ uri: regionUri,
47
+ ref: {
48
+ uri: regionUri,
49
+ },
50
+ identifier: "mock-identifier",
51
+ formOf: {
52
+ identifier: "mock-attribute",
53
+ name: "Mock Attribute",
54
+ ref: { uri: regionUri },
55
+ uri: regionUri,
56
+ },
57
+ primaryLabel: {
58
+ uri: regionUri,
59
+ },
60
+ },
61
+ },
62
+ },
63
+ {
64
+ header: {
65
+ measureHeaderItem: {
66
+ name: Won.measure.title,
67
+ format: "#,##0.00",
68
+ localIdentifier: Won.measure.localIdentifier,
69
+ uri: "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/9203",
70
+ identifier: undefined,
71
+ },
72
+ },
73
+ },
74
+ ];
75
+ export const sourceInsightDef = newInsightDefinition("visualizationClass-url", (b) => {
76
+ return b
77
+ .title("sourceInsight")
78
+ .buckets([
79
+ newBucket("measure", Won),
80
+ newBucket("view", Department.Default),
81
+ newBucket("segment", Region.Default),
82
+ ])
83
+ .filters([newNegativeAttributeFilter(Department.Default, [])]);
84
+ });
85
+ const replacedAttributeRegion = newAttribute(uriRef(targetUri), (b) => b.localId(Region.Default.attribute.localIdentifier));
86
+ const replacedAttributeDepartment = newAttribute(uriRef(targetUri), (b) => b.localId(Department.Default.attribute.localIdentifier));
87
+ export const expectedInsightDefRegion = newInsightDefinition("visualizationClass-url", (b) => {
88
+ return b
89
+ .title("sourceInsight")
90
+ .buckets([
91
+ newBucket("measure", Won),
92
+ newBucket("view", Department.Default),
93
+ newBucket("segment", replacedAttributeRegion),
94
+ ])
95
+ .filters([
96
+ newNegativeAttributeFilter(Department.Default, []),
97
+ newPositiveAttributeFilter(newAttribute(uriRef(regionUri)), {
98
+ uris: [westCoastUri],
99
+ }),
100
+ newPositiveAttributeFilter(newAttribute(uriRef(departmentUri)), {
101
+ uris: [directSalesUri],
102
+ }),
103
+ ]);
104
+ });
105
+ export const expectedInsightDefDepartment = newInsightDefinition("visualizationClass-url", (b) => {
106
+ return b
107
+ .title("sourceInsight")
108
+ .buckets([
109
+ newBucket("measure", Won),
110
+ newBucket("view", replacedAttributeDepartment),
111
+ newBucket("segment", Region.Default),
112
+ ])
113
+ .filters([
114
+ newNegativeAttributeFilter(Department.Default, []),
115
+ newPositiveAttributeFilter(newAttribute(uriRef(departmentUri)), {
116
+ uris: [directSalesUri],
117
+ }),
118
+ ]);
119
+ });
@@ -0,0 +1,7 @@
1
+ import { type IInsightDefinition } from "@gooddata/sdk-model";
2
+ import { type IDrillEventIntersectionElement } from "@gooddata/sdk-ui";
3
+ export declare const targetUri = "target-uri";
4
+ export declare const intersection: IDrillEventIntersectionElement[];
5
+ export declare const sourceInsightDef: IInsightDefinition;
6
+ export declare const expectedInsightDefRegion: IInsightDefinition;
7
+ //# sourceMappingURL=getInsightWithDrillDownAppliedMock.test.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInsightWithDrillDownAppliedMock.test.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/pluggableVisualizations/baseChart/getInsightWithDrillDownAppliedMock.test.helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,KAAK,kBAAkB,EAO1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAQvE,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC,eAAO,MAAM,YAAY,EAAE,8BAA8B,EAgExD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,kBAK7B,CAAC;AAMH,eAAO,MAAM,wBAAwB,EAAE,kBAmBtC,CAAC"}
@@ -0,0 +1,98 @@
1
+ // (C) 2020-2026 GoodData Corporation
2
+ import { ReferenceData, ReferenceMd } from "@gooddata/reference-workspace";
3
+ import { newAttribute, newBucket, newInsightDefinition, newNegativeAttributeFilter, newPositiveAttributeFilter, uriRef, } from "@gooddata/sdk-model";
4
+ const { Department, Region, Won } = ReferenceMd;
5
+ const regionUri = "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/1024";
6
+ const departmentUri = "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/1027";
7
+ const westCoastUri = ReferenceData.Region.WestCoast.uri;
8
+ const directSalesUri = ReferenceData.Department.DirectSales.uri;
9
+ export const targetUri = "target-uri";
10
+ export const intersection = [
11
+ {
12
+ header: {
13
+ measureHeaderItem: {
14
+ name: Won.measure.title,
15
+ format: "#,##0.00",
16
+ localIdentifier: Won.measure.localIdentifier,
17
+ uri: "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/9203",
18
+ identifier: undefined,
19
+ },
20
+ },
21
+ },
22
+ {
23
+ header: {
24
+ attributeHeaderItem: {
25
+ name: "West Coast",
26
+ uri: westCoastUri,
27
+ },
28
+ attributeHeader: {
29
+ name: Region.Default.attribute.alias,
30
+ localIdentifier: Region.Default.attribute.localIdentifier,
31
+ uri: regionUri,
32
+ ref: {
33
+ uri: regionUri,
34
+ },
35
+ identifier: "mock-identifier",
36
+ formOf: {
37
+ identifier: "mock-attribute",
38
+ name: "Mock Attribute",
39
+ ref: { uri: regionUri },
40
+ uri: regionUri,
41
+ },
42
+ primaryLabel: {
43
+ uri: regionUri,
44
+ },
45
+ },
46
+ },
47
+ },
48
+ {
49
+ header: {
50
+ attributeHeaderItem: {
51
+ name: "Direct Sales",
52
+ uri: directSalesUri,
53
+ },
54
+ attributeHeader: {
55
+ name: Department.Default.attribute.alias,
56
+ localIdentifier: Department.Default.attribute.localIdentifier,
57
+ uri: departmentUri,
58
+ ref: {
59
+ uri: departmentUri,
60
+ },
61
+ identifier: "mock-identifier",
62
+ formOf: {
63
+ identifier: "mock-attribute",
64
+ name: "Mock Attribute",
65
+ ref: { uri: departmentUri },
66
+ uri: departmentUri,
67
+ },
68
+ primaryLabel: {
69
+ uri: departmentUri,
70
+ },
71
+ },
72
+ },
73
+ },
74
+ ];
75
+ export const sourceInsightDef = newInsightDefinition("visualizationClass-url", (b) => {
76
+ return b
77
+ .title("sourceInsight")
78
+ .buckets([newBucket("measure", Won), newBucket("view", Region.Default, Department.Default)])
79
+ .filters([newNegativeAttributeFilter(Department.Default, [])]);
80
+ });
81
+ const replacedAttributeRegion = newAttribute(uriRef(targetUri), (b) => b.localId(Region.Default.attribute.localIdentifier));
82
+ export const expectedInsightDefRegion = newInsightDefinition("visualizationClass-url", (b) => {
83
+ return b
84
+ .title("sourceInsight")
85
+ .buckets([
86
+ newBucket("measure", Won),
87
+ newBucket("view", replacedAttributeRegion, Department.Default),
88
+ ])
89
+ .filters([
90
+ newNegativeAttributeFilter(Department.Default, []),
91
+ newPositiveAttributeFilter(newAttribute(uriRef(regionUri)), {
92
+ uris: [westCoastUri],
93
+ }),
94
+ newPositiveAttributeFilter(newAttribute(uriRef(departmentUri)), {
95
+ uris: [directSalesUri],
96
+ }),
97
+ ]);
98
+ });
@@ -0,0 +1,8 @@
1
+ import { type IInsightDefinition } from "@gooddata/sdk-model";
2
+ import { type IDrillEventIntersectionElement } from "@gooddata/sdk-ui";
3
+ export declare const targetUri = "target-uri";
4
+ export declare const intersection: IDrillEventIntersectionElement[];
5
+ export declare const sourceInsightDef: IInsightDefinition;
6
+ export declare const expectedInsightDefRegion: IInsightDefinition;
7
+ export declare const expectedInsightDefDepartment: IInsightDefinition;
8
+ //# sourceMappingURL=getInsightWithDrillDownAppliedMock.test.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInsightWithDrillDownAppliedMock.test.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/pluggableVisualizations/bulletChart/getInsightWithDrillDownAppliedMock.test.helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,KAAK,kBAAkB,EAO1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAQvE,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC,eAAO,MAAM,YAAY,EAAE,8BAA8B,EAgExD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,kBAK7B,CAAC;AAUH,eAAO,MAAM,wBAAwB,EAAE,kBAmBtC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,kBAa1C,CAAC"}
@@ -0,0 +1,110 @@
1
+ // (C) 2020-2026 GoodData Corporation
2
+ import { ReferenceData, ReferenceMd } from "@gooddata/reference-workspace";
3
+ import { newAttribute, newBucket, newInsightDefinition, newNegativeAttributeFilter, newPositiveAttributeFilter, uriRef, } from "@gooddata/sdk-model";
4
+ const { Department, Region, Won } = ReferenceMd;
5
+ const regionUri = "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/1024";
6
+ const departmentUri = "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/1027";
7
+ const westCoastUri = ReferenceData.Region.WestCoast.uri;
8
+ const directSalesUri = ReferenceData.Department.DirectSales.uri;
9
+ export const targetUri = "target-uri";
10
+ export const intersection = [
11
+ {
12
+ header: {
13
+ measureHeaderItem: {
14
+ name: Won.measure.title,
15
+ format: "#,##0.00",
16
+ localIdentifier: Won.measure.localIdentifier,
17
+ uri: "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/9203",
18
+ identifier: undefined,
19
+ },
20
+ },
21
+ },
22
+ {
23
+ header: {
24
+ attributeHeaderItem: {
25
+ name: "West Coast",
26
+ uri: westCoastUri,
27
+ },
28
+ attributeHeader: {
29
+ name: Region.Default.attribute.alias,
30
+ localIdentifier: Region.Default.attribute.localIdentifier,
31
+ uri: regionUri,
32
+ ref: {
33
+ uri: regionUri,
34
+ },
35
+ identifier: "mock-identifier",
36
+ formOf: {
37
+ identifier: "mock-attribute",
38
+ name: "Mock Attribute",
39
+ ref: { uri: regionUri },
40
+ uri: regionUri,
41
+ },
42
+ primaryLabel: {
43
+ uri: regionUri,
44
+ },
45
+ },
46
+ },
47
+ },
48
+ {
49
+ header: {
50
+ attributeHeaderItem: {
51
+ name: "Direct Sales",
52
+ uri: directSalesUri,
53
+ },
54
+ attributeHeader: {
55
+ name: Department.Default.attribute.alias,
56
+ localIdentifier: Department.Default.attribute.localIdentifier,
57
+ uri: departmentUri,
58
+ ref: {
59
+ uri: departmentUri,
60
+ },
61
+ identifier: "mock-identifier",
62
+ formOf: {
63
+ identifier: "mock-attribute",
64
+ name: "Mock Attribute",
65
+ ref: { uri: departmentUri },
66
+ uri: departmentUri,
67
+ },
68
+ primaryLabel: {
69
+ uri: departmentUri,
70
+ },
71
+ },
72
+ },
73
+ },
74
+ ];
75
+ export const sourceInsightDef = newInsightDefinition("visualizationClass-url", (b) => {
76
+ return b
77
+ .title("sourceInsight")
78
+ .buckets([newBucket("measure", Won), newBucket("view", Region.Default, Department.Default)])
79
+ .filters([newNegativeAttributeFilter(Department.Default, [])]);
80
+ });
81
+ const replacedAttributeRegion = newAttribute(uriRef(targetUri), (b) => b.localId(Region.Default.attribute.localIdentifier));
82
+ const replacedAttributeDepartment = newAttribute(uriRef(targetUri), (b) => b.localId(Department.Default.attribute.localIdentifier));
83
+ export const expectedInsightDefRegion = newInsightDefinition("visualizationClass-url", (b) => {
84
+ return b
85
+ .title("sourceInsight")
86
+ .buckets([
87
+ newBucket("measure", Won),
88
+ newBucket("view", replacedAttributeRegion, Department.Default),
89
+ ])
90
+ .filters([
91
+ newNegativeAttributeFilter(Department.Default, []),
92
+ newPositiveAttributeFilter(newAttribute(uriRef(regionUri)), {
93
+ uris: [westCoastUri],
94
+ }),
95
+ newPositiveAttributeFilter(newAttribute(uriRef(departmentUri)), {
96
+ uris: [directSalesUri],
97
+ }),
98
+ ]);
99
+ });
100
+ export const expectedInsightDefDepartment = newInsightDefinition("visualizationClass-url", (b) => {
101
+ return b
102
+ .title("sourceInsight")
103
+ .buckets([newBucket("measure", Won), newBucket("view", replacedAttributeDepartment)])
104
+ .filters([
105
+ newNegativeAttributeFilter(Department.Default, []),
106
+ newPositiveAttributeFilter(newAttribute(uriRef(departmentUri)), {
107
+ uris: [directSalesUri],
108
+ }),
109
+ ]);
110
+ });
@@ -0,0 +1,45 @@
1
+ import { type Mock } from "vitest";
2
+ import { type IVisConstruct } from "../../../interfaces/Visualization.js";
3
+ /**
4
+ * Common overrides accepted by `createComponent` in geo chart tests.
5
+ */
6
+ export interface ICreateComponentOverrides {
7
+ environment?: IVisConstruct["environment"];
8
+ visualizationProperties?: IVisConstruct["visualizationProperties"];
9
+ }
10
+ interface IGeoChartCallbackProps {
11
+ onCenterPositionChanged?: (center: {
12
+ lat: number;
13
+ lng: number;
14
+ }) => void;
15
+ onZoomChanged?: (zoom: number) => void;
16
+ onViewportInteractionEnd?: () => void;
17
+ }
18
+ /**
19
+ * Extracts the last `GeoChartInternal` render call from a mock render function
20
+ * and returns its center/zoom callback props.
21
+ */
22
+ export declare function extractGeoChartCallbacks(mockRenderFun: Mock): IGeoChartCallbackProps;
23
+ /**
24
+ * Fires center and zoom callbacks on the chart, commits the interaction,
25
+ * and asserts that pushData
26
+ * was called with the expected viewport values and `ignoreUndoRedo: true`.
27
+ */
28
+ export declare function fireAndExpectViewportSync(mockRenderFun: Mock, pushData: Mock, newCenter: {
29
+ lat: number;
30
+ lng: number;
31
+ }, newZoom: number): Promise<void>;
32
+ /**
33
+ * Fires center and zoom callbacks on the chart without committing a user interaction
34
+ * and asserts that no
35
+ * viewport sync (`ignoreUndoRedo: true`) pushData calls were made.
36
+ *
37
+ * Filters by `ignoreUndoRedo` so the assertion is robust even if
38
+ * `visualization.update()` triggers other pushData calls.
39
+ */
40
+ export declare function fireAndExpectNoViewportSync(mockRenderFun: Mock, pushData: Mock, newCenter: {
41
+ lat: number;
42
+ lng: number;
43
+ }, newZoom: number): Promise<void>;
44
+ export {};
45
+ //# sourceMappingURL=viewportSync.test.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewportSync.test.helpers.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/pluggableVisualizations/geoCommon/viewportSync.test.helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,IAAI,EAAU,MAAM,QAAQ,CAAC;AAI3C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3C,uBAAuB,CAAC,EAAE,aAAa,CAAC,yBAAyB,CAAC,CAAC;CACtE;AAED,UAAU,sBAAsB;IAC5B,uBAAuB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACzE,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;CACzC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,IAAI,GAAG,sBAAsB,CAUpF;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC3C,aAAa,EAAE,IAAI,EACnB,QAAQ,EAAE,IAAI,EACd,SAAS,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EACvC,OAAO,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAaf;AAED;;;;;;;GAOG;AACH,wBAAsB,2BAA2B,CAC7C,aAAa,EAAE,IAAI,EACnB,QAAQ,EAAE,IAAI,EACd,SAAS,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EACvC,OAAO,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CASf"}
@@ -0,0 +1,48 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { expect } from "vitest";
3
+ import { GeoChartInternal } from "@gooddata/sdk-ui-geo/internal";
4
+ /**
5
+ * Extracts the last `GeoChartInternal` render call from a mock render function
6
+ * and returns its center/zoom callback props.
7
+ */
8
+ export function extractGeoChartCallbacks(mockRenderFun) {
9
+ const chartCall = [...mockRenderFun.mock.calls]
10
+ .reverse()
11
+ .find(([node]) => node?.type === GeoChartInternal);
12
+ if (!chartCall) {
13
+ throw new Error("Missing GeoChartInternal render call.");
14
+ }
15
+ return chartCall[0].props;
16
+ }
17
+ /**
18
+ * Fires center and zoom callbacks on the chart, commits the interaction,
19
+ * and asserts that pushData
20
+ * was called with the expected viewport values and `ignoreUndoRedo: true`.
21
+ */
22
+ export async function fireAndExpectViewportSync(mockRenderFun, pushData, newCenter, newZoom) {
23
+ const chartProps = extractGeoChartCallbacks(mockRenderFun);
24
+ chartProps.onCenterPositionChanged?.(newCenter);
25
+ chartProps.onZoomChanged?.(newZoom);
26
+ chartProps.onViewportInteractionEnd?.();
27
+ const viewportCalls = pushData.mock.calls.filter((call) => call[0]?.ignoreUndoRedo === true);
28
+ expect(viewportCalls.length).toBeGreaterThanOrEqual(1);
29
+ const lastViewportCall = viewportCalls.at(-1)?.[0];
30
+ expect(lastViewportCall?.properties?.controls?.center).toEqual(newCenter);
31
+ expect(lastViewportCall?.properties?.controls?.zoom).toBe(newZoom);
32
+ }
33
+ /**
34
+ * Fires center and zoom callbacks on the chart without committing a user interaction
35
+ * and asserts that no
36
+ * viewport sync (`ignoreUndoRedo: true`) pushData calls were made.
37
+ *
38
+ * Filters by `ignoreUndoRedo` so the assertion is robust even if
39
+ * `visualization.update()` triggers other pushData calls.
40
+ */
41
+ export async function fireAndExpectNoViewportSync(mockRenderFun, pushData, newCenter, newZoom) {
42
+ const chartProps = extractGeoChartCallbacks(mockRenderFun);
43
+ const viewportCallsBefore = pushData.mock.calls.filter((call) => call[0]?.ignoreUndoRedo === true).length;
44
+ chartProps.onCenterPositionChanged?.(newCenter);
45
+ chartProps.onZoomChanged?.(newZoom);
46
+ const viewportCallsAfter = pushData.mock.calls.filter((call) => call[0]?.ignoreUndoRedo === true).length;
47
+ expect(viewportCallsAfter).toBe(viewportCallsBefore);
48
+ }
@@ -0,0 +1,13 @@
1
+ import { type IInsightDefinition, type IMeasureDescriptor } from "@gooddata/sdk-model";
2
+ import { type IDrillEventIntersectionElement, type IDrillIntersectionAttributeItem } from "@gooddata/sdk-ui";
3
+ export declare const targetUri = "target-uri";
4
+ export declare const insightDefinitionWithStackBy: IInsightDefinition;
5
+ export declare const insightDefinition: IInsightDefinition;
6
+ export declare const expectedInsightDefinitionWithStackByDrillToDepartment: IInsightDefinition;
7
+ export declare const expectedInsightDefinitionWithStackByDrillToRegion: IInsightDefinition;
8
+ export declare const expectedInsightDefinitionDrillToRegion: IInsightDefinition;
9
+ export declare const measureHeader: IMeasureDescriptor;
10
+ export declare const westCoastHeader: IDrillIntersectionAttributeItem;
11
+ export declare const directSalesHeader: IDrillIntersectionAttributeItem;
12
+ export declare const intersection: IDrillEventIntersectionElement[];
13
+ //# sourceMappingURL=getInsightWithDrillDownAppliedMock.test.helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInsightWithDrillDownAppliedMock.test.helpers.d.ts","sourceRoot":"","sources":["../../../../src/internal/components/pluggableVisualizations/getInsightWithDrillDownAppliedMock.test.helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAQ1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,8BAA8B,EAAE,KAAK,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AAI7G,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC,eAAO,MAAM,4BAA4B,EAAE,kBAY1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,kBAK9B,CAAC;AAQH,eAAO,MAAM,qDAAqD,EAAE,kBAuBnE,CAAC;AAEF,eAAO,MAAM,iDAAiD,EAAE,kBA2B/D,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,kBAsBpD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,kBAQ3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,+BAuB7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,+BAuB/B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,8BAA8B,EAUxD,CAAC"}