@picked/client 0.0.1-dev.1773807602703 → 0.0.1-dev.1773878362211
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-GlH9T8_1.js → api-4YC7Dkcf.js} +1 -1
- package/dist/{api-GvmToTw0.cjs → api-dQTozK5u.cjs} +1 -1
- package/dist/cjs/form/index.js +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/form/index.js +393 -0
- package/dist/esm/index.js +684 -771
- package/dist/esm/plugins/create-experience/index.js +284 -360
- package/dist/esm/plugins/dynamic-experiences/index.js +78 -145
- 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 +51 -46
- package/dist/esm/plugins/single-page-app/index.js +24 -24
- package/dist/esm/server/index.js +1 -1
- package/dist/experience-instance-Bd4kkjE6.js +559 -0
- package/dist/experience-instance-UAZPiG2b.cjs +1 -0
- package/dist/{object-JwZ58NOH.js → object-CJssU1Pm.js} +1 -1
- package/dist/object-mwaxtjLG.cjs +1 -0
- package/dist/rules-logic-CZfip-Wl.js +265 -0
- package/dist/rules-logic-Cgia6n5p.cjs +1 -0
- package/dist/storage-58NoTSsc.cjs +1 -0
- package/dist/{storage-Co_LbKr_.js → storage-B2d81EOI.js} +35 -30
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/experience/experience.d.ts +31 -48
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +2 -2
- 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 +12 -17
- 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 +7 -9
- package/dist/types/entities/response/response.d.ts.map +1 -1
- package/dist/types/form/build-responses.d.ts +14 -0
- package/dist/types/form/build-responses.d.ts.map +1 -0
- package/dist/types/form/create-field-evaluator.d.ts +19 -0
- package/dist/types/form/create-field-evaluator.d.ts.map +1 -0
- package/dist/types/form/create-field-validation.d.ts +44 -0
- package/dist/types/form/create-field-validation.d.ts.map +1 -0
- package/dist/types/form/create-form.d.ts +56 -0
- package/dist/types/form/create-form.d.ts.map +1 -0
- package/dist/types/form/create-submit-pipeline.d.ts +58 -0
- package/dist/types/form/create-submit-pipeline.d.ts.map +1 -0
- package/dist/types/form/get-step-fields.d.ts +5 -0
- package/dist/types/form/get-step-fields.d.ts.map +1 -0
- package/dist/types/form/index.d.ts +10 -0
- package/dist/types/form/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logic-engine.d.ts +2 -8
- package/dist/types/logic-engine.d.ts.map +1 -1
- package/dist/types/picked.d.ts +23 -41
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +41 -70
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/index.d.ts +1 -1
- package/dist/types/plugins/create-experience/index.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/plugin.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +5 -20
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/types.d.ts +0 -46
- package/dist/types/plugins/dynamic-experiences/types.d.ts.map +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts +2 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts +2 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +2 -1
- 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/dom.d.ts +0 -3
- package/dist/types/utils/dom.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +2 -2
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +0 -1
- package/dist/types/utils/global-obj.d.ts.map +1 -1
- package/dist/types/utils/indexed-db.d.ts +2 -1
- 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 +3 -3
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
- package/dist/types/utils/nodes.d.ts +2 -7
- package/dist/types/utils/nodes.d.ts.map +1 -1
- package/dist/types/utils/object.d.ts +0 -8
- 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/search-params.d.ts.map +1 -1
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/package.json +27 -3
- package/dist/experience-instance-CxiOyYPf.cjs +0 -1
- package/dist/experience-instance-DCknHRkX.js +0 -804
- package/dist/nodes-DQt4TfuO.js +0 -26
- package/dist/nodes-DsL8kMSX.cjs +0 -1
- package/dist/object-BbFTsGh3.cjs +0 -1
- package/dist/storage-Be5xWNPC.cjs +0 -1
- package/dist/types/entities/condition/condition.d.ts +0 -17
- package/dist/types/entities/condition/condition.d.ts.map +0 -1
- package/dist/types/entities/step/step.d.ts +0 -20
- package/dist/types/entities/step/step.d.ts.map +0 -1
- package/dist/types/utils/key.d.ts +0 -12
- package/dist/types/utils/key.d.ts.map +0 -1
package/dist/nodes-DQt4TfuO.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
function n(e) {
|
|
2
|
-
return e.type === "conditional";
|
|
3
|
-
}
|
|
4
|
-
function t(e) {
|
|
5
|
-
return e.type === "step";
|
|
6
|
-
}
|
|
7
|
-
function i(e) {
|
|
8
|
-
return e.type === "experience";
|
|
9
|
-
}
|
|
10
|
-
function o(e) {
|
|
11
|
-
return e.type === "origin";
|
|
12
|
-
}
|
|
13
|
-
function r(e) {
|
|
14
|
-
return e.type === "action";
|
|
15
|
-
}
|
|
16
|
-
function s(e) {
|
|
17
|
-
return e.stepKey || e.stepId || "";
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
o as a,
|
|
21
|
-
n as b,
|
|
22
|
-
r as c,
|
|
23
|
-
i as d,
|
|
24
|
-
t as i,
|
|
25
|
-
s as r
|
|
26
|
-
};
|
package/dist/nodes-DsL8kMSX.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function i(e){return e.type==="conditional"}function n(e){return e.type==="step"}function t(e){return e.type==="experience"}function o(e){return e.type==="origin"}function r(e){return e.type==="action"}function s(e){return e.stepKey||e.stepId||""}exports.isActionNode=r;exports.isConditionNode=i;exports.isLaunchExperienceNode=t;exports.isOriginNode=o;exports.isStepNode=n;exports.resolveStepKey=s;
|
package/dist/object-BbFTsGh3.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
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,17 +0,0 @@
|
|
|
1
|
-
import { LogicRule } from '../../logic-engine';
|
|
2
|
-
export type ConditionsStore = ReturnType<typeof createConditionIndex>;
|
|
3
|
-
export interface Condition {
|
|
4
|
-
id: string;
|
|
5
|
-
key: string;
|
|
6
|
-
name: string;
|
|
7
|
-
condition: LogicRule;
|
|
8
|
-
}
|
|
9
|
-
declare const createConditionIndexFactory: () => {
|
|
10
|
-
register: (condition: Condition) => void;
|
|
11
|
-
getById: (id: Condition["id"]) => import('effector').Store<Condition | null>;
|
|
12
|
-
getByKey: (key: Condition["key"]) => import('effector').Store<Condition | null>;
|
|
13
|
-
listStore: import('effector').Store<Condition[]>;
|
|
14
|
-
};
|
|
15
|
-
export declare function createConditionIndex(): ReturnType<typeof createConditionIndexFactory>;
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=condition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../../../src/entities/condition/condition.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEnD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAIrE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,SAAS,CAAA;CACrB;AAGD,QAAA,MAAM,2BAA2B;0BAcF,SAAS,KAAG,IAAI;kBAQxB,SAAS,CAAC,IAAI,CAAC;oBAIb,SAAS,CAAC,KAAK,CAAC;;CAYvC,CAAA;AAEF,wBAAgB,oBAAoB,IAAI,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAErF"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export type StepsStore = ReturnType<typeof createStepIndex>;
|
|
2
|
-
export interface ExperienceStep {
|
|
3
|
-
id: string;
|
|
4
|
-
key?: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
/** @deprecated Use `name` instead. Populated for backwards compatibility. */
|
|
7
|
-
label: string;
|
|
8
|
-
/** @deprecated Use `fieldKeys` instead. */
|
|
9
|
-
fieldIds?: string[];
|
|
10
|
-
fieldKeys?: string[];
|
|
11
|
-
}
|
|
12
|
-
declare const createStepIndexFactory: () => {
|
|
13
|
-
register: (step: ExperienceStep) => void;
|
|
14
|
-
getById: (id: ExperienceStep["id"]) => import('effector').Store<ExperienceStep | null>;
|
|
15
|
-
listStore: import('effector').Store<ExperienceStep[]>;
|
|
16
|
-
};
|
|
17
|
-
export declare function createStepIndex(): ReturnType<typeof createStepIndexFactory>;
|
|
18
|
-
export declare function setupStep(step: ExperienceStep, index: ReturnType<typeof createStepIndex>): void;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=step.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../../src/entities/step/step.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAA;AAI3D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAA;IACb,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB;AAGD,QAAA,MAAM,sBAAsB;qBAcF,cAAc,KAAG,IAAI;kBAQxB,cAAc,CAAC,IAAI,CAAC;;CASzC,CAAA;AAEF,wBAAgB,eAAe,IAAI,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAE3E;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,GAAG,IAAI,CAE/F"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** @file Utility for converting human-readable names to kebab-case keys. */
|
|
2
|
-
/**
|
|
3
|
-
* Converts a human-readable name to a kebab-case key.
|
|
4
|
-
*
|
|
5
|
-
* @param {string} name - The display name to convert (e.g. 'Email Address').
|
|
6
|
-
* @returns {string} Kebab-case key (e.g. 'email-address').
|
|
7
|
-
* @example
|
|
8
|
-
* nameToKey('Email Address') // 'email-address'
|
|
9
|
-
* nameToKey('Lead Capture') // 'lead-capture'
|
|
10
|
-
*/
|
|
11
|
-
export declare function nameToKey(name: string): string;
|
|
12
|
-
//# sourceMappingURL=key.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../../src/utils/key.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM9C"}
|