@picked/client 0.0.6-next.1 → 0.0.7-next.1
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/server/index.js +1 -1
- package/dist/esm/index.js +263 -244
- package/dist/esm/plugins/create-experience/index.js +32 -30
- package/dist/esm/server/index.js +1 -1
- package/dist/{experience-instance-DYZovD6a.js → experience-instance-C1Ky25uw.js} +17 -16
- package/dist/{experience-instance-DwO_yZK0.cjs → experience-instance-DNI5sbjx.cjs} +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +3 -0
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +1 -0
- package/dist/types/entities/field/field.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 +12 -6
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +1 -0
- package/dist/types/plugins/create-experience/create-experience.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/package.json +1 -1
|
@@ -9,9 +9,9 @@ const r = {
|
|
|
9
9
|
}, b = (e) => ({
|
|
10
10
|
name: "create-experience",
|
|
11
11
|
setup: (a) => {
|
|
12
|
-
e.experiences.forEach((
|
|
13
|
-
const s =
|
|
14
|
-
|
|
12
|
+
e.experiences.forEach((o) => {
|
|
13
|
+
const s = o.serialize(), l = r.deserialize(s);
|
|
14
|
+
l.component = o.component, a.registerExperience(l), l.fields.forEach((c) => {
|
|
15
15
|
a.registerField(c);
|
|
16
16
|
});
|
|
17
17
|
});
|
|
@@ -21,12 +21,12 @@ const r = {
|
|
|
21
21
|
label: e.label,
|
|
22
22
|
fields: e.fields ?? [],
|
|
23
23
|
addField(a) {
|
|
24
|
-
var s,
|
|
25
|
-
const
|
|
26
|
-
return (s = this.fields) != null && s.includes(
|
|
24
|
+
var s, l;
|
|
25
|
+
const o = "serialize" in a ? a : m(a);
|
|
26
|
+
return (s = this.fields) != null && s.includes(o) || (l = this.fields) == null || l.push(o), o;
|
|
27
27
|
}
|
|
28
28
|
}), y = (e, a) => {
|
|
29
|
-
const
|
|
29
|
+
const o = {
|
|
30
30
|
id: e.id ?? f("step"),
|
|
31
31
|
label: e.label,
|
|
32
32
|
experience: a,
|
|
@@ -52,16 +52,16 @@ const r = {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
return h({ step:
|
|
55
|
+
return h({ step: o, type: "step" }, a), o;
|
|
56
56
|
}, z = () => [0, 0], h = (e, a) => {
|
|
57
|
-
const
|
|
57
|
+
const o = {
|
|
58
58
|
id: f("node"),
|
|
59
59
|
position: z(),
|
|
60
60
|
experience: a
|
|
61
61
|
};
|
|
62
62
|
if (e.type === "step") {
|
|
63
|
-
const
|
|
64
|
-
...
|
|
63
|
+
const l = {
|
|
64
|
+
...o,
|
|
65
65
|
type: "step",
|
|
66
66
|
connectedStep: e.step,
|
|
67
67
|
serialize() {
|
|
@@ -74,11 +74,11 @@ const r = {
|
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
return
|
|
77
|
+
return l.connectedStep.node = l, l;
|
|
78
78
|
}
|
|
79
79
|
if (e.type === "conditional") {
|
|
80
|
-
const
|
|
81
|
-
...
|
|
80
|
+
const l = {
|
|
81
|
+
...o,
|
|
82
82
|
type: "conditional",
|
|
83
83
|
connectedConditional: e.conditional,
|
|
84
84
|
serialize() {
|
|
@@ -90,10 +90,10 @@ const r = {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
|
-
return
|
|
93
|
+
return l.connectedConditional.node = l, l;
|
|
94
94
|
}
|
|
95
95
|
return e.type === "experience" ? {
|
|
96
|
-
...
|
|
96
|
+
...o,
|
|
97
97
|
type: "experience",
|
|
98
98
|
connectedExperience: e.experience,
|
|
99
99
|
serialize() {
|
|
@@ -105,7 +105,7 @@ const r = {
|
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
} : {
|
|
108
|
-
...
|
|
108
|
+
...o,
|
|
109
109
|
type: "origin",
|
|
110
110
|
serialize() {
|
|
111
111
|
return r.serialize({
|
|
@@ -130,7 +130,7 @@ const r = {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
}), N = (e, a) => {
|
|
133
|
-
const
|
|
133
|
+
const o = {
|
|
134
134
|
id: f("conditional"),
|
|
135
135
|
condition: e.condition,
|
|
136
136
|
node: null,
|
|
@@ -138,20 +138,20 @@ const r = {
|
|
|
138
138
|
addTrue(s) {
|
|
139
139
|
if (!this.node || !s.node)
|
|
140
140
|
throw new Error("todo no node");
|
|
141
|
-
const
|
|
141
|
+
const l = p(
|
|
142
142
|
{ sourceNode: this.node, destinationNode: s.node, sourceNodeHandle: "true" },
|
|
143
143
|
this.experience
|
|
144
144
|
);
|
|
145
|
-
this.experience.edges.push(
|
|
145
|
+
this.experience.edges.push(l);
|
|
146
146
|
},
|
|
147
147
|
addFalse(s) {
|
|
148
148
|
if (!this.node || !s.node)
|
|
149
149
|
throw new Error("todo no node");
|
|
150
|
-
const
|
|
150
|
+
const l = p(
|
|
151
151
|
{ sourceNode: this.node, destinationNode: s.node, sourceNodeHandle: "false" },
|
|
152
152
|
this.experience
|
|
153
153
|
);
|
|
154
|
-
this.experience.edges.push(
|
|
154
|
+
this.experience.edges.push(l);
|
|
155
155
|
},
|
|
156
156
|
serialize() {
|
|
157
157
|
return r.serialize({
|
|
@@ -160,9 +160,9 @@ const r = {
|
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
|
-
return h({ conditional:
|
|
163
|
+
return h({ conditional: o, type: "conditional" }, a), o;
|
|
164
164
|
}, m = (e) => {
|
|
165
|
-
var
|
|
165
|
+
var o;
|
|
166
166
|
return {
|
|
167
167
|
id: e.id,
|
|
168
168
|
name: e.name,
|
|
@@ -174,8 +174,9 @@ const r = {
|
|
|
174
174
|
defaultValue: e.defaultValue,
|
|
175
175
|
multiple: e.multiple,
|
|
176
176
|
validation: e.validation,
|
|
177
|
+
condition: e.condition,
|
|
177
178
|
required: e.required,
|
|
178
|
-
options: ((
|
|
179
|
+
options: ((o = e.options) == null ? void 0 : o.map((s) => ({
|
|
179
180
|
...s
|
|
180
181
|
}))) || null,
|
|
181
182
|
policies: e.policies,
|
|
@@ -189,8 +190,9 @@ const r = {
|
|
|
189
190
|
description: this.description,
|
|
190
191
|
helpText: this.helpText,
|
|
191
192
|
validation: this.validation,
|
|
193
|
+
condition: this.condition,
|
|
192
194
|
policies: this.policies
|
|
193
|
-
},
|
|
195
|
+
}, l = typeof this.defaultValue == "string" ? this.defaultValue : null, c = typeof this.defaultValue == "number" ? this.defaultValue : null, n = typeof this.defaultValue == "boolean" ? this.defaultValue : null;
|
|
194
196
|
switch (this.type) {
|
|
195
197
|
case "text":
|
|
196
198
|
if (this.multiple) {
|
|
@@ -217,7 +219,7 @@ const r = {
|
|
|
217
219
|
...s,
|
|
218
220
|
type: "text",
|
|
219
221
|
multiple: !1,
|
|
220
|
-
defaultValue:
|
|
222
|
+
defaultValue: l,
|
|
221
223
|
options: this.options ? this.options.map((i) => ({
|
|
222
224
|
id: i.id,
|
|
223
225
|
label: i.label,
|
|
@@ -312,7 +314,7 @@ const r = {
|
|
|
312
314
|
}
|
|
313
315
|
};
|
|
314
316
|
}, V = (e) => {
|
|
315
|
-
const a = [],
|
|
317
|
+
const a = [], o = [], s = [], l = [], c = [];
|
|
316
318
|
return {
|
|
317
319
|
id: e.id,
|
|
318
320
|
component: e.component,
|
|
@@ -321,10 +323,10 @@ const r = {
|
|
|
321
323
|
decide: e.decide,
|
|
322
324
|
targets: e.targets,
|
|
323
325
|
steps: a,
|
|
324
|
-
nodes:
|
|
326
|
+
nodes: o,
|
|
325
327
|
edges: s,
|
|
326
328
|
fields: c,
|
|
327
|
-
conditionals:
|
|
329
|
+
conditionals: l,
|
|
328
330
|
addStep(n, i) {
|
|
329
331
|
let t = i == null ? void 0 : i.node;
|
|
330
332
|
this.nodes.length === 0 && (t = h({ type: "origin" }, this), this.nodes.push(t));
|
package/dist/esm/server/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createEvent as i, createStore as v, createEffect as C, sample as n, attach as S } from "effector";
|
|
2
|
-
import { h as F } from "../../experience-instance-
|
|
2
|
+
import { h as F } from "../../experience-instance-C1Ky25uw.js";
|
|
3
3
|
function R() {
|
|
4
4
|
let c, p;
|
|
5
5
|
return {
|
|
@@ -23,7 +23,7 @@ function d(t) {
|
|
|
23
23
|
const e = parseFloat(`${t}`);
|
|
24
24
|
return isNaN(e) ? 0 : e;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function L(t) {
|
|
27
27
|
return `${t}`;
|
|
28
28
|
}
|
|
29
29
|
const ht = {
|
|
@@ -52,11 +52,11 @@ const ht = {
|
|
|
52
52
|
"%": (t, e) => d(t) % d(e),
|
|
53
53
|
// eslint-disable-next-line sonarjs/function-return-type
|
|
54
54
|
log: (t) => (console.log(t), t),
|
|
55
|
-
in: (t, e) => e ? O(e) ? e.indexOf(
|
|
56
|
-
cat: (...t) => t.map(
|
|
55
|
+
in: (t, e) => e ? O(e) ? e.indexOf(L(t)) !== -1 : w(e) ? e.includes(t) : !1 : !1,
|
|
56
|
+
cat: (...t) => t.map(L).join(""),
|
|
57
57
|
/* eslint-disable sonarjs/deprecation */
|
|
58
58
|
substr: (t, e, r) => {
|
|
59
|
-
const n =
|
|
59
|
+
const n = L(t), i = d(e);
|
|
60
60
|
if (r === void 0) return n.substr(i);
|
|
61
61
|
const c = d(r);
|
|
62
62
|
if (c < 0) {
|
|
@@ -82,7 +82,7 @@ const ht = {
|
|
|
82
82
|
return this;
|
|
83
83
|
if (typeof t == "number" && Array.isArray(this))
|
|
84
84
|
return t >= 0 && t < this.length ? this[t] : r;
|
|
85
|
-
const n =
|
|
85
|
+
const n = L(t);
|
|
86
86
|
if (n === "" || n === ".")
|
|
87
87
|
return this;
|
|
88
88
|
const i = n.split(".");
|
|
@@ -122,10 +122,10 @@ const ht = {
|
|
|
122
122
|
const [c, o] = t;
|
|
123
123
|
r = c, n = o;
|
|
124
124
|
}
|
|
125
|
-
return !O(r) || !O(n) ? !1 : new RegExp(r, n).test(
|
|
125
|
+
return !O(r) || !O(n) ? !1 : new RegExp(r, n).test(L(e));
|
|
126
126
|
},
|
|
127
127
|
throw(t) {
|
|
128
|
-
throw new Error(
|
|
128
|
+
throw new Error(L(t));
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
async function l(t, e) {
|
|
@@ -352,7 +352,7 @@ function X(t) {
|
|
|
352
352
|
const et = (t, e, r, n, i = /* @__PURE__ */ new Set()) => i.has(r.id) ? [] : (i.add(r.id), $(r) && !n ? [r] : e.filter((o) => o.sourceNodeId === r.id).flatMap((o) => {
|
|
353
353
|
const a = t.find((u) => u.id === o.destinationNodeId);
|
|
354
354
|
return a ? et(t, e, a, !1, i) : [];
|
|
355
|
-
})),
|
|
355
|
+
})), Mt = (t, e, r) => et(t, e, r, !0, /* @__PURE__ */ new Set()), nt = (t, e, r, n, i = /* @__PURE__ */ new Set()) => {
|
|
356
356
|
if (i.has(r.id)) return [-1, -1];
|
|
357
357
|
i.add(r.id);
|
|
358
358
|
const c = e.filter((u) => u.sourceNodeId === r.id);
|
|
@@ -371,7 +371,7 @@ const et = (t, e, r, n, i = /* @__PURE__ */ new Set()) => i.has(r.id) ? [] : (i.
|
|
|
371
371
|
E !== -1 && (o = Math.min(o, E + 1), a = Math.max(a, y + 1));
|
|
372
372
|
}
|
|
373
373
|
return o === 1 / 0 ? [-1, -1] : [o, a];
|
|
374
|
-
},
|
|
374
|
+
}, Lt = (t, e, r) => nt(t, e, r, !0, /* @__PURE__ */ new Set()), rt = (t, e, r, n = /* @__PURE__ */ new Set()) => {
|
|
375
375
|
if (n.has(r.id)) return [-1, -1];
|
|
376
376
|
if (n.add(r.id), r.type === "origin") return [0, 0];
|
|
377
377
|
const i = e.filter((a) => a.destinationNodeId === r.id);
|
|
@@ -420,7 +420,7 @@ const U = ft("experience-instance"), Ft = Q(
|
|
|
420
420
|
), C = F(
|
|
421
421
|
e.treeStore,
|
|
422
422
|
y,
|
|
423
|
-
({ nodes: s, edges: p }, g) => g ?
|
|
423
|
+
({ nodes: s, edges: p }, g) => g ? Mt(s, p, g) : []
|
|
424
424
|
), f = F(
|
|
425
425
|
e.treeStore,
|
|
426
426
|
y,
|
|
@@ -428,7 +428,7 @@ const U = ft("experience-instance"), Ft = Q(
|
|
|
428
428
|
), m = F(
|
|
429
429
|
e.treeStore,
|
|
430
430
|
y,
|
|
431
|
-
({ nodes: s, edges: p }, g) => g ?
|
|
431
|
+
({ nodes: s, edges: p }, g) => g ? Lt(s, p, g) : [-1, -1]
|
|
432
432
|
), x = U.store(!0), N = J(x, {
|
|
433
433
|
open: () => !0,
|
|
434
434
|
close: () => !1,
|
|
@@ -455,7 +455,7 @@ const U = ft("experience-instance"), Ft = Q(
|
|
|
455
455
|
}), T = _({
|
|
456
456
|
source: e.treeStore,
|
|
457
457
|
effect: async (s, p) => {
|
|
458
|
-
const g = s.nodes.find((
|
|
458
|
+
const g = s.nodes.find((M) => $(M) && M.stepId === p);
|
|
459
459
|
g && t.history.push({ experienceId: e.id, node: g });
|
|
460
460
|
}
|
|
461
461
|
}), V = _({
|
|
@@ -470,13 +470,13 @@ const U = ft("experience-instance"), Ft = Q(
|
|
|
470
470
|
effect: async ({ nodes: s, edges: p }, g) => K(g, s, p)
|
|
471
471
|
}), G = _({
|
|
472
472
|
source: e.treeStore,
|
|
473
|
-
effect: async ({ nodes: s, edges: p, conditionals: g },
|
|
474
|
-
if (!
|
|
473
|
+
effect: async ({ nodes: s, edges: p, conditionals: g }, M) => {
|
|
474
|
+
if (!M)
|
|
475
475
|
return;
|
|
476
|
-
const q = g.find((ut) => ut.id ===
|
|
476
|
+
const q = g.find((ut) => ut.id === M.conditionalId);
|
|
477
477
|
if (!q)
|
|
478
478
|
return;
|
|
479
|
-
const ct =
|
|
479
|
+
const ct = M.id, at = await yt(t, q.condition);
|
|
480
480
|
return Bt(!!at, ct, s, p);
|
|
481
481
|
}
|
|
482
482
|
}), st = v((s) => {
|
|
@@ -573,6 +573,7 @@ const U = ft("experience-instance"), Ft = Q(
|
|
|
573
573
|
filter: (s) => s ? X(s) : !0,
|
|
574
574
|
target: W
|
|
575
575
|
}), n(), {
|
|
576
|
+
id: Math.random().toString(36).substring(7),
|
|
576
577
|
// config
|
|
577
578
|
experienceId: e.id,
|
|
578
579
|
configStore: e.configStore,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("effector"),D=require("@withease/factories"),B=require("./supports-B6KShYPU.cjs"),M=require("./logger-BsmHUUw1.cjs"),ce=require("./object-BbFTsGh3.cjs");function ae(e){return typeof e=="number"&&!isNaN(e)}function F(e){return typeof e=="string"}function w(e){return Array.isArray(e)}function z(e){return e instanceof Promise}function V(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.keys(e).length===1}function g(e){if(ae(e))return e;const t=parseFloat(`${e}`);return isNaN(t)?0:t}function A(e){return`${e}`}const ue={"==":(e,t)=>e==t,"===":(e,t)=>e===t,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,">":(e,t)=>g(e)>g(t),">=":(e,t)=>g(e)>=g(t),"<":(e,t,r)=>{const n=g(e),i=g(t);if(r===void 0)return n<i;const c=g(r);return n<i&&i<c},"<=":(e,t,r)=>{const n=g(e),i=g(t);if(r===void 0)return n<=i;const c=g(r);return n<=i&&i<=c},"!!":async e=>await k(e),"!":async e=>!await k(e),"%":(e,t)=>g(e)%g(t),log:e=>(console.log(e),e),in:(e,t)=>t?F(t)?t.indexOf(A(e))!==-1:w(t)?t.includes(e):!1:!1,cat:(...e)=>e.map(A).join(""),substr:(e,t,r)=>{const n=A(e),i=g(t);if(r===void 0)return n.substr(i);const c=g(r);if(c<0){const o=n.substr(i);return o.substr(0,o.length+c)}return n.substr(i,c)},"+":(...e)=>e.reduce((t,r)=>g(t)+g(r),0),"*":(...e)=>e.reduce((t,r)=>g(t)*g(r),1),"-":(e,t)=>{const r=g(e);return t===void 0?-r:r-g(t)},"/":(e,t)=>g(e)/g(t),min:(...e)=>Math.min(...e.map(g)),max:(...e)=>Math.max(...e.map(g)),merge:(...e)=>e.reduce((t,r)=>w(r)?t.concat(r):t.concat([r]),[]),var(e,t){const r=arguments.length>1?t:null;if(e===""||e==="."||e===null||e===void 0)return this;if(typeof e=="number"&&Array.isArray(this))return e>=0&&e<this.length?this[e]:r;const n=A(e);if(n===""||n===".")return this;const i=n.split(".");let c=this;for(const o of i){if(c==null)return r;if(Array.isArray(c)){const u=parseInt(o,10);isNaN(u)?c=c[o]:c=c[u]}else c=c[o]}return c!==void 0?c:r},async missing(...e){const t=w(e[0])?e[0]:e,r=[];for(const n of t){const i=await d({var:n},this);(i===null||i==="")&&r.push(`${n}`)}return r},async missing_some(e,t){const r=await d({missing:t},this);if(!w(r)||!w(t))return[];const n=r.filter(F);return t.filter(F).length-n.length>=g(e)?[]:n},invoke(e){return typeof e!="function"?null:e()},regexp_matches(e,t){let r=e,n="";if(w(e)){const[c,o]=e;r=c,n=o}return!F(r)||!F(n)?!1:new RegExp(r,n).test(A(t))},throw(e){throw new Error(A(e))}};async function d(e,t){if(!e)return e;if(z(e))return d(await e,t);if(w(e))return Promise.all(e.map(o=>d(o,t)));if(!V(e))return e;const r=fe(e);let n=r?e[r]??[]:[];switch(w(n)||(n=[n]),r){case"if":case"?:":for(let o=0;o<n.length-1;o+=2)if(await k(await d(n[o],t)))return d(n[o+1],t);return n.length%2===1?d(n[n.length-1],t):null;case"and":{let o=null;for(const u of n)if(o=await d(u,t),!await k(o))return o;return o}case"or":{let o=null;for(const u of n)if(o=await d(u,t),await k(o))return o;return o}case"map":{const o=await d(n[0],t);return w(o)?await Promise.all(o.map(u=>d(n[1],u))):[]}case"filter":{const o=await d(n[0],t);return w(o)?(await Promise.all(o.map(async f=>{const S=await k(await d(n[1],f));return{item:f,shouldInclude:S}}))).filter(({shouldInclude:f})=>f).map(({item:f})=>f):[]}case"reduce":{const o=await d(n[0],t);if(!w(o))return n.length>2?await d(n[2],t):null;const u=n[1];let S=n.length>2?await d(n[2],t):null;for(const x of o)S=await d(u,{current:x,accumulator:S});return S}case"all":{const o=await d(n[0],t);if(!w(o)||o.length===0)return!1;for(const u of o)if(!await k(await d(n[1],u)))return!1;return!0}case"some":{const o=await d(n[0],t);if(!w(o))return!1;for(const u of o)if(await k(await d(n[1],u)))return!0;return!1}case"none":{const o=await d(n[0],t);if(!w(o))return!0;for(const u of o)if(await k(await d(n[1],u)))return!1;return!0}case"catch":try{return await d(n[0],t)}catch(o){return V(o)?await d(o,t):n[1]?await d(n[1],o):o instanceof Error?o.message:o}}const i=await Promise.all(n.map(o=>d(o,t))),c=r?ue[r]:void 0;if(!c)throw new Error(`Unrecognized operation ${r}`);return c.apply(t,i)}async function k(e){return z(e)?k(await e):!(Array.isArray(e)&&e.length===0)&&!!e}function fe(e){return Object.keys(e)[0]}function pe(e){return!ce.isEmpty(e)}async function X(e,t,r){const n=e.getStateSnapshot(),i=e.predicates.listStore.getState().reduce((u,f)=>({...u,[f.name]:()=>f.predicate(n)}),{}),c=e.features.listStore.getState().reduce((u,f)=>({...u,[f.id]:async()=>{const{bucket:S}=await f.getBucket();return S}}),{}),o={...r,responses:e.responses.getAllStore.getState(),location:typeof n.location=="object"?{hash:n.location.hash,host:n.location.host,hostname:n.location.hostname,href:n.location.href,origin:n.location.origin,pathname:n.location.pathname,port:n.location.port,protocol:n.location.protocol,search:n.location.search}:void 0,predicates:i,features:c};return await d(t,o)}function le(e){return!B.supportsWindow()||!B.supportsDocument()?[]:Array.from(window.document.querySelectorAll(e)).filter(t=>t instanceof HTMLElement)}function de(e){if(!B.supportsShadowRoot())throw new Error("Shadow DOM is not supported in this environment");return e.attachShadow({mode:"closed"})}function ge(){return new Promise((e,t)=>{if(!B.supportsDocument()){t();return}document.readyState!=="loading"?e():document.addEventListener("readystatechange",()=>e(),{once:!0})})}function me(e,t){const r=new MutationObserver(n=>{document.contains(e)||(r.disconnect(),t())});r.observe(document.body,{childList:!0,subtree:!0})}const O="picked-root",R="picked-target",he="picked-root";function Se(e,t){return[...e,{selector:`${he}[experience-id="${t}"]`,placement:"replace"}].flatMap(n=>{const i=le(n.selector).filter(c=>!Ee(c,t)&&!J(c,t));return{...n,elements:i}})}function ye(e,t){return e.flatMap(r=>r.elements.map(n=>Ie(n,r.placement,t)))}function we(e,t){e.classList.add(R),e.classList.add(`${R}-${t}`)}function Ee(e,t){return t?e.classList.contains(`${R}-${t}`):e.classList.contains(`${R}`)}function J(e,t){return t?e.classList.contains(`${O}-${t}`):e.classList.contains(O)}function xe(e){const t=document.createElement("div");return t.style.display="block",t.classList.add(O),t.classList.add(`${O}-${e}`),t}function Ie(e,t,r){let n;const i=xe(r);if(e instanceof Document)n=e.body.appendChild(i);else{switch(t){case"replace":e.replaceWith(i);break;case"before":e.before(i);break;case"after":e.after(i);break;case"prepend":e.prepend(i);break;default:e.append(i);break}n=i}return n}function ke(e){return e.type==="conditional"}function _(e){return e.type==="step"}function Ne(e){return e.type==="experience"}function W(e){return e.type==="origin"}const Q=(e,t,r,n,i=new Set)=>i.has(r.id)?[]:(i.add(r.id),_(r)&&!n?[r]:t.filter(o=>o.sourceNodeId===r.id).flatMap(o=>{const u=e.find(f=>f.id===o.destinationNodeId);return u?Q(e,t,u,!1,i):[]})),ve=(e,t,r)=>Q(e,t,r,!0,new Set),Y=(e,t,r,n,i=new Set)=>{if(i.has(r.id))return[-1,-1];i.add(r.id);const c=t.filter(f=>f.sourceNodeId===r.id);if(c.length===0)return[0,0];let o=1/0,u=-1/0;for(const f of c){const S=e.find(I=>I.id===f.destinationNodeId);if(!S)continue;const[x,y]=Y(e,t,S,!1,new Set(i));x!==-1&&(o=Math.min(o,x+1),u=Math.max(u,y+1))}return o===1/0?[-1,-1]:[o,u]},be=(e,t,r)=>Y(e,t,r,!0,new Set),Z=(e,t,r,n=new Set)=>{if(n.has(r.id))return[-1,-1];if(n.add(r.id),r.type==="origin")return[0,0];const i=t.filter(u=>u.destinationNodeId===r.id);if(i.length===0)return[-1,-1];let c=1/0,o=-1/0;for(const u of i){const f=e.find(y=>y.id===u.sourceNodeId);if(!f)continue;const[S,x]=Z(e,t,f,new Set(n));S!==-1&&(c=Math.min(c,S+1),o=Math.max(o,x+1))}return c===1/0?[-1,-1]:[c,o]},Ae=(e,t,r)=>Z(e,t,r,new Set),ee=e=>e.find(r=>r.type==="origin")||null,j=(e,t,r)=>{if(!e)return ee(t);const n=r.find(c=>c.sourceNodeId===e.id);if(!n)return null;const i=t.find(c=>c.id===n.destinationNodeId);return i||null};async function _e(e,t,r,n){const i=e?"true":"false",c=n.find(o=>o.sourceNodeHandle===i&&o.sourceNodeId===t);return r.find(o=>o.id===(c==null?void 0:c.destinationNodeId))}const q=a.createDomain("experience-instance"),Le=D.createFactory(({client:e,experience:t,target:r})=>{const n=a.createEvent(),i=a.createEvent(),c=a.createEvent(),o=a.createEvent(),u=t.componentStore,f=q.store("transitioning"),S=e.history.entriesStore.map(s=>s.filter(l=>l.experienceId===t.id)),x=S.map(s=>s.filter(l=>_(l.node))),y=S.map(s=>{var l;return((l=s[s.length-1])==null?void 0:l.node)||null}),I=a.combine(t.treeStore,y,({steps:s},l)=>s.find(m=>l&&_(l)&&m.id===l.stepId)||null),P=a.combine(t.treeStore,y,({nodes:s,edges:l},m)=>m?ve(s,l,m):[]),p=a.combine(t.treeStore,y,({nodes:s,edges:l},m)=>m?Ae(s,l,m):[-1,-1]),h=a.combine(t.treeStore,y,({nodes:s,edges:l},m)=>m?be(s,l,m):[-1,-1]),E=q.store(!0),N=a.createApi(E,{open:()=>!0,close:()=>!1,toggle:s=>!s,set:(s,l)=>l});a.sample({source:E,filter:Boolean,target:e.eventBus.prepend(()=>({type:"experience_open",experience:t}))}),a.sample({source:E,filter:s=>!s,target:e.eventBus.prepend(()=>({type:"experience_close",experience:t}))});const v=a.createEffect(async()=>{e.history.back({experienceId:t.id})}),L=a.attach({source:t.treeStore,effect:async(s,l)=>{const m=s.nodes.find(b=>_(b)&&b.stepId===l);m&&e.history.push({experienceId:t.id,node:m})}}),G=a.attach({source:y,effect:s=>{}}),$=a.attach({source:t.treeStore,effect:async({nodes:s})=>ee(s)}),C=a.attach({source:t.treeStore,effect:async({nodes:s,edges:l},m)=>j(m,s,l)}),H=a.attach({source:t.treeStore,effect:async({nodes:s,edges:l,conditionals:m},b)=>{if(!b)return;const U=m.find(ie=>ie.id===b.conditionalId);if(!U)return;const oe=b.id,se=await X(e,U.condition);return _e(!!se,oe,s,l)}}),ne=a.createEffect(s=>{if(s)return e.launchExperienceById(s.experienceId)}),K=a.attach({source:[y,t.treeStore],effect:async([s,{nodes:l,edges:m}])=>j(s,l,m)}),T=a.attach({source:[y,t.treeStore],effect:async([s,{nodes:l,edges:m}])=>j(s,l,m)}),re=a.createEffect(s=>{e.history.push({experienceId:t.id,node:s})});return a.split({source:y,match:s=>s?ke(s)?"condition":_(s)?"step":Ne(s)?"launchExperience":W(s)?"origin":"other":"none",cases:{none:$,origin:C,condition:H,step:G,launchExperience:ne,__:a.createEvent()}}),a.sample({clock:[H.doneData,C.doneData,$.doneData,T.doneData,K.doneData],filter:Boolean,target:re}),a.sample({clock:i,target:T}),a.sample({clock:i,source:I,target:e.eventBus.prepend(s=>({type:"step_submit",step:s??void 0,experience:t}))}),a.sample({clock:T.done,source:I,target:e.eventBus.prepend(s=>({type:"step_submit_success",step:s??void 0,experience:t}))}),a.sample({clock:T.fail,source:I,target:e.eventBus.prepend(s=>({type:"step_submit_error",step:s??void 0,experience:t}))}),a.sample({clock:c,target:v}),a.sample({clock:c,source:I,target:e.eventBus.prepend(s=>({type:"step_submit",step:s??void 0,experience:t}))}),a.sample({clock:o,target:L}),a.sample({source:a.combine([H.pending,C.pending,$.pending,T.pending]),fn:s=>s.some(Boolean)?"transitioning":"ready",target:f}),a.sample({clock:G.doneData,source:I,target:e.eventBus.prepend(s=>({type:"step_enter",step:s??void 0,experience:t}))}),a.sample({source:y,clock:n,filter:s=>s?W(s):!0,target:K}),n(),{experienceId:t.id,configStore:t.configStore,target:r,componentStore:u,stateStore:f,isOpenStore:E,open:N.open,close:N.close,toggleOpen:N.toggle,setOpen:N.set,treeStore:t.treeStore,currentNodeStore:y,currentStepStore:I,nextReachableStepNodesStore:P,stepsToOriginStore:p,stepsToLeafStore:h,goToNextStep:i,goToPreviousStep:c,goToStepById:o,stepsHistoryStore:x}});function te(e){return D.invoke(Le,e)}const Te=D.createFactory(({client:e})=>{const t=q.store({}),r=a.createEvent(),n=a.createEvent(),i=a.createEvent(),c=a.createApi(t,{register(p,h){const E=[...p[h.experienceId]??[]];return E.push(h),{...p,[h.experienceId]:E}},unregister(p,h){var v;const E=h.experienceId,N=(v=p[E])==null?void 0:v.filter(L=>L!==h);return{...p,[E]:N??[]}}}),o=a.createEffect(({experience:p,target:h})=>te({client:e,experience:p,target:h})),u=a.createEffect(p=>{c.register(p)}),f=a.createEffect(p=>{p.target&&me(p.target,()=>{i(p)})}),S=a.createEffect(p=>{c.unregister(p)}),x=a.createEffect(p=>{const h=p.componentStore.getState();if(!h){M.logger("warn","No app component registered. Skipping init.");return}const E=h.frameworkStore.getState();if(!E){M.logger("error",`No framework registered for component '${h.name}'. Skipping rendering.`);return}const N=p.target;if(!N){M.logger("error",`No target element registered for experience '${p.experienceId}'. Skipping rendering.`);return}const v=de(N);try{E.render(v,h.component,e,p)}catch(L){M.logger("error",L)}});a.sample({clock:r,target:o}),a.sample({clock:i,target:S}),a.sample({clock:o.doneData,target:[u,f,n]}),a.sample({clock:o.doneData,target:e.eventBus.prepend(p=>({type:"experience_initialized",experienceInstance:p}))}),a.sample({clock:n,target:x});function y(p,h){r({experience:p,target:h})}const I=t.map(p=>Object.values(p).flat());function P(p){return t.map(h=>h[p]||[],{skipVoid:!1})}return{spawn:y,getByExperienceId:P,listStore:I}});function Fe(e){return D.invoke(Te,e)}exports.createAppHosts=ye;exports.createExperienceInstance=te;exports.createExperienceInstanceIndex=Fe;exports.domInteractive=ge;exports.evaluateRuleLogic=X;exports.getTargetElements=Se;exports.isPickedRoot=J;exports.isRulesLogic=pe;exports.isStepNode=_;exports.tagTargetElement=we;
|
|
1
|
+
"use strict";const a=require("effector"),D=require("@withease/factories"),B=require("./supports-B6KShYPU.cjs"),F=require("./logger-BsmHUUw1.cjs"),ce=require("./object-BbFTsGh3.cjs");function ae(e){return typeof e=="number"&&!isNaN(e)}function M(e){return typeof e=="string"}function w(e){return Array.isArray(e)}function z(e){return e instanceof Promise}function V(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.keys(e).length===1}function g(e){if(ae(e))return e;const t=parseFloat(`${e}`);return isNaN(t)?0:t}function A(e){return`${e}`}const ue={"==":(e,t)=>e==t,"===":(e,t)=>e===t,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,">":(e,t)=>g(e)>g(t),">=":(e,t)=>g(e)>=g(t),"<":(e,t,r)=>{const n=g(e),i=g(t);if(r===void 0)return n<i;const c=g(r);return n<i&&i<c},"<=":(e,t,r)=>{const n=g(e),i=g(t);if(r===void 0)return n<=i;const c=g(r);return n<=i&&i<=c},"!!":async e=>await k(e),"!":async e=>!await k(e),"%":(e,t)=>g(e)%g(t),log:e=>(console.log(e),e),in:(e,t)=>t?M(t)?t.indexOf(A(e))!==-1:w(t)?t.includes(e):!1:!1,cat:(...e)=>e.map(A).join(""),substr:(e,t,r)=>{const n=A(e),i=g(t);if(r===void 0)return n.substr(i);const c=g(r);if(c<0){const o=n.substr(i);return o.substr(0,o.length+c)}return n.substr(i,c)},"+":(...e)=>e.reduce((t,r)=>g(t)+g(r),0),"*":(...e)=>e.reduce((t,r)=>g(t)*g(r),1),"-":(e,t)=>{const r=g(e);return t===void 0?-r:r-g(t)},"/":(e,t)=>g(e)/g(t),min:(...e)=>Math.min(...e.map(g)),max:(...e)=>Math.max(...e.map(g)),merge:(...e)=>e.reduce((t,r)=>w(r)?t.concat(r):t.concat([r]),[]),var(e,t){const r=arguments.length>1?t:null;if(e===""||e==="."||e===null||e===void 0)return this;if(typeof e=="number"&&Array.isArray(this))return e>=0&&e<this.length?this[e]:r;const n=A(e);if(n===""||n===".")return this;const i=n.split(".");let c=this;for(const o of i){if(c==null)return r;if(Array.isArray(c)){const u=parseInt(o,10);isNaN(u)?c=c[o]:c=c[u]}else c=c[o]}return c!==void 0?c:r},async missing(...e){const t=w(e[0])?e[0]:e,r=[];for(const n of t){const i=await d({var:n},this);(i===null||i==="")&&r.push(`${n}`)}return r},async missing_some(e,t){const r=await d({missing:t},this);if(!w(r)||!w(t))return[];const n=r.filter(M);return t.filter(M).length-n.length>=g(e)?[]:n},invoke(e){return typeof e!="function"?null:e()},regexp_matches(e,t){let r=e,n="";if(w(e)){const[c,o]=e;r=c,n=o}return!M(r)||!M(n)?!1:new RegExp(r,n).test(A(t))},throw(e){throw new Error(A(e))}};async function d(e,t){if(!e)return e;if(z(e))return d(await e,t);if(w(e))return Promise.all(e.map(o=>d(o,t)));if(!V(e))return e;const r=fe(e);let n=r?e[r]??[]:[];switch(w(n)||(n=[n]),r){case"if":case"?:":for(let o=0;o<n.length-1;o+=2)if(await k(await d(n[o],t)))return d(n[o+1],t);return n.length%2===1?d(n[n.length-1],t):null;case"and":{let o=null;for(const u of n)if(o=await d(u,t),!await k(o))return o;return o}case"or":{let o=null;for(const u of n)if(o=await d(u,t),await k(o))return o;return o}case"map":{const o=await d(n[0],t);return w(o)?await Promise.all(o.map(u=>d(n[1],u))):[]}case"filter":{const o=await d(n[0],t);return w(o)?(await Promise.all(o.map(async f=>{const S=await k(await d(n[1],f));return{item:f,shouldInclude:S}}))).filter(({shouldInclude:f})=>f).map(({item:f})=>f):[]}case"reduce":{const o=await d(n[0],t);if(!w(o))return n.length>2?await d(n[2],t):null;const u=n[1];let S=n.length>2?await d(n[2],t):null;for(const x of o)S=await d(u,{current:x,accumulator:S});return S}case"all":{const o=await d(n[0],t);if(!w(o)||o.length===0)return!1;for(const u of o)if(!await k(await d(n[1],u)))return!1;return!0}case"some":{const o=await d(n[0],t);if(!w(o))return!1;for(const u of o)if(await k(await d(n[1],u)))return!0;return!1}case"none":{const o=await d(n[0],t);if(!w(o))return!0;for(const u of o)if(await k(await d(n[1],u)))return!1;return!0}case"catch":try{return await d(n[0],t)}catch(o){return V(o)?await d(o,t):n[1]?await d(n[1],o):o instanceof Error?o.message:o}}const i=await Promise.all(n.map(o=>d(o,t))),c=r?ue[r]:void 0;if(!c)throw new Error(`Unrecognized operation ${r}`);return c.apply(t,i)}async function k(e){return z(e)?k(await e):!(Array.isArray(e)&&e.length===0)&&!!e}function fe(e){return Object.keys(e)[0]}function pe(e){return!ce.isEmpty(e)}async function X(e,t,r){const n=e.getStateSnapshot(),i=e.predicates.listStore.getState().reduce((u,f)=>({...u,[f.name]:()=>f.predicate(n)}),{}),c=e.features.listStore.getState().reduce((u,f)=>({...u,[f.id]:async()=>{const{bucket:S}=await f.getBucket();return S}}),{}),o={...r,responses:e.responses.getAllStore.getState(),location:typeof n.location=="object"?{hash:n.location.hash,host:n.location.host,hostname:n.location.hostname,href:n.location.href,origin:n.location.origin,pathname:n.location.pathname,port:n.location.port,protocol:n.location.protocol,search:n.location.search}:void 0,predicates:i,features:c};return await d(t,o)}function le(e){return!B.supportsWindow()||!B.supportsDocument()?[]:Array.from(window.document.querySelectorAll(e)).filter(t=>t instanceof HTMLElement)}function de(e){if(!B.supportsShadowRoot())throw new Error("Shadow DOM is not supported in this environment");return e.attachShadow({mode:"closed"})}function ge(){return new Promise((e,t)=>{if(!B.supportsDocument()){t();return}document.readyState!=="loading"?e():document.addEventListener("readystatechange",()=>e(),{once:!0})})}function me(e,t){const r=new MutationObserver(n=>{document.contains(e)||(r.disconnect(),t())});r.observe(document.body,{childList:!0,subtree:!0})}const O="picked-root",R="picked-target",he="picked-root";function Se(e,t){return[...e,{selector:`${he}[experience-id="${t}"]`,placement:"replace"}].flatMap(n=>{const i=le(n.selector).filter(c=>!Ee(c,t)&&!J(c,t));return{...n,elements:i}})}function ye(e,t){return e.flatMap(r=>r.elements.map(n=>Ie(n,r.placement,t)))}function we(e,t){e.classList.add(R),e.classList.add(`${R}-${t}`)}function Ee(e,t){return t?e.classList.contains(`${R}-${t}`):e.classList.contains(`${R}`)}function J(e,t){return t?e.classList.contains(`${O}-${t}`):e.classList.contains(O)}function xe(e){const t=document.createElement("div");return t.style.display="block",t.classList.add(O),t.classList.add(`${O}-${e}`),t}function Ie(e,t,r){let n;const i=xe(r);if(e instanceof Document)n=e.body.appendChild(i);else{switch(t){case"replace":e.replaceWith(i);break;case"before":e.before(i);break;case"after":e.after(i);break;case"prepend":e.prepend(i);break;default:e.append(i);break}n=i}return n}function ke(e){return e.type==="conditional"}function _(e){return e.type==="step"}function Ne(e){return e.type==="experience"}function W(e){return e.type==="origin"}const Q=(e,t,r,n,i=new Set)=>i.has(r.id)?[]:(i.add(r.id),_(r)&&!n?[r]:t.filter(o=>o.sourceNodeId===r.id).flatMap(o=>{const u=e.find(f=>f.id===o.destinationNodeId);return u?Q(e,t,u,!1,i):[]})),ve=(e,t,r)=>Q(e,t,r,!0,new Set),Y=(e,t,r,n,i=new Set)=>{if(i.has(r.id))return[-1,-1];i.add(r.id);const c=t.filter(f=>f.sourceNodeId===r.id);if(c.length===0)return[0,0];let o=1/0,u=-1/0;for(const f of c){const S=e.find(I=>I.id===f.destinationNodeId);if(!S)continue;const[x,y]=Y(e,t,S,!1,new Set(i));x!==-1&&(o=Math.min(o,x+1),u=Math.max(u,y+1))}return o===1/0?[-1,-1]:[o,u]},be=(e,t,r)=>Y(e,t,r,!0,new Set),Z=(e,t,r,n=new Set)=>{if(n.has(r.id))return[-1,-1];if(n.add(r.id),r.type==="origin")return[0,0];const i=t.filter(u=>u.destinationNodeId===r.id);if(i.length===0)return[-1,-1];let c=1/0,o=-1/0;for(const u of i){const f=e.find(y=>y.id===u.sourceNodeId);if(!f)continue;const[S,x]=Z(e,t,f,new Set(n));S!==-1&&(c=Math.min(c,S+1),o=Math.max(o,x+1))}return c===1/0?[-1,-1]:[c,o]},Ae=(e,t,r)=>Z(e,t,r,new Set),ee=e=>e.find(r=>r.type==="origin")||null,j=(e,t,r)=>{if(!e)return ee(t);const n=r.find(c=>c.sourceNodeId===e.id);if(!n)return null;const i=t.find(c=>c.id===n.destinationNodeId);return i||null};async function _e(e,t,r,n){const i=e?"true":"false",c=n.find(o=>o.sourceNodeHandle===i&&o.sourceNodeId===t);return r.find(o=>o.id===(c==null?void 0:c.destinationNodeId))}const q=a.createDomain("experience-instance"),Le=D.createFactory(({client:e,experience:t,target:r})=>{const n=a.createEvent(),i=a.createEvent(),c=a.createEvent(),o=a.createEvent(),u=t.componentStore,f=q.store("transitioning"),S=e.history.entriesStore.map(s=>s.filter(l=>l.experienceId===t.id)),x=S.map(s=>s.filter(l=>_(l.node))),y=S.map(s=>{var l;return((l=s[s.length-1])==null?void 0:l.node)||null}),I=a.combine(t.treeStore,y,({steps:s},l)=>s.find(m=>l&&_(l)&&m.id===l.stepId)||null),P=a.combine(t.treeStore,y,({nodes:s,edges:l},m)=>m?ve(s,l,m):[]),p=a.combine(t.treeStore,y,({nodes:s,edges:l},m)=>m?Ae(s,l,m):[-1,-1]),h=a.combine(t.treeStore,y,({nodes:s,edges:l},m)=>m?be(s,l,m):[-1,-1]),E=q.store(!0),N=a.createApi(E,{open:()=>!0,close:()=>!1,toggle:s=>!s,set:(s,l)=>l});a.sample({source:E,filter:Boolean,target:e.eventBus.prepend(()=>({type:"experience_open",experience:t}))}),a.sample({source:E,filter:s=>!s,target:e.eventBus.prepend(()=>({type:"experience_close",experience:t}))});const v=a.createEffect(async()=>{e.history.back({experienceId:t.id})}),L=a.attach({source:t.treeStore,effect:async(s,l)=>{const m=s.nodes.find(b=>_(b)&&b.stepId===l);m&&e.history.push({experienceId:t.id,node:m})}}),G=a.attach({source:y,effect:s=>{}}),$=a.attach({source:t.treeStore,effect:async({nodes:s})=>ee(s)}),C=a.attach({source:t.treeStore,effect:async({nodes:s,edges:l},m)=>j(m,s,l)}),H=a.attach({source:t.treeStore,effect:async({nodes:s,edges:l,conditionals:m},b)=>{if(!b)return;const U=m.find(ie=>ie.id===b.conditionalId);if(!U)return;const oe=b.id,se=await X(e,U.condition);return _e(!!se,oe,s,l)}}),ne=a.createEffect(s=>{if(s)return e.launchExperienceById(s.experienceId)}),K=a.attach({source:[y,t.treeStore],effect:async([s,{nodes:l,edges:m}])=>j(s,l,m)}),T=a.attach({source:[y,t.treeStore],effect:async([s,{nodes:l,edges:m}])=>j(s,l,m)}),re=a.createEffect(s=>{e.history.push({experienceId:t.id,node:s})});return a.split({source:y,match:s=>s?ke(s)?"condition":_(s)?"step":Ne(s)?"launchExperience":W(s)?"origin":"other":"none",cases:{none:$,origin:C,condition:H,step:G,launchExperience:ne,__:a.createEvent()}}),a.sample({clock:[H.doneData,C.doneData,$.doneData,T.doneData,K.doneData],filter:Boolean,target:re}),a.sample({clock:i,target:T}),a.sample({clock:i,source:I,target:e.eventBus.prepend(s=>({type:"step_submit",step:s??void 0,experience:t}))}),a.sample({clock:T.done,source:I,target:e.eventBus.prepend(s=>({type:"step_submit_success",step:s??void 0,experience:t}))}),a.sample({clock:T.fail,source:I,target:e.eventBus.prepend(s=>({type:"step_submit_error",step:s??void 0,experience:t}))}),a.sample({clock:c,target:v}),a.sample({clock:c,source:I,target:e.eventBus.prepend(s=>({type:"step_submit",step:s??void 0,experience:t}))}),a.sample({clock:o,target:L}),a.sample({source:a.combine([H.pending,C.pending,$.pending,T.pending]),fn:s=>s.some(Boolean)?"transitioning":"ready",target:f}),a.sample({clock:G.doneData,source:I,target:e.eventBus.prepend(s=>({type:"step_enter",step:s??void 0,experience:t}))}),a.sample({source:y,clock:n,filter:s=>s?W(s):!0,target:K}),n(),{id:Math.random().toString(36).substring(7),experienceId:t.id,configStore:t.configStore,target:r,componentStore:u,stateStore:f,isOpenStore:E,open:N.open,close:N.close,toggleOpen:N.toggle,setOpen:N.set,treeStore:t.treeStore,currentNodeStore:y,currentStepStore:I,nextReachableStepNodesStore:P,stepsToOriginStore:p,stepsToLeafStore:h,goToNextStep:i,goToPreviousStep:c,goToStepById:o,stepsHistoryStore:x}});function te(e){return D.invoke(Le,e)}const Te=D.createFactory(({client:e})=>{const t=q.store({}),r=a.createEvent(),n=a.createEvent(),i=a.createEvent(),c=a.createApi(t,{register(p,h){const E=[...p[h.experienceId]??[]];return E.push(h),{...p,[h.experienceId]:E}},unregister(p,h){var v;const E=h.experienceId,N=(v=p[E])==null?void 0:v.filter(L=>L!==h);return{...p,[E]:N??[]}}}),o=a.createEffect(({experience:p,target:h})=>te({client:e,experience:p,target:h})),u=a.createEffect(p=>{c.register(p)}),f=a.createEffect(p=>{p.target&&me(p.target,()=>{i(p)})}),S=a.createEffect(p=>{c.unregister(p)}),x=a.createEffect(p=>{const h=p.componentStore.getState();if(!h){F.logger("warn","No app component registered. Skipping init.");return}const E=h.frameworkStore.getState();if(!E){F.logger("error",`No framework registered for component '${h.name}'. Skipping rendering.`);return}const N=p.target;if(!N){F.logger("error",`No target element registered for experience '${p.experienceId}'. Skipping rendering.`);return}const v=de(N);try{E.render(v,h.component,e,p)}catch(L){F.logger("error",L)}});a.sample({clock:r,target:o}),a.sample({clock:i,target:S}),a.sample({clock:o.doneData,target:[u,f,n]}),a.sample({clock:o.doneData,target:e.eventBus.prepend(p=>({type:"experience_initialized",experienceInstance:p}))}),a.sample({clock:n,target:x});function y(p,h){r({experience:p,target:h})}const I=t.map(p=>Object.values(p).flat());function P(p){return t.map(h=>h[p]||[],{skipVoid:!1})}return{spawn:y,getByExperienceId:P,listStore:I}});function Me(e){return D.invoke(Te,e)}exports.createAppHosts=ye;exports.createExperienceInstance=te;exports.createExperienceInstanceIndex=Me;exports.domInteractive=ge;exports.evaluateRuleLogic=X;exports.getTargetElements=Se;exports.isPickedRoot=J;exports.isRulesLogic=pe;exports.isStepNode=_;exports.tagTargetElement=we;
|
|
@@ -11,6 +11,7 @@ declare const createExperienceInstanceFactory: ({ client, experience, target, }:
|
|
|
11
11
|
experience: ExperienceStore;
|
|
12
12
|
target?: HTMLElement;
|
|
13
13
|
}) => {
|
|
14
|
+
id: string;
|
|
14
15
|
experienceId: string;
|
|
15
16
|
configStore: import('effector').Store<{
|
|
16
17
|
type: string;
|
|
@@ -52,6 +53,7 @@ declare const createExperienceInstanceIndexFactory: ({ client }: {
|
|
|
52
53
|
}) => {
|
|
53
54
|
spawn: (experience: ExperienceStore, target: HTMLElement) => void;
|
|
54
55
|
getByExperienceId: (id: Experience["id"]) => import('effector').Store<{
|
|
56
|
+
id: string;
|
|
55
57
|
experienceId: string;
|
|
56
58
|
configStore: import('effector').Store<{
|
|
57
59
|
type: string;
|
|
@@ -88,6 +90,7 @@ declare const createExperienceInstanceIndexFactory: ({ client }: {
|
|
|
88
90
|
stepsHistoryStore: import('effector').Store<import('../..').HistoryEntry[]>;
|
|
89
91
|
}[]>;
|
|
90
92
|
listStore: import('effector').Store<{
|
|
93
|
+
id: string;
|
|
91
94
|
experienceId: string;
|
|
92
95
|
configStore: import('effector').Store<{
|
|
93
96
|
type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experience-instance.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience-instance/experience-instance.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAEV,UAAU,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAGjB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAmB1C,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAC5E,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAA;AACtF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB,SAAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;CACzC;AAED,QAAA,MAAM,+BAA+B,oCAKhC;IACD,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,eAAe,CAAA;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB
|
|
1
|
+
{"version":3,"file":"experience-instance.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience-instance/experience-instance.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAEV,UAAU,EACV,cAAc,EACd,eAAe,EACf,gBAAgB,EAGjB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAmB1C,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAC5E,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAA;AACtF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB,SAAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;CACzC;AAED,QAAA,MAAM,+BAA+B,oCAKhC;IACD,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,eAAe,CAAA;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoTF,CAAA;AAED,wBAAgB,wBAAwB,CACtC,CAAC,SAAS,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC,CAAC,CAAC,EAC/D,MAAM,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAE/D;AAED,QAAA,MAAM,oCAAoC,eAA8B;IA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A;QACV,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,OAAO,CAAA;KACf,EAAE,GACH,IAAI,CAAA;CACT;AAED,MAAM,MAAM,KAAK,GACb,iBAAiB,GACjB,iBAAiB,GACjB,mBAAmB,GACnB,mBAAmB,GAGnB,oBAAoB,GACpB,oBAAoB,CAAA;AAGxB,QAAA,MAAM,uBAAuB;sBAcF,KAAK,KAAG,IAAI;kBAQhB,SAAS,CAAC,IAAI,CAAC;;sBAIX,SAAS,CAAC,MAAM,CAAC;CAU1C,CAAA;AAEF,wBAAgB,gBAAgB,IAAI,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAE7E;AAED,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,EAAE,QAAQ,WAAW,KAAG,IAE9D,CAAA"}
|
|
@@ -2,6 +2,10 @@ import { Picked } from '../../picked';
|
|
|
2
2
|
import { Field, FieldValue } from '../field/field';
|
|
3
3
|
export type ResponsesStore = ReturnType<typeof createResponseIndex>;
|
|
4
4
|
export type Response = FieldValue;
|
|
5
|
+
export interface ResponseListItem {
|
|
6
|
+
fieldId: string;
|
|
7
|
+
value: Response | undefined;
|
|
8
|
+
}
|
|
5
9
|
declare const createResponseIndexFactory: ({ client }: {
|
|
6
10
|
client: Picked;
|
|
7
11
|
}) => {
|
|
@@ -11,6 +15,10 @@ declare const createResponseIndexFactory: ({ client }: {
|
|
|
11
15
|
commit: (responsesToCommit: CommitResponses) => Promise<{
|
|
12
16
|
errors: ValidationError[];
|
|
13
17
|
}>;
|
|
18
|
+
getResponsesToCommit: (responsesToCommit: CommitResponses) => Promise<{
|
|
19
|
+
responsesToCommit: CommitResponses;
|
|
20
|
+
validationErrors: ValidationError[];
|
|
21
|
+
}>;
|
|
14
22
|
listStore: import('effector').Store<{
|
|
15
23
|
fieldId: string;
|
|
16
24
|
value: FieldValue | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../../src/entities/response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,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
|
@@ -50,6 +50,7 @@ export declare class Picked {
|
|
|
50
50
|
readonly experienceInstances: {
|
|
51
51
|
spawn: (experience: import('.').ExperienceStore, target: HTMLElement) => void;
|
|
52
52
|
getByExperienceId: (id: Experience["id"]) => import('effector').Store<{
|
|
53
|
+
id: string;
|
|
53
54
|
experienceId: string;
|
|
54
55
|
configStore: import('effector').Store<{
|
|
55
56
|
type: string;
|
|
@@ -86,6 +87,7 @@ export declare class Picked {
|
|
|
86
87
|
stepsHistoryStore: import('effector').Store<import('.').HistoryEntry[]>;
|
|
87
88
|
}[]>;
|
|
88
89
|
listStore: import('effector').Store<{
|
|
90
|
+
id: string;
|
|
89
91
|
experienceId: string;
|
|
90
92
|
configStore: import('effector').Store<{
|
|
91
93
|
type: string;
|
|
@@ -194,12 +196,6 @@ export declare class Picked {
|
|
|
194
196
|
getByName: (name: string) => import('effector').Store<import('.').FeatureIndexItem | undefined>;
|
|
195
197
|
listStore: import('effector').Store<import('.').FeatureBucket[]>;
|
|
196
198
|
};
|
|
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
199
|
readonly responses: {
|
|
204
200
|
register: (fieldId: Field["id"], response: import('.').Response) => void;
|
|
205
201
|
clearAll: import('effector').EventCallable<void>;
|
|
@@ -207,6 +203,10 @@ export declare class Picked {
|
|
|
207
203
|
commit: (responsesToCommit: import('.').CommitResponses) => Promise<{
|
|
208
204
|
errors: import('.').ValidationError[];
|
|
209
205
|
}>;
|
|
206
|
+
getResponsesToCommit: (responsesToCommit: import('.').CommitResponses) => Promise<{
|
|
207
|
+
responsesToCommit: import('.').CommitResponses;
|
|
208
|
+
validationErrors: import('.').ValidationError[];
|
|
209
|
+
}>;
|
|
210
210
|
listStore: import('effector').Store<{
|
|
211
211
|
fieldId: string;
|
|
212
212
|
value: import('.').FieldValue | undefined;
|
|
@@ -217,6 +217,12 @@ export declare class Picked {
|
|
|
217
217
|
getByFieldId: (fieldId: Field["id"]) => import('effector').Store<import('.').FieldValue>;
|
|
218
218
|
getByFieldName: (fieldName: Field["name"]) => import('effector').Store<import('.').FieldValue>;
|
|
219
219
|
};
|
|
220
|
+
readonly fields: {
|
|
221
|
+
register: (field: Field) => void;
|
|
222
|
+
getById: (id: import('.').FieldBase["id"]) => import('effector').Store<Field | null>;
|
|
223
|
+
listStore: import('effector').Store<Field[]>;
|
|
224
|
+
getByName: (name: import('.').FieldBase["name"]) => import('effector').Store<Field | null>;
|
|
225
|
+
};
|
|
220
226
|
constructor(options: CreateClientOptions);
|
|
221
227
|
start(): void;
|
|
222
228
|
registerFramework(framework: Framework): void;
|
|
@@ -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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I9E,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIpC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAI9C,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS;IAIpD,aAAa,CAAC,KAAK,EAAE,KAAK;IAI1B,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAQhD,gBAAgB,IAAI,aAAa;IAI3B,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqB/D,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,aAAa;IA8CrB,OAAO,CAAC,eAAe;IAgBvB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAGzF"}
|
|
@@ -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;AACnD,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;IACh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SAAS,EAAE,MAAM,UAAU,CAAC,UAAU,CAAC,CAAA;CACxC;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,SAAS,CAAA;IACjB,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,gBAAgB,EACd,UAAU,GACV,iBAAiB,GACjB,mBAAmB,GACnB,MAAM,GACN,WAAW,GACX,UAAU,GACV,YAAY,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,
|
|
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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