@picked/client 0.0.39-next.1 → 0.0.39-next.2

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.
@@ -0,0 +1 @@
1
+ "use strict";const i=require("effector"),W=require("@withease/factories"),j=require("./supports-YvpQZxbh.cjs"),x=require("./logger-BsmHUUw1.cjs"),Ee=require("./object-BbFTsGh3.cjs");function xe(e){return typeof e=="number"&&!isNaN(e)}function P(e){return typeof e=="string"}function E(e){return Array.isArray(e)}function ae(e){return e instanceof Promise}function oe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.keys(e).length===1}function m(e){if(xe(e))return e;const t=parseFloat(`${e}`);return isNaN(t)?0:t}function L(e){return`${e}`}const Ne={"==":(e,t)=>e==t,"===":(e,t)=>e===t,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,">":(e,t)=>m(e)>m(t),">=":(e,t)=>m(e)>=m(t),"<":(e,t,r)=>{const n=m(e),c=m(t);if(r===void 0)return n<c;const a=m(r);return n<c&&c<a},"<=":(e,t,r)=>{const n=m(e),c=m(t);if(r===void 0)return n<=c;const a=m(r);return n<=c&&c<=a},"!!":async e=>await b(e),"!":async e=>!await b(e),"%":(e,t)=>m(e)%m(t),log:e=>(console.log(e),e),in:(e,t)=>t?P(t)?t.indexOf(L(e))!==-1:E(t)?t.includes(e):!1:!1,cat:(...e)=>e.map(L).join(""),substr:(e,t,r)=>{const n=L(e),c=m(t);if(r===void 0)return n.substr(c);const a=m(r);if(a<0){const o=n.substr(c);return o.substr(0,o.length+a)}return n.substr(c,a)},"+":(...e)=>e.reduce((t,r)=>m(t)+m(r),0),"*":(...e)=>e.reduce((t,r)=>m(t)*m(r),1),"-":(e,t)=>{const r=m(e);return t===void 0?-r:r-m(t)},"/":(e,t)=>m(e)/m(t),min:(...e)=>Math.min(...e.map(m)),max:(...e)=>Math.max(...e.map(m)),merge:(...e)=>e.reduce((t,r)=>E(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=L(e);if(n===""||n===".")return this;const c=n.split(".");let a=this;for(const o of c){if(a==null)return r;if(Array.isArray(a)){const u=parseInt(o,10);isNaN(u)?a=a[o]:a=a[u]}else a=a[o]}return a!==void 0?a:r},async missing(...e){const t=E(e[0])?e[0]:e,r=[];for(const n of t){const c=await g({var:n},this);(c===null||c==="")&&r.push(`${n}`)}return r},async missing_some(e,t){const r=await g({missing:t},this);if(!E(r)||!E(t))return[];const n=r.filter(P);return t.filter(P).length-n.length>=m(e)?[]:n},invoke(...e){const[t,...r]=e;return typeof t!="function"?null:Reflect.apply(t,null,r)},regexp_matches(e,t){let r=e,n="";if(E(e)){const[a,o]=e;r=a,n=o}return!P(r)||!P(n)?!1:new RegExp(r,n).test(L(t))},throw(e){throw new Error(L(e))}};async function g(e,t){if(!e)return e;if(ae(e))return g(await e,t);if(E(e))return Promise.all(e.map(o=>g(o,t)));if(!oe(e))return e;const r=Ie(e);let n=r?e[r]??[]:[];switch(E(n)||(n=[n]),r){case"if":case"?:":for(let o=0;o<n.length-1;o+=2)if(await b(await g(n[o],t)))return g(n[o+1],t);return n.length%2===1?g(n[n.length-1],t):null;case"and":{let o=null;for(const u of n)if(o=await g(u,t),!await b(o))return o;return o}case"or":{let o=null;for(const u of n)if(o=await g(u,t),await b(o))return o;return o}case"map":{const o=await g(n[0],t);return E(o)?await Promise.all(o.map(u=>g(n[1],u))):[]}case"filter":{const o=await g(n[0],t);return E(o)?(await Promise.all(o.map(async p=>{const S=await b(await g(n[1],p));return{item:p,shouldInclude:S}}))).filter(({shouldInclude:p})=>p).map(({item:p})=>p):[]}case"reduce":{const o=await g(n[0],t);if(!E(o))return n.length>2?await g(n[2],t):null;const u=n[1];let S=n.length>2?await g(n[2],t):null;for(const k of o)S=await g(u,{current:k,accumulator:S});return S}case"all":{const o=await g(n[0],t);if(!E(o)||o.length===0)return!1;for(const u of o)if(!await b(await g(n[1],u)))return!1;return!0}case"some":{const o=await g(n[0],t);if(!E(o))return!1;for(const u of o)if(await b(await g(n[1],u)))return!0;return!1}case"none":{const o=await g(n[0],t);if(!E(o))return!0;for(const u of o)if(await b(await g(n[1],u)))return!1;return!0}case"catch":try{return await g(n[0],t)}catch(o){return oe(o)?await g(o,t):n[1]?await g(n[1],o):o instanceof Error?o.message:o}}const c=await Promise.all(n.map(o=>g(o,t))),a=r?Ne[r]:void 0;if(!a)throw new Error(`Unrecognized operation ${r}`);return a.apply(t,c)}async function b(e){return ae(e)?b(await e):!(Array.isArray(e)&&e.length===0)&&!!e}function Ie(e){return Object.keys(e)[0]}function ue(e){return!Ee.isEmpty(e)}async function Q(e,t,r){const n=e.getStateSnapshot(),c=e.predicates.listStore.getState().reduce((u,p)=>({...u,[p.name]:(...S)=>p.predicate({...n,args:S})}),{}),a=e.features.listStore.getState().reduce((u,p)=>({...u,[p.id]:async()=>{const{bucket:S}=await p.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:c,features:a};return await g(t,o)}function ke(e){return!j.supportsWindow()||!j.supportsDocument()?[]:Array.from(window.document.querySelectorAll(e)).filter(t=>t instanceof HTMLElement)}const ve="open";function be(e){if(!j.supportsShadowRoot())throw new Error("Shadow DOM is not supported in this environment");return e.attachShadow({mode:ve})}function Ae(){return new Promise((e,t)=>{if(!j.supportsDocument()){t();return}document.readyState!=="loading"?e():document.addEventListener("readystatechange",()=>e(),{once:!0})})}function Oe(e,t){const r=new MutationObserver(n=>{document.contains(e)||(r.disconnect(),t())});r.observe(document.body,{childList:!0,subtree:!0})}const q="picked-root",U="picked-target",Fe="picked-root";function Be(e,t){return[...e,{selector:`${Fe}[experience-id="${t}"]`,placement:"replace"}].flatMap(n=>{const c=ke(n.selector).filter(a=>!Te(a,t)&&!fe(a,t));return{...n,elements:c}})}function _e(e,t){return e.flatMap(r=>r.elements.map(n=>Le(n,r.placement,t)))}function $e(e,t){e.classList.add(U),e.classList.add(`${U}-${t}`)}function Te(e,t){return t?e.classList.contains(`${U}-${t}`):e.classList.contains(`${U}`)}function fe(e,t){return t?e.classList.contains(`${q}-${t}`):e.classList.contains(q)}function Me(e){const t=document.createElement("div");return t.style.display="block",t.classList.add(q),t.classList.add(`${q}-${e}`),t}function Le(e,t,r){let n;const c=Me(r);if(e instanceof Document)n=e.body.appendChild(c);else{switch(t){case"replace":e.replaceWith(c);break;case"before":e.before(c);break;case"after":e.after(c);break;case"prepend":e.prepend(c);break;default:e.append(c);break}n=c}return n}function se(e){return e.type==="conditional"}function $(e){return e.type==="step"}function ie(e){return e.type==="experience"}function X(e){return e.type==="origin"}function ce(e){return e.type==="action"}const le=(e,t,r,n,c=new Set)=>c.has(r.id)?[]:(c.add(r.id),$(r)&&!n?[r]:t.filter(o=>o.sourceNodeId===r.id).flatMap(o=>{const u=e.find(p=>p.id===o.destinationNodeId);return u?le(e,t,u,!1,c):[]})),De=(e,t,r)=>le(e,t,r,!0,new Set),de=(e,t,r,n,c=new Set)=>{if(c.has(r.id))return[-1,-1];c.add(r.id);const a=t.filter(p=>p.sourceNodeId===r.id);if(a.length===0)return[0,0];let o=1/0,u=-1/0;for(const p of a){const S=e.find(T=>T.id===p.destinationNodeId);if(!S)continue;const[k,O]=de(e,t,S,!1,new Set(c));k!==-1&&(o=Math.min(o,k+1),u=Math.max(u,O+1))}return o===1/0?[-1,-1]:[o,u]},Re=(e,t,r)=>de(e,t,r,!0,new Set),pe=(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 c=t.filter(u=>u.destinationNodeId===r.id);if(c.length===0)return[-1,-1];let a=1/0,o=-1/0;for(const u of c){const p=e.find(O=>O.id===u.sourceNodeId);if(!p)continue;const[S,k]=pe(e,t,p,new Set(n));S!==-1&&(a=Math.min(a,S+1),o=Math.max(o,k+1))}return a===1/0?[-1,-1]:[a,o]},Pe=(e,t,r)=>pe(e,t,r,new Set),ge=e=>e.find(r=>r.type==="origin")||null,J=(e,t,r)=>{if(!e)return ge(t);const n=r.find(a=>a.sourceNodeId===e.id);if(!n)return null;const c=t.find(a=>a.id===n.destinationNodeId);return c||null};async function He(e,t,r,n){const c=e?"true":"false",a=n.find(o=>o.sourceNodeHandle===c&&o.sourceNodeId===t);return r.find(o=>o.id===a?.destinationNodeId)}const Y=i.createDomain("experience-instance"),Ce=W.createFactory(({client:e,experience:t,target:r})=>{const n=i.createEvent(),c=i.createEvent(),a=i.createEvent(),o=i.createEvent(),u=i.createEvent(),p=i.createEvent(),S=t.componentStore,k=Y.store("transitioning"),O=e.history.entriesStore.map(s=>s.filter(d=>d.experienceId===t.id)),T=O.map(s=>s.filter(d=>$(d.node))),N=O.map(s=>s.at(-1)?.node||null),l=i.combine(t.treeStore,N,({steps:s},d)=>s.find(f=>d&&$(d)&&f.id===d.stepId)||null),h=i.combine(t.treeStore,T,({steps:s},d)=>{const f=d.at(-2);if(!f||!$(f.node))return null;const y=f.node;return s.find(B=>B.id===y.stepId)||null}),v=i.combine(t.treeStore,N,({nodes:s,edges:d},f)=>f?De(s,d,f):[]),M=i.combine(t.treeStore,N,({nodes:s,edges:d},f)=>f?Pe(s,d,f):[-1,-1]),D=i.combine(t.treeStore,N,({nodes:s,edges:d},f)=>f?Re(s,d,f):[-1,-1]),F=Y.store(!1),H=i.createApi(F,{open:()=>!0,close:()=>!1,toggle:s=>!s,set:(s,d)=>d}),Se=i.createEffect(async()=>{e.history.back({experienceId:t.id})}),he=i.attach({source:t.treeStore,effect:async(s,d)=>{const f=s.nodes.find(y=>$(y)&&y.stepId===d);f&&e.history.push({experienceId:t.id,node:f})}}),Z=i.attach({source:N,effect:s=>{}}),G=i.attach({source:t.treeStore,effect:async({nodes:s})=>ge(s)}),K=i.attach({source:t.treeStore,effect:async({nodes:s,edges:d},f)=>{if(X(f))return J(f,s,d)}}),V=i.attach({source:t.treeStore,effect:async({nodes:s,edges:d,conditionals:f},y)=>{if(!se(y))return;const B=f.find(A=>A.id===y.conditionalId);if(!B)return;const I=y.id,w=await Q(e,B.condition);return He(!!w,I,s,d)}}),ee=i.attach({source:t.treeStore,effect:async({nodes:s,edges:d},f)=>{if(!ce(f))return;const y=f.action;if(!y){x.logger("warn",`Action node ${f.id} has no action name`);return}const B=e.actions.getByName(y).getState();if(!B){x.logger("warn",`Action '${y}' not registered on client`);const I=d.find(w=>w.sourceNodeId===f.id&&w.sourceNodeHandle==="false");return I?s.find(w=>w.id===I.destinationNodeId):null}if(typeof B.action!="function"){x.logger("warn",`Action '${y}' is not a function`);const I=d.find(w=>w.sourceNodeId===f.id&&w.sourceNodeHandle==="false");return I?s.find(w=>w.id===I.destinationNodeId):null}try{x.logger("info",`Executing action: ${y}`),await B.action(y);const I=d.find(A=>A.sourceNodeId===f.id&&A.sourceNodeHandle==="true");if(!I)return x.logger("warn",`No 'true' edge found for action node ${f.id}`),null;const w=s.find(A=>A.id===I.destinationNodeId);return x.logger("info",`Action '${y}' succeeded, moving to node ${w?.id}`),w||null}catch(I){x.logger("warn",`Action '${y}' failed:`,I);const w=d.find(C=>C.sourceNodeId===f.id&&C.sourceNodeHandle==="false");if(!w)return x.logger("warn",`No 'false' edge found for action node ${f.id}`),null;const A=s.find(C=>C.id===w.destinationNodeId);return x.logger("info",`Action '${y}' failed, moving to node ${A?.id}`),A||null}}}),ye=i.createEffect(s=>{if(ie(s))return e.launchExperienceById(s.experienceId)}),te=i.attach({source:[N,t.treeStore],effect:async([s,{nodes:d,edges:f}])=>J(s,d,f)}),R=i.attach({source:[N,t.treeStore],effect:async([s,{nodes:d,edges:f}])=>J(s,d,f)}),we=i.createEffect(s=>{e.history.push({experienceId:t.id,node:s})}),ne=i.attach({source:t.configStore,effect:async({initializeOpenLogic:s})=>ue(s)?!!await Q(e,s):s??!1}),_=Object.freeze({id:Math.random().toString(36).substring(7),experienceId:t.id,configStore:t.configStore,target:r,componentStore:S,stateStore:k,isOpenStore:F,open:H.open,close:H.close,toggleOpen:H.toggle,setOpen:H.set,treeStore:t.treeStore,fieldsStore:t.fieldsStore,currentNodeStore:N,currentStepStore:l,previousStepStore:h,nextReachableStepNodesStore:v,stepsToOriginStore:M,stepsToLeafStore:D,goToNextStep:c,goToPreviousStep:a,goToStepById:o,stepsHistoryStore:T}),z=i.createEvent(),re=i.createEvent();return i.sample({source:N,target:z}),i.sample({clock:z,filter:s=>s===null,target:G}),i.sample({clock:z,filter:s=>s!==null,target:re}),i.split({source:re,match:s=>se(s)?"condition":$(s)?"step":ie(s)?"launchExperience":X(s)?"origin":ce(s)?"action":"other",cases:{origin:K,condition:V,step:Z,launchExperience:ye,action:ee,__:i.createEvent()}}),i.sample({clock:[V.doneData,K.doneData,G.doneData,R.doneData,te.doneData,ee.doneData],filter:Boolean,target:we}),i.sample({clock:c,target:R}),i.sample({clock:c,source:l,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_submit",step:s,experience:_}))}),i.sample({clock:R.done,source:l,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_submit_success",step:s,experience:_}))}),i.sample({clock:R.fail,source:l,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_submit_error",step:s,experience:_}))}),i.sample({clock:a,target:Se}),i.sample({clock:o,target:he}),i.sample({source:i.combine([V.pending,K.pending,G.pending,R.pending]),fn:s=>s.some(Boolean)?"transitioning":"ready",target:k}),i.sample({clock:Z.doneData,source:l,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_enter",step:s,experience:_}))}),i.sample({clock:p,target:ne}),i.sample({source:ne.doneData,fn:Boolean,target:F}),i.sample({source:N,clock:n,filter:s=>s?X(s):!0,target:te}),i.sample({source:F,filter:Boolean,target:n}),i.sample({source:F,filter:Boolean,target:e.eventBus.prepend(()=>({type:"experience_open",experience:_}))}),i.sample({source:F,filter:s=>!s,target:e.eventBus.prepend(()=>({type:"experience_close",experience:_}))}),i.sample({clock:u,target:[p]}),u(),_});function me(e){return W.invoke(Ce,e)}const je=W.createFactory(({client:e})=>{const t=Y.store({}),r=i.createEvent(),n=i.createEvent(),c=i.createEvent(),a=i.createApi(t,{register(l,h){const v=[...l[h.experienceId]??[]];return v.push(h),{...l,[h.experienceId]:v}},unregister(l,h){const v=h.experienceId,M=l[v]?.filter(D=>D!==h);return{...l,[v]:M??[]}}}),o=i.createEffect(({experience:l,target:h})=>me({client:e,experience:l,target:h})),u=i.createEffect(l=>{a.register(l)}),p=i.createEffect(l=>{l.target&&Oe(l.target,()=>{c(l)})}),S=i.createEffect(l=>{a.unregister(l)}),k=i.createEffect(l=>{const h=l.componentStore.getState();if(!h){x.logger("warn","No app component registered. Skipping init.");return}const v=h.frameworkStore.getState();if(!v){x.logger("error",`No framework registered for component '${h.name}'. Skipping rendering.`);return}const M=l.target;if(!M){x.logger("error",`No target element registered for experience '${l.experienceId}'. Skipping rendering.`);return}const D=be(M);try{v.render(D,h.component,e,l)}catch(F){x.logger("error",F)}});i.sample({clock:r,target:o}),i.sample({clock:c,target:S}),i.sample({clock:o.doneData,target:[u,p,n]}),i.sample({clock:o.doneData,target:e.eventBus.prepend(l=>({type:"experience_initialize",experience:l}))}),i.sample({clock:n,target:k});function O(l,h){r({experience:l,target:h})}const T=t.map(l=>Object.values(l).flat());function N(l){return t.map(h=>h[l]||[],{skipVoid:!1})}return{spawn:O,getByExperienceId:N,listStore:T}});function qe(e){return W.invoke(je,e)}exports.createAppHosts=_e;exports.createExperienceInstance=me;exports.createExperienceInstanceIndex=qe;exports.domInteractive=Ae;exports.evaluateRuleLogic=Q;exports.getTargetElements=Be;exports.isPickedRoot=fe;exports.isRulesLogic=ue;exports.isStepNode=$;exports.tagTargetElement=$e;
@@ -1,6 +1,32 @@
1
+ import { EventCallable, Store } from 'effector';
1
2
  import { Experience, ExperienceNode, ExperienceStep, ExperienceStore, ExperienceTarget } from '../experience/experience';
2
3
  import { Picked } from '../../picked';
3
- export type ExperienceInstance = ReturnType<typeof createExperienceInstance>;
4
+ import { HistoryEntry } from '../history/history';
5
+ export interface ExperienceInstance {
6
+ id: string;
7
+ experienceId: Experience['id'];
8
+ configStore: ExperienceStore['configStore'];
9
+ target: HTMLElement | undefined;
10
+ componentStore: ExperienceStore['componentStore'];
11
+ stateStore: Store<'transitioning' | 'ready'>;
12
+ isOpenStore: Store<boolean>;
13
+ open: EventCallable<void>;
14
+ close: EventCallable<void>;
15
+ toggleOpen: EventCallable<void>;
16
+ setOpen: EventCallable<boolean>;
17
+ treeStore: ExperienceStore['treeStore'];
18
+ fieldsStore: ExperienceStore['fieldsStore'];
19
+ currentNodeStore: Store<ExperienceNode | null>;
20
+ currentStepStore: Store<ExperienceStep | null>;
21
+ previousStepStore: Store<ExperienceStep | null>;
22
+ nextReachableStepNodesStore: Store<ExperienceNode[]>;
23
+ stepsToOriginStore: Store<number[]>;
24
+ stepsToLeafStore: Store<number[]>;
25
+ goToNextStep: EventCallable<void>;
26
+ goToPreviousStep: EventCallable<void>;
27
+ goToStepById: EventCallable<string>;
28
+ stepsHistoryStore: Store<HistoryEntry[]>;
29
+ }
4
30
  export type ExperienceInstanceIndex = ReturnType<typeof createExperienceInstanceIndex>;
5
31
  export interface ExperienceInstanceTarget {
6
32
  selector: HTMLElement[];
@@ -10,128 +36,14 @@ declare const createExperienceInstanceFactory: ({ client, experience, target, }:
10
36
  client: Picked;
11
37
  experience: ExperienceStore;
12
38
  target?: HTMLElement;
13
- }) => {
14
- id: string;
15
- experienceId: string;
16
- configStore: import('effector').Store<{
17
- name: string;
18
- decisionLogic: import('../../logic-engine').LogicRule | undefined;
19
- targetSelectors: ExperienceTarget[];
20
- initializeOpenLogic: import('../../logic-engine').LogicValue | import('../../logic-engine').LogicRule;
21
- }>;
22
- target: HTMLElement | undefined;
23
- componentStore: import('effector').Store<{
24
- name: string;
25
- component: import('../..').AdaptedComponent<string, unknown>;
26
- frameworkStore: import('effector').Store<import('../..').Framework | undefined>;
27
- } | undefined>;
28
- stateStore: import('effector').StoreWritable<"transitioning" | "ready">;
29
- isOpenStore: import('effector').StoreWritable<boolean>;
30
- open: import('effector').EventCallable<void>;
31
- close: import('effector').EventCallable<void>;
32
- toggleOpen: import('effector').EventCallable<void>;
33
- setOpen: import('effector').EventCallable<boolean>;
34
- treeStore: import('effector').Store<{
35
- steps: ExperienceStep[];
36
- nodes: ExperienceNode[];
37
- edges: import('../..').ExperienceEdge[];
38
- conditionals: import('../..').ExperienceConditional[];
39
- }>;
40
- fieldsStore: import('effector').Store<import('../..').Field[]>;
41
- currentNodeStore: import('effector').Store<ExperienceNode | null>;
42
- currentStepStore: import('effector').Store<ExperienceStep | null>;
43
- previousStepStore: import('effector').Store<ExperienceStep | null>;
44
- nextReachableStepNodesStore: import('effector').Store<ExperienceNode[]>;
45
- stepsToOriginStore: import('effector').Store<number[]>;
46
- stepsToLeafStore: import('effector').Store<number[]>;
47
- goToNextStep: import('effector').EventCallable<void>;
48
- goToPreviousStep: import('effector').EventCallable<void>;
49
- goToStepById: import('effector').EventCallable<string>;
50
- stepsHistoryStore: import('effector').Store<import('../..').HistoryEntry[]>;
51
- };
39
+ }) => Readonly<ExperienceInstance>;
52
40
  export declare function createExperienceInstance<T extends Parameters<typeof createExperienceInstanceFactory>[0]>(params: T): ReturnType<typeof createExperienceInstanceFactory>;
53
41
  declare const createExperienceInstanceIndexFactory: ({ client }: {
54
42
  client: Picked;
55
43
  }) => {
56
44
  spawn: (experience: ExperienceStore, target: HTMLElement) => void;
57
- getByExperienceId: (id: Experience["id"]) => import('effector').Store<{
58
- id: string;
59
- experienceId: string;
60
- configStore: import('effector').Store<{
61
- name: string;
62
- decisionLogic: import('../../logic-engine').LogicRule | undefined;
63
- targetSelectors: ExperienceTarget[];
64
- initializeOpenLogic: import('../../logic-engine').LogicValue | import('../../logic-engine').LogicRule;
65
- }>;
66
- target: HTMLElement | undefined;
67
- componentStore: import('effector').Store<{
68
- name: string;
69
- component: import('../..').AdaptedComponent<string, unknown>;
70
- frameworkStore: import('effector').Store<import('../..').Framework | undefined>;
71
- } | undefined>;
72
- stateStore: import('effector').StoreWritable<"transitioning" | "ready">;
73
- isOpenStore: import('effector').StoreWritable<boolean>;
74
- open: import('effector').EventCallable<void>;
75
- close: import('effector').EventCallable<void>;
76
- toggleOpen: import('effector').EventCallable<void>;
77
- setOpen: import('effector').EventCallable<boolean>;
78
- treeStore: import('effector').Store<{
79
- steps: ExperienceStep[];
80
- nodes: ExperienceNode[];
81
- edges: import('../..').ExperienceEdge[];
82
- conditionals: import('../..').ExperienceConditional[];
83
- }>;
84
- fieldsStore: import('effector').Store<import('../..').Field[]>;
85
- currentNodeStore: import('effector').Store<ExperienceNode | null>;
86
- currentStepStore: import('effector').Store<ExperienceStep | null>;
87
- previousStepStore: import('effector').Store<ExperienceStep | null>;
88
- nextReachableStepNodesStore: import('effector').Store<ExperienceNode[]>;
89
- stepsToOriginStore: import('effector').Store<number[]>;
90
- stepsToLeafStore: import('effector').Store<number[]>;
91
- goToNextStep: import('effector').EventCallable<void>;
92
- goToPreviousStep: import('effector').EventCallable<void>;
93
- goToStepById: import('effector').EventCallable<string>;
94
- stepsHistoryStore: import('effector').Store<import('../..').HistoryEntry[]>;
95
- }[]>;
96
- listStore: import('effector').Store<{
97
- id: string;
98
- experienceId: string;
99
- configStore: import('effector').Store<{
100
- name: string;
101
- decisionLogic: import('../../logic-engine').LogicRule | undefined;
102
- targetSelectors: ExperienceTarget[];
103
- initializeOpenLogic: import('../../logic-engine').LogicValue | import('../../logic-engine').LogicRule;
104
- }>;
105
- target: HTMLElement | undefined;
106
- componentStore: import('effector').Store<{
107
- name: string;
108
- component: import('../..').AdaptedComponent<string, unknown>;
109
- frameworkStore: import('effector').Store<import('../..').Framework | undefined>;
110
- } | undefined>;
111
- stateStore: import('effector').StoreWritable<"transitioning" | "ready">;
112
- isOpenStore: import('effector').StoreWritable<boolean>;
113
- open: import('effector').EventCallable<void>;
114
- close: import('effector').EventCallable<void>;
115
- toggleOpen: import('effector').EventCallable<void>;
116
- setOpen: import('effector').EventCallable<boolean>;
117
- treeStore: import('effector').Store<{
118
- steps: ExperienceStep[];
119
- nodes: ExperienceNode[];
120
- edges: import('../..').ExperienceEdge[];
121
- conditionals: import('../..').ExperienceConditional[];
122
- }>;
123
- fieldsStore: import('effector').Store<import('../..').Field[]>;
124
- currentNodeStore: import('effector').Store<ExperienceNode | null>;
125
- currentStepStore: import('effector').Store<ExperienceStep | null>;
126
- previousStepStore: import('effector').Store<ExperienceStep | null>;
127
- nextReachableStepNodesStore: import('effector').Store<ExperienceNode[]>;
128
- stepsToOriginStore: import('effector').Store<number[]>;
129
- stepsToLeafStore: import('effector').Store<number[]>;
130
- goToNextStep: import('effector').EventCallable<void>;
131
- goToPreviousStep: import('effector').EventCallable<void>;
132
- goToStepById: import('effector').EventCallable<string>;
133
- stepsHistoryStore: import('effector').Store<import('../..').HistoryEntry[]>;
134
- }[]>;
45
+ getByExperienceId: (id: Experience["id"]) => Store<ExperienceInstance[]>;
46
+ listStore: Store<ExperienceInstance[]>;
135
47
  };
136
48
  export declare function createExperienceInstanceIndex<T extends Parameters<typeof createExperienceInstanceIndexFactory>[0]>(params: T): ReturnType<typeof createExperienceInstanceIndexFactory>;
137
49
  export {};
@@ -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,cAAc,EACd,eAAe,EACf,gBAAgB,EAGjB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAoB1C,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAucF,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;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;wBAqI7D,eAAe,UAAU,WAAW;4BAQhC,UAAU,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS/C,CAAA;AAEF,wBAAgB,6BAA6B,CAC3C,CAAC,SAAS,UAAU,CAAC,OAAO,oCAAoC,CAAC,CAAC,CAAC,CAAC,EACpE,MAAM,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,oCAAoC,CAAC,CAEpE"}
1
+ {"version":3,"file":"experience-instance.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience-instance/experience-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,aAAa,EAClB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EACjB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAiB1C,OAAO,KAAK,EAAE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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,oCAKhC;IACD,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,eAAe,CAAA;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,iCAycF,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;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;wBAqI7D,eAAe,UAAU,WAAW;4BAQhC,UAAU,CAAC,IAAI,CAAC;;CAS/C,CAAA;AAEF,wBAAgB,6BAA6B,CAC3C,CAAC,SAAS,UAAU,CAAC,OAAO,oCAAoC,CAAC,CAAC,CAAC,CAAC,EACpE,MAAM,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,oCAAoC,CAAC,CAEpE"}
@@ -55,84 +55,8 @@ export declare class Picked {
55
55
  };
56
56
  readonly experienceInstances: {
57
57
  spawn: (experience: import('.').ExperienceStore, target: HTMLElement) => void;
58
- getByExperienceId: (id: Experience["id"]) => import('effector').Store<{
59
- id: string;
60
- experienceId: string;
61
- configStore: import('effector').Store<{
62
- name: string;
63
- decisionLogic: LogicRule | undefined;
64
- targetSelectors: import('.').ExperienceTarget[];
65
- initializeOpenLogic: import('./logic-engine').LogicValue | LogicRule;
66
- }>;
67
- target: HTMLElement | undefined;
68
- componentStore: import('effector').Store<{
69
- name: string;
70
- component: AdaptedComponent<string, unknown>;
71
- frameworkStore: import('effector').Store<Framework | undefined>;
72
- } | undefined>;
73
- stateStore: import('effector').StoreWritable<"transitioning" | "ready">;
74
- isOpenStore: import('effector').StoreWritable<boolean>;
75
- open: import('effector').EventCallable<void>;
76
- close: import('effector').EventCallable<void>;
77
- toggleOpen: import('effector').EventCallable<void>;
78
- setOpen: import('effector').EventCallable<boolean>;
79
- treeStore: import('effector').Store<{
80
- steps: import('.').ExperienceStep[];
81
- nodes: import('.').ExperienceNode[];
82
- edges: import('.').ExperienceEdge[];
83
- conditionals: import('.').ExperienceConditional[];
84
- }>;
85
- fieldsStore: import('effector').Store<Field[]>;
86
- currentNodeStore: import('effector').Store<import('.').ExperienceNode | null>;
87
- currentStepStore: import('effector').Store<import('.').ExperienceStep | null>;
88
- previousStepStore: import('effector').Store<import('.').ExperienceStep | null>;
89
- nextReachableStepNodesStore: import('effector').Store<import('.').ExperienceNode[]>;
90
- stepsToOriginStore: import('effector').Store<number[]>;
91
- stepsToLeafStore: import('effector').Store<number[]>;
92
- goToNextStep: import('effector').EventCallable<void>;
93
- goToPreviousStep: import('effector').EventCallable<void>;
94
- goToStepById: import('effector').EventCallable<string>;
95
- stepsHistoryStore: import('effector').Store<import('.').HistoryEntry[]>;
96
- }[]>;
97
- listStore: import('effector').Store<{
98
- id: string;
99
- experienceId: string;
100
- configStore: import('effector').Store<{
101
- name: string;
102
- decisionLogic: LogicRule | undefined;
103
- targetSelectors: import('.').ExperienceTarget[];
104
- initializeOpenLogic: import('./logic-engine').LogicValue | LogicRule;
105
- }>;
106
- target: HTMLElement | undefined;
107
- componentStore: import('effector').Store<{
108
- name: string;
109
- component: AdaptedComponent<string, unknown>;
110
- frameworkStore: import('effector').Store<Framework | undefined>;
111
- } | undefined>;
112
- stateStore: import('effector').StoreWritable<"transitioning" | "ready">;
113
- isOpenStore: import('effector').StoreWritable<boolean>;
114
- open: import('effector').EventCallable<void>;
115
- close: import('effector').EventCallable<void>;
116
- toggleOpen: import('effector').EventCallable<void>;
117
- setOpen: import('effector').EventCallable<boolean>;
118
- treeStore: import('effector').Store<{
119
- steps: import('.').ExperienceStep[];
120
- nodes: import('.').ExperienceNode[];
121
- edges: import('.').ExperienceEdge[];
122
- conditionals: import('.').ExperienceConditional[];
123
- }>;
124
- fieldsStore: import('effector').Store<Field[]>;
125
- currentNodeStore: import('effector').Store<import('.').ExperienceNode | null>;
126
- currentStepStore: import('effector').Store<import('.').ExperienceStep | null>;
127
- previousStepStore: import('effector').Store<import('.').ExperienceStep | null>;
128
- nextReachableStepNodesStore: import('effector').Store<import('.').ExperienceNode[]>;
129
- stepsToOriginStore: import('effector').Store<number[]>;
130
- stepsToLeafStore: import('effector').Store<number[]>;
131
- goToNextStep: import('effector').EventCallable<void>;
132
- goToPreviousStep: import('effector').EventCallable<void>;
133
- goToStepById: import('effector').EventCallable<string>;
134
- stepsHistoryStore: import('effector').Store<import('.').HistoryEntry[]>;
135
- }[]>;
58
+ getByExperienceId: (id: Experience["id"]) => import('effector').Store<import('.').ExperienceInstance[]>;
59
+ listStore: import('effector').Store<import('.').ExperienceInstance[]>;
136
60
  };
137
61
  readonly experiences: {
138
62
  register: (experience: Experience) => 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,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE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CAAC,IAAI,CAAC;IAqB/D,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,aAAa;IA8CrB,OAAO,CAAC,eAAe;IAgBvB,OAAO,CAAC,YAAY;IAgBpB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACH,YAAY,GAAI,UAAU,MAAM,EAAE,UAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAAM,CAY3E;CACF"}
@@ -1,5 +1,5 @@
1
1
  import { ValidationError } from '../entities/response/response';
2
- import { ExperienceStep, ExperienceStore } from '../entities/experience/experience';
2
+ import { ExperienceStep } from '../entities/experience/experience';
3
3
  import { ExperienceInstance } from '../entities/experience-instance/experience-instance';
4
4
  import { ResolvedFeature } from '../entities/feature/feature';
5
5
  export interface FormPayload {
@@ -22,36 +22,36 @@ export interface PayloadMap {
22
22
  feature: ResolvedFeature;
23
23
  };
24
24
  experience_initialize: {
25
- experienceInstance: ExperienceInstance;
25
+ experience: ExperienceInstance;
26
26
  };
27
27
  experience_open: {
28
- experience: ExperienceStore;
28
+ experience: ExperienceInstance;
29
29
  };
30
30
  experience_close: {
31
- experience: ExperienceStore;
31
+ experience: ExperienceInstance;
32
32
  };
33
33
  experience_complete: {
34
- experience: ExperienceStore;
34
+ experience: ExperienceInstance;
35
35
  };
36
36
  step_enter: {
37
37
  step: ExperienceStep;
38
- experience: ExperienceStore;
38
+ experience: ExperienceInstance;
39
39
  };
40
40
  step_submit: {
41
41
  step: ExperienceStep;
42
- experience: ExperienceStore;
42
+ experience: ExperienceInstance;
43
43
  };
44
44
  step_submit_success: {
45
45
  step: ExperienceStep;
46
- experience: ExperienceStore;
46
+ experience: ExperienceInstance;
47
47
  };
48
48
  step_submit_error: {
49
49
  step: ExperienceStep;
50
- experience: ExperienceStore;
50
+ experience: ExperienceInstance;
51
51
  };
52
52
  step_complete: {
53
53
  step: ExperienceStep;
54
- experience: ExperienceStore;
54
+ experience: ExperienceInstance;
55
55
  };
56
56
  form_submit: {
57
57
  form: FormPayload;
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/utils/events.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAA;AACxF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAElE,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,KAAK,CAAA;IACZ,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,UAAU,EAAE,KAAK,CAAA;IACjB,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IACvB,WAAW,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAA;IAC/B,cAAc,EAAE;QAAE,OAAO,EAAE,eAAe,CAAA;KAAE,CAAA;IAC5C,qBAAqB,EAAE;QAAE,kBAAkB,EAAE,kBAAkB,CAAA;KAAE,CAAA;IACjE,eAAe,EAAE;QAAE,UAAU,EAAE,eAAe,CAAA;KAAE,CAAA;IAChD,gBAAgB,EAAE;QAAE,UAAU,EAAE,eAAe,CAAA;KAAE,CAAA;IACjD,mBAAmB,EAAE;QAAE,UAAU,EAAE,eAAe,CAAA;KAAE,CAAA;IACpD,UAAU,EAAE;QAAE,IAAI,EAAE,cAAc,CAAC;QAAC,UAAU,EAAE,eAAe,CAAA;KAAE,CAAA;IACjE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3B,CAAC,IAAI,eAAe,GAAG;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,KAAK,GACxF,MAAM,GACN,UAAU,CAAC,CAAC,CAAC,CAAC;CACnB,CAAC,eAAe,CAAC,CAAA;AAElB,eAAO,MAAM,cAAc,yDAAuC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picked/client",
3
- "version": "0.0.39-next.1",
3
+ "version": "0.0.39-next.2",
4
4
  "dependencies": {
5
5
  "@withease/factories": "^1.0.5"
6
6
  },