@picked/client 0.0.1-dev.1772412203098 → 0.0.1-dev.1772493269328
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/api-Cn3XwsA6.js +32 -0
- package/dist/api-D-NB7WP7.cjs +1 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +582 -681
- package/dist/esm/plugins/create-experience/index.js +237 -209
- package/dist/esm/plugins/dynamic-experiences/index.js +71 -55
- package/dist/esm/plugins/experience-browser-storage/index.js +1 -1
- package/dist/esm/plugins/history-browser-storage/index.js +1 -1
- package/dist/esm/plugins/responses-browser-storage/index.js +1 -1
- package/dist/esm/plugins/responses-indexeddb/index.js +46 -51
- package/dist/esm/plugins/single-page-app/index.js +24 -24
- package/dist/esm/server/index.js +1 -1
- package/dist/experience-instance-BsXG5XJ4.cjs +1 -0
- package/dist/{experience-instance-DTyL1fNb.js → experience-instance-fvSEb72i.js} +199 -205
- package/dist/object-BbFTsGh3.cjs +1 -0
- package/dist/{object-CJssU1Pm.js → object-JwZ58NOH.js} +1 -1
- package/dist/storage-Be5xWNPC.cjs +1 -0
- package/dist/{storage-B2d81EOI.js → storage-Co_LbKr_.js} +30 -35
- package/dist/types/entities/action/action.d.ts +2 -5
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/experience/experience.d.ts +4 -4
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +14 -51
- 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/project/project.d.ts.map +1 -1
- package/dist/types/entities/response/response.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logic-engine.d.ts +8 -2
- package/dist/types/logic-engine.d.ts.map +1 -1
- package/dist/types/picked.d.ts +7 -16
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +21 -24
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/index.d.ts +1 -0
- package/dist/types/plugins/dynamic-experiences/index.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +2 -2
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/types.d.ts +4 -0
- package/dist/types/plugins/dynamic-experiences/types.d.ts.map +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts +1 -2
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts +1 -2
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +1 -2
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
- package/dist/types/utils/api.d.ts +1 -1
- package/dist/types/utils/api.d.ts.map +1 -1
- package/dist/types/utils/client-headers.d.ts +2 -0
- package/dist/types/utils/client-headers.d.ts.map +1 -0
- package/dist/types/utils/dom.d.ts +3 -0
- package/dist/types/utils/dom.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +1 -1
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/get-step-fields.d.ts +1 -2
- package/dist/types/utils/get-step-fields.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +1 -0
- package/dist/types/utils/global-obj.d.ts.map +1 -1
- package/dist/types/utils/indexed-db.d.ts +1 -2
- package/dist/types/utils/indexed-db.d.ts.map +1 -1
- package/dist/types/utils/logger.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
- package/dist/types/utils/object.d.ts +8 -0
- package/dist/types/utils/object.d.ts.map +1 -1
- package/dist/types/utils/picked-config.d.ts +1 -1
- package/dist/types/utils/picked-config.d.ts.map +1 -1
- package/dist/types/utils/rules-logic.d.ts.map +1 -1
- package/dist/types/utils/search-params.d.ts.map +1 -1
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/package.json +2 -14
- package/dist/api-CbXfbi_s.js +0 -19
- package/dist/api-DzSCgBQ2.cjs +0 -1
- package/dist/experience-instance-BX0aqKsC.cjs +0 -1
- package/dist/object-mwaxtjLG.cjs +0 -1
- package/dist/storage-58NoTSsc.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function c(t,e,n){if(!(e in t))return;const o=t[e];if(typeof o!="function")throw new Error(`Expected '${String(e)}' to be a function`);const r=n(o);p(r,o),t[e]=r}function i(t,e,n){Object.defineProperty(t,e,{enumerable:!1,value:n,writable:!0,configurable:!0})}function p(t,e){const n=e.prototype||{};t.prototype=e.prototype=n,i(t,"__picked_original",e)}function u(t){return t===void 0||typeof t=="object"&&t!==null&&t.constructor===Object&&Object.keys(t).length===0}exports.isEmpty=u;exports.patchMethod=c;
|
|
@@ -17,7 +17,7 @@ function c(t, e, n) {
|
|
|
17
17
|
}
|
|
18
18
|
function i(t, e) {
|
|
19
19
|
const n = e.prototype || {};
|
|
20
|
-
|
|
20
|
+
t.prototype = e.prototype = n, c(t, "__picked_original", e);
|
|
21
21
|
}
|
|
22
22
|
function u(t) {
|
|
23
23
|
return t === void 0 || typeof t == "object" && t !== null && t.constructor === Object && Object.keys(t).length === 0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=e=>btoa([...e].map(t=>String.fromCharCode(t.charCodeAt(0)^7)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");function w(e,t="global",o){let r="pckd";if(t==="experience"){if(!o)throw new Error("Experience instance is required to scope storage to an experience");r=`${r}:${o.experienceId}`}return{_:`${r}:${p(e)}`,scope:t}}const a=new Map;function m(e,t){const o=a.get(e._);o&&o.forEach(r=>r(e,t))}function S(e,t,o,r){const i=o==="local"?localStorage:sessionStorage,c=typeof t!="string"?JSON.stringify(t):t;if(i.setItem(e._,c),typeof r=="number"){const s=new Date(Date.now()+r).toISOString();i.setItem(`${e._}:expires-at`,s)}m(e,o)}function b(e,t){const o=t==="local"?localStorage:sessionStorage;o.removeItem(e._),o.removeItem(`${e._}:expires-at`),m(e,t)}function f(e,t,o,r){const i=t==="local"?localStorage:sessionStorage;function c(s){s.storageArea===i&&s.key===e._&&r(o(e))}function l(s,n){n===t&&r(o(s))}return window.addEventListener("storage",c),a.has(e._)||a.set(e._,new Set),a.get(e._).add(l),function(){window.removeEventListener("storage",c);const n=a.get(e._);n&&(n.delete(l),n.size===0&&a.delete(e._))}}function g(e,t){const o=t==="local"?localStorage:sessionStorage,r=o.getItem(e._),i=o.getItem(`${e._}:expires-at`),c=(n,u)=>S(e,n,t,u),l=()=>b(e,t),s=n=>f(e,t,u=>g(u,t),n);if(i){const n=new Date,u=new Date(i);if(n>u)return b(e,t),{isSet:()=>!1,text:()=>null,json:()=>null,boolean:()=>null,set:c,remove:l,subscribe:s}}return{isSet(){return r!==null},text(){return r},json(){return r?JSON.parse(r):null},boolean(){return r?r==="true":null},set:c,remove:l,subscribe:s}}const d={get(e){return g(e,"session")},set(e,t,o){S(e,t,"session",o)},remove(e){b(e,"session")},subscribe(e,t){return f(e,"session",this.get,t)}},_={get(e){return g(e,"local")},set(e,t,o){S(e,t,"local",o)},remove(e){b(e,"local")},subscribe(e,t){return f(e,"local",this.get,t)}};exports.createStorageKey=w;exports.localStore=_;exports.sessionStore=d;exports.subscribe=f;
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
const m = (e) => (
|
|
2
|
-
// eslint-disable-next-line no-bitwise -- XOR cipher for cookie consent banner detection avoidance
|
|
3
|
-
btoa([...e].map((t) => String.fromCharCode(t.charCodeAt(0) ^ 7)).join("")).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "")
|
|
4
|
-
);
|
|
1
|
+
const m = (e) => btoa([...e].map((t) => String.fromCharCode(t.charCodeAt(0) ^ 7)).join("")).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
5
2
|
function w(e, t = "global", o) {
|
|
6
|
-
let
|
|
3
|
+
let r = "pckd";
|
|
7
4
|
if (t === "experience") {
|
|
8
5
|
if (!o)
|
|
9
6
|
throw new Error("Experience instance is required to scope storage to an experience");
|
|
10
|
-
|
|
7
|
+
r = `${r}:${o.experienceId}`;
|
|
11
8
|
}
|
|
12
|
-
return { _: `${
|
|
9
|
+
return { _: `${r}:${m(e)}`, scope: t };
|
|
13
10
|
}
|
|
14
|
-
const
|
|
11
|
+
const l = /* @__PURE__ */ new Map();
|
|
15
12
|
function p(e, t) {
|
|
16
|
-
const o =
|
|
17
|
-
o && o.forEach((
|
|
13
|
+
const o = l.get(e._);
|
|
14
|
+
o && o.forEach((r) => r(e, t));
|
|
18
15
|
}
|
|
19
|
-
function b(e, t, o,
|
|
16
|
+
function b(e, t, o, r) {
|
|
20
17
|
const i = o === "local" ? localStorage : sessionStorage, c = typeof t != "string" ? JSON.stringify(t) : t;
|
|
21
|
-
if (i.setItem(e._, c), typeof
|
|
22
|
-
const
|
|
23
|
-
i.setItem(`${e._}:expires-at`,
|
|
18
|
+
if (i.setItem(e._, c), typeof r == "number") {
|
|
19
|
+
const s = new Date(Date.now() + r).toISOString();
|
|
20
|
+
i.setItem(`${e._}:expires-at`, s);
|
|
24
21
|
}
|
|
25
22
|
p(e, o);
|
|
26
23
|
}
|
|
@@ -28,53 +25,51 @@ function f(e, t) {
|
|
|
28
25
|
const o = t === "local" ? localStorage : sessionStorage;
|
|
29
26
|
o.removeItem(e._), o.removeItem(`${e._}:expires-at`), p(e, t);
|
|
30
27
|
}
|
|
31
|
-
function S(e, t, o,
|
|
28
|
+
function S(e, t, o, r) {
|
|
32
29
|
const i = t === "local" ? localStorage : sessionStorage;
|
|
33
|
-
function c(
|
|
34
|
-
|
|
30
|
+
function c(s) {
|
|
31
|
+
s.storageArea === i && s.key === e._ && r(o(e));
|
|
35
32
|
}
|
|
36
|
-
function
|
|
37
|
-
|
|
33
|
+
function a(s, n) {
|
|
34
|
+
n === t && r(o(s));
|
|
38
35
|
}
|
|
39
|
-
window.addEventListener("storage", c),
|
|
40
|
-
const a = u.get(e._);
|
|
41
|
-
return a && a.add(l), function() {
|
|
36
|
+
return window.addEventListener("storage", c), l.has(e._) || l.set(e._, /* @__PURE__ */ new Set()), l.get(e._).add(a), function() {
|
|
42
37
|
window.removeEventListener("storage", c);
|
|
43
|
-
const
|
|
44
|
-
|
|
38
|
+
const n = l.get(e._);
|
|
39
|
+
n && (n.delete(a), n.size === 0 && l.delete(e._));
|
|
45
40
|
};
|
|
46
41
|
}
|
|
47
42
|
function g(e, t) {
|
|
48
|
-
const o = t === "local" ? localStorage : sessionStorage,
|
|
43
|
+
const o = t === "local" ? localStorage : sessionStorage, r = o.getItem(e._), i = o.getItem(`${e._}:expires-at`), c = (n, u) => b(e, n, t, u), a = () => f(e, t), s = (n) => S(e, t, (u) => g(u, t), n);
|
|
49
44
|
if (i) {
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
45
|
+
const n = /* @__PURE__ */ new Date(), u = new Date(i);
|
|
46
|
+
if (n > u)
|
|
52
47
|
return f(e, t), {
|
|
53
48
|
isSet: () => !1,
|
|
54
49
|
text: () => null,
|
|
55
50
|
json: () => null,
|
|
56
51
|
boolean: () => null,
|
|
57
52
|
set: c,
|
|
58
|
-
remove:
|
|
59
|
-
subscribe:
|
|
53
|
+
remove: a,
|
|
54
|
+
subscribe: s
|
|
60
55
|
};
|
|
61
56
|
}
|
|
62
57
|
return {
|
|
63
58
|
isSet() {
|
|
64
|
-
return
|
|
59
|
+
return r !== null;
|
|
65
60
|
},
|
|
66
61
|
text() {
|
|
67
|
-
return
|
|
62
|
+
return r;
|
|
68
63
|
},
|
|
69
64
|
json() {
|
|
70
|
-
return
|
|
65
|
+
return r ? JSON.parse(r) : null;
|
|
71
66
|
},
|
|
72
67
|
boolean() {
|
|
73
|
-
return
|
|
68
|
+
return r ? r === "true" : null;
|
|
74
69
|
},
|
|
75
70
|
set: c,
|
|
76
|
-
remove:
|
|
77
|
-
subscribe:
|
|
71
|
+
remove: a,
|
|
72
|
+
subscribe: s
|
|
78
73
|
};
|
|
79
74
|
}
|
|
80
75
|
const d = {
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import { Store } from 'effector';
|
|
2
|
-
import { Picked } from '../../picked';
|
|
3
2
|
export type Action = <T = void>(params?: T) => void;
|
|
4
3
|
export type ActionsStore = ReturnType<typeof createActionIndexFactory>;
|
|
5
4
|
export interface ActionIndexItem {
|
|
6
5
|
name: string;
|
|
7
6
|
action: Action;
|
|
8
7
|
}
|
|
9
|
-
declare const createActionIndexFactory: (
|
|
10
|
-
client: Picked;
|
|
11
|
-
}) => {
|
|
8
|
+
declare const createActionIndexFactory: () => {
|
|
12
9
|
register: (name: string, action: Action) => void;
|
|
13
10
|
getByName: (name: string) => Store<ActionIndexItem | undefined>;
|
|
14
11
|
listStore: Store<ActionIndexItem[]>;
|
|
15
12
|
getEvokableAction: (actionName: string) => Store<(<T = void>(params?: T) => void) | undefined>;
|
|
16
13
|
};
|
|
17
|
-
export declare function createActionIndex
|
|
14
|
+
export declare function createActionIndex(): ReturnType<typeof createActionIndexFactory>;
|
|
18
15
|
export declare const setupAction: (name: string, action: Action, actions: ActionsStore) => void;
|
|
19
16
|
export {};
|
|
20
17
|
//# sourceMappingURL=action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/entities/action/action.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/entities/action/action.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;AAG9D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;AACnD,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAItE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,QAAA,MAAM,wBAAwB;qBAiBJ,MAAM,UAAU,MAAM,KAAG,IAAI;sBAQ5B,MAAM;;oCAIQ,MAAM,KAAG,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAgBnG,CAAA;AAEF,wBAAgB,iBAAiB,IAAI,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAE/E;AAED,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,EAAE,SAAS,YAAY,KAAG,IAEjF,CAAA"}
|
|
@@ -11,7 +11,7 @@ declare const createExperienceFactory: ({ client, experience }: {
|
|
|
11
11
|
id: string;
|
|
12
12
|
configStore: import('effector').Store<{
|
|
13
13
|
name: string;
|
|
14
|
-
decisionLogic: string | number | boolean |
|
|
14
|
+
decisionLogic: string | number | boolean | import('../../logic-engine').LogicArray | import('../../logic-engine').LogicObject | (() => LogicValue) | Promise<import('../../logic-engine').SyncLogicValue> | undefined;
|
|
15
15
|
targetSelectors: ExperienceTarget[];
|
|
16
16
|
initializeOpenLogic: LogicValue | LogicRule;
|
|
17
17
|
}>;
|
|
@@ -53,7 +53,7 @@ declare const createExperienceIndexFactory: ({ client }: {
|
|
|
53
53
|
id: string;
|
|
54
54
|
configStore: import('effector').Store<{
|
|
55
55
|
name: string;
|
|
56
|
-
decisionLogic: string | number | boolean |
|
|
56
|
+
decisionLogic: string | number | boolean | import('../../logic-engine').LogicArray | import('../../logic-engine').LogicObject | (() => LogicValue) | Promise<import('../../logic-engine').SyncLogicValue> | undefined;
|
|
57
57
|
targetSelectors: ExperienceTarget[];
|
|
58
58
|
initializeOpenLogic: LogicValue | LogicRule;
|
|
59
59
|
}>;
|
|
@@ -80,7 +80,7 @@ declare const createExperienceIndexFactory: ({ client }: {
|
|
|
80
80
|
id: string;
|
|
81
81
|
configStore: import('effector').Store<{
|
|
82
82
|
name: string;
|
|
83
|
-
decisionLogic: string | number | boolean |
|
|
83
|
+
decisionLogic: string | number | boolean | import('../../logic-engine').LogicArray | import('../../logic-engine').LogicObject | (() => LogicValue) | Promise<import('../../logic-engine').SyncLogicValue> | undefined;
|
|
84
84
|
targetSelectors: ExperienceTarget[];
|
|
85
85
|
initializeOpenLogic: LogicValue | LogicRule;
|
|
86
86
|
}>;
|
|
@@ -117,7 +117,7 @@ declare const createExperienceIndexFactory: ({ client }: {
|
|
|
117
117
|
id: string;
|
|
118
118
|
configStore: import('effector').Store<{
|
|
119
119
|
name: string;
|
|
120
|
-
decisionLogic: string | number | boolean |
|
|
120
|
+
decisionLogic: string | number | boolean | import('../../logic-engine').LogicArray | import('../../logic-engine').LogicObject | (() => LogicValue) | Promise<import('../../logic-engine').SyncLogicValue> | undefined;
|
|
121
121
|
targetSelectors: ExperienceTarget[];
|
|
122
122
|
initializeOpenLogic: LogicValue | LogicRule;
|
|
123
123
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experience.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience/experience.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAC3E,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAIjE,QAAA,MAAM,uBAAuB,2BACF;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;oBAIjB,OAAO,CAAC,UAAU,CAAC;kBAAY,UAAU;;
|
|
1
|
+
{"version":3,"file":"experience.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience/experience.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAC3E,MAAM,MAAM,eAAe,GAAG,UAAU,C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CAAC,OAAO,CA4BjB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experience-instance.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience-instance/experience-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,aAAa,EAGlB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAiB1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAItD,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;IAC9B,WAAW,EAAE,eAAe,CAAC,aAAa,CAAC,CAAA;IAC3C,MAAM,EAAE,WAAW,GAAG,SAAS,CAAA;IAC/B,cAAc,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAA;IACjD,UAAU,EAAE,KAAK,CAAC,eAAe,GAAG,OAAO,CAAC,CAAA;IAC5C,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAC3B,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;IACzB,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;IAC1B,UAAU,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;IAC/B,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAA;IAC/B,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAA;IACvC,WAAW,EAAE,eAAe,CAAC,aAAa,CAAC,CAAA;IAC3C,gBAAgB,EAAE,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC9C,gBAAgB,EAAE,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC9C,iBAAiB,EAAE,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC/C,2BAA2B,EAAE,KAAK,CAAC,cAAc,EAAE,CAAC,CAAA;IACpD,kBAAkB,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAA;IACnC,gBAAgB,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAA;IACjC,YAAY,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;IACjC,gBAAgB,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;IACrC,YAAY,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IACnC,iBAAiB,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAA;CACzC;AAED,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,6CAMhC;IACD,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,eAAe,CAAA;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,uBAAuB,CAAA;CAClC,
|
|
1
|
+
{"version":3,"file":"experience-instance.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience-instance/experience-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,aAAa,EAGlB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAiB1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAItD,MAAM,WAAW,kBAAkB;IACj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EAAE,MAAM;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAC1D;AAED,MAAM,MAAM,aAAa,GAAG,uBAAuB,GAAG,qBAAqB,CAAA;AAK3E,QAAA,MAAM,yBAAyB,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;mBAgBvD,MAAM,WAAW,OAAO,KAAG,IAAI;kBAwMhC,MAAM;sBAOF,MAAM;;sCAKhB,MAAM,KAClB,KAAK,CAAC,MAAM,OAAO,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;CA2CrD,CAAA;AAEF,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC,CAAC,EAC1F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAE9C;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,SAAS,OAAO,EAAE,UAAU,aAAa,SAEnF,CAAA"}
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import { Store } from 'effector';
|
|
2
|
-
import {
|
|
3
|
-
import { Picked } from '../../picked';
|
|
2
|
+
import { LogicRule } from '../../logic-engine';
|
|
4
3
|
export type FieldsStore = ReturnType<typeof createFieldIndex>;
|
|
5
|
-
export type FieldOptionsStatus = 'idle' | 'loading' | 'resolved' | 'error' | 'waiting';
|
|
6
4
|
export type PrimitiveFieldValue = string | number | boolean | null;
|
|
7
|
-
export type FieldOptionValue = string | number | boolean;
|
|
8
|
-
export interface FieldOption<T = FieldOptionValue> {
|
|
9
|
-
id: string;
|
|
10
|
-
label: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
value: T;
|
|
13
|
-
condition?: LogicRule;
|
|
14
|
-
}
|
|
15
|
-
export type FieldOptionArray<T = FieldOptionValue> = FieldOption<T>[];
|
|
16
|
-
export type FieldOptions<T = FieldOptionValue> = FieldOptionArray<T> | LogicRule;
|
|
17
5
|
/**
|
|
18
6
|
* JSON-serializable value type for object fields.
|
|
19
7
|
* Recursively defines all valid JSON-serializable structures.
|
|
@@ -22,7 +10,7 @@ export type JsonValue = string | number | boolean | null | {
|
|
|
22
10
|
[key: string]: JsonValue;
|
|
23
11
|
} | JsonValue[];
|
|
24
12
|
export type FieldValue = PrimitiveFieldValue | PrimitiveFieldValue[] | JsonValue | JsonValue[];
|
|
25
|
-
export interface FieldBase<TOptionValue =
|
|
13
|
+
export interface FieldBase<TOptionValue = PrimitiveFieldValue> {
|
|
26
14
|
id: string;
|
|
27
15
|
name: string;
|
|
28
16
|
label: string;
|
|
@@ -39,16 +27,13 @@ export interface FieldBase<TOptionValue = JsonValue> {
|
|
|
39
27
|
doNotTrackValue?: boolean;
|
|
40
28
|
doNotStoreValue?: boolean;
|
|
41
29
|
};
|
|
42
|
-
options?:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* options: { if: [{ '==': [{ var: 'responses.city-selector-field' }, 'sydney'] }, { invoke: { var: 'actions.fetchSydneyEmployees' } }, ...] }
|
|
50
|
-
*/
|
|
51
|
-
dependsOn?: string[];
|
|
30
|
+
options?: {
|
|
31
|
+
id: string;
|
|
32
|
+
label: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
value: TOptionValue;
|
|
35
|
+
condition?: LogicRule;
|
|
36
|
+
}[] | null;
|
|
52
37
|
}
|
|
53
38
|
export interface FieldTextSingular extends FieldBase<string> {
|
|
54
39
|
type: 'text';
|
|
@@ -91,36 +76,14 @@ export interface FieldBooleanMultiple extends FieldBase<boolean> {
|
|
|
91
76
|
defaultValue?: boolean[];
|
|
92
77
|
}
|
|
93
78
|
export type Field = FieldTextSingular | FieldTextMultiple | FieldNumberSingular | FieldNumberMultiple | FieldObjectSingular | FieldObjectMultiple | FieldBooleanSingular | FieldBooleanMultiple;
|
|
94
|
-
|
|
95
|
-
* A field enriched with its runtime options resolution state.
|
|
96
|
-
* Returned by getById, getByName, and listStore — status is always present.
|
|
97
|
-
*/
|
|
98
|
-
export type FieldWithStatus = Field & {
|
|
99
|
-
status: FieldOptionsStatus;
|
|
100
|
-
options: FieldOptionArray<JsonValue> | null;
|
|
101
|
-
error?: string;
|
|
102
|
-
};
|
|
103
|
-
declare const createFieldIndexFactory: ({ client }: {
|
|
104
|
-
client?: Picked;
|
|
105
|
-
}) => {
|
|
79
|
+
declare const createFieldIndexFactory: () => {
|
|
106
80
|
register: (field: Field) => void;
|
|
107
81
|
update: (fieldId: FieldBase["id"], updates: Partial<Field>) => void;
|
|
108
|
-
getById: (id: FieldBase["id"]) => Store<
|
|
109
|
-
listStore: Store<
|
|
110
|
-
getByName: (name: FieldBase["name"]) => Store<
|
|
111
|
-
resolve: (fieldId: string, opts?: {
|
|
112
|
-
force?: boolean;
|
|
113
|
-
context?: LogicObject;
|
|
114
|
-
}) => void;
|
|
115
|
-
resolveAll: (fieldIds: string[], opts?: {
|
|
116
|
-
force?: boolean;
|
|
117
|
-
context?: LogicObject;
|
|
118
|
-
}) => void;
|
|
119
|
-
setWaiting: import('effector').EventCallable<string>;
|
|
82
|
+
getById: (id: FieldBase["id"]) => Store<Field | null>;
|
|
83
|
+
listStore: Store<Field[]>;
|
|
84
|
+
getByName: (name: FieldBase["name"]) => Store<Field | null>;
|
|
120
85
|
};
|
|
121
|
-
export declare function createFieldIndex(
|
|
122
|
-
client: Picked;
|
|
123
|
-
}): ReturnType<typeof createFieldIndexFactory>;
|
|
86
|
+
export declare function createFieldIndex(): ReturnType<typeof createFieldIndexFactory>;
|
|
124
87
|
export declare const setupField: (field: Field, fields: FieldsStore) => void;
|
|
125
88
|
export {};
|
|
126
89
|
//# sourceMappingURL=field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/entities/field/field.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1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AI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE,KAAK,CAAA;IACf,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,oBAAqB,SAAQ,SAAS,CAAC,OAAO,CAAC;IAC9D,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE,IAAI,CAAA;IACd,YAAY,CAAC,EAAE,OAAO,EAAE,CAAA;CACzB;AAED,MAAM,MAAM,KAAK,GACb,iBAAiB,GACjB,iBAAiB,GACjB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,CAAA;AAGxB,QAAA,MAAM,uBAAuB;sBAcF,KAAK,KAAG,IAAI;sBAcZ,SAAS,CAAC,IAAI,CAAC,WAAW,OAAO,CAAC,KAAK,CAAC,KAAG,IAAI;kBAmBnD,SAAS,CAAC,IAAI,CAAC;;sBAIX,SAAS,CAAC,MAAM,CAAC;CAW1C,CAAA;AAEF,wBAAgB,gBAAgB,IAAI,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAE7E;AAED,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,EAAE,QAAQ,WAAW,KAAG,IAE9D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/entities/history/history.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAM9D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;CACrB;
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/entities/history/history.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAM9D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;CACrB;AA2FD,wBAAgB,aAAa;;sBA1EsB,MAAM;cAAQ,cAAc;;;sBACzB,MAAM;cAAQ,cAAc;;;uBAC9B,MAAM;;;iBACT,YAAY,EAAE;;;EAyE9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../../src/entities/project/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAA;CAC/B;
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../../src/entities/project/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAA;CAC/B;AAED,eAAO,MAAM,iBAAiB,GAC5B,gBAAgB,MAAM,EACtB,WAAW,MAAM,KAChB,OAAO,CAAC,OAAO,CAOjB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../../src/entities/response/response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,KAAK,KAAK,EAAE,MAAM,UAAU,CAAA;AAE5F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,KAA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BAAgB,EAAE,eAAe,EAAE,CAAA;KAAE,CAAC;;;;;;;;;kBAkPxD,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC;SAExC,CAAC,SAAS,SAAS,WAAW,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC;;gCA6B9C,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/index.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export type * from './entities/predicate/predicate';
|
|
|
14
14
|
export type * from './entities/project/project';
|
|
15
15
|
export type * from './utils/state-snaphot';
|
|
16
16
|
export type * from './utils/events';
|
|
17
|
-
export type * from './utils/search-params';
|
|
18
17
|
export type * from './entities/response/response';
|
|
19
18
|
export { Picked } from './picked';
|
|
20
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,oCAAoC,CAAA;AACvD,mBAAmB,oDAAoD,CAAA;AACvE,mBAAmB,kCAAkC,CAAA;AACrD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,oCAAoC,CAAA;AACvD,mBAAmB,oDAAoD,CAAA;AACvE,mBAAmB,kCAAkC,CAAA;AACrD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,0BAA0B,CAAA;AAC7C,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,4BAA4B,CAAA;AAC/C,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,gBAAgB,CAAA;AACnC,mBAAmB,8BAA8B,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -8,14 +8,20 @@ export type LogicValue = SyncLogicValue | (() => LogicValue) | (() => Promise<Sy
|
|
|
8
8
|
export interface LogicObject {
|
|
9
9
|
[key: string]: LogicValue;
|
|
10
10
|
}
|
|
11
|
-
type LogicArray = Array<LogicValue>;
|
|
11
|
+
export type LogicArray = Array<LogicValue>;
|
|
12
12
|
export type LogicRuleValue = string | number | boolean | null | undefined | LogicRule | LogicRule[] | LogicRuleValue[];
|
|
13
13
|
export interface LogicRule {
|
|
14
14
|
[key: string]: LogicRuleValue | LogicRuleValue[];
|
|
15
15
|
}
|
|
16
|
+
export type ComparisonOperation = (a: LogicValue, b: LogicValue) => boolean;
|
|
17
|
+
export type NumericOperation = (a: number, b: number, c?: number) => boolean | number;
|
|
18
|
+
export type UnaryOperation = (a: LogicValue) => LogicValue;
|
|
19
|
+
export type StringOperation = (source: LogicValue, start: number, end?: number) => string;
|
|
20
|
+
export type ArrayOperation = (...args: LogicValue[]) => LogicValue[];
|
|
21
|
+
export type MathOperation = (...args: number[]) => number;
|
|
16
22
|
export type LogicContext = {
|
|
17
23
|
[key: string]: LogicValue;
|
|
18
24
|
} | LogicValue;
|
|
25
|
+
export type Operation = (this: LogicContext, ...args: LogicValue[]) => LogicValue | Promise<SyncLogicValue>;
|
|
19
26
|
export declare function apply(logic: LogicObject | LogicValue | undefined, data?: LogicContext): Promise<LogicValue>;
|
|
20
|
-
export {};
|
|
21
27
|
//# sourceMappingURL=logic-engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logic-engine.d.ts","sourceRoot":"","sources":["../../src/logic-engine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAAA;AAEpG,MAAM,MAAM,UAAU,GAClB,cAAc,GACd,CAAC,MAAM,UAAU,CAAC,GAClB,CAAC,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC,GAC/B,OAAO,CAAC,cAAc,CAAC,CAAA;AAE3B,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAC1B;AAED,
|
|
1
|
+
{"version":3,"file":"logic-engine.d.ts","sourceRoot":"","sources":["../../src/logic-engine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,OA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AC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;CAC1B,GACD,UAAU,CAAA;AAqCd,MAAM,MAAM,SAAS,GAAG,CACtB,IAAI,EAAE,YAAY,EAClB,GAAG,IAAI,EAAE,UAAU,EAAE,KAClB,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;AAuMzC,wBAAsB,KAAK,CACzB,KAAK,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,EAC3C,IAAI,CAAC,EAAE,YAAY,GAClB,OAAO,CAAC,UAAU,CAAC,CAoJrB"}
|
package/dist/types/picked.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare class Picked {
|
|
|
28
28
|
readonly session?: SessionStore | null;
|
|
29
29
|
readonly precondition?: LogicRule | boolean;
|
|
30
30
|
readonly condition?: LogicRule | boolean;
|
|
31
|
-
readonly searchParams: import('
|
|
31
|
+
readonly searchParams: import('./utils/search-params').PickedSearchParams;
|
|
32
32
|
readonly history: {
|
|
33
33
|
push: import('effector').EventCallable<{
|
|
34
34
|
experienceId: string;
|
|
@@ -69,7 +69,7 @@ export declare class Picked {
|
|
|
69
69
|
id: string;
|
|
70
70
|
configStore: import('effector').Store<{
|
|
71
71
|
name: string;
|
|
72
|
-
decisionLogic: string | number | boolean | import('./logic-engine').
|
|
72
|
+
decisionLogic: string | number | boolean | import('./logic-engine').LogicArray | import('./logic-engine').LogicObject | (() => import('./logic-engine').LogicValue) | Promise<import('./logic-engine').SyncLogicValue> | undefined;
|
|
73
73
|
targetSelectors: import('.').ExperienceTarget[];
|
|
74
74
|
initializeOpenLogic: import('./logic-engine').LogicValue | LogicRule;
|
|
75
75
|
}>;
|
|
@@ -95,7 +95,7 @@ export declare class Picked {
|
|
|
95
95
|
id: string;
|
|
96
96
|
configStore: import('effector').Store<{
|
|
97
97
|
name: string;
|
|
98
|
-
decisionLogic: string | number | boolean | import('./logic-engine').
|
|
98
|
+
decisionLogic: string | number | boolean | import('./logic-engine').LogicArray | import('./logic-engine').LogicObject | (() => import('./logic-engine').LogicValue) | Promise<import('./logic-engine').SyncLogicValue> | undefined;
|
|
99
99
|
targetSelectors: import('.').ExperienceTarget[];
|
|
100
100
|
initializeOpenLogic: import('./logic-engine').LogicValue | LogicRule;
|
|
101
101
|
}>;
|
|
@@ -129,7 +129,7 @@ export declare class Picked {
|
|
|
129
129
|
id: string;
|
|
130
130
|
configStore: import('effector').Store<{
|
|
131
131
|
name: string;
|
|
132
|
-
decisionLogic: string | number | boolean | import('./logic-engine').
|
|
132
|
+
decisionLogic: string | number | boolean | import('./logic-engine').LogicArray | import('./logic-engine').LogicObject | (() => import('./logic-engine').LogicValue) | Promise<import('./logic-engine').SyncLogicValue> | undefined;
|
|
133
133
|
targetSelectors: import('.').ExperienceTarget[];
|
|
134
134
|
initializeOpenLogic: import('./logic-engine').LogicValue | LogicRule;
|
|
135
135
|
}>;
|
|
@@ -203,18 +203,9 @@ export declare class Picked {
|
|
|
203
203
|
readonly fields: {
|
|
204
204
|
register: (field: Field) => void;
|
|
205
205
|
update: (fieldId: import('.').FieldBase["id"], updates: Partial<Field>) => void;
|
|
206
|
-
getById: (id: import('.').FieldBase["id"]) => import('effector').Store<
|
|
207
|
-
listStore: import('effector').Store<
|
|
208
|
-
getByName: (name: import('.').FieldBase["name"]) => import('effector').Store<
|
|
209
|
-
resolve: (fieldId: string, opts?: {
|
|
210
|
-
force?: boolean;
|
|
211
|
-
context?: import('./logic-engine').LogicObject;
|
|
212
|
-
}) => void;
|
|
213
|
-
resolveAll: (fieldIds: string[], opts?: {
|
|
214
|
-
force?: boolean;
|
|
215
|
-
context?: import('./logic-engine').LogicObject;
|
|
216
|
-
}) => void;
|
|
217
|
-
setWaiting: import('effector').EventCallable<string>;
|
|
206
|
+
getById: (id: import('.').FieldBase["id"]) => import('effector').Store<Field | null>;
|
|
207
|
+
listStore: import('effector').Store<Field[]>;
|
|
208
|
+
getByName: (name: import('.').FieldBase["name"]) => import('effector').Store<Field | null>;
|
|
218
209
|
};
|
|
219
210
|
readonly actions: {
|
|
220
211
|
register: (name: string, action: Action) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picked.d.ts","sourceRoot":"","sources":["../../src/picked.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,UAAU,EAEf,KAAK,uBAAuB,EAE7B,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;AAKzD,OAAO,EAAsB,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACjG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAOtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAK/C,qBAAa,MAAM;IACjB,MAAM,CAAC,QAAQ,CAAC,MAAM,0FAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAE7C,OAAO,UAAQ;IAEf,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwB;IAChD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA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AG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1F;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACH,YAAY,GAAI,UAAU,MAAM,EAAE,UAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAAM,CAY3E;CACF"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ActionNode, Experience, ExperienceConditional, ExperienceEdge, ExperienceNode, ExperienceStep, ExperienceTarget } from '../../entities/experience/experience';
|
|
2
2
|
import { AdaptedComponent } from '../../entities/component/component';
|
|
3
3
|
import { LogicRule, LogicValue } from '../../logic-engine';
|
|
4
|
-
import { Field,
|
|
4
|
+
import { Field, FieldBooleanMultiple, FieldBooleanSingular, FieldNumberMultiple, FieldNumberSingular, FieldObjectMultiple, FieldObjectSingular, FieldTextMultiple, FieldTextSingular, JsonValue } from '../../entities/field/field';
|
|
5
5
|
import { Serialized } from './serialization';
|
|
6
|
-
export type { FieldOptionValue, FieldOption, FieldOptionArray, FieldOptions };
|
|
7
6
|
export interface Nodeable {
|
|
8
7
|
node: SerializableNode | null;
|
|
9
8
|
}
|
|
@@ -98,53 +97,51 @@ export interface CreateConditionalOptions {
|
|
|
98
97
|
condition: LogicRule;
|
|
99
98
|
label?: string;
|
|
100
99
|
}
|
|
101
|
-
export
|
|
102
|
-
|
|
103
|
-
name: string;
|
|
104
|
-
type: 'text' | 'number' | 'boolean' | 'object';
|
|
105
|
-
label: string;
|
|
100
|
+
export type CreateFieldOptions = Omit<Field, 'options' | 'placeholder' | 'description' | 'helpText' | 'validation' | 'policies' | 'defaultValue'> & {
|
|
101
|
+
defaultValue?: string | number | boolean | object | null | string[] | number[] | boolean[] | object[];
|
|
106
102
|
placeholder?: string;
|
|
107
103
|
description?: string;
|
|
108
104
|
helpText?: string;
|
|
109
|
-
defaultValue?: T | T[] | null;
|
|
110
|
-
multiple: boolean;
|
|
111
105
|
validation?: LogicRule;
|
|
112
|
-
condition?: LogicRule;
|
|
113
|
-
required: boolean;
|
|
114
|
-
options?: FieldOptions<JsonValue>;
|
|
115
|
-
dependsOn?: string[];
|
|
116
106
|
policies?: {
|
|
117
107
|
doNotTrackValue?: boolean;
|
|
118
108
|
doNotStoreValue?: boolean;
|
|
119
109
|
};
|
|
120
|
-
|
|
121
|
-
|
|
110
|
+
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][] | Omit<NonNullable<FieldObjectSingular['options']>[number], 'id'>[] | Omit<NonNullable<FieldObjectMultiple['options']>[number], 'id'>[];
|
|
111
|
+
};
|
|
112
|
+
export type SerializableField<T extends JsonValue = JsonValue> = {
|
|
122
113
|
id: string;
|
|
123
114
|
name: string;
|
|
124
|
-
type: 'text' | 'number' | 'boolean' | 'object';
|
|
125
115
|
label: string;
|
|
116
|
+
type: 'text' | 'number' | 'object' | 'boolean';
|
|
117
|
+
multiple: boolean;
|
|
118
|
+
required: boolean;
|
|
119
|
+
defaultValue: string | number | boolean | object | null | string[] | number[] | boolean[] | object[];
|
|
126
120
|
placeholder?: string;
|
|
127
121
|
description?: string;
|
|
128
122
|
helpText?: string;
|
|
129
|
-
|
|
130
|
-
multiple: boolean;
|
|
131
|
-
validation?: LogicRule;
|
|
123
|
+
validation: LogicRule;
|
|
132
124
|
condition?: LogicRule;
|
|
133
|
-
required: boolean;
|
|
134
|
-
options: FieldOptionArray<JsonValue> | LogicRule | null;
|
|
135
|
-
dependsOn?: string[];
|
|
136
125
|
policies?: {
|
|
137
126
|
doNotTrackValue?: boolean;
|
|
138
127
|
doNotStoreValue?: boolean;
|
|
139
128
|
};
|
|
129
|
+
options: {
|
|
130
|
+
id: string;
|
|
131
|
+
label: string;
|
|
132
|
+
description?: string;
|
|
133
|
+
value: JsonValue;
|
|
134
|
+
condition?: LogicRule;
|
|
135
|
+
}[] | null;
|
|
140
136
|
/**
|
|
141
137
|
* Phantom type property for TypeScript type inference.
|
|
142
138
|
* This property never exists at runtime but enables type-safe field value access.
|
|
143
139
|
* @internal
|
|
144
140
|
*/
|
|
145
141
|
__fieldType?: T;
|
|
142
|
+
} & {
|
|
146
143
|
serialize: () => Serialized<Field>;
|
|
147
|
-
}
|
|
144
|
+
};
|
|
148
145
|
export interface SerializableExperience {
|
|
149
146
|
id: string;
|
|
150
147
|
component?: AdaptedComponent;
|
|
@@ -209,6 +206,6 @@ export declare const createConditional: (conditionalOptions: CreateConditionalOp
|
|
|
209
206
|
* const typedField = createField<MyData>({ type: 'object', ... })
|
|
210
207
|
* ```
|
|
211
208
|
*/
|
|
212
|
-
export declare const createField: <T extends JsonValue = JsonValue>(fieldOptions: CreateFieldOptions
|
|
209
|
+
export declare const createField: <T extends JsonValue = JsonValue>(fieldOptions: CreateFieldOptions) => SerializableField<T>;
|
|
213
210
|
export declare const createExperience: (experience: CreateExperienceOptions) => SerializableExperience;
|
|
214
211
|
//# sourceMappingURL=create-experience.d.ts.map
|