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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.fixture.d.ts +4 -0
  2. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.fixture.d.ts.map +1 -0
  3. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.fixture.js +6487 -0
  4. package/esm/internal/components/configurationControls/colors/coloredItemsList/mock.d.ts +3 -0
  5. package/esm/internal/components/configurationControls/colors/coloredItemsList/mock.d.ts.map +1 -0
  6. package/esm/internal/components/configurationControls/colors/coloredItemsList/mock.js +139 -0
  7. package/esm/internal/components/pluggableVisualizations/heatMap/getInsightWithDrillDownAppliedMock.d.ts +8 -0
  8. package/esm/internal/components/pluggableVisualizations/heatMap/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  9. package/esm/internal/components/pluggableVisualizations/heatMap/getInsightWithDrillDownAppliedMock.js +116 -0
  10. package/esm/internal/components/pluggableVisualizations/lineChart/getInsightWithDrillDownAppliedMock.d.ts +8 -0
  11. package/esm/internal/components/pluggableVisualizations/lineChart/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  12. package/esm/internal/components/pluggableVisualizations/lineChart/getInsightWithDrillDownAppliedMock.js +119 -0
  13. package/esm/internal/components/pluggableVisualizations/pivotTable/getInsightWithDrillDownAppliedMock.d.ts +13 -0
  14. package/esm/internal/components/pluggableVisualizations/pivotTable/getInsightWithDrillDownAppliedMock.d.ts.map +1 -0
  15. package/esm/internal/components/pluggableVisualizations/pivotTable/getInsightWithDrillDownAppliedMock.js +229 -0
  16. package/esm/internal/components/pluggableVisualizations/pivotTable/mockReferencePoint.d.ts +5 -0
  17. package/esm/internal/components/pluggableVisualizations/pivotTable/mockReferencePoint.d.ts.map +1 -0
  18. package/esm/internal/components/pluggableVisualizations/pivotTable/mockReferencePoint.js +92 -0
  19. package/esm/internal/components/pluggableVisualizations/pivotTable/sortMocks.d.ts +9 -0
  20. package/esm/internal/components/pluggableVisualizations/pivotTable/sortMocks.d.ts.map +1 -0
  21. package/esm/internal/components/pluggableVisualizations/pivotTable/sortMocks.js +19 -0
  22. package/esm/internal/components/pluggableVisualizations/pivotTable/widthItemsMock.d.ts +16 -0
  23. package/esm/internal/components/pluggableVisualizations/pivotTable/widthItemsMock.d.ts.map +1 -0
  24. package/esm/internal/components/pluggableVisualizations/pivotTable/widthItemsMock.js +186 -0
  25. package/package.json +21 -21
@@ -0,0 +1,3 @@
1
+ import { type IColoredItem } from "../../../../interfaces/Colors.js";
2
+ export declare const inputItemsMock: IColoredItem[];
3
+ //# sourceMappingURL=mock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/configurationControls/colors/coloredItemsList/mock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,eAAO,MAAM,cAAc,EAAE,YAAY,EAyIxC,CAAC"}
@@ -0,0 +1,139 @@
1
+ // (C) 2019-2026 GoodData Corporation
2
+ export const inputItemsMock = [
3
+ {
4
+ colorItem: {
5
+ type: "guid",
6
+ value: "1",
7
+ },
8
+ mappingHeader: {
9
+ attributeHeaderItem: {
10
+ name: "Adam Bradley",
11
+ uri: "/gdc/md/x3k4294x4k00lrz5degxnc6nykynhh52/obj/1025/elements?id=1224",
12
+ },
13
+ },
14
+ color: {
15
+ r: 20,
16
+ g: 178,
17
+ b: 226,
18
+ },
19
+ },
20
+ {
21
+ colorItem: {
22
+ type: "guid",
23
+ value: "2",
24
+ },
25
+ mappingHeader: {
26
+ attributeHeaderItem: {
27
+ name: "Alejandro Vabiano",
28
+ uri: "/gdc/md/x3k4294x4k00lrz5degxnc6nykynhh52/obj/1025/elements?id=1227",
29
+ },
30
+ },
31
+ color: {
32
+ r: 0,
33
+ g: 193,
34
+ b: 141,
35
+ },
36
+ },
37
+ {
38
+ colorItem: {
39
+ type: "guid",
40
+ value: "3",
41
+ },
42
+ mappingHeader: {
43
+ attributeHeaderItem: {
44
+ name: "Alexsandr Fyodr",
45
+ uri: "/gdc/md/x3k4294x4k00lrz5degxnc6nykynhh52/obj/1025/elements?id=1228",
46
+ },
47
+ },
48
+ color: {
49
+ r: 229,
50
+ g: 77,
51
+ b: 66,
52
+ },
53
+ },
54
+ {
55
+ colorItem: {
56
+ type: "guid",
57
+ value: "4",
58
+ },
59
+ mappingHeader: {
60
+ attributeHeaderItem: {
61
+ name: "Cory Owens",
62
+ uri: "/gdc/md/x3k4294x4k00lrz5degxnc6nykynhh52/obj/1025/elements?id=1229",
63
+ },
64
+ },
65
+ color: {
66
+ r: 241,
67
+ g: 134,
68
+ b: 0,
69
+ },
70
+ },
71
+ {
72
+ colorItem: {
73
+ type: "guid",
74
+ value: "5",
75
+ },
76
+ mappingHeader: {
77
+ attributeHeaderItem: {
78
+ name: "Dale Perdadtin",
79
+ uri: "/gdc/md/x3k4294x4k00lrz5degxnc6nykynhh52/obj/1025/elements?id=1230",
80
+ },
81
+ },
82
+ color: {
83
+ r: 171,
84
+ g: 85,
85
+ b: 163,
86
+ },
87
+ },
88
+ {
89
+ colorItem: {
90
+ type: "guid",
91
+ value: "6",
92
+ },
93
+ mappingHeader: {
94
+ attributeHeaderItem: {
95
+ name: "Dave Bostadt",
96
+ uri: "/gdc/md/x3k4294x4k00lrz5degxnc6nykynhh52/obj/1025/elements?id=1231",
97
+ },
98
+ },
99
+ color: {
100
+ r: 244,
101
+ g: 213,
102
+ b: 33,
103
+ },
104
+ },
105
+ {
106
+ colorItem: {
107
+ type: "guid",
108
+ value: "7",
109
+ },
110
+ mappingHeader: {
111
+ attributeHeaderItem: {
112
+ name: "Ellen Jones",
113
+ uri: "/gdc/md/x3k4294x4k00lrz5degxnc6nykynhh52/obj/1025/elements?id=1232",
114
+ },
115
+ },
116
+ color: {
117
+ r: 148,
118
+ g: 161,
119
+ b: 174,
120
+ },
121
+ },
122
+ {
123
+ colorItem: {
124
+ type: "guid",
125
+ value: "8",
126
+ },
127
+ mappingHeader: {
128
+ attributeHeaderItem: {
129
+ name: "Huey Jonas",
130
+ uri: "/gdc/md/x3k4294x4k00lrz5degxnc6nykynhh52/obj/1025/elements?id=1233",
131
+ },
132
+ },
133
+ color: {
134
+ r: 107,
135
+ g: 191,
136
+ b: 216,
137
+ },
138
+ },
139
+ ];
@@ -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"}