@picked/client 0.0.38-next.1 → 0.0.38-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +2 -2
- 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/server/index.js +1 -1
- package/dist/esm/index.js +218 -217
- 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/server/index.js +1 -1
- package/dist/{experience-instance-CsMhH0DN.cjs → experience-instance-CVIXiBiy.cjs} +1 -1
- package/dist/{experience-instance-CwXYJkRx.js → experience-instance-Dl8KzR7C.js} +1 -0
- package/dist/storage-Be5xWNPC.cjs +1 -0
- package/dist/storage-Co_LbKr_.js +239 -0
- package/dist/types/entities/experience/experience.d.ts +3 -0
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +3 -0
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/picked.d.ts +4 -0
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/utils/storage.d.ts +357 -1
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/storage-BLmAhfhl.js +0 -94
- package/dist/storage-YlR83AWP.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createEffect as r, sample as i } from "effector";
|
|
2
|
-
import { c, l as g, s as S } from "../../../storage-
|
|
2
|
+
import { c, l as g, s as S } from "../../../storage-Co_LbKr_.js";
|
|
3
3
|
import { l as f } from "../../../logger-C9a75KZn.js";
|
|
4
4
|
const y = ({
|
|
5
5
|
storage: a = "local"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createEffect as s, sample as r } from "effector";
|
|
2
|
-
import { c as l, l as y, s as g } from "../../../storage-
|
|
2
|
+
import { c as l, l as y, s as g } from "../../../storage-Co_LbKr_.js";
|
|
3
3
|
const a = l("history", "global"), f = ({
|
|
4
4
|
storage: i = "local"
|
|
5
5
|
} = {}) => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createEffect as i, attach as f, sample as c } from "effector";
|
|
2
|
-
import { c as u, l as g, s as d } from "../../../storage-
|
|
2
|
+
import { c as u, l as g, s as d } from "../../../storage-Co_LbKr_.js";
|
|
3
3
|
const p = u("responses", "global"), S = (r, s) => {
|
|
4
4
|
const o = {};
|
|
5
5
|
return Object.entries(r).forEach(([t, n]) => {
|
package/dist/esm/server/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createEvent as i, createStore as v, createEffect as C, sample as n, attach as S } from "effector";
|
|
2
|
-
import { h as F } from "../../experience-instance-
|
|
2
|
+
import { h as F } from "../../experience-instance-Dl8KzR7C.js";
|
|
3
3
|
function R() {
|
|
4
4
|
let c, p;
|
|
5
5
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("effector"),q=require("@withease/factories"),H=require("./supports-YvpQZxbh.cjs"),N=require("./logger-BsmHUUw1.cjs"),ye=require("./object-BbFTsGh3.cjs");function we(e){return typeof e=="number"&&!isNaN(e)}function R(e){return typeof e=="string"}function E(e){return Array.isArray(e)}function ie(e){return e instanceof Promise}function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.keys(e).length===1}function m(e){if(we(e))return e;const t=parseFloat(`${e}`);return isNaN(t)?0:t}function T(e){return`${e}`}const Ee={"==":(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),a=m(t);if(r===void 0)return n<a;const c=m(r);return n<a&&a<c},"<=":(e,t,r)=>{const n=m(e),a=m(t);if(r===void 0)return n<=a;const c=m(r);return n<=a&&a<=c},"!!":async e=>await A(e),"!":async e=>!await A(e),"%":(e,t)=>m(e)%m(t),log:e=>(console.log(e),e),in:(e,t)=>t?R(t)?t.indexOf(T(e))!==-1:E(t)?t.includes(e):!1:!1,cat:(...e)=>e.map(T).join(""),substr:(e,t,r)=>{const n=T(e),a=m(t);if(r===void 0)return n.substr(a);const c=m(r);if(c<0){const o=n.substr(a);return o.substr(0,o.length+c)}return n.substr(a,c)},"+":(...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=T(e);if(n===""||n===".")return this;const a=n.split(".");let c=this;for(const o of a){if(c==null)return r;if(Array.isArray(c)){const u=parseInt(o,10);isNaN(u)?c=c[o]:c=c[u]}else c=c[o]}return c!==void 0?c:r},async missing(...e){const t=E(e[0])?e[0]:e,r=[];for(const n of t){const a=await g({var:n},this);(a===null||a==="")&&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(R);return t.filter(R).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[c,o]=e;r=c,n=o}return!R(r)||!R(n)?!1:new RegExp(r,n).test(T(t))},throw(e){throw new Error(T(e))}};async function g(e,t){if(!e)return e;if(ie(e))return g(await e,t);if(E(e))return Promise.all(e.map(o=>g(o,t)));if(!ne(e))return e;const r=Ne(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 A(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 A(o))return o;return o}case"or":{let o=null;for(const u of n)if(o=await g(u,t),await A(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 h=await A(await g(n[1],p));return{item:p,shouldInclude:h}}))).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 h=n.length>2?await g(n[2],t):null;for(const k of o)h=await g(u,{current:k,accumulator:h});return h}case"all":{const o=await g(n[0],t);if(!E(o)||o.length===0)return!1;for(const u of o)if(!await A(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 A(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 A(await g(n[1],u)))return!1;return!0}case"catch":try{return await g(n[0],t)}catch(o){return ne(o)?await g(o,t):n[1]?await g(n[1],o):o instanceof Error?o.message:o}}const a=await Promise.all(n.map(o=>g(o,t))),c=r?Ee[r]:void 0;if(!c)throw new Error(`Unrecognized operation ${r}`);return c.apply(t,a)}async function A(e){return ie(e)?A(await e):!(Array.isArray(e)&&e.length===0)&&!!e}function Ne(e){return Object.keys(e)[0]}function ae(e){return!ye.isEmpty(e)}async function z(e,t,r){const n=e.getStateSnapshot(),a=e.predicates.listStore.getState().reduce((u,p)=>({...u,[p.name]:(...h)=>p.predicate({...n,args:h})}),{}),c=e.features.listStore.getState().reduce((u,p)=>({...u,[p.id]:async()=>{const{bucket:h}=await p.getBucket();return h}}),{}),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:a,features:c};return await g(t,o)}function xe(e){return!H.supportsWindow()||!H.supportsDocument()?[]:Array.from(window.document.querySelectorAll(e)).filter(t=>t instanceof HTMLElement)}const Ie="open";function ke(e){if(!H.supportsShadowRoot())throw new Error("Shadow DOM is not supported in this environment");return e.attachShadow({mode:Ie})}function ve(){return new Promise((e,t)=>{if(!H.supportsDocument()){t();return}document.readyState!=="loading"?e():document.addEventListener("readystatechange",()=>e(),{once:!0})})}function be(e,t){const r=new MutationObserver(n=>{document.contains(e)||(r.disconnect(),t())});r.observe(document.body,{childList:!0,subtree:!0})}const C="picked-root",j="picked-target",Ae="picked-root";function Oe(e,t){return[...e,{selector:`${Ae}[experience-id="${t}"]`,placement:"replace"}].flatMap(n=>{const a=xe(n.selector).filter(c=>!_e(c,t)&&!ce(c,t));return{...n,elements:a}})}function Fe(e,t){return e.flatMap(r=>r.elements.map(n=>Te(n,r.placement,t)))}function Be(e,t){e.classList.add(j),e.classList.add(`${j}-${t}`)}function _e(e,t){return t?e.classList.contains(`${j}-${t}`):e.classList.contains(`${j}`)}function ce(e,t){return t?e.classList.contains(`${C}-${t}`):e.classList.contains(C)}function $e(e){const t=document.createElement("div");return t.style.display="block",t.classList.add(C),t.classList.add(`${C}-${e}`),t}function Te(e,t,r){let n;const a=$e(r);if(e instanceof Document)n=e.body.appendChild(a);else{switch(t){case"replace":e.replaceWith(a);break;case"before":e.before(a);break;case"after":e.after(a);break;case"prepend":e.prepend(a);break;default:e.append(a);break}n=a}return n}function re(e){return e.type==="conditional"}function M(e){return e.type==="step"}function oe(e){return e.type==="experience"}function V(e){return e.type==="origin"}function se(e){return e.type==="action"}const ue=(e,t,r,n,a=new Set)=>a.has(r.id)?[]:(a.add(r.id),M(r)&&!n?[r]:t.filter(o=>o.sourceNodeId===r.id).flatMap(o=>{const u=e.find(p=>p.id===o.destinationNodeId);return u?ue(e,t,u,!1,a):[]})),Me=(e,t,r)=>ue(e,t,r,!0,new Set),fe=(e,t,r,n,a=new Set)=>{if(a.has(r.id))return[-1,-1];a.add(r.id);const c=t.filter(p=>p.sourceNodeId===r.id);if(c.length===0)return[0,0];let o=1/0,u=-1/0;for(const p of c){const h=e.find(L=>L.id===p.destinationNodeId);if(!h)continue;const[k,F]=fe(e,t,h,!1,new Set(a));k!==-1&&(o=Math.min(o,k+1),u=Math.max(u,F+1))}return o===1/0?[-1,-1]:[o,u]},Le=(e,t,r)=>fe(e,t,r,!0,new Set),le=(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 a=t.filter(u=>u.destinationNodeId===r.id);if(a.length===0)return[-1,-1];let c=1/0,o=-1/0;for(const u of a){const p=e.find(F=>F.id===u.sourceNodeId);if(!p)continue;const[h,k]=le(e,t,p,new Set(n));h!==-1&&(c=Math.min(c,h+1),o=Math.max(o,k+1))}return c===1/0?[-1,-1]:[c,o]},De=(e,t,r)=>le(e,t,r,new Set),de=e=>e.find(r=>r.type==="origin")||null,X=(e,t,r)=>{if(!e)return de(t);const n=r.find(c=>c.sourceNodeId===e.id);if(!n)return null;const a=t.find(c=>c.id===n.destinationNodeId);return a||null};async function Re(e,t,r,n){const a=e?"true":"false",c=n.find(o=>o.sourceNodeHandle===a&&o.sourceNodeId===t);return r.find(o=>o.id===c?.destinationNodeId)}const J=i.createDomain("experience-instance"),Pe=q.createFactory(({client:e,experience:t,target:r})=>{const n=i.createEvent(),a=i.createEvent(),c=i.createEvent(),o=i.createEvent(),u=i.createEvent(),p=i.createEvent(),h=t.componentStore,k=J.store("transitioning"),F=e.history.entriesStore.map(s=>s.filter(d=>d.experienceId===t.id)),L=F.map(s=>s.filter(d=>M(d.node))),x=F.map(s=>s[s.length-1]?.node||null),f=i.combine(t.treeStore,x,({steps:s},d)=>s.find(l=>d&&M(d)&&l.id===d.stepId)||null),S=i.combine(t.treeStore,x,({nodes:s,edges:d},l)=>l?Me(s,d,l):[]),v=i.combine(t.treeStore,x,({nodes:s,edges:d},l)=>l?De(s,d,l):[-1,-1]),B=i.combine(t.treeStore,x,({nodes:s,edges:d},l)=>l?Le(s,d,l):[-1,-1]),b=J.store(!1),_=i.createApi(b,{open:()=>!0,close:()=>!1,toggle:s=>!s,set:(s,d)=>d}),ge=i.createEffect(async()=>{e.history.back({experienceId:t.id})}),me=i.attach({source:t.treeStore,effect:async(s,d)=>{const l=s.nodes.find(w=>M(w)&&w.stepId===d);l&&e.history.push({experienceId:t.id,node:l})}}),Q=i.attach({source:x,effect:s=>{}}),U=i.attach({source:t.treeStore,effect:async({nodes:s})=>de(s)}),W=i.attach({source:t.treeStore,effect:async({nodes:s,edges:d},l)=>{if(V(l))return X(l,s,d)}}),G=i.attach({source:t.treeStore,effect:async({nodes:s,edges:d,conditionals:l},w)=>{if(!re(w))return;const $=l.find(O=>O.id===w.conditionalId);if(!$)return;const I=w.id,y=await z(e,$.condition);return Re(!!y,I,s,d)}}),Y=i.attach({source:t.treeStore,effect:async({nodes:s,edges:d},l)=>{if(!se(l))return;const w=l.action;if(!w){N.logger("warn",`Action node ${l.id} has no action name`);return}const $=e.actions.getByName(w).getState();if(!$){N.logger("warn",`Action '${w}' not registered on client`);const I=d.find(y=>y.sourceNodeId===l.id&&y.sourceNodeHandle==="false");return I?s.find(y=>y.id===I.destinationNodeId):null}if(typeof $.action!="function"){N.logger("warn",`Action '${w}' is not a function`);const I=d.find(y=>y.sourceNodeId===l.id&&y.sourceNodeHandle==="false");return I?s.find(y=>y.id===I.destinationNodeId):null}try{N.logger("info",`Executing action: ${w}`),await $.action(w);const I=d.find(O=>O.sourceNodeId===l.id&&O.sourceNodeHandle==="true");if(!I)return N.logger("warn",`No 'true' edge found for action node ${l.id}`),null;const y=s.find(O=>O.id===I.destinationNodeId);return N.logger("info",`Action '${w}' succeeded, moving to node ${y?.id}`),y||null}catch(I){N.logger("warn",`Action '${w}' failed:`,I);const y=d.find(P=>P.sourceNodeId===l.id&&P.sourceNodeHandle==="false");if(!y)return N.logger("warn",`No 'false' edge found for action node ${l.id}`),null;const O=s.find(P=>P.id===y.destinationNodeId);return N.logger("info",`Action '${w}' failed, moving to node ${O?.id}`),O||null}}}),he=i.createEffect(s=>{if(oe(s))return e.launchExperienceById(s.experienceId)}),Z=i.attach({source:[x,t.treeStore],effect:async([s,{nodes:d,edges:l}])=>X(s,d,l)}),D=i.attach({source:[x,t.treeStore],effect:async([s,{nodes:d,edges:l}])=>X(s,d,l)}),Se=i.createEffect(s=>{e.history.push({experienceId:t.id,node:s})}),ee=i.attach({source:t.configStore,effect:async({initializeOpenLogic:s})=>ae(s)?!!await z(e,s):s??!1}),K=i.createEvent(),te=i.createEvent();return i.sample({source:x,target:K}),i.sample({clock:K,filter:s=>s===null,target:U}),i.sample({clock:K,filter:s=>s!==null,target:te}),i.split({source:te,match:s=>re(s)?"condition":M(s)?"step":oe(s)?"launchExperience":V(s)?"origin":se(s)?"action":"other",cases:{origin:W,condition:G,step:Q,launchExperience:he,action:Y,__:i.createEvent()}}),i.sample({clock:[G.doneData,W.doneData,U.doneData,D.doneData,Z.doneData,Y.doneData],filter:Boolean,target:Se}),i.sample({clock:a,target:D}),i.sample({clock:a,source:f,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_submit",step:s,experience:t}))}),i.sample({clock:D.done,source:f,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_submit_success",step:s,experience:t}))}),i.sample({clock:D.fail,source:f,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_submit_error",step:s,experience:t}))}),i.sample({clock:c,target:ge}),i.sample({clock:o,target:me}),i.sample({source:i.combine([G.pending,W.pending,U.pending,D.pending]),fn:s=>s.some(Boolean)?"transitioning":"ready",target:k}),i.sample({clock:Q.doneData,source:f,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_enter",step:s,experience:t}))}),i.sample({clock:p,target:ee}),i.sample({source:ee.doneData,fn:Boolean,target:b}),i.sample({source:x,clock:n,filter:s=>s?V(s):!0,target:Z}),i.sample({source:b,filter:Boolean,target:n}),i.sample({source:b,filter:Boolean,target:e.eventBus.prepend(()=>({type:"experience_open",experience:t}))}),i.sample({source:b,filter:s=>!s,target:e.eventBus.prepend(()=>({type:"experience_close",experience:t}))}),i.sample({clock:u,target:[p]}),u(),{id:Math.random().toString(36).substring(7),experienceId:t.id,configStore:t.configStore,target:r,componentStore:h,stateStore:k,isOpenStore:b,open:_.open,close:_.close,toggleOpen:_.toggle,setOpen:_.set,treeStore:t.treeStore,currentNodeStore:x,currentStepStore:f,nextReachableStepNodesStore:S,stepsToOriginStore:v,stepsToLeafStore:B,goToNextStep:a,goToPreviousStep:c,goToStepById:o,stepsHistoryStore:L}});function pe(e){return q.invoke(Pe,e)}const He=q.createFactory(({client:e})=>{const t=J.store({}),r=i.createEvent(),n=i.createEvent(),a=i.createEvent(),c=i.createApi(t,{register(f,S){const v=[...f[S.experienceId]??[]];return v.push(S),{...f,[S.experienceId]:v}},unregister(f,S){const v=S.experienceId,B=f[v]?.filter(b=>b!==S);return{...f,[v]:B??[]}}}),o=i.createEffect(({experience:f,target:S})=>pe({client:e,experience:f,target:S})),u=i.createEffect(f=>{c.register(f)}),p=i.createEffect(f=>{f.target&&be(f.target,()=>{a(f)})}),h=i.createEffect(f=>{c.unregister(f)}),k=i.createEffect(f=>{const S=f.componentStore.getState();if(!S){N.logger("warn","No app component registered. Skipping init.");return}const v=S.frameworkStore.getState();if(!v){N.logger("error",`No framework registered for component '${S.name}'. Skipping rendering.`);return}const B=f.target;if(!B){N.logger("error",`No target element registered for experience '${f.experienceId}'. Skipping rendering.`);return}const b=ke(B);try{v.render(b,S.component,e,f)}catch(_){N.logger("error",_)}});i.sample({clock:r,target:o}),i.sample({clock:a,target:h}),i.sample({clock:o.doneData,target:[u,p,n]}),i.sample({clock:o.doneData,target:e.eventBus.prepend(f=>({type:"experience_initialize",experienceInstance:f}))}),i.sample({clock:n,target:k});function F(f,S){r({experience:f,target:S})}const L=t.map(f=>Object.values(f).flat());function x(f){return t.map(S=>S[f]||[],{skipVoid:!1})}return{spawn:F,getByExperienceId:x,listStore:L}});function Ce(e){return q.invoke(He,e)}exports.createAppHosts=Fe;exports.createExperienceInstance=pe;exports.createExperienceInstanceIndex=Ce;exports.domInteractive=ve;exports.evaluateRuleLogic=z;exports.getTargetElements=Oe;exports.isPickedRoot=ce;exports.isRulesLogic=ae;exports.isStepNode=M;exports.tagTargetElement=Be;
|
|
1
|
+
"use strict";const i=require("effector"),q=require("@withease/factories"),H=require("./supports-YvpQZxbh.cjs"),N=require("./logger-BsmHUUw1.cjs"),ye=require("./object-BbFTsGh3.cjs");function we(e){return typeof e=="number"&&!isNaN(e)}function R(e){return typeof e=="string"}function E(e){return Array.isArray(e)}function ie(e){return e instanceof Promise}function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.keys(e).length===1}function m(e){if(we(e))return e;const t=parseFloat(`${e}`);return isNaN(t)?0:t}function T(e){return`${e}`}const Ee={"==":(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),a=m(t);if(r===void 0)return n<a;const c=m(r);return n<a&&a<c},"<=":(e,t,r)=>{const n=m(e),a=m(t);if(r===void 0)return n<=a;const c=m(r);return n<=a&&a<=c},"!!":async e=>await A(e),"!":async e=>!await A(e),"%":(e,t)=>m(e)%m(t),log:e=>(console.log(e),e),in:(e,t)=>t?R(t)?t.indexOf(T(e))!==-1:E(t)?t.includes(e):!1:!1,cat:(...e)=>e.map(T).join(""),substr:(e,t,r)=>{const n=T(e),a=m(t);if(r===void 0)return n.substr(a);const c=m(r);if(c<0){const o=n.substr(a);return o.substr(0,o.length+c)}return n.substr(a,c)},"+":(...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=T(e);if(n===""||n===".")return this;const a=n.split(".");let c=this;for(const o of a){if(c==null)return r;if(Array.isArray(c)){const u=parseInt(o,10);isNaN(u)?c=c[o]:c=c[u]}else c=c[o]}return c!==void 0?c:r},async missing(...e){const t=E(e[0])?e[0]:e,r=[];for(const n of t){const a=await g({var:n},this);(a===null||a==="")&&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(R);return t.filter(R).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[c,o]=e;r=c,n=o}return!R(r)||!R(n)?!1:new RegExp(r,n).test(T(t))},throw(e){throw new Error(T(e))}};async function g(e,t){if(!e)return e;if(ie(e))return g(await e,t);if(E(e))return Promise.all(e.map(o=>g(o,t)));if(!ne(e))return e;const r=Ne(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 A(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 A(o))return o;return o}case"or":{let o=null;for(const u of n)if(o=await g(u,t),await A(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 A(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 A(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 A(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 A(await g(n[1],u)))return!1;return!0}case"catch":try{return await g(n[0],t)}catch(o){return ne(o)?await g(o,t):n[1]?await g(n[1],o):o instanceof Error?o.message:o}}const a=await Promise.all(n.map(o=>g(o,t))),c=r?Ee[r]:void 0;if(!c)throw new Error(`Unrecognized operation ${r}`);return c.apply(t,a)}async function A(e){return ie(e)?A(await e):!(Array.isArray(e)&&e.length===0)&&!!e}function Ne(e){return Object.keys(e)[0]}function ae(e){return!ye.isEmpty(e)}async function z(e,t,r){const n=e.getStateSnapshot(),a=e.predicates.listStore.getState().reduce((u,p)=>({...u,[p.name]:(...S)=>p.predicate({...n,args:S})}),{}),c=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:a,features:c};return await g(t,o)}function Ie(e){return!H.supportsWindow()||!H.supportsDocument()?[]:Array.from(window.document.querySelectorAll(e)).filter(t=>t instanceof HTMLElement)}const xe="open";function ke(e){if(!H.supportsShadowRoot())throw new Error("Shadow DOM is not supported in this environment");return e.attachShadow({mode:xe})}function ve(){return new Promise((e,t)=>{if(!H.supportsDocument()){t();return}document.readyState!=="loading"?e():document.addEventListener("readystatechange",()=>e(),{once:!0})})}function be(e,t){const r=new MutationObserver(n=>{document.contains(e)||(r.disconnect(),t())});r.observe(document.body,{childList:!0,subtree:!0})}const C="picked-root",j="picked-target",Ae="picked-root";function Oe(e,t){return[...e,{selector:`${Ae}[experience-id="${t}"]`,placement:"replace"}].flatMap(n=>{const a=Ie(n.selector).filter(c=>!_e(c,t)&&!ce(c,t));return{...n,elements:a}})}function Fe(e,t){return e.flatMap(r=>r.elements.map(n=>Te(n,r.placement,t)))}function Be(e,t){e.classList.add(j),e.classList.add(`${j}-${t}`)}function _e(e,t){return t?e.classList.contains(`${j}-${t}`):e.classList.contains(`${j}`)}function ce(e,t){return t?e.classList.contains(`${C}-${t}`):e.classList.contains(C)}function $e(e){const t=document.createElement("div");return t.style.display="block",t.classList.add(C),t.classList.add(`${C}-${e}`),t}function Te(e,t,r){let n;const a=$e(r);if(e instanceof Document)n=e.body.appendChild(a);else{switch(t){case"replace":e.replaceWith(a);break;case"before":e.before(a);break;case"after":e.after(a);break;case"prepend":e.prepend(a);break;default:e.append(a);break}n=a}return n}function re(e){return e.type==="conditional"}function M(e){return e.type==="step"}function oe(e){return e.type==="experience"}function V(e){return e.type==="origin"}function se(e){return e.type==="action"}const ue=(e,t,r,n,a=new Set)=>a.has(r.id)?[]:(a.add(r.id),M(r)&&!n?[r]:t.filter(o=>o.sourceNodeId===r.id).flatMap(o=>{const u=e.find(p=>p.id===o.destinationNodeId);return u?ue(e,t,u,!1,a):[]})),Me=(e,t,r)=>ue(e,t,r,!0,new Set),fe=(e,t,r,n,a=new Set)=>{if(a.has(r.id))return[-1,-1];a.add(r.id);const c=t.filter(p=>p.sourceNodeId===r.id);if(c.length===0)return[0,0];let o=1/0,u=-1/0;for(const p of c){const S=e.find(L=>L.id===p.destinationNodeId);if(!S)continue;const[k,F]=fe(e,t,S,!1,new Set(a));k!==-1&&(o=Math.min(o,k+1),u=Math.max(u,F+1))}return o===1/0?[-1,-1]:[o,u]},Le=(e,t,r)=>fe(e,t,r,!0,new Set),le=(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 a=t.filter(u=>u.destinationNodeId===r.id);if(a.length===0)return[-1,-1];let c=1/0,o=-1/0;for(const u of a){const p=e.find(F=>F.id===u.sourceNodeId);if(!p)continue;const[S,k]=le(e,t,p,new Set(n));S!==-1&&(c=Math.min(c,S+1),o=Math.max(o,k+1))}return c===1/0?[-1,-1]:[c,o]},De=(e,t,r)=>le(e,t,r,new Set),de=e=>e.find(r=>r.type==="origin")||null,X=(e,t,r)=>{if(!e)return de(t);const n=r.find(c=>c.sourceNodeId===e.id);if(!n)return null;const a=t.find(c=>c.id===n.destinationNodeId);return a||null};async function Re(e,t,r,n){const a=e?"true":"false",c=n.find(o=>o.sourceNodeHandle===a&&o.sourceNodeId===t);return r.find(o=>o.id===c?.destinationNodeId)}const J=i.createDomain("experience-instance"),Pe=q.createFactory(({client:e,experience:t,target:r})=>{const n=i.createEvent(),a=i.createEvent(),c=i.createEvent(),o=i.createEvent(),u=i.createEvent(),p=i.createEvent(),S=t.componentStore,k=J.store("transitioning"),F=e.history.entriesStore.map(s=>s.filter(d=>d.experienceId===t.id)),L=F.map(s=>s.filter(d=>M(d.node))),I=F.map(s=>s[s.length-1]?.node||null),f=i.combine(t.treeStore,I,({steps:s},d)=>s.find(l=>d&&M(d)&&l.id===d.stepId)||null),h=i.combine(t.treeStore,I,({nodes:s,edges:d},l)=>l?Me(s,d,l):[]),v=i.combine(t.treeStore,I,({nodes:s,edges:d},l)=>l?De(s,d,l):[-1,-1]),B=i.combine(t.treeStore,I,({nodes:s,edges:d},l)=>l?Le(s,d,l):[-1,-1]),b=J.store(!1),_=i.createApi(b,{open:()=>!0,close:()=>!1,toggle:s=>!s,set:(s,d)=>d}),ge=i.createEffect(async()=>{e.history.back({experienceId:t.id})}),me=i.attach({source:t.treeStore,effect:async(s,d)=>{const l=s.nodes.find(w=>M(w)&&w.stepId===d);l&&e.history.push({experienceId:t.id,node:l})}}),Q=i.attach({source:I,effect:s=>{}}),U=i.attach({source:t.treeStore,effect:async({nodes:s})=>de(s)}),W=i.attach({source:t.treeStore,effect:async({nodes:s,edges:d},l)=>{if(V(l))return X(l,s,d)}}),G=i.attach({source:t.treeStore,effect:async({nodes:s,edges:d,conditionals:l},w)=>{if(!re(w))return;const $=l.find(O=>O.id===w.conditionalId);if(!$)return;const x=w.id,y=await z(e,$.condition);return Re(!!y,x,s,d)}}),Y=i.attach({source:t.treeStore,effect:async({nodes:s,edges:d},l)=>{if(!se(l))return;const w=l.action;if(!w){N.logger("warn",`Action node ${l.id} has no action name`);return}const $=e.actions.getByName(w).getState();if(!$){N.logger("warn",`Action '${w}' not registered on client`);const x=d.find(y=>y.sourceNodeId===l.id&&y.sourceNodeHandle==="false");return x?s.find(y=>y.id===x.destinationNodeId):null}if(typeof $.action!="function"){N.logger("warn",`Action '${w}' is not a function`);const x=d.find(y=>y.sourceNodeId===l.id&&y.sourceNodeHandle==="false");return x?s.find(y=>y.id===x.destinationNodeId):null}try{N.logger("info",`Executing action: ${w}`),await $.action(w);const x=d.find(O=>O.sourceNodeId===l.id&&O.sourceNodeHandle==="true");if(!x)return N.logger("warn",`No 'true' edge found for action node ${l.id}`),null;const y=s.find(O=>O.id===x.destinationNodeId);return N.logger("info",`Action '${w}' succeeded, moving to node ${y?.id}`),y||null}catch(x){N.logger("warn",`Action '${w}' failed:`,x);const y=d.find(P=>P.sourceNodeId===l.id&&P.sourceNodeHandle==="false");if(!y)return N.logger("warn",`No 'false' edge found for action node ${l.id}`),null;const O=s.find(P=>P.id===y.destinationNodeId);return N.logger("info",`Action '${w}' failed, moving to node ${O?.id}`),O||null}}}),Se=i.createEffect(s=>{if(oe(s))return e.launchExperienceById(s.experienceId)}),Z=i.attach({source:[I,t.treeStore],effect:async([s,{nodes:d,edges:l}])=>X(s,d,l)}),D=i.attach({source:[I,t.treeStore],effect:async([s,{nodes:d,edges:l}])=>X(s,d,l)}),he=i.createEffect(s=>{e.history.push({experienceId:t.id,node:s})}),ee=i.attach({source:t.configStore,effect:async({initializeOpenLogic:s})=>ae(s)?!!await z(e,s):s??!1}),K=i.createEvent(),te=i.createEvent();return i.sample({source:I,target:K}),i.sample({clock:K,filter:s=>s===null,target:U}),i.sample({clock:K,filter:s=>s!==null,target:te}),i.split({source:te,match:s=>re(s)?"condition":M(s)?"step":oe(s)?"launchExperience":V(s)?"origin":se(s)?"action":"other",cases:{origin:W,condition:G,step:Q,launchExperience:Se,action:Y,__:i.createEvent()}}),i.sample({clock:[G.doneData,W.doneData,U.doneData,D.doneData,Z.doneData,Y.doneData],filter:Boolean,target:he}),i.sample({clock:a,target:D}),i.sample({clock:a,source:f,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_submit",step:s,experience:t}))}),i.sample({clock:D.done,source:f,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_submit_success",step:s,experience:t}))}),i.sample({clock:D.fail,source:f,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_submit_error",step:s,experience:t}))}),i.sample({clock:c,target:ge}),i.sample({clock:o,target:me}),i.sample({source:i.combine([G.pending,W.pending,U.pending,D.pending]),fn:s=>s.some(Boolean)?"transitioning":"ready",target:k}),i.sample({clock:Q.doneData,source:f,filter:Boolean,target:e.eventBus.prepend(s=>({type:"step_enter",step:s,experience:t}))}),i.sample({clock:p,target:ee}),i.sample({source:ee.doneData,fn:Boolean,target:b}),i.sample({source:I,clock:n,filter:s=>s?V(s):!0,target:Z}),i.sample({source:b,filter:Boolean,target:n}),i.sample({source:b,filter:Boolean,target:e.eventBus.prepend(()=>({type:"experience_open",experience:t}))}),i.sample({source:b,filter:s=>!s,target:e.eventBus.prepend(()=>({type:"experience_close",experience:t}))}),i.sample({clock:u,target:[p]}),u(),{id:Math.random().toString(36).substring(7),experienceId:t.id,configStore:t.configStore,target:r,componentStore:S,stateStore:k,isOpenStore:b,open:_.open,close:_.close,toggleOpen:_.toggle,setOpen:_.set,treeStore:t.treeStore,fieldsStore:t.fieldsStore,currentNodeStore:I,currentStepStore:f,nextReachableStepNodesStore:h,stepsToOriginStore:v,stepsToLeafStore:B,goToNextStep:a,goToPreviousStep:c,goToStepById:o,stepsHistoryStore:L}});function pe(e){return q.invoke(Pe,e)}const He=q.createFactory(({client:e})=>{const t=J.store({}),r=i.createEvent(),n=i.createEvent(),a=i.createEvent(),c=i.createApi(t,{register(f,h){const v=[...f[h.experienceId]??[]];return v.push(h),{...f,[h.experienceId]:v}},unregister(f,h){const v=h.experienceId,B=f[v]?.filter(b=>b!==h);return{...f,[v]:B??[]}}}),o=i.createEffect(({experience:f,target:h})=>pe({client:e,experience:f,target:h})),u=i.createEffect(f=>{c.register(f)}),p=i.createEffect(f=>{f.target&&be(f.target,()=>{a(f)})}),S=i.createEffect(f=>{c.unregister(f)}),k=i.createEffect(f=>{const h=f.componentStore.getState();if(!h){N.logger("warn","No app component registered. Skipping init.");return}const v=h.frameworkStore.getState();if(!v){N.logger("error",`No framework registered for component '${h.name}'. Skipping rendering.`);return}const B=f.target;if(!B){N.logger("error",`No target element registered for experience '${f.experienceId}'. Skipping rendering.`);return}const b=ke(B);try{v.render(b,h.component,e,f)}catch(_){N.logger("error",_)}});i.sample({clock:r,target:o}),i.sample({clock:a,target:S}),i.sample({clock:o.doneData,target:[u,p,n]}),i.sample({clock:o.doneData,target:e.eventBus.prepend(f=>({type:"experience_initialize",experienceInstance:f}))}),i.sample({clock:n,target:k});function F(f,h){r({experience:f,target:h})}const L=t.map(f=>Object.values(f).flat());function I(f){return t.map(h=>h[f]||[],{skipVoid:!1})}return{spawn:F,getByExperienceId:I,listStore:L}});function Ce(e){return q.invoke(He,e)}exports.createAppHosts=Fe;exports.createExperienceInstance=pe;exports.createExperienceInstanceIndex=Ce;exports.domInteractive=ve;exports.evaluateRuleLogic=z;exports.getTargetElements=Oe;exports.isPickedRoot=ce;exports.isRulesLogic=ae;exports.isStepNode=M;exports.tagTargetElement=Be;
|
|
@@ -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;
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
const m = (e) => btoa([...e].map((t) => String.fromCharCode(t.charCodeAt(0) ^ 7)).join("")).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
2
|
+
function w(e, t = "global", o) {
|
|
3
|
+
let r = "pckd";
|
|
4
|
+
if (t === "experience") {
|
|
5
|
+
if (!o)
|
|
6
|
+
throw new Error("Experience instance is required to scope storage to an experience");
|
|
7
|
+
r = `${r}:${o.experienceId}`;
|
|
8
|
+
}
|
|
9
|
+
return { _: `${r}:${m(e)}`, scope: t };
|
|
10
|
+
}
|
|
11
|
+
const l = /* @__PURE__ */ new Map();
|
|
12
|
+
function p(e, t) {
|
|
13
|
+
const o = l.get(e._);
|
|
14
|
+
o && o.forEach((r) => r(e, t));
|
|
15
|
+
}
|
|
16
|
+
function b(e, t, o, r) {
|
|
17
|
+
const i = o === "local" ? localStorage : sessionStorage, c = typeof t != "string" ? JSON.stringify(t) : t;
|
|
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);
|
|
21
|
+
}
|
|
22
|
+
p(e, o);
|
|
23
|
+
}
|
|
24
|
+
function f(e, t) {
|
|
25
|
+
const o = t === "local" ? localStorage : sessionStorage;
|
|
26
|
+
o.removeItem(e._), o.removeItem(`${e._}:expires-at`), p(e, t);
|
|
27
|
+
}
|
|
28
|
+
function S(e, t, o, r) {
|
|
29
|
+
const i = t === "local" ? localStorage : sessionStorage;
|
|
30
|
+
function c(s) {
|
|
31
|
+
s.storageArea === i && s.key === e._ && r(o(e));
|
|
32
|
+
}
|
|
33
|
+
function a(s, n) {
|
|
34
|
+
n === t && r(o(s));
|
|
35
|
+
}
|
|
36
|
+
return window.addEventListener("storage", c), l.has(e._) || l.set(e._, /* @__PURE__ */ new Set()), l.get(e._).add(a), function() {
|
|
37
|
+
window.removeEventListener("storage", c);
|
|
38
|
+
const n = l.get(e._);
|
|
39
|
+
n && (n.delete(a), n.size === 0 && l.delete(e._));
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function g(e, t) {
|
|
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);
|
|
44
|
+
if (i) {
|
|
45
|
+
const n = /* @__PURE__ */ new Date(), u = new Date(i);
|
|
46
|
+
if (n > u)
|
|
47
|
+
return f(e, t), {
|
|
48
|
+
isSet: () => !1,
|
|
49
|
+
text: () => null,
|
|
50
|
+
json: () => null,
|
|
51
|
+
boolean: () => null,
|
|
52
|
+
set: c,
|
|
53
|
+
remove: a,
|
|
54
|
+
subscribe: s
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
isSet() {
|
|
59
|
+
return r !== null;
|
|
60
|
+
},
|
|
61
|
+
text() {
|
|
62
|
+
return r;
|
|
63
|
+
},
|
|
64
|
+
json() {
|
|
65
|
+
return r ? JSON.parse(r) : null;
|
|
66
|
+
},
|
|
67
|
+
boolean() {
|
|
68
|
+
return r ? r === "true" : null;
|
|
69
|
+
},
|
|
70
|
+
set: c,
|
|
71
|
+
remove: a,
|
|
72
|
+
subscribe: s
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const d = {
|
|
76
|
+
/**
|
|
77
|
+
* Retrieves a storage item from sessionStorage.
|
|
78
|
+
*
|
|
79
|
+
* @template T - The type of the stored value
|
|
80
|
+
* @param key - The storage key
|
|
81
|
+
* @returns A StorageItem with methods to interact with the value
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const key = createStorageKey('user')
|
|
86
|
+
* const item = sessionStore.get<User>(key)
|
|
87
|
+
* const user = item.json() // User | null
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
get(e) {
|
|
91
|
+
return g(e, "session");
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* Sets a value in sessionStorage with optional expiry.
|
|
95
|
+
*
|
|
96
|
+
* @param key - The storage key
|
|
97
|
+
* @param value - The value to store
|
|
98
|
+
* @param expiresIn - Optional expiry time in milliseconds from now
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const key = createStorageKey('theme')
|
|
103
|
+
* // Set without expiry
|
|
104
|
+
* sessionStore.set(key, 'dark')
|
|
105
|
+
* // Set with 1 hour expiry
|
|
106
|
+
* sessionStore.set(key, 'dark', 60 * 60 * 1000)
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
set(e, t, o) {
|
|
110
|
+
b(e, t, "session", o);
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
113
|
+
* Removes a value from sessionStorage, including expiry metadata.
|
|
114
|
+
*
|
|
115
|
+
* @param key - The storage key
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* const key = createStorageKey('temp-data')
|
|
120
|
+
* sessionStore.remove(key)
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
remove(e) {
|
|
124
|
+
f(e, "session");
|
|
125
|
+
},
|
|
126
|
+
/**
|
|
127
|
+
* Subscribes to storage changes for a key, both in the same tab and across browser tabs/windows.
|
|
128
|
+
* Callbacks are invoked when changes occur via sessionStore.set() or sessionStore.remove() in the same tab,
|
|
129
|
+
* and also when changes are made in other tabs/windows.
|
|
130
|
+
*
|
|
131
|
+
* @template T - The type of the stored value
|
|
132
|
+
* @param key - The storage key to watch
|
|
133
|
+
* @param callback - Function called when storage changes
|
|
134
|
+
* @returns Unsubscribe function to stop listening
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```typescript
|
|
138
|
+
* const key = createStorageKey('notifications')
|
|
139
|
+
* const unsubscribe = sessionStore.subscribe<Notification[]>(key, (item) => {
|
|
140
|
+
* const notifications = item.json()
|
|
141
|
+
* console.log('Notifications updated:', notifications)
|
|
142
|
+
* })
|
|
143
|
+
*
|
|
144
|
+
* // Changes in same tab trigger callback
|
|
145
|
+
* sessionStore.set(key, [{ id: 1, message: 'New notification' }])
|
|
146
|
+
*
|
|
147
|
+
* // Later, stop listening
|
|
148
|
+
* unsubscribe()
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
subscribe(e, t) {
|
|
152
|
+
return S(e, "session", this.get, t);
|
|
153
|
+
}
|
|
154
|
+
}, _ = {
|
|
155
|
+
/**
|
|
156
|
+
* Retrieves a storage item from localStorage.
|
|
157
|
+
*
|
|
158
|
+
* @template T - The type of the stored value
|
|
159
|
+
* @param key - The storage key
|
|
160
|
+
* @returns A StorageItem with methods to interact with the value
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* ```typescript
|
|
164
|
+
* const key = createStorageKey('settings')
|
|
165
|
+
* const item = localStore.get<Settings>(key)
|
|
166
|
+
* const settings = item.json() // Settings | null
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
get(e) {
|
|
170
|
+
return g(e, "local");
|
|
171
|
+
},
|
|
172
|
+
/**
|
|
173
|
+
* Sets a value in localStorage with optional expiry.
|
|
174
|
+
*
|
|
175
|
+
* @param key - The storage key
|
|
176
|
+
* @param value - The value to store
|
|
177
|
+
* @param expiresIn - Optional expiry time in milliseconds from now
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```typescript
|
|
181
|
+
* const key = createStorageKey('auth-token')
|
|
182
|
+
* // Set without expiry
|
|
183
|
+
* localStore.set(key, 'token123')
|
|
184
|
+
* // Set with 24 hour expiry
|
|
185
|
+
* localStore.set(key, 'token123', 24 * 60 * 60 * 1000)
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
set(e, t, o) {
|
|
189
|
+
b(e, t, "local", o);
|
|
190
|
+
},
|
|
191
|
+
/**
|
|
192
|
+
* Removes a value from localStorage, including expiry metadata.
|
|
193
|
+
*
|
|
194
|
+
* @param key - The storage key
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* ```typescript
|
|
198
|
+
* const key = createStorageKey('cached-data')
|
|
199
|
+
* localStore.remove(key)
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
remove(e) {
|
|
203
|
+
f(e, "local");
|
|
204
|
+
},
|
|
205
|
+
/**
|
|
206
|
+
* Subscribes to storage changes for a key, both in the same tab and across browser tabs/windows.
|
|
207
|
+
* Callbacks are invoked when changes occur via localStore.set() or localStore.remove() in the same tab,
|
|
208
|
+
* and also when changes are made in other tabs/windows.
|
|
209
|
+
*
|
|
210
|
+
* @template T - The type of the stored value
|
|
211
|
+
* @param key - The storage key to watch
|
|
212
|
+
* @param callback - Function called when storage changes
|
|
213
|
+
* @returns Unsubscribe function to stop listening
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* ```typescript
|
|
217
|
+
* const key = createStorageKey('user-status')
|
|
218
|
+
* const unsubscribe = localStore.subscribe<UserStatus>(key, (item) => {
|
|
219
|
+
* const status = item.json()
|
|
220
|
+
* console.log('User status changed:', status)
|
|
221
|
+
* })
|
|
222
|
+
*
|
|
223
|
+
* // Changes in same tab trigger callback
|
|
224
|
+
* localStore.set(key, { online: true })
|
|
225
|
+
*
|
|
226
|
+
* // Later, stop listening
|
|
227
|
+
* unsubscribe()
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
subscribe(e, t) {
|
|
231
|
+
return S(e, "local", this.get, t);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
export {
|
|
235
|
+
S as a,
|
|
236
|
+
w as c,
|
|
237
|
+
_ as l,
|
|
238
|
+
d as s
|
|
239
|
+
};
|
|
@@ -21,6 +21,7 @@ declare const createExperienceFactory: ({ client, experience }: {
|
|
|
21
21
|
edges: ExperienceEdge[];
|
|
22
22
|
conditionals: ExperienceConditional[];
|
|
23
23
|
}>;
|
|
24
|
+
fieldsStore: import('effector').Store<Field[]>;
|
|
24
25
|
componentStore: import('effector').Store<{
|
|
25
26
|
name: string;
|
|
26
27
|
component: AdaptedComponent<string, unknown>;
|
|
@@ -51,6 +52,7 @@ declare const createExperienceIndexFactory: ({ client }: {
|
|
|
51
52
|
edges: ExperienceEdge[];
|
|
52
53
|
conditionals: ExperienceConditional[];
|
|
53
54
|
}>;
|
|
55
|
+
fieldsStore: import('effector').Store<Field[]>;
|
|
54
56
|
componentStore: import('effector').Store<{
|
|
55
57
|
name: string;
|
|
56
58
|
component: AdaptedComponent<string, unknown>;
|
|
@@ -76,6 +78,7 @@ declare const createExperienceIndexFactory: ({ client }: {
|
|
|
76
78
|
edges: ExperienceEdge[];
|
|
77
79
|
conditionals: ExperienceConditional[];
|
|
78
80
|
}>;
|
|
81
|
+
fieldsStore: import('effector').Store<Field[]>;
|
|
79
82
|
componentStore: import('effector').Store<{
|
|
80
83
|
name: string;
|
|
81
84
|
component: AdaptedComponent<string, unknown>;
|
|
@@ -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;AAE1C,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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@ declare const createExperienceInstanceFactory: ({ client, experience, target, }:
|
|
|
37
37
|
edges: import('../..').ExperienceEdge[];
|
|
38
38
|
conditionals: import('../..').ExperienceConditional[];
|
|
39
39
|
}>;
|
|
40
|
+
fieldsStore: import('effector').Store<import('../..').Field[]>;
|
|
40
41
|
currentNodeStore: import('effector').Store<ExperienceNode | null>;
|
|
41
42
|
currentStepStore: import('effector').Store<ExperienceStep | null>;
|
|
42
43
|
nextReachableStepNodesStore: import('effector').Store<ExperienceNode[]>;
|
|
@@ -79,6 +80,7 @@ declare const createExperienceInstanceIndexFactory: ({ client }: {
|
|
|
79
80
|
edges: import('../..').ExperienceEdge[];
|
|
80
81
|
conditionals: import('../..').ExperienceConditional[];
|
|
81
82
|
}>;
|
|
83
|
+
fieldsStore: import('effector').Store<import('../..').Field[]>;
|
|
82
84
|
currentNodeStore: import('effector').Store<ExperienceNode | null>;
|
|
83
85
|
currentStepStore: import('effector').Store<ExperienceStep | null>;
|
|
84
86
|
nextReachableStepNodesStore: import('effector').Store<ExperienceNode[]>;
|
|
@@ -116,6 +118,7 @@ declare const createExperienceInstanceIndexFactory: ({ client }: {
|
|
|
116
118
|
edges: import('../..').ExperienceEdge[];
|
|
117
119
|
conditionals: import('../..').ExperienceConditional[];
|
|
118
120
|
}>;
|
|
121
|
+
fieldsStore: import('effector').Store<import('../..').Field[]>;
|
|
119
122
|
currentNodeStore: import('effector').Store<ExperienceNode | null>;
|
|
120
123
|
currentStepStore: import('effector').Store<ExperienceStep | null>;
|
|
121
124
|
nextReachableStepNodesStore: import('effector').Store<ExperienceNode[]>;
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAubF,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"}
|
package/dist/types/picked.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export declare class Picked {
|
|
|
82
82
|
edges: import('.').ExperienceEdge[];
|
|
83
83
|
conditionals: import('.').ExperienceConditional[];
|
|
84
84
|
}>;
|
|
85
|
+
fieldsStore: import('effector').Store<Field[]>;
|
|
85
86
|
currentNodeStore: import('effector').Store<import('.').ExperienceNode | null>;
|
|
86
87
|
currentStepStore: import('effector').Store<import('.').ExperienceStep | null>;
|
|
87
88
|
nextReachableStepNodesStore: import('effector').Store<import('.').ExperienceNode[]>;
|
|
@@ -119,6 +120,7 @@ export declare class Picked {
|
|
|
119
120
|
edges: import('.').ExperienceEdge[];
|
|
120
121
|
conditionals: import('.').ExperienceConditional[];
|
|
121
122
|
}>;
|
|
123
|
+
fieldsStore: import('effector').Store<Field[]>;
|
|
122
124
|
currentNodeStore: import('effector').Store<import('.').ExperienceNode | null>;
|
|
123
125
|
currentStepStore: import('effector').Store<import('.').ExperienceStep | null>;
|
|
124
126
|
nextReachableStepNodesStore: import('effector').Store<import('.').ExperienceNode[]>;
|
|
@@ -146,6 +148,7 @@ export declare class Picked {
|
|
|
146
148
|
edges: import('.').ExperienceEdge[];
|
|
147
149
|
conditionals: import('.').ExperienceConditional[];
|
|
148
150
|
}>;
|
|
151
|
+
fieldsStore: import('effector').Store<Field[]>;
|
|
149
152
|
componentStore: import('effector').Store<{
|
|
150
153
|
name: string;
|
|
151
154
|
component: AdaptedComponent<string, unknown>;
|
|
@@ -171,6 +174,7 @@ export declare class Picked {
|
|
|
171
174
|
edges: import('.').ExperienceEdge[];
|
|
172
175
|
conditionals: import('.').ExperienceConditional[];
|
|
173
176
|
}>;
|
|
177
|
+
fieldsStore: import('effector').Store<Field[]>;
|
|
174
178
|
componentStore: import('effector').Store<{
|
|
175
179
|
name: string;
|
|
176
180
|
component: AdaptedComponent<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picked.d.ts","sourceRoot":"","sources":["../../src/picked.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,UAAU,EAIhB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,iBAAiB,EAAe,MAAM,0BAA0B,CAAA;AAC3F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EAGtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAEL,KAAK,SAAS,EAEf,MAAM,gCAAgC,CAAA;AAGvC,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAMzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;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,MA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