@gooddata/sdk-ui-ext 11.54.0-alpha.3 → 11.54.0-alpha.5

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 (81) hide show
  1. package/NOTICE +92923 -17333
  2. package/esm/dataLoaders/dataLoaders.mock.d.ts +4 -0
  3. package/esm/dataLoaders/dataLoaders.mock.d.ts.map +1 -0
  4. package/esm/dataLoaders/dataLoaders.mock.js +52 -0
  5. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.fixture.d.ts +4 -0
  6. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.fixture.d.ts.map +1 -0
  7. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.fixture.js +6487 -0
  8. package/esm/internal/components/configurationControls/colors/coloredItemsList/mock.d.ts +3 -0
  9. package/esm/internal/components/configurationControls/colors/coloredItemsList/mock.d.ts.map +1 -0
  10. package/esm/internal/components/configurationControls/colors/coloredItemsList/mock.js +139 -0
  11. package/esm/internal/components/pluggableVisualizations/areaChart/getInsightWithDrillDownAppliedMock.d.ts +8 -0
  12. package/esm/internal/components/pluggableVisualizations/areaChart/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  13. package/esm/internal/components/pluggableVisualizations/areaChart/getInsightWithDrillDownAppliedMock.js +119 -0
  14. package/esm/internal/components/pluggableVisualizations/baseChart/getInsightWithDrillDownAppliedMock.d.ts +7 -0
  15. package/esm/internal/components/pluggableVisualizations/baseChart/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  16. package/esm/internal/components/pluggableVisualizations/baseChart/getInsightWithDrillDownAppliedMock.js +98 -0
  17. package/esm/internal/components/pluggableVisualizations/bulletChart/getInsightWithDrillDownAppliedMock.d.ts +8 -0
  18. package/esm/internal/components/pluggableVisualizations/bulletChart/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  19. package/esm/internal/components/pluggableVisualizations/bulletChart/getInsightWithDrillDownAppliedMock.js +110 -0
  20. package/esm/internal/components/pluggableVisualizations/geoCommon/viewportSync.test.helpers.d.ts +45 -0
  21. package/esm/internal/components/pluggableVisualizations/geoCommon/viewportSync.test.helpers.d.ts.map +1 -0
  22. package/esm/internal/components/pluggableVisualizations/geoCommon/viewportSync.test.helpers.js +48 -0
  23. package/esm/internal/components/pluggableVisualizations/getInsightWithDrillDownAppliedMock.d.ts +13 -0
  24. package/esm/internal/components/pluggableVisualizations/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  25. package/esm/internal/components/pluggableVisualizations/getInsightWithDrillDownAppliedMock.js +132 -0
  26. package/esm/internal/components/pluggableVisualizations/heatMap/getInsightWithDrillDownAppliedMock.d.ts +8 -0
  27. package/esm/internal/components/pluggableVisualizations/heatMap/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  28. package/esm/internal/components/pluggableVisualizations/heatMap/getInsightWithDrillDownAppliedMock.js +116 -0
  29. package/esm/internal/components/pluggableVisualizations/lineChart/getInsightWithDrillDownAppliedMock.d.ts +8 -0
  30. package/esm/internal/components/pluggableVisualizations/lineChart/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  31. package/esm/internal/components/pluggableVisualizations/lineChart/getInsightWithDrillDownAppliedMock.js +119 -0
  32. package/esm/internal/components/pluggableVisualizations/pivotTable/getInsightWithDrillDownAppliedMock.d.ts +13 -0
  33. package/esm/internal/components/pluggableVisualizations/pivotTable/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  34. package/esm/internal/components/pluggableVisualizations/pivotTable/getInsightWithDrillDownAppliedMock.js +229 -0
  35. package/esm/internal/components/pluggableVisualizations/pivotTable/mockReferencePoint.d.ts +5 -0
  36. package/esm/internal/components/pluggableVisualizations/pivotTable/mockReferencePoint.d.ts.map +1 -0
  37. package/esm/internal/components/pluggableVisualizations/pivotTable/mockReferencePoint.js +92 -0
  38. package/esm/internal/components/pluggableVisualizations/pivotTable/sortMocks.d.ts +9 -0
  39. package/esm/internal/components/pluggableVisualizations/pivotTable/sortMocks.d.ts.map +1 -0
  40. package/esm/internal/components/pluggableVisualizations/pivotTable/sortMocks.js +19 -0
  41. package/esm/internal/components/pluggableVisualizations/pivotTable/widthItemsMock.d.ts +16 -0
  42. package/esm/internal/components/pluggableVisualizations/pivotTable/widthItemsMock.d.ts.map +1 -0
  43. package/esm/internal/components/pluggableVisualizations/pivotTable/widthItemsMock.js +186 -0
  44. package/esm/internal/components/pluggableVisualizations/pluggableVisualizations.test.helpers.d.ts +16 -0
  45. package/esm/internal/components/pluggableVisualizations/pluggableVisualizations.test.helpers.d.ts.map +1 -0
  46. package/esm/internal/components/pluggableVisualizations/pluggableVisualizations.test.helpers.js +39 -0
  47. package/esm/internal/components/pluggableVisualizations/reverseAndTrimIntersectionMock.d.ts +10 -0
  48. package/esm/internal/components/pluggableVisualizations/reverseAndTrimIntersectionMock.d.ts.map +1 -0
  49. package/esm/internal/components/pluggableVisualizations/reverseAndTrimIntersectionMock.js +94 -0
  50. package/esm/internal/components/pluggableVisualizations/treeMap/getInsightWithDrillDownAppliedMock.d.ts +8 -0
  51. package/esm/internal/components/pluggableVisualizations/treeMap/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  52. package/esm/internal/components/pluggableVisualizations/treeMap/getInsightWithDrillDownAppliedMock.js +119 -0
  53. package/esm/internal/components/pluggableVisualizations/visConstruct.fixture.d.ts +17 -0
  54. package/esm/internal/components/pluggableVisualizations/visConstruct.fixture.d.ts.map +1 -0
  55. package/esm/internal/components/pluggableVisualizations/visConstruct.fixture.js +18 -0
  56. package/esm/internal/index.d.ts +1 -1
  57. package/esm/internal/index.d.ts.map +1 -1
  58. package/esm/internal/index.js +1 -1
  59. package/esm/internal/mocks/referencePointMocks.d.ts +187 -0
  60. package/esm/internal/mocks/referencePointMocks.d.ts.map +1 -0
  61. package/esm/internal/mocks/referencePointMocks.js +4045 -0
  62. package/esm/internal/mocks/testColorHelper.d.ts +19 -0
  63. package/esm/internal/mocks/testColorHelper.d.ts.map +1 -0
  64. package/esm/internal/mocks/testColorHelper.js +65 -0
  65. package/esm/internal/mocks/testMocks.d.ts +24 -0
  66. package/esm/internal/mocks/testMocks.d.ts.map +1 -0
  67. package/esm/internal/mocks/testMocks.js +739 -0
  68. package/esm/internal/mocks/uiConfigMocks.d.ts +17 -0
  69. package/esm/internal/mocks/uiConfigMocks.d.ts.map +1 -0
  70. package/esm/internal/mocks/uiConfigMocks.js +125 -0
  71. package/esm/internal/mocks/visualizationObjectMocks.d.ts +7 -0
  72. package/esm/internal/mocks/visualizationObjectMocks.d.ts.map +1 -0
  73. package/esm/internal/mocks/visualizationObjectMocks.js +49 -0
  74. package/esm/internal/testDataProvider.d.ts +16 -0
  75. package/esm/internal/testDataProvider.d.ts.map +1 -0
  76. package/esm/internal/testDataProvider.js +36 -0
  77. package/esm/internal/testIntlProvider.d.ts.map +1 -0
  78. package/esm/internal/{tests/testIntlProvider.js → testIntlProvider.js} +2 -2
  79. package/package.json +21 -21
  80. package/esm/internal/tests/testIntlProvider.d.ts.map +0 -1
  81. /package/esm/internal/{tests/testIntlProvider.d.ts → testIntlProvider.d.ts} +0 -0
@@ -0,0 +1,132 @@
1
+ // (C) 2020-2026 GoodData Corporation
2
+ import { ReferenceData, ReferenceMd } from "@gooddata/reference-workspace";
3
+ import { modifyAttribute, newAttribute, newBucket, newInsightDefinition, newNegativeAttributeFilter, newPositiveAttributeFilter, uriRef, } from "@gooddata/sdk-model";
4
+ const { Department, Region, Won } = ReferenceMd;
5
+ export const targetUri = "target-uri";
6
+ export const insightDefinitionWithStackBy = newInsightDefinition("visualizationClass-url", (b) => {
7
+ return b
8
+ .title("sourceInsight")
9
+ .buckets([
10
+ newBucket("measure", Won),
11
+ newBucket("stack", Region.Default),
12
+ newBucket("view", Department.Default),
13
+ ])
14
+ .filters([newNegativeAttributeFilter(Department.Default, [])]);
15
+ });
16
+ export const insightDefinition = newInsightDefinition("visualizationClass-url", (b) => {
17
+ return b
18
+ .title("sourceInsight")
19
+ .buckets([newBucket("measure", Won), newBucket("view", Department.Default, Region.Default)])
20
+ .filters([newNegativeAttributeFilter(Department.Default, [])]);
21
+ });
22
+ const departmentUri = "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/1027";
23
+ const regionUri = "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/1024";
24
+ const westCoastUri = ReferenceData.Region.WestCoast.uri;
25
+ const directSalesUri = ReferenceData.Department.DirectSales.uri;
26
+ export const expectedInsightDefinitionWithStackByDrillToDepartment = newInsightDefinition("visualizationClass-url", (b) => {
27
+ return b
28
+ .title("sourceInsight")
29
+ .buckets([
30
+ newBucket("measure", Won),
31
+ newBucket("stack", Region.Default),
32
+ newBucket("view", newAttribute(uriRef(targetUri), (b) => b.localId(Department.Default.attribute.localIdentifier))),
33
+ ])
34
+ .filters([
35
+ newNegativeAttributeFilter(Department.Default, []),
36
+ newPositiveAttributeFilter(modifyAttribute(Department.Default, (a) => a.displayForm(uriRef(departmentUri))), { uris: [directSalesUri] }),
37
+ ]);
38
+ });
39
+ export const expectedInsightDefinitionWithStackByDrillToRegion = newInsightDefinition("visualizationClass-url", (b) => {
40
+ return b
41
+ .title("sourceInsight")
42
+ .buckets([
43
+ newBucket("measure", Won),
44
+ newBucket("stack", newAttribute(uriRef(targetUri), (b) => b.localId(Region.Default.attribute.localIdentifier))),
45
+ newBucket("view", Department.Default),
46
+ ])
47
+ .filters([
48
+ newNegativeAttributeFilter(Department.Default, []),
49
+ newPositiveAttributeFilter(modifyAttribute(Region.Default, (a) => a.displayForm(uriRef(regionUri))), { uris: [westCoastUri] }),
50
+ newPositiveAttributeFilter(modifyAttribute(Department.Default, (a) => a.displayForm(uriRef(departmentUri))), { uris: [directSalesUri] }),
51
+ ]);
52
+ });
53
+ export const expectedInsightDefinitionDrillToRegion = newInsightDefinition("visualizationClass-url", (b) => {
54
+ return b
55
+ .title("sourceInsight")
56
+ .buckets([
57
+ newBucket("measure", Won),
58
+ newBucket("view", newAttribute(uriRef(targetUri), (b) => b.localId(Region.Default.attribute.localIdentifier))),
59
+ ])
60
+ .filters([
61
+ newNegativeAttributeFilter(Department.Default, []),
62
+ newPositiveAttributeFilter(modifyAttribute(Region.Default, (a) => a.displayForm(uriRef(regionUri))), { uris: [westCoastUri] }),
63
+ ]);
64
+ });
65
+ export const measureHeader = {
66
+ measureHeaderItem: {
67
+ name: Won.measure.title,
68
+ format: "#,##0.00",
69
+ localIdentifier: Won.measure.localIdentifier,
70
+ uri: "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/9203",
71
+ identifier: undefined,
72
+ },
73
+ };
74
+ export const westCoastHeader = {
75
+ attributeHeaderItem: {
76
+ name: "West Coast",
77
+ uri: westCoastUri,
78
+ },
79
+ attributeHeader: {
80
+ name: Region.Default.attribute.alias,
81
+ localIdentifier: Region.Default.attribute.localIdentifier,
82
+ uri: regionUri,
83
+ ref: {
84
+ uri: regionUri,
85
+ },
86
+ identifier: "mock-identifier",
87
+ formOf: {
88
+ identifier: "mock-attribute",
89
+ name: "Mock Attribute",
90
+ ref: { uri: regionUri },
91
+ uri: regionUri,
92
+ },
93
+ primaryLabel: {
94
+ uri: regionUri,
95
+ },
96
+ },
97
+ };
98
+ export const directSalesHeader = {
99
+ attributeHeaderItem: {
100
+ name: "Direct Sales",
101
+ uri: directSalesUri,
102
+ },
103
+ attributeHeader: {
104
+ name: Department.Default.attribute.alias,
105
+ localIdentifier: Department.Default.attribute.localIdentifier,
106
+ uri: departmentUri,
107
+ ref: {
108
+ uri: departmentUri,
109
+ },
110
+ identifier: "mock-identifier",
111
+ formOf: {
112
+ identifier: "mock-attribute",
113
+ name: "Mock Attribute",
114
+ ref: { uri: departmentUri },
115
+ uri: departmentUri,
116
+ },
117
+ primaryLabel: {
118
+ uri: departmentUri,
119
+ },
120
+ },
121
+ };
122
+ export const intersection = [
123
+ {
124
+ header: measureHeader,
125
+ },
126
+ {
127
+ header: directSalesHeader,
128
+ },
129
+ {
130
+ header: westCoastHeader,
131
+ },
132
+ ];
@@ -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.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInsightWithDrillDownAppliedMock.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/pluggableVisualizations/heatMap/getInsightWithDrillDownAppliedMock.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,kBAiBtC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,kBAiB1C,CAAC"}
@@ -0,0 +1,116 @@
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
+ 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("stack", 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("stack", replacedAttributeRegion),
94
+ ])
95
+ .filters([
96
+ newNegativeAttributeFilter(Department.Default, []),
97
+ newPositiveAttributeFilter(newAttribute(uriRef(regionUri)), {
98
+ uris: [westCoastUri],
99
+ }),
100
+ ]);
101
+ });
102
+ export const expectedInsightDefDepartment = newInsightDefinition("visualizationClass-url", (b) => {
103
+ return b
104
+ .title("sourceInsight")
105
+ .buckets([
106
+ newBucket("measure", Won),
107
+ newBucket("view", replacedAttributeDepartment),
108
+ newBucket("stack", Region.Default),
109
+ ])
110
+ .filters([
111
+ newNegativeAttributeFilter(Department.Default, []),
112
+ newPositiveAttributeFilter(newAttribute(uriRef(departmentUri)), {
113
+ uris: [directSalesUri],
114
+ }),
115
+ ]);
116
+ });
@@ -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.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInsightWithDrillDownAppliedMock.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/pluggableVisualizations/lineChart/getInsightWithDrillDownAppliedMock.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 { 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
+ 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,13 @@
1
+ import { type IInsight } from "@gooddata/sdk-model";
2
+ import { type IDrillEventIntersectionElement } from "@gooddata/sdk-ui";
3
+ import { type IDrillDownDefinition, type IVisualizationProperties } from "../../../interfaces/Visualization.js";
4
+ export declare const getInsightWithDrillDownApplied: {
5
+ properties: IVisualizationProperties<import("../../../interfaces/ControlProperties.js").IDefaultControlProperties>;
6
+ sourceInsight: IInsight;
7
+ sourceInsightWithTotals: IInsight;
8
+ drillConfig: IDrillDownDefinition;
9
+ expectedInsight: IInsight;
10
+ expectedInsightWithTotals: IInsight;
11
+ intersection: IDrillEventIntersectionElement[];
12
+ };
13
+ //# sourceMappingURL=getInsightWithDrillDownAppliedMock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInsightWithDrillDownAppliedMock.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/pluggableVisualizations/pivotTable/getInsightWithDrillDownAppliedMock.ts"],"names":[],"mappings":"AAGA,OAAO,EAEH,KAAK,QAAQ,EAchB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,8BAA8B,EAAwC,MAAM,kBAAkB,CAAC;AAG7G,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAChC,MAAM,sCAAsC,CAAC;AA0Q9C,eAAO,MAAM,8BAA8B;;;;;;;;CAQ1C,CAAC"}
@@ -0,0 +1,229 @@
1
+ // (C) 2020-2026 GoodData Corporation
2
+ import { ReferenceData, ReferenceMd } from "@gooddata/reference-workspace";
3
+ import { bucketSetTotals, localIdRef, modifyAttribute, newAttribute, newAttributeSort, newBucket, newInsightDefinition, newPositiveAttributeFilter, newTotal, uriRef, } from "@gooddata/sdk-model";
4
+ import { newWidthForAllMeasureColumns, newWidthForAttributeColumn } from "@gooddata/sdk-ui-pivot";
5
+ const { Department, Region, Status, Won } = ReferenceMd;
6
+ const properties = {
7
+ controls: {
8
+ columnWidths: [
9
+ newWidthForAttributeColumn(Region.Default, 131, false),
10
+ newWidthForAttributeColumn(Status, 125, false),
11
+ newWidthForAttributeColumn(Department.Default, 97, false),
12
+ newWidthForAllMeasureColumns(270),
13
+ ],
14
+ },
15
+ sortItems: [newAttributeSort(Region.Default, "desc"), newAttributeSort(Status)],
16
+ };
17
+ const filters = [newPositiveAttributeFilter(Department.Default, ["Inside Sales"])];
18
+ const sorts = [newAttributeSort(Department.Default)];
19
+ const sourceInsightDefinition = newInsightDefinition("visualizationClass-url", (b) => {
20
+ return b
21
+ .title("sourceInsight")
22
+ .buckets([
23
+ newBucket("attribute", Region.Default, modifyAttribute(Status, (attr) => attr.alias("status alias")), Department.Default),
24
+ bucketSetTotals(newBucket("measure", Won), []),
25
+ ])
26
+ .filters(filters)
27
+ .sorts(sorts)
28
+ .properties(properties);
29
+ });
30
+ const sourceInsightDefinitionWithTotals = newInsightDefinition("visualizationClass-url", (b) => {
31
+ return b
32
+ .title("sourceInsight")
33
+ .buckets([
34
+ newBucket("attribute", Region.Default, Status, Department.Default),
35
+ newBucket("measure", Won, newTotal("nat", Won, Region.Default), newTotal("nat", Won, Status)),
36
+ ])
37
+ .filters(filters)
38
+ .sorts(sorts)
39
+ .properties(properties);
40
+ });
41
+ const sourceInsight = {
42
+ ...sourceInsightDefinition,
43
+ insight: {
44
+ ...sourceInsightDefinition.insight,
45
+ identifier: "sourceInsightIdentifier",
46
+ uri: "/sourceInsightUri",
47
+ ref: uriRef("/sourceInsightUri"),
48
+ },
49
+ };
50
+ const sourceInsightWithTotals = {
51
+ ...sourceInsightDefinitionWithTotals,
52
+ insight: {
53
+ ...sourceInsight.insight,
54
+ ...sourceInsightDefinitionWithTotals.insight,
55
+ },
56
+ };
57
+ const implicitTargetDF = uriRef("implicitDrillDown-target-uri");
58
+ const drillConfig = {
59
+ type: "drillDown",
60
+ origin: localIdRef(Status.attribute.localIdentifier),
61
+ target: implicitTargetDF,
62
+ };
63
+ const measureHeader = {
64
+ measureHeaderItem: {
65
+ name: Won.measure.title,
66
+ format: "#,##0.00",
67
+ localIdentifier: Won.measure.localIdentifier,
68
+ uri: "/gdc/md/lmnivlu3sowt63jvr2mo1wlse5fyv203/obj/9203",
69
+ identifier: undefined,
70
+ },
71
+ };
72
+ const departmentDirectSalesUri = ReferenceData.Department.DirectSales.uri;
73
+ const departmentHeaderAttributeUri = "departmentHeaderAttributeUri";
74
+ const departmentHeader = {
75
+ attributeHeaderItem: {
76
+ name: "Direct Sales",
77
+ uri: departmentDirectSalesUri,
78
+ },
79
+ attributeHeader: {
80
+ name: Department.Default.attribute.alias,
81
+ localIdentifier: Department.Default.attribute.localIdentifier,
82
+ uri: departmentHeaderAttributeUri,
83
+ ref: {
84
+ uri: departmentHeaderAttributeUri,
85
+ },
86
+ identifier: "mock-identifier",
87
+ formOf: {
88
+ identifier: "mock-attribute",
89
+ name: "Mock Attribute",
90
+ ref: { uri: departmentHeaderAttributeUri },
91
+ uri: departmentHeaderAttributeUri,
92
+ },
93
+ primaryLabel: {
94
+ uri: departmentHeaderAttributeUri,
95
+ },
96
+ },
97
+ };
98
+ const statusLostUri = ReferenceData.Status.Lost.uri;
99
+ const statusHeaderAttributeUri = "statusHeaderAttributeUri";
100
+ const statusHeader = {
101
+ attributeHeaderItem: {
102
+ name: "Lost",
103
+ uri: statusLostUri,
104
+ },
105
+ attributeHeader: {
106
+ name: Status.attribute.alias,
107
+ localIdentifier: Status.attribute.localIdentifier,
108
+ uri: statusHeaderAttributeUri,
109
+ ref: {
110
+ uri: statusHeaderAttributeUri,
111
+ },
112
+ identifier: "mock-identifier",
113
+ formOf: {
114
+ identifier: "mock-attribute",
115
+ name: "Mock Attribute",
116
+ ref: { uri: statusHeaderAttributeUri },
117
+ uri: statusHeaderAttributeUri,
118
+ },
119
+ primaryLabel: {
120
+ uri: statusHeaderAttributeUri,
121
+ },
122
+ },
123
+ };
124
+ const regionEastCoastUri = ReferenceData.Region.EastCoast.uri;
125
+ const regionHeaderAttributeUri = "regionHeaderAttributeUri";
126
+ const regionHeader = {
127
+ attributeHeaderItem: {
128
+ name: "East Coast",
129
+ uri: regionEastCoastUri,
130
+ },
131
+ attributeHeader: {
132
+ name: Region.Default.attribute.alias,
133
+ localIdentifier: Region.Default.attribute.localIdentifier,
134
+ uri: regionHeaderAttributeUri,
135
+ ref: {
136
+ uri: regionHeaderAttributeUri,
137
+ },
138
+ identifier: "mock-identifier",
139
+ formOf: {
140
+ identifier: "mock-attribute",
141
+ name: "Mock Attribute",
142
+ ref: { uri: regionHeaderAttributeUri },
143
+ uri: regionHeaderAttributeUri,
144
+ },
145
+ primaryLabel: {
146
+ uri: regionHeaderAttributeUri,
147
+ },
148
+ },
149
+ };
150
+ const intersection = [
151
+ {
152
+ header: measureHeader,
153
+ },
154
+ {
155
+ header: departmentHeader,
156
+ },
157
+ {
158
+ header: statusHeader,
159
+ },
160
+ {
161
+ header: regionHeader,
162
+ },
163
+ ];
164
+ const expectedProperties = {
165
+ ...sourceInsight.insight.properties,
166
+ controls: {
167
+ columnWidths: [
168
+ newWidthForAttributeColumn(Status, 125, false),
169
+ newWidthForAttributeColumn(Department.Default, 97, false),
170
+ newWidthForAllMeasureColumns(270),
171
+ ],
172
+ },
173
+ sortItems: [newAttributeSort(Region.Default, "desc"), newAttributeSort(Status)],
174
+ };
175
+ const expectedFilters = [
176
+ newPositiveAttributeFilter(Department.Default, ["Inside Sales"]),
177
+ newPositiveAttributeFilter(modifyAttribute(Department.Default, (a) => a.displayForm(uriRef(departmentHeaderAttributeUri))), { uris: [departmentDirectSalesUri] }),
178
+ newPositiveAttributeFilter(modifyAttribute(Status, (a) => a.displayForm(uriRef(statusHeaderAttributeUri))), { uris: [statusLostUri] }),
179
+ newPositiveAttributeFilter(modifyAttribute(Region.Default, (a) => a.displayForm(uriRef(regionHeaderAttributeUri))), { uris: [regionEastCoastUri] }),
180
+ ];
181
+ const expectedInsightDefinition = newInsightDefinition(sourceInsight.insight.visualizationUrl, (b) => {
182
+ return b
183
+ .title(sourceInsight.insight.title)
184
+ .buckets([
185
+ newBucket("attribute", newAttribute(implicitTargetDF, (attr) => attr.localId(Status.attribute.localIdentifier)), Department.Default),
186
+ bucketSetTotals(newBucket("measure", Won), []),
187
+ ])
188
+ .filters(expectedFilters)
189
+ .sorts([newAttributeSort(Department.Default)])
190
+ .properties(expectedProperties);
191
+ });
192
+ const expectedInsightDefinitionWithTotals = newInsightDefinition(sourceInsight.insight.visualizationUrl, (b) => {
193
+ return b
194
+ .title(sourceInsight.insight.title)
195
+ .buckets([
196
+ newBucket("attribute", newAttribute(implicitTargetDF, (attr) => attr.localId(Status.attribute.localIdentifier)), Department.Default),
197
+ newBucket("measure", Won, newTotal("nat", Won, Status)),
198
+ ])
199
+ .filters(expectedFilters)
200
+ .sorts([newAttributeSort(Department.Default)])
201
+ .properties(expectedProperties);
202
+ });
203
+ const expectedInsight = {
204
+ ...expectedInsightDefinition,
205
+ insight: {
206
+ ...expectedInsightDefinition.insight,
207
+ identifier: sourceInsight.insight.identifier,
208
+ uri: sourceInsight.insight.uri,
209
+ ref: uriRef(sourceInsight.insight.uri),
210
+ },
211
+ };
212
+ const expectedInsightWithTotals = {
213
+ ...expectedInsightDefinitionWithTotals,
214
+ insight: {
215
+ ...expectedInsightDefinitionWithTotals.insight,
216
+ identifier: sourceInsight.insight.identifier,
217
+ uri: sourceInsight.insight.uri,
218
+ ref: uriRef(sourceInsight.insight.uri),
219
+ },
220
+ };
221
+ export const getInsightWithDrillDownApplied = {
222
+ properties,
223
+ sourceInsight,
224
+ sourceInsightWithTotals,
225
+ drillConfig,
226
+ expectedInsight,
227
+ expectedInsightWithTotals,
228
+ intersection,
229
+ };
@@ -0,0 +1,5 @@
1
+ import { type ISortItem } from "@gooddata/sdk-model";
2
+ import { type ColumnWidthItem } from "@gooddata/sdk-ui-pivot";
3
+ import { type IBucketItem, type IExtendedReferencePoint, type IFiltersBucketItem } from "../../../interfaces/Visualization.js";
4
+ export declare const getMockReferencePoint: (measures?: IBucketItem[], rows?: IBucketItem[], columns?: IBucketItem[], filterItems?: IFiltersBucketItem[], sortItems?: ISortItem[], measuresIsShowInPercentEnabled?: boolean, columnWidths?: ColumnWidthItem[], multipleDatesEnabled?: boolean) => IExtendedReferencePoint;
5
+ //# sourceMappingURL=mockReferencePoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockReferencePoint.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/pluggableVisualizations/pivotTable/mockReferencePoint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EAC1B,MAAM,sCAAsC,CAAC;AAE9C,eAAO,MAAM,qBAAqB,+QAmGhC,CAAC"}