@crystaldesign/diva-utils 26.9.0 → 26.10.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/types/utils/src/tests/BusinessMetricsUtils.test.d.ts +2 -0
- package/build/types/utils/src/tests/BusinessMetricsUtils.test.d.ts.map +1 -0
- package/build/types/utils/src/tests/fixtures/businessEventCatalog.d.ts +228 -0
- package/build/types/utils/src/tests/fixtures/businessEventCatalog.d.ts.map +1 -0
- package/build/types/utils/src/tests/helpers/expectBusinessEvent.d.ts +8 -0
- package/build/types/utils/src/tests/helpers/expectBusinessEvent.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BusinessMetricsUtils.test.d.ts","sourceRoot":"","sources":["../../../../../src/tests/BusinessMetricsUtils.test.ts"],"names":[],"mappings":"AAOA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { EventAction, EventModule } from '../../utils/BusinessMetricsUtils';
|
|
2
|
+
/**
|
|
3
|
+
* One documented business event: name, emitting module and the label keys that
|
|
4
|
+
* must be present on every emit. Source of truth: Confluence "DIVA Analytics
|
|
5
|
+
* Stacks Documentation" (page 2792718337) — keep both in sync.
|
|
6
|
+
*/
|
|
7
|
+
export interface BusinessEventCatalogEntry {
|
|
8
|
+
event: EventAction;
|
|
9
|
+
/** Omitted for backend-emitted events and events with a dynamic module. */
|
|
10
|
+
module?: EventModule;
|
|
11
|
+
requiredLabels: string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Documented events covered by automated tests. Typing `event` as `EventAction`
|
|
15
|
+
* makes this a compile-time drift check: a documented name that no longer exists
|
|
16
|
+
* in the code union fails the test run.
|
|
17
|
+
*/
|
|
18
|
+
export declare const businessEventCatalog: {
|
|
19
|
+
onInitGenericData: {
|
|
20
|
+
event: "onInitGenericData";
|
|
21
|
+
module: "Framework";
|
|
22
|
+
requiredLabels: never[];
|
|
23
|
+
};
|
|
24
|
+
onPageOpen: {
|
|
25
|
+
event: "onPageOpen";
|
|
26
|
+
requiredLabels: never[];
|
|
27
|
+
};
|
|
28
|
+
onOpenModule: {
|
|
29
|
+
event: "onOpenModule";
|
|
30
|
+
requiredLabels: never[];
|
|
31
|
+
};
|
|
32
|
+
onClose: {
|
|
33
|
+
event: "onClose";
|
|
34
|
+
module: "Framework";
|
|
35
|
+
requiredLabels: never[];
|
|
36
|
+
};
|
|
37
|
+
onTabGroupStep: {
|
|
38
|
+
event: "onTabGroupStep";
|
|
39
|
+
module: "Planner";
|
|
40
|
+
requiredLabels: string[];
|
|
41
|
+
};
|
|
42
|
+
onEnterPlanner: {
|
|
43
|
+
event: "onEnterPlanner";
|
|
44
|
+
module: "Planner";
|
|
45
|
+
requiredLabels: never[];
|
|
46
|
+
};
|
|
47
|
+
onExitPlanner: {
|
|
48
|
+
event: "onExitPlanner";
|
|
49
|
+
module: "Planner";
|
|
50
|
+
requiredLabels: never[];
|
|
51
|
+
};
|
|
52
|
+
onEnterConfigurator: {
|
|
53
|
+
event: "onEnterConfigurator";
|
|
54
|
+
module: "Planner";
|
|
55
|
+
requiredLabels: never[];
|
|
56
|
+
};
|
|
57
|
+
onExitConfigurator: {
|
|
58
|
+
event: "onExitConfigurator";
|
|
59
|
+
module: "Planner";
|
|
60
|
+
requiredLabels: never[];
|
|
61
|
+
};
|
|
62
|
+
onEnterAccessories: {
|
|
63
|
+
event: "onEnterAccessories";
|
|
64
|
+
module: "Planner";
|
|
65
|
+
requiredLabels: never[];
|
|
66
|
+
};
|
|
67
|
+
onExitAccessories: {
|
|
68
|
+
event: "onExitAccessories";
|
|
69
|
+
module: "Planner";
|
|
70
|
+
requiredLabels: never[];
|
|
71
|
+
};
|
|
72
|
+
onEnterSummary: {
|
|
73
|
+
event: "onEnterSummary";
|
|
74
|
+
module: "Planner";
|
|
75
|
+
requiredLabels: never[];
|
|
76
|
+
};
|
|
77
|
+
onExitSummary: {
|
|
78
|
+
event: "onExitSummary";
|
|
79
|
+
module: "Planner";
|
|
80
|
+
requiredLabels: never[];
|
|
81
|
+
};
|
|
82
|
+
onCreateQrCode: {
|
|
83
|
+
event: "onCreateQrCode";
|
|
84
|
+
module: "Products";
|
|
85
|
+
requiredLabels: string[];
|
|
86
|
+
};
|
|
87
|
+
onWidgetProductSelected: {
|
|
88
|
+
event: "onWidgetProductSelected";
|
|
89
|
+
module: "DivaWidget";
|
|
90
|
+
requiredLabels: string[];
|
|
91
|
+
};
|
|
92
|
+
onWidgetInitialProduct: {
|
|
93
|
+
event: "onWidgetInitialProduct";
|
|
94
|
+
module: "DivaWidget";
|
|
95
|
+
requiredLabels: string[];
|
|
96
|
+
};
|
|
97
|
+
onInitializeConfigurator: {
|
|
98
|
+
event: "onInitializeConfigurator";
|
|
99
|
+
module: "Planner";
|
|
100
|
+
requiredLabels: string[];
|
|
101
|
+
};
|
|
102
|
+
onReinitializeConfigurator: {
|
|
103
|
+
event: "onReinitializeConfigurator";
|
|
104
|
+
module: "Planner";
|
|
105
|
+
requiredLabels: string[];
|
|
106
|
+
};
|
|
107
|
+
onConfigurationInit: {
|
|
108
|
+
event: "onConfigurationInit";
|
|
109
|
+
module: "Planner";
|
|
110
|
+
requiredLabels: string[];
|
|
111
|
+
};
|
|
112
|
+
onConfigurationChange: {
|
|
113
|
+
event: "onConfigurationChange";
|
|
114
|
+
module: "Planner";
|
|
115
|
+
requiredLabels: string[];
|
|
116
|
+
};
|
|
117
|
+
onActualBasketValue: {
|
|
118
|
+
event: "onActualBasketValue";
|
|
119
|
+
module: "Planner";
|
|
120
|
+
requiredLabels: string[];
|
|
121
|
+
};
|
|
122
|
+
onInitPlanner: {
|
|
123
|
+
event: "onInitPlanner";
|
|
124
|
+
module: "Planner";
|
|
125
|
+
requiredLabels: string[];
|
|
126
|
+
};
|
|
127
|
+
onAddPlanner: {
|
|
128
|
+
event: "onAddPlanner";
|
|
129
|
+
module: "Planner";
|
|
130
|
+
requiredLabels: string[];
|
|
131
|
+
};
|
|
132
|
+
onSwitchPlanner: {
|
|
133
|
+
event: "onSwitchPlanner";
|
|
134
|
+
module: "Planner";
|
|
135
|
+
requiredLabels: string[];
|
|
136
|
+
};
|
|
137
|
+
onDeletePlanner: {
|
|
138
|
+
event: "onDeletePlanner";
|
|
139
|
+
module: "Planner";
|
|
140
|
+
requiredLabels: string[];
|
|
141
|
+
};
|
|
142
|
+
onUpdateAccessoireQuantity: {
|
|
143
|
+
event: "onUpdateAccessoireQuantity";
|
|
144
|
+
module: "Planner";
|
|
145
|
+
requiredLabels: string[];
|
|
146
|
+
};
|
|
147
|
+
onClickArticle: {
|
|
148
|
+
event: "onClickArticle";
|
|
149
|
+
module: "Planner";
|
|
150
|
+
requiredLabels: string[];
|
|
151
|
+
};
|
|
152
|
+
onClickAccesorie: {
|
|
153
|
+
event: "onClickAccesorie";
|
|
154
|
+
module: "Planner";
|
|
155
|
+
requiredLabels: string[];
|
|
156
|
+
};
|
|
157
|
+
onShareStep: {
|
|
158
|
+
event: "onShareStep";
|
|
159
|
+
module: "Planner";
|
|
160
|
+
requiredLabels: never[];
|
|
161
|
+
};
|
|
162
|
+
onConsultancyStep: {
|
|
163
|
+
event: "onConsultancyStep";
|
|
164
|
+
module: "Planner";
|
|
165
|
+
requiredLabels: never[];
|
|
166
|
+
};
|
|
167
|
+
onDimensoinVisualization: {
|
|
168
|
+
event: "onDimensoinVisualization";
|
|
169
|
+
module: "Planner";
|
|
170
|
+
requiredLabels: string[];
|
|
171
|
+
};
|
|
172
|
+
onVisualizationChange: {
|
|
173
|
+
event: "onVisualizationChange";
|
|
174
|
+
module: "Planner";
|
|
175
|
+
requiredLabels: string[];
|
|
176
|
+
};
|
|
177
|
+
onRoomVisualization: {
|
|
178
|
+
event: "onRoomVisualization";
|
|
179
|
+
module: "Planner";
|
|
180
|
+
requiredLabels: string[];
|
|
181
|
+
};
|
|
182
|
+
onLeadKeyGenerated: {
|
|
183
|
+
event: "onLeadKeyGenerated";
|
|
184
|
+
module: "AIInspire";
|
|
185
|
+
requiredLabels: string[];
|
|
186
|
+
};
|
|
187
|
+
onPlannerCheckoutAction: {
|
|
188
|
+
event: "onPlannerCheckoutAction";
|
|
189
|
+
module: "Planner";
|
|
190
|
+
requiredLabels: string[];
|
|
191
|
+
};
|
|
192
|
+
onPlannerShareConfiguration: {
|
|
193
|
+
event: "onPlannerShareConfiguration";
|
|
194
|
+
module: "Planner";
|
|
195
|
+
requiredLabels: string[];
|
|
196
|
+
};
|
|
197
|
+
onPlannerClickToCall: {
|
|
198
|
+
event: "onPlannerClickToCall";
|
|
199
|
+
module: "Planner";
|
|
200
|
+
requiredLabels: string[];
|
|
201
|
+
};
|
|
202
|
+
onPlannerCreateAppointment: {
|
|
203
|
+
event: "onPlannerCreateAppointment";
|
|
204
|
+
module: "Planner";
|
|
205
|
+
requiredLabels: string[];
|
|
206
|
+
};
|
|
207
|
+
onPlannerSaveEMail: {
|
|
208
|
+
event: "onPlannerSaveEMail";
|
|
209
|
+
module: "Planner";
|
|
210
|
+
requiredLabels: string[];
|
|
211
|
+
};
|
|
212
|
+
onPlannerOpenPDF: {
|
|
213
|
+
event: "onPlannerOpenPDF";
|
|
214
|
+
module: "Planner";
|
|
215
|
+
requiredLabels: never[];
|
|
216
|
+
};
|
|
217
|
+
onLoadInfoBox: {
|
|
218
|
+
event: "onLoadInfoBox";
|
|
219
|
+
module: "InfoBox";
|
|
220
|
+
requiredLabels: string[];
|
|
221
|
+
};
|
|
222
|
+
onInitARViewer: {
|
|
223
|
+
event: "onInitARViewer";
|
|
224
|
+
module: "RealTimeViewer";
|
|
225
|
+
requiredLabels: never[];
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
//# sourceMappingURL=businessEventCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"businessEventCatalog.d.ts","sourceRoot":"","sources":["../../../../../../src/tests/fixtures/businessEventCatalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE5E;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,WAAW,CAAC;IACnB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEoB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BusinessEventCatalogEntry } from '../fixtures/businessEventCatalog';
|
|
2
|
+
/**
|
|
3
|
+
* Asserts that `spy` observed an emit of the cataloged event: the event name was
|
|
4
|
+
* emitted, the module matches (when the catalog pins one) and every required
|
|
5
|
+
* label key is present. `extraLabels` adds exact-value expectations on top.
|
|
6
|
+
*/
|
|
7
|
+
export declare const expectBusinessEvent: (spy: jest.Mock, entry: BusinessEventCatalogEntry, extraLabels?: Record<string, unknown>) => void;
|
|
8
|
+
//# sourceMappingURL=expectBusinessEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expectBusinessEvent.d.ts","sourceRoot":"","sources":["../../../../../../src/tests/helpers/expectBusinessEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAyB7E;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAAS,IAAI,CAAC,IAAI,SAAS,yBAAyB,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,IAiB7H,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-utils",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.10.0-beta.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"module": "build/esm/index.js",
|
|
25
25
|
"types": "./build/types/utils/src/index.d.ts",
|
|
26
26
|
"main": "build/cjs/index.js",
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "fbefcf38a7846af17aac44a1de593d47ca344dc1"
|
|
28
28
|
}
|