@picked/client 0.0.12-next.1 → 0.0.12-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +461 -452
- package/dist/esm/plugins/create-experience/index.js +45 -45
- package/dist/esm/server/index.js +1 -1
- package/dist/experience-instance-7IUp4MTc.js +781 -0
- package/dist/experience-instance-BLph5qCo.cjs +1 -0
- package/dist/types/entities/experience/experience.d.ts +5 -5
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +3 -3
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts +5 -2
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/picked.d.ts +4 -4
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +3 -3
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +10 -4
- package/dist/types/utils/events.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/experience-instance-BBz99AXU.js +0 -766
- package/dist/experience-instance-DDsqvl4c.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("effector"),G=require("@withease/factories"),H=require("./supports-YvpQZxbh.cjs"),N=require("./logger-BsmHUUw1.cjs"),mt=require("./object-BbFTsGh3.cjs");function ht(t){return typeof t=="number"&&!isNaN(t)}function R(t){return typeof t=="string"}function E(t){return Array.isArray(t)}function rt(t){return t instanceof Promise}function tt(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===1}function m(t){if(ht(t))return t;const e=parseFloat(`${t}`);return isNaN(e)?0:e}function T(t){return`${t}`}const St={"==":(t,e)=>t==e,"===":(t,e)=>t===e,"!=":(t,e)=>t!=e,"!==":(t,e)=>t!==e,">":(t,e)=>m(t)>m(e),">=":(t,e)=>m(t)>=m(e),"<":(t,e,r)=>{const n=m(t),a=m(e);if(r===void 0)return n<a;const c=m(r);return n<a&&a<c},"<=":(t,e,r)=>{const n=m(t),a=m(e);if(r===void 0)return n<=a;const c=m(r);return n<=a&&a<=c},"!!":async t=>await B(t),"!":async t=>!await B(t),"%":(t,e)=>m(t)%m(e),log:t=>(console.log(t),t),in:(t,e)=>e?R(e)?e.indexOf(T(t))!==-1:E(e)?e.includes(t):!1:!1,cat:(...t)=>t.map(T).join(""),substr:(t,e,r)=>{const n=T(t),a=m(e);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)},"+":(...t)=>t.reduce((e,r)=>m(e)+m(r),0),"*":(...t)=>t.reduce((e,r)=>m(e)*m(r),1),"-":(t,e)=>{const r=m(t);return e===void 0?-r:r-m(e)},"/":(t,e)=>m(t)/m(e),min:(...t)=>Math.min(...t.map(m)),max:(...t)=>Math.max(...t.map(m)),merge:(...t)=>t.reduce((e,r)=>E(r)?e.concat(r):e.concat([r]),[]),var(t,e){const r=arguments.length>1?e:null;if(t===""||t==="."||t===null||t===void 0)return this;if(typeof t=="number"&&Array.isArray(this))return t>=0&&t<this.length?this[t]:r;const n=T(t);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(...t){const e=E(t[0])?t[0]:t,r=[];for(const n of e){const a=await g({var:n},this);(a===null||a==="")&&r.push(`${n}`)}return r},async missing_some(t,e){const r=await g({missing:e},this);if(!E(r)||!E(e))return[];const n=r.filter(R);return e.filter(R).length-n.length>=m(t)?[]:n},invoke(t){return typeof t!="function"?null:t()},regexp_matches(t,e){let r=t,n="";if(E(t)){const[c,o]=t;r=c,n=o}return!R(r)||!R(n)?!1:new RegExp(r,n).test(T(e))},throw(t){throw new Error(T(t))}};async function g(t,e){if(!t)return t;if(rt(t))return g(await t,e);if(E(t))return Promise.all(t.map(o=>g(o,e)));if(!tt(t))return t;const r=yt(t);let n=r?t[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],e)))return g(n[o+1],e);return n.length%2===1?g(n[n.length-1],e):null;case"and":{let o=null;for(const u of n)if(o=await g(u,e),!await B(o))return o;return o}case"or":{let o=null;for(const u of n)if(o=await g(u,e),await B(o))return o;return o}case"map":{const o=await g(n[0],e);return E(o)?await Promise.all(o.map(u=>g(n[1],u))):[]}case"filter":{const o=await g(n[0],e);return E(o)?(await Promise.all(o.map(async p=>{const y=await B(await g(n[1],p));return{item:p,shouldInclude:y}}))).filter(({shouldInclude:p})=>p).map(({item:p})=>p):[]}case"reduce":{const o=await g(n[0],e);if(!E(o))return n.length>2?await g(n[2],e):null;const u=n[1];let y=n.length>2?await g(n[2],e):null;for(const k of o)y=await g(u,{current:k,accumulator:y});return y}case"all":{const o=await g(n[0],e);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],e);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],e);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],e)}catch(o){return tt(o)?await g(o,e):n[1]?await g(n[1],o):o instanceof Error?o.message:o}}const a=await Promise.all(n.map(o=>g(o,e))),c=r?St[r]:void 0;if(!c)throw new Error(`Unrecognized operation ${r}`);return c.apply(e,a)}async function B(t){return rt(t)?B(await t):!(Array.isArray(t)&&t.length===0)&&!!t}function yt(t){return Object.keys(t)[0]}function ot(t){return!mt.isEmpty(t)}async function z(t,e,r){const n=t.getStateSnapshot(),a=t.predicates.listStore.getState().reduce((u,p)=>({...u,[p.name]:()=>p.predicate(n)}),{}),c=t.features.listStore.getState().reduce((u,p)=>({...u,[p.id]:async()=>{const{bucket:y}=await p.getBucket();return y}}),{}),o={...r,responses:t.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(e,o)}function wt(t){return!H.supportsWindow()||!H.supportsDocument()?[]:Array.from(window.document.querySelectorAll(t)).filter(e=>e instanceof HTMLElement)}function Et(t){if(!H.supportsShadowRoot())throw new Error("Shadow DOM is not supported in this environment");return t.attachShadow({mode:"closed"})}function Nt(){return new Promise((t,e)=>{if(!H.supportsDocument()){e();return}document.readyState!=="loading"?t():document.addEventListener("readystatechange",()=>t(),{once:!0})})}function It(t,e){const r=new MutationObserver(n=>{document.contains(t)||(r.disconnect(),e())});r.observe(document.body,{childList:!0,subtree:!0})}const j="picked-root",q="picked-target",xt="picked-root";function kt(t,e){return[...t,{selector:`${xt}[experience-id="${e}"]`,placement:"replace"}].flatMap(n=>{const a=wt(n.selector).filter(c=>!At(c,e)&&!it(c,e));return{...n,elements:a}})}function vt(t,e){return t.flatMap(r=>r.elements.map(n=>Ot(n,r.placement,e)))}function bt(t,e){t.classList.add(q),t.classList.add(`${q}-${e}`)}function At(t,e){return e?t.classList.contains(`${q}-${e}`):t.classList.contains(`${q}`)}function it(t,e){return e?t.classList.contains(`${j}-${e}`):t.classList.contains(j)}function Bt(t){const e=document.createElement("div");return e.style.display="block",e.classList.add(j),e.classList.add(`${j}-${t}`),e}function Ot(t,e,r){let n;const a=Bt(r);if(t instanceof Document)n=t.body.appendChild(a);else{switch(e){case"replace":t.replaceWith(a);break;case"before":t.before(a);break;case"after":t.after(a);break;case"prepend":t.prepend(a);break;default:t.append(a);break}n=a}return n}function Ft(t){return t.type==="conditional"}function L(t){return t.type==="step"}function $t(t){return t.type==="experience"}function et(t){return t.type==="origin"}function nt(t){return t.type==="action"}const st=(t,e,r,n,a=new Set)=>a.has(r.id)?[]:(a.add(r.id),L(r)&&!n?[r]:e.filter(o=>o.sourceNodeId===r.id).flatMap(o=>{const u=t.find(p=>p.id===o.destinationNodeId);return u?st(t,e,u,!1,a):[]})),_t=(t,e,r)=>st(t,e,r,!0,new Set),at=(t,e,r,n,a=new Set)=>{if(a.has(r.id))return[-1,-1];a.add(r.id);const c=e.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 y=t.find(M=>M.id===p.destinationNodeId);if(!y)continue;const[k,O]=at(t,e,y,!1,new Set(a));k!==-1&&(o=Math.min(o,k+1),u=Math.max(u,O+1))}return o===1/0?[-1,-1]:[o,u]},Tt=(t,e,r)=>at(t,e,r,!0,new Set),ct=(t,e,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=e.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=t.find(O=>O.id===u.sourceNodeId);if(!p)continue;const[y,k]=ct(t,e,p,new Set(n));y!==-1&&(c=Math.min(c,y+1),o=Math.max(o,k+1))}return c===1/0?[-1,-1]:[c,o]},Lt=(t,e,r)=>ct(t,e,r,new Set),ut=t=>t.find(r=>r.type==="origin")||null,W=(t,e,r)=>{if(!t)return ut(e);const n=r.find(c=>c.sourceNodeId===t.id);if(!n)return null;const a=e.find(c=>c.id===n.destinationNodeId);return a||null};async function Mt(t,e,r,n){const a=t?"true":"false",c=n.find(o=>o.sourceNodeHandle===a&&o.sourceNodeId===e);return r.find(o=>o.id===(c==null?void 0:c.destinationNodeId))}const X=s.createDomain("experience-instance"),Dt=G.createFactory(({client:t,experience:e,target:r})=>{const n=s.createEvent(),a=s.createEvent(),c=s.createEvent(),o=s.createEvent(),u=s.createEvent(),p=s.createEvent(),y=e.componentStore,k=X.store("transitioning"),O=t.history.entriesStore.map(i=>i.filter(l=>l.experienceId===e.id)),M=O.map(i=>i.filter(l=>L(l.node))),I=O.map(i=>{var l;return((l=i[i.length-1])==null?void 0:l.node)||null}),f=s.combine(e.treeStore,I,({steps:i},l)=>i.find(d=>l&&L(l)&&d.id===l.stepId)||null),h=s.combine(e.treeStore,I,({nodes:i,edges:l},d)=>d?_t(i,l,d):[]),b=s.combine(e.treeStore,I,({nodes:i,edges:l},d)=>d?Lt(i,l,d):[-1,-1]),$=s.combine(e.treeStore,I,({nodes:i,edges:l},d)=>d?Tt(i,l,d):[-1,-1]),F=e.configStore.getState().initializeOpenLogic,A=X.store(F===!0),P=s.createApi(A,{open:()=>!0,close:()=>!1,toggle:i=>!i,set:(i,l)=>l}),lt=s.createEffect(async()=>{t.history.back({experienceId:e.id})}),dt=s.attach({source:e.treeStore,effect:async(i,l)=>{const d=i.nodes.find(w=>L(w)&&w.stepId===l);d&&t.history.push({experienceId:e.id,node:d})}}),J=s.attach({source:I,effect:i=>{}}),K=s.attach({source:e.treeStore,effect:async({nodes:i})=>ut(i)}),U=s.attach({source:e.treeStore,effect:async({nodes:i,edges:l},d)=>W(d,i,l)}),V=s.attach({source:e.treeStore,effect:async({nodes:i,edges:l,conditionals:d},w)=>{if(!w)return;const _=d.find(v=>v.id===w.conditionalId);if(!_)return;const x=w.id,S=await z(t,_.condition);return Mt(!!S,x,i,l)}}),Q=s.attach({source:e.treeStore,effect:async({nodes:i,edges:l},d)=>{if(!d||!nt(d))return;const w=d.action;if(!w){N.logger("warn",`Action node ${d.id} has no action name`);return}const _=t.actions.getByName(w).getState();if(!_){N.logger("warn",`Action '${w}' not registered on client`);const x=l.find(S=>S.sourceNodeId===d.id&&S.sourceNodeHandle==="false");return x?i.find(S=>S.id===x.destinationNodeId):null}if(typeof _.action!="function"){N.logger("warn",`Action '${w}' is not a function`);const x=l.find(S=>S.sourceNodeId===d.id&&S.sourceNodeHandle==="false");return x?i.find(S=>S.id===x.destinationNodeId):null}try{N.logger("info",`Executing action: ${w}`),await _.action();const x=l.find(v=>v.sourceNodeId===d.id&&v.sourceNodeHandle==="true");if(!x)return N.logger("warn",`No 'true' edge found for action node ${d.id}`),null;const S=i.find(v=>v.id===x.destinationNodeId);return N.logger("info",`Action '${w}' succeeded, moving to node ${S==null?void 0:S.id}`),S||null}catch(x){N.logger("warn",`Action '${w}' failed:`,x);const S=l.find(C=>C.sourceNodeId===d.id&&C.sourceNodeHandle==="false");if(!S)return N.logger("warn",`No 'false' edge found for action node ${d.id}`),null;const v=i.find(C=>C.id===S.destinationNodeId);return N.logger("info",`Action '${w}' failed, moving to node ${v==null?void 0:v.id}`),v||null}}}),pt=s.createEffect(i=>{if(i)return t.launchExperienceById(i.experienceId)}),Y=s.attach({source:[I,e.treeStore],effect:async([i,{nodes:l,edges:d}])=>W(i,l,d)}),D=s.attach({source:[I,e.treeStore],effect:async([i,{nodes:l,edges:d}])=>W(i,l,d)}),gt=s.createEffect(i=>{t.history.push({experienceId:e.id,node:i})}),Z=s.attach({source:e.configStore,effect:async({initializeOpenLogic:i})=>ot(i)?!!await z(t,i):i??!1});return s.split({source:I,match:i=>i?Ft(i)?"condition":L(i)?"step":$t(i)?"launchExperience":et(i)?"origin":nt(i)?"action":"other":"none",cases:{none:K,origin:U,condition:V,step:J,launchExperience:pt,action:Q,__:s.createEvent()}}),s.sample({clock:[V.doneData,U.doneData,K.doneData,D.doneData,Y.doneData,Q.doneData],filter:Boolean,target:gt}),s.sample({clock:a,target:D}),s.sample({clock:a,source:f,filter:Boolean,target:t.eventBus.prepend(i=>({type:"step_submit",step:i,experience:e}))}),s.sample({clock:D.done,source:f,filter:Boolean,target:t.eventBus.prepend(i=>({type:"step_submit_success",step:i,experience:e}))}),s.sample({clock:D.fail,source:f,filter:Boolean,target:t.eventBus.prepend(i=>({type:"step_submit_error",step:i,experience:e}))}),s.sample({clock:c,target:lt}),s.sample({clock:o,target:dt}),s.sample({source:s.combine([V.pending,U.pending,K.pending,D.pending]),fn:i=>i.some(Boolean)?"transitioning":"ready",target:k}),s.sample({clock:J.doneData,source:f,filter:Boolean,target:t.eventBus.prepend(i=>({type:"step_enter",step:i,experience:e}))}),s.sample({clock:p,target:Z}),s.sample({source:Z.doneData,fn:i=>!!i,target:A}),s.sample({source:I,clock:n,filter:i=>i?et(i):!0,target:Y}),F===!0&&n(),s.sample({source:A,filter:i=>!!i,target:n}),s.sample({source:A,filter:Boolean,target:t.eventBus.prepend(()=>({type:"experience_open",experience:e}))}),s.sample({source:A,filter:i=>!i,target:t.eventBus.prepend(()=>({type:"experience_close",experience:e}))}),s.sample({clock:u,target:[p]}),u(),{id:Math.random().toString(36).substring(7),experienceId:e.id,configStore:e.configStore,target:r,componentStore:y,stateStore:k,isOpenStore:A,open:P.open,close:P.close,toggleOpen:P.toggle,setOpen:P.set,treeStore:e.treeStore,currentNodeStore:I,currentStepStore:f,nextReachableStepNodesStore:h,stepsToOriginStore:b,stepsToLeafStore:$,goToNextStep:a,goToPreviousStep:c,goToStepById:o,stepsHistoryStore:M}});function ft(t){return G.invoke(Dt,t)}const Rt=G.createFactory(({client:t})=>{const e=X.store({}),r=s.createEvent(),n=s.createEvent(),a=s.createEvent(),c=s.createApi(e,{register(f,h){const b=[...f[h.experienceId]??[]];return b.push(h),{...f,[h.experienceId]:b}},unregister(f,h){var F;const b=h.experienceId,$=(F=f[b])==null?void 0:F.filter(A=>A!==h);return{...f,[b]:$??[]}}}),o=s.createEffect(({experience:f,target:h})=>ft({client:t,experience:f,target:h})),u=s.createEffect(f=>{c.register(f)}),p=s.createEffect(f=>{f.target&&It(f.target,()=>{a(f)})}),y=s.createEffect(f=>{c.unregister(f)}),k=s.createEffect(f=>{const h=f.componentStore.getState();if(!h){N.logger("warn","No app component registered. Skipping init.");return}const b=h.frameworkStore.getState();if(!b){N.logger("error",`No framework registered for component '${h.name}'. Skipping rendering.`);return}const $=f.target;if(!$){N.logger("error",`No target element registered for experience '${f.experienceId}'. Skipping rendering.`);return}const F=Et($);try{b.render(F,h.component,t,f)}catch(A){N.logger("error",A)}});s.sample({clock:r,target:o}),s.sample({clock:a,target:y}),s.sample({clock:o.doneData,target:[u,p,n]}),s.sample({clock:o.doneData,target:t.eventBus.prepend(f=>({type:"experience_initialized",experienceInstance:f}))}),s.sample({clock:n,target:k});function O(f,h){r({experience:f,target:h})}const M=e.map(f=>Object.values(f).flat());function I(f){return e.map(h=>h[f]||[],{skipVoid:!1})}return{spawn:O,getByExperienceId:I,listStore:M}});function Pt(t){return G.invoke(Rt,t)}exports.createAppHosts=vt;exports.createExperienceInstance=ft;exports.createExperienceInstanceIndex=Pt;exports.domInteractive=Nt;exports.evaluateRuleLogic=z;exports.getTargetElements=kt;exports.isPickedRoot=it;exports.isRulesLogic=ot;exports.isStepNode=L;exports.tagTargetElement=bt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdaptedComponent } from '../component/component';
|
|
2
2
|
import { Picked } from '../../picked';
|
|
3
|
-
import { LogicRule } from '../../logic-engine';
|
|
3
|
+
import { LogicRule, LogicValue } from '../../logic-engine';
|
|
4
4
|
import { Field } from '../field/field';
|
|
5
5
|
export type ExperiencesListStore = ReturnType<typeof createExperienceIndex>;
|
|
6
6
|
export type ExperienceStore = ReturnType<typeof createExperience>;
|
|
@@ -10,10 +10,10 @@ declare const createExperienceFactory: ({ client, experience }: {
|
|
|
10
10
|
}) => {
|
|
11
11
|
id: string;
|
|
12
12
|
configStore: import('effector').Store<{
|
|
13
|
-
type: string;
|
|
14
13
|
name: string;
|
|
15
14
|
decisionLogic: LogicRule | undefined;
|
|
16
15
|
targetSelectors: ExperienceTarget[];
|
|
16
|
+
initializeOpenLogic: LogicValue | LogicRule;
|
|
17
17
|
}>;
|
|
18
18
|
treeStore: import('effector').Store<{
|
|
19
19
|
steps: ExperienceStep[];
|
|
@@ -40,10 +40,10 @@ declare const createExperienceIndexFactory: ({ client }: {
|
|
|
40
40
|
getById: (id: Experience["id"]) => import('effector').Store<{
|
|
41
41
|
id: string;
|
|
42
42
|
configStore: import('effector').Store<{
|
|
43
|
-
type: string;
|
|
44
43
|
name: string;
|
|
45
44
|
decisionLogic: LogicRule | undefined;
|
|
46
45
|
targetSelectors: ExperienceTarget[];
|
|
46
|
+
initializeOpenLogic: LogicValue | LogicRule;
|
|
47
47
|
}>;
|
|
48
48
|
treeStore: import('effector').Store<{
|
|
49
49
|
steps: ExperienceStep[];
|
|
@@ -65,10 +65,10 @@ declare const createExperienceIndexFactory: ({ client }: {
|
|
|
65
65
|
listStore: import('effector').Store<{
|
|
66
66
|
id: string;
|
|
67
67
|
configStore: import('effector').Store<{
|
|
68
|
-
type: string;
|
|
69
68
|
name: string;
|
|
70
69
|
decisionLogic: LogicRule | undefined;
|
|
71
70
|
targetSelectors: ExperienceTarget[];
|
|
71
|
+
initializeOpenLogic: LogicValue | LogicRule;
|
|
72
72
|
}>;
|
|
73
73
|
treeStore: import('effector').Store<{
|
|
74
74
|
steps: ExperienceStep[];
|
|
@@ -142,9 +142,9 @@ export interface ExperienceTarget {
|
|
|
142
142
|
export interface Experience {
|
|
143
143
|
id: string;
|
|
144
144
|
name: string;
|
|
145
|
-
type: string;
|
|
146
145
|
component?: AdaptedComponent;
|
|
147
146
|
conditionals: ExperienceConditional[];
|
|
147
|
+
initializeOpen?: LogicRule | LogicValue;
|
|
148
148
|
actions?: ExperienceAction[];
|
|
149
149
|
decide: LogicRule | undefined;
|
|
150
150
|
edges: ExperienceEdge[];
|
|
@@ -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,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"experience.d.ts","sourceRoot":"","sources":["../../../../src/entities/experience/experience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AAA;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;CACjE;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,YAAY,EAAE,qBAAqB,EAAE,CAAA;IACrC,cAAc,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;IACvC,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC5B,MAAM,EAAE,SAAS,GAAG,SAAS,CAAA;IAC7B,KAAK,EAAE,cAAc,EAAE,CAAA;IACvB,KAAK,EAAE,cAAc,EAAE,CAAA;IACvB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,KAAK,EAAE,cAAc,EAAE,CAAA;IACvB,OAAO,EAAE,gBAAgB,EAAE,CAAA;CAC5B;AAED,eAAO,MAAM,eAAe,GAC1B,YAAY,UAAU,EACtB,iBAAiB,oBAAoB,KACpC,IAEF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,EAAE,YAAY,eAAe,SAa/E,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAU,QAAQ,MAAM,kBASzD,CAAA;AAsBD,eAAO,MAAM,0BAA0B,GACrC,QAAQ,MAAM,EACd,YAAY,eAAe,KAC1B,OAAO,CAAC,OAAO,CAsBjB,CAAA"}
|
|
@@ -14,10 +14,10 @@ declare const createExperienceInstanceFactory: ({ client, experience, target, }:
|
|
|
14
14
|
id: string;
|
|
15
15
|
experienceId: string;
|
|
16
16
|
configStore: import('effector').Store<{
|
|
17
|
-
type: string;
|
|
18
17
|
name: string;
|
|
19
18
|
decisionLogic: import('../../logic-engine').LogicRule | undefined;
|
|
20
19
|
targetSelectors: ExperienceTarget[];
|
|
20
|
+
initializeOpenLogic: import('../../logic-engine').LogicValue | import('../../logic-engine').LogicRule;
|
|
21
21
|
}>;
|
|
22
22
|
target: HTMLElement | undefined;
|
|
23
23
|
componentStore: import('effector').Store<{
|
|
@@ -56,10 +56,10 @@ declare const createExperienceInstanceIndexFactory: ({ client }: {
|
|
|
56
56
|
id: string;
|
|
57
57
|
experienceId: string;
|
|
58
58
|
configStore: import('effector').Store<{
|
|
59
|
-
type: string;
|
|
60
59
|
name: string;
|
|
61
60
|
decisionLogic: import('../../logic-engine').LogicRule | undefined;
|
|
62
61
|
targetSelectors: ExperienceTarget[];
|
|
62
|
+
initializeOpenLogic: import('../../logic-engine').LogicValue | import('../../logic-engine').LogicRule;
|
|
63
63
|
}>;
|
|
64
64
|
target: HTMLElement | undefined;
|
|
65
65
|
componentStore: import('effector').Store<{
|
|
@@ -93,10 +93,10 @@ declare const createExperienceInstanceIndexFactory: ({ client }: {
|
|
|
93
93
|
id: string;
|
|
94
94
|
experienceId: string;
|
|
95
95
|
configStore: import('effector').Store<{
|
|
96
|
-
type: string;
|
|
97
96
|
name: string;
|
|
98
97
|
decisionLogic: import('../../logic-engine').LogicRule | undefined;
|
|
99
98
|
targetSelectors: ExperienceTarget[];
|
|
99
|
+
initializeOpenLogic: import('../../logic-engine').LogicValue | import('../../logic-engine').LogicRule;
|
|
100
100
|
}>;
|
|
101
101
|
target: HTMLElement | undefined;
|
|
102
102
|
componentStore: import('effector').Store<{
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiaF,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,3 +1,4 @@
|
|
|
1
|
+
import { Picked } from '../../picked';
|
|
1
2
|
export interface Feature {
|
|
2
3
|
key: string;
|
|
3
4
|
name: string;
|
|
@@ -37,12 +38,14 @@ export interface ResolvedFeatureBucket extends FeatureBaseBucket {
|
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
export type FeatureBucket = UnresolvedFeatureBucket | ResolvedFeatureBucket;
|
|
40
|
-
declare const createFeatureIndexFactory: (
|
|
41
|
+
declare const createFeatureIndexFactory: ({ client }: {
|
|
42
|
+
client: Picked;
|
|
43
|
+
}) => {
|
|
41
44
|
register: (id: string, feature: Feature) => void;
|
|
42
45
|
getByName: (name: string) => import('effector').Store<FeatureIndexItem | undefined>;
|
|
43
46
|
listStore: import('effector').Store<FeatureBucket[]>;
|
|
44
47
|
};
|
|
45
|
-
export declare function createFeatureIndex(): ReturnType<typeof createFeatureIndexFactory>;
|
|
48
|
+
export declare function createFeatureIndex<T extends Parameters<typeof createFeatureIndexFactory>[0]>(params: T): ReturnType<typeof createFeatureIndexFactory>;
|
|
46
49
|
export declare const setupFeature: (name: string, feature: Feature, features: FeaturesStore) => void;
|
|
47
50
|
export {};
|
|
48
51
|
//# sourceMappingURL=feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../../src/entities/feature/feature.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../../src/entities/feature/feature.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAI1C,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACnE,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,OAAO,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,UAAU,EAAE,KAAK,CAAA;IACjB,SAAS,EAAE,MAAM,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC,CAAA;CACnE;AAED,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,UAAU,EAAE,IAAI,CAAA;IAChB,SAAS,EAAE,MAAM;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAC1D;AAED,MAAM,MAAM,aAAa,GAAG,uBAAuB,GAAG,qBAAqB,CAAA;AAK3E,QAAA,MAAM,yBAAyB,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;mBAgBvD,MAAM,WAAW,OAAO,KAAG,IAAI;sBA6L5B,MAAM;;CAS/B,CAAA;AAEF,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC,CAAC,EAC1F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAE9C;AAED,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,SAAS,OAAO,EAAE,UAAU,aAAa,SAEnF,CAAA"}
|
package/dist/types/picked.d.ts
CHANGED
|
@@ -56,10 +56,10 @@ export declare class Picked {
|
|
|
56
56
|
id: string;
|
|
57
57
|
experienceId: string;
|
|
58
58
|
configStore: import('effector').Store<{
|
|
59
|
-
type: string;
|
|
60
59
|
name: string;
|
|
61
60
|
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
62
61
|
targetSelectors: import('.').ExperienceTarget[];
|
|
62
|
+
initializeOpenLogic: import('./logic-engine').LogicValue | import('./logic-engine').LogicRule;
|
|
63
63
|
}>;
|
|
64
64
|
target: HTMLElement | undefined;
|
|
65
65
|
componentStore: import('effector').Store<{
|
|
@@ -93,10 +93,10 @@ export declare class Picked {
|
|
|
93
93
|
id: string;
|
|
94
94
|
experienceId: string;
|
|
95
95
|
configStore: import('effector').Store<{
|
|
96
|
-
type: string;
|
|
97
96
|
name: string;
|
|
98
97
|
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
99
98
|
targetSelectors: import('.').ExperienceTarget[];
|
|
99
|
+
initializeOpenLogic: import('./logic-engine').LogicValue | import('./logic-engine').LogicRule;
|
|
100
100
|
}>;
|
|
101
101
|
target: HTMLElement | undefined;
|
|
102
102
|
componentStore: import('effector').Store<{
|
|
@@ -132,10 +132,10 @@ export declare class Picked {
|
|
|
132
132
|
getById: (id: Experience["id"]) => import('effector').Store<{
|
|
133
133
|
id: string;
|
|
134
134
|
configStore: import('effector').Store<{
|
|
135
|
-
type: string;
|
|
136
135
|
name: string;
|
|
137
136
|
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
138
137
|
targetSelectors: import('.').ExperienceTarget[];
|
|
138
|
+
initializeOpenLogic: import('./logic-engine').LogicValue | import('./logic-engine').LogicRule;
|
|
139
139
|
}>;
|
|
140
140
|
treeStore: import('effector').Store<{
|
|
141
141
|
steps: import('.').ExperienceStep[];
|
|
@@ -157,10 +157,10 @@ export declare class Picked {
|
|
|
157
157
|
listStore: import('effector').Store<{
|
|
158
158
|
id: string;
|
|
159
159
|
configStore: import('effector').Store<{
|
|
160
|
-
type: string;
|
|
161
160
|
name: string;
|
|
162
161
|
decisionLogic: import('./logic-engine').LogicRule | undefined;
|
|
163
162
|
targetSelectors: import('.').ExperienceTarget[];
|
|
163
|
+
initializeOpenLogic: import('./logic-engine').LogicValue | import('./logic-engine').LogicRule;
|
|
164
164
|
}>;
|
|
165
165
|
treeStore: import('effector').Store<{
|
|
166
166
|
steps: import('.').ExperienceStep[];
|
|
@@ -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;AACv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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;CAGzF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActionNode, Experience, ExperienceConditional, ExperienceEdge, ExperienceNode, ExperienceStep, ExperienceTarget } from '../../entities/experience/experience';
|
|
2
2
|
import { AdaptedComponent } from '../../entities/component/component';
|
|
3
|
-
import { LogicRule } from '../../logic-engine';
|
|
3
|
+
import { LogicRule, LogicValue } from '../../logic-engine';
|
|
4
4
|
import { Field, FieldBooleanMultiple, FieldBooleanSingular, FieldNumberMultiple, FieldNumberSingular, FieldTextMultiple, FieldTextSingular } from '../../entities/field/field';
|
|
5
5
|
import { Serialized } from './serialization';
|
|
6
6
|
export interface Nodeable {
|
|
@@ -136,9 +136,9 @@ export type SerializableField = {
|
|
|
136
136
|
export interface SerializableExperience {
|
|
137
137
|
id: string;
|
|
138
138
|
component?: AdaptedComponent;
|
|
139
|
-
type: string;
|
|
140
139
|
name: string;
|
|
141
140
|
decide?: LogicRule;
|
|
141
|
+
initializeOpen?: LogicRule | LogicValue;
|
|
142
142
|
targets: ExperienceTarget[];
|
|
143
143
|
steps: SerializableStep[];
|
|
144
144
|
nodes: SerializableNode[];
|
|
@@ -164,9 +164,9 @@ export interface CreateExperienceOptions {
|
|
|
164
164
|
id: string;
|
|
165
165
|
name: string;
|
|
166
166
|
decide: LogicRule;
|
|
167
|
+
initializeOpen?: LogicRule | LogicValue;
|
|
167
168
|
targets: ExperienceTarget[];
|
|
168
169
|
component?: AdaptedComponent;
|
|
169
|
-
type: string;
|
|
170
170
|
}
|
|
171
171
|
export type OrphanStep = Omit<SerializableStep, 'nextStep' | 'nextConditional' | 'addNextExperience' | 'node' | 'serialize' | 'addField' | 'experience'> & {
|
|
172
172
|
addField: (fieldOrFieldOptions: CreateFieldOptions | SerializableField) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-experience.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/create-experience.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAEV,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAGjB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"create-experience.d.ts","sourceRoot":"","sources":["../../../../src/plugins/create-experience/create-experience.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAEV,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,cAAc,EACd,gBAAgB,EAGjB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAE1E,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAAK,EACV,KAAK,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEhE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAC9B;AAED,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,iBAAiB,EAAE,CAAA;IAC3B,UAAU,EAAE,sBAAsB,CAAA;I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C,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,SAAS,CAAA;IACjB,cAAc,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;IACvC,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,SAAS,CAAC,EAAE,gBAAgB,CAAA;CAC7B;AAED,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,gBAAgB,EACd,UAAU,GACV,iBAAiB,GACjB,mBAAmB,GACnB,MAAM,GACN,WAAW,GACX,UAAU,GACV,YAAY,CACf,GAAG;IACF,QAAQ,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,GAAG,iBAAiB,KAAK,IAAI,CAAA;CAChF,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,aAAa,iBAAiB,KAAG,UAgB3D,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,aAAa,iBAAiB,GAAG,UAAU,EAC3C,YAAY,sBAAsB,KACjC,gBA+BF,CAAA;AAID,eAAO,MAAM,UAAU,GACrB,aAAa,iBAAiB,EAC9B,YAAY,sBAAsB,KACjC,gBA+EF,CAAA;AAED,eAAO,MAAM,UAAU,GACrB,aAAa,iBAAiB,EAC9B,YAAY,sBAAsB,KACjC,gBAkBF,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,oBAAoB,wBAAwB,EAC5C,YAAY,sBAAsB,KACjC,uBA0CF,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,cAAc,kBAAkB,KAAG,iBAiN9D,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,YAAY,uBAAuB,KAAG,sBAsLtE,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ValidationError } from '../entities/response/response';
|
|
2
2
|
import { ExperienceStep, ExperienceStore } from '../entities/experience/experience';
|
|
3
3
|
import { ExperienceInstance } from '../entities/experience-instance/experience-instance';
|
|
4
|
+
import { ResolvedFeature } from '../entities/feature/feature';
|
|
4
5
|
export interface FormPayload {
|
|
5
6
|
id: string;
|
|
6
7
|
title: string;
|
|
@@ -10,6 +11,9 @@ export interface PayloadMap {
|
|
|
10
11
|
experience_initialized: {
|
|
11
12
|
experienceInstance: ExperienceInstance;
|
|
12
13
|
};
|
|
14
|
+
feature_decide: {
|
|
15
|
+
feature: ResolvedFeature;
|
|
16
|
+
};
|
|
13
17
|
initialized: {
|
|
14
18
|
version: string;
|
|
15
19
|
};
|
|
@@ -47,12 +51,12 @@ export interface PayloadMap {
|
|
|
47
51
|
};
|
|
48
52
|
form_submit: {
|
|
49
53
|
form: FormPayload;
|
|
50
|
-
experience
|
|
54
|
+
experience: ExperienceInstance;
|
|
51
55
|
step?: ExperienceStep;
|
|
52
56
|
};
|
|
53
57
|
form_submit_success: {
|
|
54
58
|
form: FormPayload;
|
|
55
|
-
experience
|
|
59
|
+
experience: ExperienceInstance;
|
|
56
60
|
step?: ExperienceStep;
|
|
57
61
|
};
|
|
58
62
|
form_submit_error: {
|
|
@@ -60,20 +64,22 @@ export interface PayloadMap {
|
|
|
60
64
|
exception: {
|
|
61
65
|
reason: ValidationError[];
|
|
62
66
|
};
|
|
63
|
-
experience
|
|
67
|
+
experience: ExperienceInstance;
|
|
64
68
|
step?: ExperienceStep;
|
|
65
69
|
};
|
|
66
70
|
field_validation_error: {
|
|
67
71
|
exception: {
|
|
68
72
|
reason: ValidationError[];
|
|
69
73
|
};
|
|
74
|
+
experience: ExperienceInstance;
|
|
75
|
+
step?: ExperienceStep;
|
|
70
76
|
};
|
|
71
77
|
}
|
|
72
78
|
export type PickedEventType = keyof PayloadMap;
|
|
73
79
|
export type EventBusPayload = {
|
|
74
80
|
[K in PickedEventType]: {
|
|
75
81
|
type: K;
|
|
76
|
-
} & (PayloadMap[K] extends never ?
|
|
82
|
+
} & (PayloadMap[K] extends never ? object : PayloadMap[K]);
|
|
77
83
|
}[PickedEventType];
|
|
78
84
|
export declare const createEventBus: () => import('effector').EventCallable<EventBusPayload>;
|
|
79
85
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -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;
|
|
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,sBAAsB,EAAE;QAAE,kBAAkB,EAAE,kBAAkB,CAAA;KAAE,CAAA;IAClE,cAAc,EAAE;QAAE,OAAO,EAAE,eAAe,CAAA;KAAE,CAAA;IAC5C,WAAW,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;IAChC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IACvB,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,EAA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C,SAAS,KAAK,GAAG,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;CAC7F,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.12-next.
|
|
3
|
+
"version": "0.0.12-next.11",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@withease/factories": "^1.0.5"
|
|
6
6
|
},
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
"@repo/typescript-config": "workspace:*",
|
|
10
10
|
"@rollup/plugin-replace": "^6.0.2",
|
|
11
11
|
"@testing-library/dom": "^10.4.0",
|
|
12
|
-
"@vitest/browser": "^3.2.
|
|
13
|
-
"@vitest/coverage-istanbul": "^3.2.
|
|
12
|
+
"@vitest/browser": "^3.2.4",
|
|
13
|
+
"@vitest/coverage-istanbul": "^3.2.4",
|
|
14
14
|
"effector": "^23.3.0",
|
|
15
|
-
"happy-dom": "^
|
|
15
|
+
"happy-dom": "^20.0.2",
|
|
16
16
|
"tslib": "^2.8.1",
|
|
17
17
|
"typedoc": "^0.28.5",
|
|
18
18
|
"typedoc-plugin-markdown": "^4.6.3",
|
|
19
|
-
"vite": "^6.
|
|
19
|
+
"vite": "^6.4.1",
|
|
20
20
|
"vite-plugin-dts": "^4.5.4",
|
|
21
|
-
"vitest": "^3.2.
|
|
21
|
+
"vitest": "^3.2.4"
|
|
22
22
|
},
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|