@picked/svelte 0.0.1-dev.1773719715758 → 0.0.1-dev.1773729274420
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getStepFields as m}from"
|
|
1
|
+
import{getStepFields as m}from"./get-step-fields.js";import{createStore as u,attach as F,createEffect as S,sample as i}from"effector";function k(e,r,s){const o=u([]),t=F({source:{allFields:e.fields.listStore,fieldIds:r,staged:s,committed:e.responses.getAllStore},effect:S(async({allFields:l,fieldIds:a,staged:c,committed:d})=>{const f=l.filter(p=>a.includes(p.id)),n={...d,...c};return await m(e,f,{responses:n})})});return i({clock:t.doneData,target:o}),t(),i({clock:[e.responses.listStore,r,e.fields.listStore,s],target:t}),{fieldsStore:o}}export{k as createFieldEvaluator};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{evaluateRuleLogic as e}from"@picked/client";function u(o){return Array.isArray(o.options)&&o.options.some(t=>"condition"in t)}function a(o){return o.some(t=>t.condition||u(t))}async function R(o,t,s){return t.length===0||!a(t)?t:(await Promise.all(t.map(async n=>{if(!(n.condition?await e(o,n.condition,s):!0))return null;if(!Array.isArray(n.options)||!u(n))return n;const r=(await Promise.all(n.options.map(async i=>i.condition?await e(o,i.condition,s)?i:null:i))).filter(i=>i!==null);return r.length===n.options.length?n:r.length===0?null:{...n,options:r}}))).filter(n=>n!==null)}export{R as getStepFields};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/svelte",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.1773729274420",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"d3": "^7.9.0"
|
|
6
6
|
},
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
},
|
|
89
89
|
"module": "./dist/index.js",
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@picked/client": "0.0.1-dev.
|
|
91
|
+
"@picked/client": "0.0.1-dev.1773729274420",
|
|
92
92
|
"effector": "^23.3.0",
|
|
93
93
|
"svelte": "^5.34.3"
|
|
94
94
|
},
|