@picked/client 0.0.1-dev.1756875690387 → 0.0.1-dev.1762908210565
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/dist/cjs/index.js +1 -1
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +1 -0
- package/dist/cjs/plugins/history-browser-storage/index.js +1 -0
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -0
- package/dist/cjs/plugins/{responses-indexeddb-plugin → responses-indexeddb}/index.js +1 -1
- package/dist/cjs/plugins/shopify/index.js +1 -1
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/plugins/web-components/index.js +1 -0
- package/dist/cjs/plugins/window-object/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +555 -443
- package/dist/esm/plugins/create-experience/index.js +172 -103
- package/dist/esm/plugins/experience-browser-storage/index.js +39 -0
- package/dist/esm/plugins/{history-browserstorage-plugin → history-browser-storage}/index.js +2 -2
- package/dist/esm/plugins/responses-browser-storage/index.js +41 -0
- package/dist/esm/plugins/{responses-indexeddb-plugin → responses-indexeddb}/index.js +24 -21
- package/dist/esm/plugins/shopify/index.js +38 -28
- package/dist/esm/plugins/single-page-app/index.js +3 -3
- package/dist/esm/plugins/web-components/index.js +21 -0
- package/dist/esm/plugins/window-object/index.js +1 -1
- package/dist/esm/server/index.js +1 -1
- package/dist/experience-instance-CF6m7G83.cjs +1 -0
- package/dist/experience-instance-CKru5var.js +781 -0
- package/dist/storage-Cb_71y48.js +94 -0
- package/dist/storage-DuRlyFaY.cjs +1 -0
- package/dist/{supports-BvrzQAVk.js → supports-BjhuLJ8z.js} +27 -11
- package/dist/supports-YvpQZxbh.cjs +1 -0
- package/dist/types/client.d.ts +26 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/entities/action/action.d.ts +15 -0
- package/dist/types/entities/action/action.d.ts.map +1 -0
- package/dist/types/entities/experience/experience.d.ts +19 -6
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +13 -10
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts +5 -2
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +27 -19
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/history/history.d.ts.map +1 -1
- package/dist/types/entities/predicate/predicate.d.ts +1 -1
- package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
- package/dist/types/entities/response/response.d.ts +8 -0
- package/dist/types/entities/response/response.d.ts.map +1 -1
- package/dist/types/exports.d.ts +2 -0
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/picked.d.ts +28 -10
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +48 -13
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/experience-browser-storage/index.d.ts.map +1 -0
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -0
- package/dist/types/plugins/history-browser-storage/index.d.ts.map +1 -0
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -0
- package/dist/types/plugins/responses-browser-storage/index.d.ts.map +1 -0
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -0
- package/dist/types/plugins/responses-indexeddb/index.d.ts.map +1 -0
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +1 -0
- package/dist/types/plugins/shopify/plugin.d.ts.map +1 -1
- package/dist/types/plugins/shopify/utils.d.ts +21 -0
- package/dist/types/plugins/shopify/utils.d.ts.map +1 -0
- package/dist/types/plugins/web-components/index.d.ts +2 -0
- package/dist/types/plugins/web-components/index.d.ts.map +1 -0
- package/dist/types/plugins/web-components/plugin.d.ts +3 -0
- package/dist/types/plugins/web-components/plugin.d.ts.map +1 -0
- package/dist/types/utils/dom.d.ts +5 -5
- package/dist/types/utils/dom.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +29 -24
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/get-step-fields.d.ts +4 -0
- package/dist/types/utils/get-step-fields.d.ts.map +1 -0
- package/dist/types/utils/nodes.d.ts +2 -1
- package/dist/types/utils/nodes.d.ts.map +1 -1
- package/dist/types/utils/storage.d.ts +3 -0
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/dist/types/utils/supports.d.ts +2 -0
- package/dist/types/utils/supports.d.ts.map +1 -1
- package/dist/types/utils/user-session.d.ts +5 -0
- package/dist/types/utils/user-session.d.ts.map +1 -0
- package/package.json +32 -26
- package/dist/cjs/plugins/experience-browserstorage-plugin/index.js +0 -1
- package/dist/cjs/plugins/history-browserstorage-plugin/index.js +0 -1
- package/dist/cjs/plugins/responses-browserstorage-plugin/index.js +0 -1
- package/dist/esm/plugins/experience-browserstorage-plugin/index.js +0 -38
- package/dist/esm/plugins/responses-browserstorage-plugin/index.js +0 -36
- package/dist/experience-instance-6ZKZS7dF.cjs +0 -1
- package/dist/experience-instance-BA0EXYg5.js +0 -712
- package/dist/storage-BPJwmlva.cjs +0 -1
- package/dist/storage-D87xFySf.js +0 -85
- package/dist/supports-C0y3-V5V.cjs +0 -1
- package/dist/types/plugins/experience-browserstorage-plugin/index.d.ts.map +0 -1
- package/dist/types/plugins/experience-browserstorage-plugin/plugin.d.ts.map +0 -1
- package/dist/types/plugins/history-browserstorage-plugin/index.d.ts.map +0 -1
- package/dist/types/plugins/history-browserstorage-plugin/plugin.d.ts.map +0 -1
- package/dist/types/plugins/responses-browserstorage-plugin/index.d.ts.map +0 -1
- package/dist/types/plugins/responses-browserstorage-plugin/plugin.d.ts.map +0 -1
- package/dist/types/plugins/responses-indexeddb-plugin/index.d.ts.map +0 -1
- package/dist/types/plugins/responses-indexeddb-plugin/plugin.d.ts.map +0 -1
- /package/dist/types/plugins/{experience-browserstorage-plugin → experience-browser-storage}/index.d.ts +0 -0
- /package/dist/types/plugins/{experience-browserstorage-plugin → experience-browser-storage}/plugin.d.ts +0 -0
- /package/dist/types/plugins/{history-browserstorage-plugin → history-browser-storage}/index.d.ts +0 -0
- /package/dist/types/plugins/{history-browserstorage-plugin → history-browser-storage}/plugin.d.ts +0 -0
- /package/dist/types/plugins/{responses-browserstorage-plugin → responses-browser-storage}/index.d.ts +0 -0
- /package/dist/types/plugins/{responses-browserstorage-plugin → responses-browser-storage}/plugin.d.ts +0 -0
- /package/dist/types/plugins/{responses-indexeddb-plugin → responses-indexeddb}/index.d.ts +0 -0
- /package/dist/types/plugins/{responses-indexeddb-plugin → responses-indexeddb}/plugin.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../../src/entities/response/response.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAuB,MAAM,gBAAgB,CAAA;AAI5E,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAInE,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../../src/entities/response/response.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAuB,MAAM,gBAAgB,CAAA;AAI5E,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAInE,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAA;AAGjC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,GAAG,SAAS,CAAA;CAC5B;AAED,QAAA,MAAM,0BAA0B,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;wBA8BnD,KAAK,CAAC,IAAI,CAAC,YAAY,QAAQ,KAAG,IAAI;;;gCA0H5C,eAAe,KACjC,OAAO,CAAC;QAAE,MAAM,EAAE,eAAe,EAAE,CAAA;KAAE,CAAC;8CAtHpB,eAAe,KACjC,OAAO,CAAC;QAAE,iBAAiB,EAAE,eAAe,CAAC;QAAC,gBAAgB,EAAE,eAAe,EAAE,CAAA;KAAE,CAAC;;;;;;;;4BAgJxD,KAAK,CAAC,IAAI,CAAC;gCAmBP,KAAK,CAAC,MAAM,CAAC;CAwChD,CAAA;AAEF,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC,CAAC,EAC5F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAE/C;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAA;AAE7D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IAGpB,WAAW,EAAE,MAAM,CAAA;IAGnB,aAAa,EAAE,MAAM,CAAA;IAGrB,KAAK,EAAE,UAAU,CAAA;CAClB"}
|
package/dist/types/exports.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { isPickedRoot } from './utils/dom';
|
|
|
4
4
|
export * from './utils/supports';
|
|
5
5
|
export * from './utils/storage';
|
|
6
6
|
export type * from './utils/storage';
|
|
7
|
+
export { evaluateRuleLogic } from './utils/rules-logic';
|
|
8
|
+
export { getStepFields } from './utils/get-step-fields';
|
|
7
9
|
/**
|
|
8
10
|
* Create a new Picked client instance and bind it to the window
|
|
9
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/exports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGjC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,mBAAmB,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/exports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGjC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,mBAAmB,iBAAiB,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,mBAAmB,WAIxD,CAAA"}
|
package/dist/types/picked.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ import { StateSnapshot } from './utils/state-snaphot';
|
|
|
7
7
|
import { Predicate } from './entities/predicate/predicate';
|
|
8
8
|
import { Feature } from './entities/feature/feature';
|
|
9
9
|
import { Field } from './entities/field/field';
|
|
10
|
+
import { Action } from './entities/action/action';
|
|
11
|
+
import { Session } from './utils/user-session';
|
|
10
12
|
export declare class Picked {
|
|
11
13
|
static readonly logger: (level: "log" | "warn" | "info" | "error", ...args: Parameters<Console["log"]>) => void;
|
|
12
14
|
private readonly options;
|
|
@@ -17,6 +19,7 @@ export declare class Picked {
|
|
|
17
19
|
readonly organizationId: string;
|
|
18
20
|
readonly projectId: string;
|
|
19
21
|
readonly apiUrl: string;
|
|
22
|
+
readonly session?: Session | null;
|
|
20
23
|
readonly searchParams: import('./utils/search-params').PickedSearchParams;
|
|
21
24
|
readonly history: {
|
|
22
25
|
push: import('effector').EventCallable<{
|
|
@@ -50,12 +53,13 @@ export declare class Picked {
|
|
|
50
53
|
readonly experienceInstances: {
|
|
51
54
|
spawn: (experience: import('.').ExperienceStore, target: HTMLElement) => void;
|
|
52
55
|
getByExperienceId: (id: Experience["id"]) => import('effector').Store<{
|
|
56
|
+
id: string;
|
|
53
57
|
experienceId: string;
|
|
54
58
|
configStore: import('effector').Store<{
|
|
55
|
-
type: string;
|
|
56
59
|
name: string;
|
|
57
60
|
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
58
61
|
targetSelectors: import('.').ExperienceTarget[];
|
|
62
|
+
initializeOpenLogic: import('./logic-engine').LogicValue | import('./logic-engine').LogicRule;
|
|
59
63
|
}>;
|
|
60
64
|
target: HTMLElement | undefined;
|
|
61
65
|
componentStore: import('effector').Store<{
|
|
@@ -86,12 +90,13 @@ export declare class Picked {
|
|
|
86
90
|
stepsHistoryStore: import('effector').Store<import('.').HistoryEntry[]>;
|
|
87
91
|
}[]>;
|
|
88
92
|
listStore: import('effector').Store<{
|
|
93
|
+
id: string;
|
|
89
94
|
experienceId: string;
|
|
90
95
|
configStore: import('effector').Store<{
|
|
91
|
-
type: string;
|
|
92
96
|
name: string;
|
|
93
97
|
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
94
98
|
targetSelectors: import('.').ExperienceTarget[];
|
|
99
|
+
initializeOpenLogic: import('./logic-engine').LogicValue | import('./logic-engine').LogicRule;
|
|
95
100
|
}>;
|
|
96
101
|
target: HTMLElement | undefined;
|
|
97
102
|
componentStore: import('effector').Store<{
|
|
@@ -127,10 +132,10 @@ export declare class Picked {
|
|
|
127
132
|
getById: (id: Experience["id"]) => import('effector').Store<{
|
|
128
133
|
id: string;
|
|
129
134
|
configStore: import('effector').Store<{
|
|
130
|
-
type: string;
|
|
131
135
|
name: string;
|
|
132
136
|
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
133
137
|
targetSelectors: import('.').ExperienceTarget[];
|
|
138
|
+
initializeOpenLogic: import('./logic-engine').LogicValue | import('./logic-engine').LogicRule;
|
|
134
139
|
}>;
|
|
135
140
|
treeStore: import('effector').Store<{
|
|
136
141
|
steps: import('.').ExperienceStep[];
|
|
@@ -143,6 +148,7 @@ export declare class Picked {
|
|
|
143
148
|
component: AdaptedComponent<string, unknown>;
|
|
144
149
|
frameworkStore: import('effector').Store<Framework | undefined>;
|
|
145
150
|
} | undefined>;
|
|
151
|
+
actions: import('.').ExperienceAction[];
|
|
146
152
|
merge: import('effector').EventCallable<{
|
|
147
153
|
experience: Partial<Experience>;
|
|
148
154
|
strategy: "override";
|
|
@@ -151,10 +157,10 @@ export declare class Picked {
|
|
|
151
157
|
listStore: import('effector').Store<{
|
|
152
158
|
id: string;
|
|
153
159
|
configStore: import('effector').Store<{
|
|
154
|
-
type: string;
|
|
155
160
|
name: string;
|
|
156
161
|
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
157
162
|
targetSelectors: import('.').ExperienceTarget[];
|
|
163
|
+
initializeOpenLogic: import('./logic-engine').LogicValue | import('./logic-engine').LogicRule;
|
|
158
164
|
}>;
|
|
159
165
|
treeStore: import('effector').Store<{
|
|
160
166
|
steps: import('.').ExperienceStep[];
|
|
@@ -167,6 +173,7 @@ export declare class Picked {
|
|
|
167
173
|
component: AdaptedComponent<string, unknown>;
|
|
168
174
|
frameworkStore: import('effector').Store<Framework | undefined>;
|
|
169
175
|
} | undefined>;
|
|
176
|
+
actions: import('.').ExperienceAction[];
|
|
170
177
|
merge: import('effector').EventCallable<{
|
|
171
178
|
experience: Partial<Experience>;
|
|
172
179
|
strategy: "override";
|
|
@@ -194,12 +201,6 @@ export declare class Picked {
|
|
|
194
201
|
getByName: (name: string) => import('effector').Store<import('.').FeatureIndexItem | undefined>;
|
|
195
202
|
listStore: import('effector').Store<import('.').FeatureBucket[]>;
|
|
196
203
|
};
|
|
197
|
-
readonly fields: {
|
|
198
|
-
register: (field: Field) => void;
|
|
199
|
-
getById: (id: import('.').FieldBase["id"]) => import('effector').Store<Field | null>;
|
|
200
|
-
listStore: import('effector').Store<Field[]>;
|
|
201
|
-
getByName: (name: import('.').FieldBase["name"]) => import('effector').Store<Field | null>;
|
|
202
|
-
};
|
|
203
204
|
readonly responses: {
|
|
204
205
|
register: (fieldId: Field["id"], response: import('.').Response) => void;
|
|
205
206
|
clearAll: import('effector').EventCallable<void>;
|
|
@@ -207,6 +208,10 @@ export declare class Picked {
|
|
|
207
208
|
commit: (responsesToCommit: import('.').CommitResponses) => Promise<{
|
|
208
209
|
errors: import('.').ValidationError[];
|
|
209
210
|
}>;
|
|
211
|
+
getResponsesToCommit: (responsesToCommit: import('.').CommitResponses) => Promise<{
|
|
212
|
+
responsesToCommit: import('.').CommitResponses;
|
|
213
|
+
validationErrors: import('.').ValidationError[];
|
|
214
|
+
}>;
|
|
210
215
|
listStore: import('effector').Store<{
|
|
211
216
|
fieldId: string;
|
|
212
217
|
value: import('.').FieldValue | undefined;
|
|
@@ -217,6 +222,17 @@ export declare class Picked {
|
|
|
217
222
|
getByFieldId: (fieldId: Field["id"]) => import('effector').Store<import('.').FieldValue>;
|
|
218
223
|
getByFieldName: (fieldName: Field["name"]) => import('effector').Store<import('.').FieldValue>;
|
|
219
224
|
};
|
|
225
|
+
readonly fields: {
|
|
226
|
+
register: (field: Field) => void;
|
|
227
|
+
getById: (id: import('.').FieldBase["id"]) => import('effector').Store<Field | null>;
|
|
228
|
+
listStore: import('effector').Store<Field[]>;
|
|
229
|
+
getByName: (name: import('.').FieldBase["name"]) => import('effector').Store<Field | null>;
|
|
230
|
+
};
|
|
231
|
+
readonly actions: {
|
|
232
|
+
register: (name: string, action: Action) => void;
|
|
233
|
+
getByName: (name: string) => import('effector').Store<import('./entities/action/action').ActionIndexItem | undefined>;
|
|
234
|
+
listStore: import('effector').Store<import('./entities/action/action').ActionIndexItem[]>;
|
|
235
|
+
};
|
|
220
236
|
constructor(options: CreateClientOptions);
|
|
221
237
|
start(): void;
|
|
222
238
|
registerFramework(framework: Framework): void;
|
|
@@ -225,12 +241,14 @@ export declare class Picked {
|
|
|
225
241
|
registerFeature(name: string, feature: Feature): void;
|
|
226
242
|
registerPredicate(name: string, predicate: Predicate): void;
|
|
227
243
|
registerField(field: Field): void;
|
|
244
|
+
registerAction(name: string, action: Action): void;
|
|
228
245
|
registerExperience(experience: Experience): void;
|
|
229
246
|
getStateSnapshot(): StateSnapshot;
|
|
230
247
|
launchExperienceById(experienceId: string): Promise<void>;
|
|
231
248
|
private setupPlugins;
|
|
232
249
|
private setupFeatures;
|
|
233
250
|
private setupPredicates;
|
|
251
|
+
private setupActions;
|
|
234
252
|
getPluginConfig(pluginName: string): PluginConfigIndex[string] | Record<string, unknown>;
|
|
235
253
|
}
|
|
236
254
|
//# sourceMappingURL=picked.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picked.d.ts","sourceRoot":"","sources":["../../src/picked.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,UAAU,EAIhB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,iBAAiB,EAAe,MAAM,0BAA0B,CAAA;AAC3F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EAGtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAEL,KAAK,SAAS,EAEf,MAAM,gCAAgC,CAAA;AAGvC,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAMzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"picked.d.ts","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AAe,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAGzF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Experience, ExperienceConditional, ExperienceEdge, ExperienceNode, ExperienceStep, ExperienceTarget } from '../../entities/experience/experience';
|
|
1
|
+
import { ActionNode, Experience, ExperienceConditional, ExperienceEdge, ExperienceNode, ExperienceStep, ExperienceTarget } from '../../entities/experience/experience';
|
|
2
2
|
import { AdaptedComponent } from '../../entities/component/component';
|
|
3
|
-
import { LogicRule } from '../../logic-engine';
|
|
3
|
+
import { LogicRule, LogicValue } from '../../logic-engine';
|
|
4
4
|
import { Field, FieldBooleanMultiple, FieldBooleanSingular, FieldNumberMultiple, FieldNumberSingular, FieldTextMultiple, FieldTextSingular } from '../../entities/field/field';
|
|
5
5
|
import { Serialized } from './serialization';
|
|
6
6
|
export interface Nodeable {
|
|
@@ -18,9 +18,23 @@ export interface SerializableStep extends Nodeable {
|
|
|
18
18
|
serialize: () => Serialized<ExperienceStep>;
|
|
19
19
|
}
|
|
20
20
|
export interface CreateStepOptions {
|
|
21
|
+
id?: string;
|
|
21
22
|
label: string;
|
|
23
|
+
fields?: SerializableField[];
|
|
22
24
|
}
|
|
23
|
-
export type SerializableNode = SerializableStepNode | SerializableConditionalNode | SerializableLaunchExperienceNode | SerializableOriginNode;
|
|
25
|
+
export type SerializableNode = SerializableStepNode | SerializableConditionalNode | SerializableLaunchExperienceNode | SerializableOriginNode | SerializableActionNode;
|
|
26
|
+
export interface SerializableActionNode extends SerializableBaseNode {
|
|
27
|
+
type: 'action';
|
|
28
|
+
action: string;
|
|
29
|
+
addNext: (nodeable: Nodeable) => undefined;
|
|
30
|
+
onSuccess: (nodeable: Nodeable) => undefined;
|
|
31
|
+
onFail: (nodeable: Nodeable) => undefined;
|
|
32
|
+
serialize: () => Serialized<ActionNode>;
|
|
33
|
+
}
|
|
34
|
+
export interface CreateActionOptions {
|
|
35
|
+
action: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const createAction: (actionOptions: CreateActionOptions, experience: SerializableExperience) => SerializableActionNode;
|
|
24
38
|
export interface SerializableBaseNode {
|
|
25
39
|
id: string;
|
|
26
40
|
experience: SerializableExperience;
|
|
@@ -53,6 +67,9 @@ export type CreateNodeOptions = {
|
|
|
53
67
|
} | {
|
|
54
68
|
experience: SerializableExperience;
|
|
55
69
|
type: 'experience';
|
|
70
|
+
} | {
|
|
71
|
+
action: SerializableActionNode;
|
|
72
|
+
type: 'action';
|
|
56
73
|
};
|
|
57
74
|
export interface SerializableEdge {
|
|
58
75
|
id: string;
|
|
@@ -78,8 +95,17 @@ export interface SerializableConditional extends Nodeable {
|
|
|
78
95
|
export interface CreateConditionalOptions {
|
|
79
96
|
condition: LogicRule;
|
|
80
97
|
}
|
|
81
|
-
export type CreateFieldOptions = Omit<Field, '
|
|
82
|
-
|
|
98
|
+
export type CreateFieldOptions = Omit<Field, 'options' | 'placeholder' | 'description' | 'helpText' | 'validation' | 'policies' | 'defaultValue'> & {
|
|
99
|
+
defaultValue?: string | number | boolean | object | null | string[] | number[] | boolean[] | object[];
|
|
100
|
+
placeholder?: string;
|
|
101
|
+
description?: string;
|
|
102
|
+
helpText?: string;
|
|
103
|
+
validation?: LogicRule;
|
|
104
|
+
policies?: {
|
|
105
|
+
doNotTrackValue?: boolean;
|
|
106
|
+
doNotStoreValue?: boolean;
|
|
107
|
+
};
|
|
108
|
+
options?: NonNullable<FieldTextSingular['options']>[number][] | NonNullable<FieldTextMultiple['options']>[number][] | NonNullable<FieldNumberSingular['options']>[number][] | NonNullable<FieldNumberMultiple['options']>[number][] | NonNullable<FieldBooleanSingular['options']>[number][] | NonNullable<FieldBooleanMultiple['options']>[number][];
|
|
83
109
|
};
|
|
84
110
|
export type SerializableField = {
|
|
85
111
|
id: string;
|
|
@@ -89,11 +115,12 @@ export type SerializableField = {
|
|
|
89
115
|
multiple: boolean;
|
|
90
116
|
required: boolean;
|
|
91
117
|
defaultValue: string | number | boolean | object | null | string[] | number[] | boolean[] | object[];
|
|
92
|
-
placeholder
|
|
93
|
-
description
|
|
94
|
-
helpText
|
|
118
|
+
placeholder?: string;
|
|
119
|
+
description?: string;
|
|
120
|
+
helpText?: string;
|
|
95
121
|
validation: LogicRule;
|
|
96
|
-
|
|
122
|
+
condition?: LogicRule;
|
|
123
|
+
policies?: {
|
|
97
124
|
doNotTrackValue?: boolean;
|
|
98
125
|
doNotStoreValue?: boolean;
|
|
99
126
|
};
|
|
@@ -101,6 +128,7 @@ export type SerializableField = {
|
|
|
101
128
|
id: string;
|
|
102
129
|
label: string;
|
|
103
130
|
value: string | number | boolean | object;
|
|
131
|
+
condition?: LogicRule;
|
|
104
132
|
}[] | null;
|
|
105
133
|
} & {
|
|
106
134
|
serialize: () => Serialized<Field>;
|
|
@@ -108,16 +136,16 @@ export type SerializableField = {
|
|
|
108
136
|
export interface SerializableExperience {
|
|
109
137
|
id: string;
|
|
110
138
|
component?: AdaptedComponent;
|
|
111
|
-
type: string;
|
|
112
139
|
name: string;
|
|
113
140
|
decide?: LogicRule;
|
|
141
|
+
initializeOpen?: LogicRule | LogicValue;
|
|
114
142
|
targets: ExperienceTarget[];
|
|
115
143
|
steps: SerializableStep[];
|
|
116
144
|
nodes: SerializableNode[];
|
|
117
145
|
edges: SerializableEdge[];
|
|
118
146
|
fields: SerializableField[];
|
|
119
147
|
conditionals: SerializableConditional[];
|
|
120
|
-
addStep: (stepOptions: CreateStepOptions | SerializableStep, after?: {
|
|
148
|
+
addStep: (stepOptions: CreateStepOptions | SerializableStep | OrphanStep, after?: {
|
|
121
149
|
node: SerializableNode | null;
|
|
122
150
|
}) => SerializableStep;
|
|
123
151
|
addConditional: (conditionalOptions: CreateConditionalOptions | SerializableConditional, after?: {
|
|
@@ -127,17 +155,24 @@ export interface SerializableExperience {
|
|
|
127
155
|
node: SerializableNode | null;
|
|
128
156
|
}) => SerializableExperience;
|
|
129
157
|
addField: (fieldOptions: CreateFieldOptions | SerializableField, step?: SerializableStep) => SerializableField;
|
|
158
|
+
addAction: (actionOptions: CreateActionOptions | SerializableActionNode, after?: {
|
|
159
|
+
node: SerializableNode | null;
|
|
160
|
+
}) => SerializableActionNode;
|
|
130
161
|
serialize: () => Serialized<Experience>;
|
|
131
162
|
}
|
|
132
163
|
export interface CreateExperienceOptions {
|
|
133
164
|
id: string;
|
|
134
165
|
name: string;
|
|
135
166
|
decide: LogicRule;
|
|
167
|
+
initializeOpen?: LogicRule | LogicValue;
|
|
136
168
|
targets: ExperienceTarget[];
|
|
137
169
|
component?: AdaptedComponent;
|
|
138
|
-
type: string;
|
|
139
170
|
}
|
|
140
|
-
export
|
|
171
|
+
export type OrphanStep = Omit<SerializableStep, 'nextStep' | 'nextConditional' | 'addNextExperience' | 'node' | 'serialize' | 'addField' | 'experience'> & {
|
|
172
|
+
addField: (fieldOrFieldOptions: CreateFieldOptions | SerializableField) => void;
|
|
173
|
+
};
|
|
174
|
+
export declare const createStep: (stepOptions: CreateStepOptions) => OrphanStep;
|
|
175
|
+
export declare const bindExperienceStep: (stepOptions: CreateStepOptions | OrphanStep, experience: SerializableExperience) => SerializableStep;
|
|
141
176
|
export declare const createNode: (nodeOptions: CreateNodeOptions, experience: SerializableExperience) => SerializableNode;
|
|
142
177
|
export declare const createEdge: (edgeOptions: CreateEdgeOptions, experience: SerializableExperience) => SerializableEdge;
|
|
143
178
|
export declare const createConditional: (conditionalOptions: CreateConditionalOptions, experience: SerializableExperience) => SerializableConditional;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-experience.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/create-experience.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAGjB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"create-experience.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/create-experience.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAEV,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAGjB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAAK,EACV,KAAK,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEhE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAC9B;AAED,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,iBAAiB,EAAE,CAAA;IAC3B,UAAU,EAAE,sBAAsB,CAAA;IAClC,QAAQ,EAAE,CAAC,WAAW,EAAE,iBAAiB,GAAG,gBAAgB,KAAK,gBAAgB,CAAA;IACjF,eAAe,EAAE,CACf,kBAAkB,EAAE,wBAAwB,GAAG,uBAAuB,KACnE,uBAAuB,CAAA;IAC5B,iBAAiB,EAAE,CAAC,UAAU,EAAE,sBAAsB,KAAK,sBAAsB,CAAA;IACjF,QAAQ,EAAE,CAAC,YAAY,EAAE,kBAAkB,GAAG,iBAAiB,KAAK,iBAAiB,CAAA;IACrF,SAAS,EAAE,MAAM,UAAU,CAAC,cAAc,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,CACf,GAAG;IACF,QAAQ,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,GAAG,iBAAiB,KAAK,IAAI,CAAA;CAChF,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,aAAa,iBAAiB,KAAG,UAgB3D,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,aAAa,iBAAiB,GAAG,UAAU,EAC3C,YAAY,sBAAsB,KACjC,gBA+BF,CAAA;AAID,eAAO,MAAM,UAAU,GACrB,aAAa,iBAAiB,EAC9B,YAAY,sBAAsB,KACjC,gBA+EF,CAAA;AAED,eAAO,MAAM,UAAU,GACrB,aAAa,iBAAiB,EAC9B,YAAY,sBAAsB,KACjC,gBAkBF,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,oBAAoB,wBAAwB,EAC5C,YAAY,sBAAsB,KACjC,uBA0CF,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,cAAc,kBAAkB,KAAG,iBAiN9D,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,YAAY,uBAAuB,KAAG,sBAsLtE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/experience-browser-storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/experience-browser-storage/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,eAAO,MAAM,8BAA8B,GAAI,eAE5C,8BAAmC,KAAG,MA6CxC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/history-browser-storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/history-browser-storage/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,MAAM,WAAW,2BAA2B;IAC1C,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,eAAO,MAAM,2BAA2B,GAAI,eAEzC,2BAAgC,KAAG,MA4BrC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/responses-browser-storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/responses-browser-storage/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAK1D,MAAM,WAAW,6BAA6B;IAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,eAAO,MAAM,6BAA6B,GAAI,eAE3C,6BAAkC,KAAG,MAiDvC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/responses-indexeddb/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/responses-indexeddb/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAM1D,eAAO,MAAM,wBAAwB,QAAO,MA2E3C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAM1D,eAAO,MAAM,aAAa,QAAO,MA0BhC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface EventPayload {
|
|
2
|
+
[key: string]: string | number | boolean | null | undefined | EventPayload | Array<string | number | boolean | null | undefined | EventPayload>;
|
|
3
|
+
}
|
|
4
|
+
declare global {
|
|
5
|
+
interface Window {
|
|
6
|
+
Shopify?: {
|
|
7
|
+
analytics?: {
|
|
8
|
+
publish?: (event: string, payload: EventPayload) => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare function supportsShopifyAnalytics(w: Window): w is Window & {
|
|
14
|
+
Shopify: {
|
|
15
|
+
analytics: {
|
|
16
|
+
publish: (event: string, payload: EventPayload) => void;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shopify/utils.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACpB,CAAC,GAAG,EAAE,MAAM,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,GACT,YAAY,GACZ,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,CAAC,CAAA;CACvE;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,CAAC,EAAE;YACR,SAAS,CAAC,EAAE;gBACV,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;aACzD,CAAA;SACF,CAAA;KACF;CACF;AAED,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG;IACjE,OAAO,EAAE;QAAE,SAAS,EAAE;YAAE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;SAAE,CAAA;KAAE,CAAA;CACpF,CAEA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/web-components/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAG1D,eAAO,MAAM,mBAAmB,QAAO,MA4BtC,CAAA"}
|
|
@@ -12,11 +12,11 @@ export declare function getTargetElements(targets: {
|
|
|
12
12
|
})[];
|
|
13
13
|
export declare function createAppHosts(targets: (ExperienceTarget & {
|
|
14
14
|
elements: HTMLElement[];
|
|
15
|
-
})[]): HTMLElement[];
|
|
15
|
+
})[], experienceId: string): HTMLElement[];
|
|
16
16
|
export declare function tagTargetElement(element: HTMLElement, experienceId: string): void;
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function isPickedRoot(element: HTMLElement): boolean;
|
|
19
|
-
export declare function createPickedRoot(): HTMLDivElement;
|
|
20
|
-
export declare function createHostElement(target: HTMLElement | Document, placement: Placement): HTMLElement;
|
|
17
|
+
export declare function isTaggedTarget(element: HTMLElement, experienceId?: string): boolean;
|
|
18
|
+
export declare function isPickedRoot(element: HTMLElement, experienceId?: string): boolean;
|
|
19
|
+
export declare function createPickedRoot(experienceId: string): HTMLDivElement;
|
|
20
|
+
export declare function createHostElement(target: HTMLElement | Document, placement: Placement, experienceId: string): HTMLElement;
|
|
21
21
|
export {};
|
|
22
22
|
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/utils/dom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AAGzE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CAQ7D;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,CAMhE;AAED,wBAAgB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAa9C;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,QAS1E;AAED,KAAK,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/utils/dom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AAGzE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CAQ7D;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,CAMhE;AAED,wBAAgB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAa9C;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,QAS1E;AAED,KAAK,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;AAOtE,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,EAAE,EACrD,YAAY,EAAE,MAAM,GACnB,CAAC,gBAAgB,GAAG;IAAE,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,EAAE,CAqBpD;AAED,wBAAgB,cAAc,CAC5B,OAAO,EAAE,CAAC,gBAAgB,GAAG;IAAE,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC,EAAE,EAC3D,YAAY,EAAE,MAAM,iBAOrB;AAGD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,QAG1E;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC,EAAE,MAAM,WAMzE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC,EAAE,MAAM,WAMvE;AAED,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,kBAMpD;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,GAAG,QAAQ,EAC9B,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,eA+BrB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ValidationError } from '../entities/response/response';
|
|
2
|
-
import { ExperienceStep, ExperienceStore
|
|
2
|
+
import { ExperienceStep, ExperienceStore } from '../entities/experience/experience';
|
|
3
3
|
import { ExperienceInstance } from '../entities/experience-instance/experience-instance';
|
|
4
|
+
import { ResolvedFeature } from '../entities/feature/feature';
|
|
4
5
|
export interface FormPayload {
|
|
5
6
|
id: string;
|
|
6
7
|
title: string;
|
|
@@ -10,9 +11,15 @@ export interface PayloadMap {
|
|
|
10
11
|
experience_initialized: {
|
|
11
12
|
experienceInstance: ExperienceInstance;
|
|
12
13
|
};
|
|
14
|
+
feature_decide: {
|
|
15
|
+
feature: ResolvedFeature;
|
|
16
|
+
};
|
|
13
17
|
initialized: {
|
|
14
18
|
version: string;
|
|
15
19
|
};
|
|
20
|
+
session: {
|
|
21
|
+
id: string;
|
|
22
|
+
};
|
|
16
23
|
experience_open: {
|
|
17
24
|
experience: ExperienceStore;
|
|
18
25
|
};
|
|
@@ -23,58 +30,56 @@ export interface PayloadMap {
|
|
|
23
30
|
experience: ExperienceStore;
|
|
24
31
|
};
|
|
25
32
|
step_enter: {
|
|
26
|
-
step:
|
|
33
|
+
step: ExperienceStep;
|
|
27
34
|
experience: ExperienceStore;
|
|
28
35
|
};
|
|
29
36
|
step_submit: {
|
|
30
|
-
step:
|
|
37
|
+
step: ExperienceStep;
|
|
31
38
|
experience: ExperienceStore;
|
|
32
39
|
};
|
|
33
40
|
step_submit_success: {
|
|
34
|
-
step:
|
|
41
|
+
step: ExperienceStep;
|
|
35
42
|
experience: ExperienceStore;
|
|
36
43
|
};
|
|
37
44
|
step_submit_error: {
|
|
38
|
-
step:
|
|
45
|
+
step: ExperienceStep;
|
|
39
46
|
experience: ExperienceStore;
|
|
40
47
|
};
|
|
41
48
|
step_complete: {
|
|
42
|
-
step:
|
|
49
|
+
step: ExperienceStep;
|
|
43
50
|
experience: ExperienceStore;
|
|
44
51
|
};
|
|
45
52
|
form_submit: {
|
|
46
53
|
form: FormPayload;
|
|
47
|
-
experience:
|
|
48
|
-
step
|
|
54
|
+
experience: ExperienceInstance;
|
|
55
|
+
step?: ExperienceStep;
|
|
49
56
|
};
|
|
50
57
|
form_submit_success: {
|
|
51
58
|
form: FormPayload;
|
|
52
|
-
experience:
|
|
53
|
-
step
|
|
59
|
+
experience: ExperienceInstance;
|
|
60
|
+
step?: ExperienceStep;
|
|
54
61
|
};
|
|
55
62
|
form_submit_error: {
|
|
56
63
|
form: FormPayload;
|
|
57
64
|
exception: {
|
|
58
65
|
reason: ValidationError[];
|
|
59
66
|
};
|
|
60
|
-
experience:
|
|
61
|
-
step
|
|
67
|
+
experience: ExperienceInstance;
|
|
68
|
+
step?: ExperienceStep;
|
|
62
69
|
};
|
|
63
70
|
field_validation_error: {
|
|
64
|
-
exception:
|
|
71
|
+
exception: {
|
|
72
|
+
reason: ValidationError[];
|
|
73
|
+
};
|
|
74
|
+
experience: ExperienceInstance;
|
|
75
|
+
step?: ExperienceStep;
|
|
65
76
|
};
|
|
66
77
|
}
|
|
67
|
-
export type PayloadValues = PayloadMap[keyof PayloadMap];
|
|
68
78
|
export type PickedEventType = keyof PayloadMap;
|
|
69
|
-
export
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
experienceInstance?: ExperienceInstance;
|
|
75
|
-
step?: ExperienceStep;
|
|
76
|
-
exception?: ValidationError | string;
|
|
77
|
-
}
|
|
79
|
+
export type EventBusPayload = {
|
|
80
|
+
[K in PickedEventType]: {
|
|
81
|
+
type: K;
|
|
82
|
+
} & (PayloadMap[K] extends never ? object : PayloadMap[K]);
|
|
83
|
+
}[PickedEventType];
|
|
78
84
|
export declare const createEventBus: () => import('effector').EventCallable<EventBusPayload>;
|
|
79
|
-
export type EventBus = ReturnType<typeof createEventBus>;
|
|
80
85
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/utils/events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/utils/events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+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KAAK,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAoDrF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ConditionalNode, ExperienceNode, LaunchExperienceNode, OriginNode, StepNode } from '../entities/experience/experience';
|
|
1
|
+
import { ConditionalNode, ExperienceNode, LaunchExperienceNode, OriginNode, StepNode, ActionNode } from '../entities/experience/experience';
|
|
2
2
|
export declare function isConditionNode(node: ExperienceNode): node is ConditionalNode;
|
|
3
3
|
export declare function isStepNode(node: ExperienceNode): node is StepNode;
|
|
4
4
|
export declare function isLaunchExperienceNode(node: ExperienceNode): node is LaunchExperienceNode;
|
|
5
5
|
export declare function isOriginNode(node: ExperienceNode): node is OriginNode;
|
|
6
|
+
export declare function isActionNode(node: ExperienceNode): node is ActionNode;
|
|
6
7
|
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../src/utils/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,QAAQ,
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../src/utils/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,UAAU,EACX,MAAM,mCAAmC,CAAA;AAE1C,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,eAAe,CAE7E;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,QAAQ,CAEjE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,oBAAoB,CAEzF;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,UAAU,CAErE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,IAAI,UAAU,CAErE"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { ExperienceInstance } from '../entities/experience-instance/experience-instance';
|
|
2
2
|
export type StorageScope = 'global' | 'experience';
|
|
3
3
|
export interface StorageItem<T = unknown> {
|
|
4
|
+
isSet: () => boolean;
|
|
4
5
|
text: () => string | null;
|
|
5
6
|
json: () => T | null;
|
|
6
7
|
boolean: () => boolean | null;
|
|
8
|
+
set: (value: T) => void;
|
|
9
|
+
remove: () => void;
|
|
7
10
|
}
|
|
8
11
|
export declare function createStorageKey(key: string, scope?: StorageScope, experienceInstance?: ExperienceInstance): string;
|
|
9
12
|
export declare function subscribe<T = unknown>(key: string, storage: 'local' | 'session', get: (key: string) => StorageItem<T>, callback: (value: StorageItem<T>) => void): () => void;
|