@streamline-pulse/formkrafter-wc 0.1.1 → 0.2.0
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/README.md +3 -3
- package/dist/cjs/fk-brick-actions_18.cjs.entry.js +41 -40
- package/dist/cjs/formkrafter-wc.cjs.js +2 -2
- package/dist/cjs/{index-By4GGW_q.js → index-Can2MpG5.js} +215 -23
- package/dist/cjs/{index-D_7eGIJ0.js → index-CbyFxLc_.js} +26 -2
- package/dist/cjs/index.cjs.js +3 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/fk-brick-render/fk-brick-render.js +31 -3
- package/dist/collection/components/fk-file-input/fk-file-input.css +26 -5
- package/dist/collection/components/fk-file-input/fk-file-input.js +45 -6
- package/dist/collection/components/fk-form-builder/fk-form-builder.css +30 -0
- package/dist/collection/components/fk-form-render/fk-form-render.js +1 -1
- package/dist/collection/i18n/i18n.js +12 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/registry/default-bricks.js +161 -23
- package/dist/components/fk-brick-actions.js +1 -1
- package/dist/components/fk-brick-list.js +1 -1
- package/dist/components/fk-brick-mold-item.js +1 -1
- package/dist/components/fk-brick-not-found.js +1 -1
- package/dist/components/fk-brick-render.js +1 -1
- package/dist/components/fk-code-editor.js +1 -1
- package/dist/components/fk-data-grid.js +1 -1
- package/dist/components/fk-drop-area.js +1 -1
- package/dist/components/fk-empty-form.js +1 -1
- package/dist/components/fk-file-input.js +1 -1
- package/dist/components/fk-form-builder.js +1 -1
- package/dist/components/fk-form-render.js +1 -1
- package/dist/components/fk-property-panel.js +1 -1
- package/dist/components/fk-rules-editor.js +1 -1
- package/dist/components/fk-select-input.js +1 -1
- package/dist/components/fk-signature-input.js +1 -1
- package/dist/components/fk-stepper.js +1 -1
- package/dist/components/fk-tabs.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-B4vAN-UA.js → p-B0YjIsVn.js} +1 -1
- package/dist/components/{p-BIEpAM4V.js → p-B1t0M_hN.js} +1 -1
- package/dist/components/p-B21cOFRx.js +1 -0
- package/dist/components/{p-DWgjI3TW.js → p-B7ED8qMb.js} +1 -1
- package/dist/components/{p-ZEW2q-4b.js → p-BDvqHJih.js} +1 -1
- package/dist/components/{p-BXFug2Ql.js → p-BSPTuA1p.js} +1 -1
- package/dist/components/{p-BNREw7TY.js → p-BVBfbMl_.js} +1 -1
- package/dist/components/p-BrOXMyOG.js +1 -0
- package/dist/components/{p-DtzMNM4i.js → p-C85zhhpr.js} +1 -1
- package/dist/components/p-CMQ_4Zfv.js +1 -0
- package/dist/components/p-CWQX0sXS.js +1 -0
- package/dist/components/{p-DJDrDvoC.js → p-CXEvsomA.js} +1 -1
- package/dist/components/{p-BCQ-hj6j.js → p-Cq9HSEn8.js} +1 -1
- package/dist/components/{p-BQP1WryV.js → p-D7bf2ztq.js} +1 -1
- package/dist/components/{p-DKGyje7v.js → p-DIPoAaGe.js} +1 -1
- package/dist/components/p-DYBirEew.js +1 -0
- package/dist/components/p-DluDp8V5.js +1 -0
- package/dist/components/{p-BLKRn62s.js → p-Do6-yRva.js} +1 -1
- package/dist/components/{p-D318uFl-.js → p-GjmAhT2E.js} +1 -1
- package/dist/components/{p-dX7Lo8Fe.js → p-LXnm2ogM.js} +1 -1
- package/dist/components/{p-Ctt--jpe.js → p-y0xDvzJR.js} +1 -1
- package/dist/esm/fk-brick-actions_18.entry.js +37 -36
- package/dist/esm/formkrafter-wc.js +3 -3
- package/dist/esm/{index-BTmZ8XET.js → index-BB2OOj__.js} +214 -24
- package/dist/esm/{index-BQqrzKxo.js → index-DMDO6w5-.js} +26 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
- package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
- package/dist/formkrafter-wc/index.esm.js +1 -1
- package/dist/formkrafter-wc/p-0de7cbe1.entry.js +1 -0
- package/dist/formkrafter-wc/{p-BXIsVlA6.js → p-Bp_A8oL5.js} +4 -4
- package/dist/formkrafter-wc/p-DMDO6w5-.js +2 -0
- package/dist/types/components/fk-brick-render/fk-brick-render.d.ts +1 -0
- package/dist/types/components/fk-file-input/fk-file-input.d.ts +3 -0
- package/dist/types/components.d.ts +5 -0
- package/dist/types/home/runner/work/formkrafter/formkrafter/packages/wc/.stencil/stencil.config.d.ts +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/registry/default-bricks.d.ts +73 -54
- package/package.json +11 -2
- package/dist/components/p-BB3BQPr8.js +0 -1
- package/dist/components/p-BOvjVIvo.js +0 -1
- package/dist/components/p-DKoJovNt.js +0 -1
- package/dist/components/p-QC41Uj05.js +0 -1
- package/dist/components/p-TvmRksgg.js +0 -1
- package/dist/formkrafter-wc/p-BQqrzKxo.js +0 -2
- package/dist/formkrafter-wc/p-f6bc0be0.entry.js +0 -1
- package/dist/types/Users/datagnikan/Desktop/WorkSpace/streamline-pulse/formkrafter-js/formkrafter/packages/wc/.stencil/stencil.config.d.ts +0 -2
|
@@ -9,4 +9,4 @@ function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"de
|
|
|
9
9
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
10
10
|
* (c) 2017-2021 Joachim Wester
|
|
11
11
|
* MIT license
|
|
12
|
-
*/function gs(t,e){e.unobserve()}function bs(t,e){var i,r=function(t){return ys.get(t)}(t);if(r){var n=function(t,e){return t.observers.get(e)}(r,e);i=n&&n.observer}else r=new $s(t),ys.set(t,r);if(i)return i;if(i={},r.value=Yn(t),e){i.callback=e,i.next=null;var s=function(){_s(i)},o=function(){clearTimeout(i.next),i.next=setTimeout(s)};"undefined"!=typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return i.patches=[],i.object=t,i.unobserve=function(){_s(i),clearTimeout(i.next),function(t,e){t.observers.delete(e.callback)}(r,i),"undefined"!=typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},r.observers.set(e,new ws(e,i)),i}function _s(t,e){void 0===e&&(e=!1);var i=ys.get(t.object);Es(i.value,t.object,t.patches,"",e),t.patches.length&&fs(i.value,t.patches);var r=t.patches;return r.length>0&&(t.patches=[],t.callback&&t.callback(r)),r}function Es(t,e,i,r,n){if(e!==t){"function"==typeof e.toJSON&&(e=e.toJSON());for(var s=Qn(e),o=Qn(t),a=!1,h=o.length-1;h>=0;h--){var u=t[f=o[h]];if(!Xn(e,f)||void 0===e[f]&&void 0!==u&&!1===Array.isArray(e))Array.isArray(t)===Array.isArray(e)?(n&&i.push({op:"test",path:r+"/"+es(f),value:Yn(u)}),i.push({op:"remove",path:r+"/"+es(f)}),a=!0):(n&&i.push({op:"test",path:r,value:t}),i.push({op:"replace",path:r,value:e}));else{var c=e[f];"object"==typeof u&&null!=u&&"object"==typeof c&&null!=c&&Array.isArray(u)===Array.isArray(c)?Es(u,c,i,r+"/"+es(f),n):u!==c&&(n&&i.push({op:"test",path:r+"/"+es(f),value:Yn(u)}),i.push({op:"replace",path:r+"/"+es(f),value:Yn(c)}))}}if(a||s.length!=o.length)for(h=0;h<s.length;h++){var f;Xn(t,f=s[h])||void 0===e[f]||i.push({op:"add",path:r+"/"+es(f),value:Yn(e[f])})}}}function Os(t,e,i){void 0===i&&(i=!1);var r=[];return Es(t,e,r,"",i),r}var js=Object.assign({},vs,Object.freeze({__proto__:null,compare:Os,generate:_s,observe:bs,unobserve:gs}),{JsonPatchError:ss,deepClone:Yn,escapePathComponent:es,unescapePathComponent:is}),xs=Object.freeze({__proto__:null,JsonPatchError:ss,_areEquals:ms,applyOperation:cs,applyPatch:fs,applyReducer:ls,compare:Os,deepClone:Yn,default:js,escapePathComponent:es,generate:_s,getValueByPointer:us,observe:bs,unescapePathComponent:is,unobserve:gs,validate:ps,validator:ds});function Ss(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&Object.keys(t).length>0&&Object.values(t).every((t=>"string"==typeof t))}function ks(t,e){return Ss(t)?e&&void 0!==t[e]?t[e]:Object.values(t)[0]:t}function Ps(t,e){if(!t)return t;const i={};for(const[r,n]of Object.entries(t))i[r]=ks(n,e);return i}var Is={en:{required:"This field is required",minLength:"Must be at least {value} characters",maxLength:"Must be at most {value} characters",min:"Must be at least {value}",max:"Must be at most {value}",pattern:"Invalid format",minItems:"Select at least {value} item(s)",maxItems:"Select at most {value} item(s)",email:"Invalid email address",url:"Invalid URL",type:"Invalid value",custom:"Invalid value"},fr:{required:"Ce champ est obligatoire",minLength:"Minimum {value} caractères",maxLength:"Maximum {value} caractères",min:"Minimum {value}",max:"Maximum {value}",pattern:"Format invalide",minItems:"Sélectionnez au moins {value} élément(s)",maxItems:"Sélectionnez au plus {value} élément(s)",email:"Adresse email invalide",url:"URL invalide",type:"Valeur invalide",custom:"Valeur invalide"}};function As(t,e,i){return((Is[e??"en"]??Is.en)[t]??Is.en[t]??"Invalid value").replace("{value}",String(i??""))}function*Cs(t,e="0"){if(t){yield{brick:t,path:e};for(const[i,r]of(t.children??[]).entries())yield*Cs(r,`${e}.${i}`)}}function*Ns(t){if(t&&(yield t,"collection"!==t.type))for(const e of t.children??[])yield*Ns(e)}class Ts{type;dataType;id;name;configsForm;category;styles;unWrapData;isPrivate;validators;defaultConfigs;constructor(t){this.type=t.type,this.dataType=t.dataType,this.id=t.id,this.name=t.name,this.configsForm=t.configsForm,this.category=t.category,this.styles=t.styles,this.unWrapData=t.unWrapData??!1,this.isPrivate=t.isPrivate??!1,this.validators=t.validators??[],this.defaultConfigs=t.defaultConfigs}getBrickEmptySpec(){return{type:this.type,dataType:this.dataType,id:this.id,name:this.name,...void 0!==this.category?{category:this.category}:{},...void 0!==this.configsForm?{configsForm:this.configsForm}:{},...void 0!==this.styles?{styles:this.styles}:{},...void 0!==this.defaultConfigs?{configs:{...this.defaultConfigs}}:{},validators:this.validators}}}var Ms=new Set(["__proto__","constructor","prototype"]);class Rs{value;constructor(t){this.value=t}}var Ds=(t,e,i)=>{t.scopes[t.scopes.length-1].set(e,i)},zs=t=>{if("number"==typeof t)return t;const e=String(t);if(Ms.has(e))throw new Error(`Access to "${e}" is not allowed`);return e},Ls=(t,e)=>({object:Us(t,e.object),prop:zs(e.computed?Us(t,e.property):e.property.name),optional:!0===e.optional}),Us=(t,e)=>{if(++t.steps>1e5)throw new Error("Sandbox execution budget exceeded");switch(e.type){case"Program":case"BlockStatement":for(const i of e.body){const e=Us(t,i);if(e instanceof Rs)return e}return;case"ReturnStatement":return new Rs(e.argument?Us(t,e.argument):void 0);case"IfStatement":return Us(t,e.test)?Us(t,e.consequent):e.alternate?Us(t,e.alternate):void 0;case"VariableDeclaration":for(const i of e.declarations){const e=i.id;if("Identifier"!==e.type)throw new Error("Only simple variable names are supported");Ds(t,e.name,i.init?Us(t,i.init):void 0)}return;case"ExpressionStatement":return void Us(t,e.expression);case"Literal":return e.value;case"TemplateLiteral":{const i=e.expressions;let r="";return e.quasis.forEach(((e,n)=>{r+=e.value.cooked??"",n<i.length&&(r+=String(Us(t,i[n])))})),r}case"Identifier":return((t,e)=>{for(let i=t.scopes.length-1;i>=0;i--)if(t.scopes[i].has(e))return t.scopes[i].get(e);throw new Error(`Unknown identifier "${e}"`)})(t,e.name);case"ThisExpression":return;case"ChainExpression":return Us(t,e.expression);case"MemberExpression":return((t,e)=>{const{object:i,prop:r,optional:n}=Ls(t,e);if(null==i){if(n)return;throw new Error(`Cannot read "${String(r)}" of ${String(i)}`)}return i[r]})(t,e);case"CallExpression":{const i=e.callee,r=[];for(const i of e.arguments)if("SpreadElement"===i.type){const e=Us(t,i.argument);Array.isArray(e)&&r.push(...e)}else r.push(Us(t,i));if("MemberExpression"===i.type){const{object:n,prop:s,optional:o}=Ls(t,i);if(null==n){if(o||!0===e.optional)return;throw new Error(`Cannot call "${String(s)}" of ${String(n)}`)}const a=n[s];if("function"!=typeof a){if(!0===e.optional&&null==a)return;throw new Error(`"${String(s)}" is not a function`)}if(a===Function||a===eval)throw new Error("This function is not allowed");return a.apply(n,r)}const n=Us(t,i);if("function"!=typeof n){if(!0===e.optional&&null==n)return;throw new Error("Value is not a function")}if(n===Function||n===eval)throw new Error("This function is not allowed");return n(...r)}case"ArrowFunctionExpression":{const i=e.params,r=e.body,n=[...t.scopes];return(...s)=>{const o=new Map;i.forEach(((t,e)=>{if("Identifier"!==t.type)throw new Error("Only simple parameters are supported");o.set(t.name,s[e])}));const a={steps:t.steps,scopes:[...n,o]},h=Us(a,r);return t.steps=a.steps,h instanceof Rs?h.value:!0===e.expression?h:void 0}}case"BinaryExpression":{const i=Us(t,e.left),r=Us(t,e.right);switch(e.operator){case"===":return i===r;case"!==":return i!==r;case"==":return i==r;case"!=":return i!=r;case"<":return i<r;case"<=":return i<=r;case">":return i>r;case">=":return i>=r;case"+":return i+r;case"-":return i-r;case"*":return i*r;case"/":return i/r;case"%":return i%r;case"**":return i**r;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"LogicalExpression":{const i=Us(t,e.left);switch(e.operator){case"&&":return i&&Us(t,e.right);case"||":return i||Us(t,e.right);case"??":return i??Us(t,e.right);default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"UnaryExpression":{const i=Us(t,e.argument);switch(e.operator){case"!":return!i;case"-":return-i;case"+":return+i;case"typeof":return typeof i;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"ConditionalExpression":return Us(t,e.test)?Us(t,e.consequent):Us(t,e.alternate);case"AssignmentExpression":{const i=e.left;if("Identifier"!==i.type||"="!==e.operator)throw new Error("Only simple assignments are supported");const r=Us(t,e.right);return((t,e,i)=>{for(let r=t.scopes.length-1;r>=0;r--)if(t.scopes[r].has(e))return void t.scopes[r].set(e,i);throw new Error(`Cannot assign to unknown identifier "${e}"`)})(t,i.name,r),r}case"ArrayExpression":{const i=[];for(const r of e.elements)if(r)if("SpreadElement"===r.type){const e=Us(t,r.argument);Array.isArray(e)&&i.push(...e)}else i.push(Us(t,r));return i}case"ObjectExpression":{const i={};for(const r of e.properties){if("SpreadElement"===r.type){const e=Us(t,r.argument);if(e&&"object"==typeof e)for(const[t,r]of Object.entries(e))i[String(zs(t))]=r;continue}const e=r.key,n=zs(r.computed?Us(t,e):"Identifier"===e.type?e.name:e.value);i[String(n)]=Us(t,r.value)}return i}default:throw new Error(`Unsupported syntax: ${e.type}`)}},qs={undefined:void 0,NaN:NaN,Infinity:1/0,Math,JSON,Number,String,Boolean,Array,Object,Date,parseInt,parseFloat,isNaN,isFinite},Bs=Symbol.for("formkrafter.core.services"),Fs=globalThis,Vs=Fs[Bs]??={jsRunnerService:new class{validateJs(t,e={ecmaVersion:"latest",allowReturnOutsideFunction:!0}){try{return Xt(t,e),{valide:!0}}catch(t){return{valide:!1,error:t instanceof Error?t:new Error(String(t))}}}eval(t,e={}){return function(t,e={}){const i=Xt(t,{ecmaVersion:"latest",allowReturnOutsideFunction:!0}),r={steps:0,scopes:[new Map(Object.entries({...qs,...e})),new Map]},n=Us(r,i);return n instanceof Rs?n.value:void 0}(t,e)}},dataSourceService:new class{defaults;cache=new Map;constructor(t={}){this.defaults=t}fetchOptions(t,e){const i={...this.defaults.headers,...e?.headers},r={};Object.keys(i).length&&(r.headers=i),this.defaults.credentials&&(r.credentials=this.defaults.credentials);const n=`${t}|${JSON.stringify(r)}`;let s=this.cache.get(n);return s||(s=fetch(t,Object.keys(r).length?r:void 0).then((e=>{if(!e.ok)throw new Error(`Data source request failed (${e.status}): ${t}`);return e.json()})).then((t=>Array.isArray(t)?t:[])).catch((t=>{throw this.cache.delete(n),t})),this.cache.set(n,s)),s}},fileUploadService:new class{async upload(t){const e=globalThis.btoa;if(!e)throw new Error("No base64 encoder available");const i=new Uint8Array(await t.arrayBuffer());let r="";for(const t of i)r+=String.fromCharCode(t);return{name:t.name,type:t.type,size:t.size,url:`data:${t.type};base64,${e(r)}`}}}},Gs=(t,e)=>{try{return Vs.jsRunnerService.eval(t,{dataMap:e??{}})}catch(t){return t instanceof Error?t:new Error(String(t))}},Hs=(t,e)=>((t,e)=>((t,e)=>t?.filter((t=>((t,e)=>"jsonLogic"===t.type?null!=t.logic&&!0===n.apply(t.logic,e):"javaScript"===t.type&&!!t.code&&!0===Gs(t.code,e))(t,e))))(t,e)?.map((t=>t.effects)).flat().filter((t=>null!=t)))(t,e)?.map((t=>{let i;return t.property?("boolean"===t.property.type?i=t.boolean:"logic"===t.property.type&&null!=t.logic?i=n.apply(t.logic,e):"code"===t.property.type&&t.code?i=Gs(t.code,e):"string"===t.property.type&&(i=t.string),{[t.property.target]:i}):{}})).flat().reduce(((t,e)=>({...t,...e})),{})??{hidden:!1},Ks=new Un.Ajv({allErrors:!0});Wn(Ks,["email","uri"]),Fn(Ks);var Ws=new WeakMap,Js=t=>{if("required"===t.keyword)return t.params.missingProperty;if("errorMessage"===t.keyword){const e=t.params.errors?.[0];return e?Js(e):void 0}return t.instancePath.split("/").filter(Boolean)[0]},Zs=(t,e,i)=>{const r={},n=((t,e)=>{let i=Ws.get(t);i||(i=new Map,Ws.set(t,i));const r=e??"";let n=i.get(r);if(!n){const s=function(t,e){if(!t)return;const i={},r=[],n={},s=t=>{const i=ks(t,e);return"string"==typeof i?i:void 0};for(const o of Ns(t)){const t=o.configs?.key,a=o.dataType;if(!t||!a||"void"===a)continue;const h=o.validations?.find((t=>"required"===t.validator)),u={type:a,nullable:!h},c={type:As("type",e)};for(const t of o.validations??[]){const{validator:i,value:r}=t,n=s(t.message)??As(i,e,r);"minLength"===i&&null!=r?(u.minLength=Number(r),c.minLength=n):"maxLength"===i&&null!=r?(u.maxLength=Number(r),c.maxLength=n):"min"===i&&null!=r?(u.minimum=Number(r),c.minimum=n):"max"===i&&null!=r?(u.maximum=Number(r),c.maximum=n):"pattern"===i&&"string"==typeof r&&r?(u.pattern=r,c.pattern=n):"minItems"===i&&null!=r?(u.minItems=Number(r),c.minItems=n):"maxItems"===i&&null!=r?(u.maxItems=Number(r),c.maxItems=n):"email"===i?(u.format="email",c.format=n):"url"===i&&(u.format="uri",c.format=n)}u.errorMessage=c,i[t]=u,h&&(r.push(t),n[t]=s(h.message)??As("required",e))}return{type:"object",properties:i,required:r,...Object.keys(n).length?{errorMessage:{required:n}}:{},additionalProperties:!1}}(t,e);if(!s)return;try{n=Ks.compile(s)}catch{return}i.set(r,n)}return n})(t,i);if(n&&!n(e))for(const t of n.errors??[]){const e=Js(t);e&&!(e in r)&&t.message&&(r[e]=t.message)}for(const[n,s]of Object.entries(((t,e,i)=>{const r={},n=e??{};for(const e of Ns(t)){const t=e.configs?.key;if(t)for(const s of e.validations??[]){if("custom"!==s.validator||!s.customValidator)continue;const e=Gs(`const value = dataMap?.[${JSON.stringify(t)}];\n${s.customValidator}`,n);if(!0!==e&&null!=e&&!(t in r))if("string"==typeof e)r[t]=e;else if(e instanceof Error)r[t]=e.message;else{const e=ks(s.message,i);r[t]="string"==typeof e?e:As("custom",i)}}}return r})(t,e,i)))n in r||(r[n]=s);return{valid:0===Object.keys(r).length,errors:r}};function Xs(t){return t.split(".").slice(1).map((t=>`/children/${t}`)).join("")}function Qs(t,e){if(t.configs?.uid===e)return"";for(const[i,r]of(t.children??[]).entries()){const t=Qs(r,e);if(void 0!==t)return`/children/${i}${t}`}}function Ys(t,e){let i=t;for(const t of e.split(".").slice(1))i=i?.children?.[Number(t)];return i}var to=(js??xs).applyPatch,eo=(t,e,i)=>({spec:to(t,e,!0,!1).newDocument,patches:e,inverse:i}),io=(t,e)=>{const i=Ys(t,e);if(!i)throw new Error(`No brick at path "${e}"`);return i},ro=(t,e)=>{const i=Qs(t,e);if(void 0===i)throw new Error(`No brick with uid "${e}"`);let r=t;for(const t of i.split("/children/").slice(1))r=r.children[Number(t)];return{pointer:i,brick:r}},no=t=>JSON.parse(JSON.stringify(t));function so(t,e,i,r){const n=io(t,i),s=Xs(i),o=no(e);if(!n.children){const e=`${s}/children`;return eo(t,[{op:"add",path:e,value:[o]}],[{op:"remove",path:e}])}const a=`${s}/children/${Math.min(r??n.children.length,n.children.length)}`;return eo(t,[{op:"add",path:a,value:o}],[{op:"remove",path:a}])}function oo(t,e){if("0"===e)throw new Error("Cannot remove the root brick");const i=io(t,e),r=Xs(e);return eo(t,[{op:"remove",path:r}],[{op:"add",path:r,value:i}])}function ao(t,e,i){if("0"===e||"0"===i)throw new Error("Cannot move the root brick");const r=io(t,e),n=e.split(".").map(Number),s=i.split(".").map(Number),o=n.length-1,a=n[o],h=s.length>o&&n.slice(0,o).every(((t,e)=>t===s[e])),u=[...s];if(h){if(u[o]===a&&u.length>n.length)throw new Error(`Cannot move a brick into its own subtree ("${e}" → "${i}")`);u[o]>a&&(u[o]-=1)}const c=Xs(e),f=Xs(u.join("."));return eo(t,[{op:"remove",path:c},{op:"add",path:f,value:r}],[{op:"remove",path:f},{op:"add",path:c,value:r}])}var ho=t=>({...t,...t.configs?{configs:{...t.configs,uid:crypto.randomUUID()}}:{},...t.children?{children:t.children.map(ho)}:{}});function uo(t,e){if("0"===e)throw new Error("Cannot duplicate the root brick");const i=io(t,e),r=e.split("."),n=Number(r[r.length-1])+1,s=Xs([...r.slice(0,-1),String(n)].join(".")),o=ho(no(i));return eo(t,[{op:"add",path:s,value:o}],[{op:"remove",path:s}])}var co=(t,e,i,r,n)=>{const s=`${e}/${i}`;return void 0===n?eo(t,[{op:"add",path:s,value:r}],[{op:"remove",path:s}]):eo(t,[{op:"replace",path:s,value:r}],[{op:"replace",path:s,value:n}])};function fo(t,e,i){const{pointer:r,brick:n}=ro(t,e),s={...n.configs,...i};return co(t,r,"configs",s,n.configs)}function lo(t,e,i){const{pointer:r,brick:n}=ro(t,e),s={...n.styles,...i};return co(t,r,"styles",s,n.styles)}function po(t,e,i){const{pointer:r,brick:n}=ro(t,e);return co(t,r,"validations",i,n.validations)}function mo(t,e,i){const{pointer:r,brick:n}=ro(t,e);return co(t,r,"rules",i,n.rules)}class vo{past=[];future=[];record(t){this.past.push({patches:t.patches,inverse:t.inverse}),this.future=[]}get canUndo(){return this.past.length>0}get canRedo(){return this.future.length>0}undo(t){const e=this.past.pop();if(e)return this.future.push(e),to(t,e.inverse,!0,!1).newDocument}redo(t){const e=this.future.pop();if(e)return this.past.push(e),to(t,e.patches,!0,!1).newDocument}clear(){this.past=[],this.future=[]}}export{Ts as B,vo as S,Ss as a,Ns as b,so as c,Ys as d,oo as e,uo as f,Hs as g,lo as h,Cs as i,po as j,mo as k,Gs as l,ao as m,ks as n,Ps as r,Vs as s,fo as u,Zs as v}
|
|
12
|
+
*/function gs(t,e){e.unobserve()}function bs(t,e){var i,r=function(t){return ys.get(t)}(t);if(r){var n=function(t,e){return t.observers.get(e)}(r,e);i=n&&n.observer}else r=new $s(t),ys.set(t,r);if(i)return i;if(i={},r.value=Yn(t),e){i.callback=e,i.next=null;var s=function(){_s(i)},o=function(){clearTimeout(i.next),i.next=setTimeout(s)};"undefined"!=typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return i.patches=[],i.object=t,i.unobserve=function(){_s(i),clearTimeout(i.next),function(t,e){t.observers.delete(e.callback)}(r,i),"undefined"!=typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},r.observers.set(e,new ws(e,i)),i}function _s(t,e){void 0===e&&(e=!1);var i=ys.get(t.object);Es(i.value,t.object,t.patches,"",e),t.patches.length&&fs(i.value,t.patches);var r=t.patches;return r.length>0&&(t.patches=[],t.callback&&t.callback(r)),r}function Es(t,e,i,r,n){if(e!==t){"function"==typeof e.toJSON&&(e=e.toJSON());for(var s=Qn(e),o=Qn(t),a=!1,h=o.length-1;h>=0;h--){var u=t[f=o[h]];if(!Xn(e,f)||void 0===e[f]&&void 0!==u&&!1===Array.isArray(e))Array.isArray(t)===Array.isArray(e)?(n&&i.push({op:"test",path:r+"/"+es(f),value:Yn(u)}),i.push({op:"remove",path:r+"/"+es(f)}),a=!0):(n&&i.push({op:"test",path:r,value:t}),i.push({op:"replace",path:r,value:e}));else{var c=e[f];"object"==typeof u&&null!=u&&"object"==typeof c&&null!=c&&Array.isArray(u)===Array.isArray(c)?Es(u,c,i,r+"/"+es(f),n):u!==c&&(n&&i.push({op:"test",path:r+"/"+es(f),value:Yn(u)}),i.push({op:"replace",path:r+"/"+es(f),value:Yn(c)}))}}if(a||s.length!=o.length)for(h=0;h<s.length;h++){var f;Xn(t,f=s[h])||void 0===e[f]||i.push({op:"add",path:r+"/"+es(f),value:Yn(e[f])})}}}function Os(t,e,i){void 0===i&&(i=!1);var r=[];return Es(t,e,r,"",i),r}var js=Object.assign({},vs,Object.freeze({__proto__:null,compare:Os,generate:_s,observe:bs,unobserve:gs}),{JsonPatchError:ss,deepClone:Yn,escapePathComponent:es,unescapePathComponent:is}),xs=Object.freeze({__proto__:null,JsonPatchError:ss,_areEquals:ms,applyOperation:cs,applyPatch:fs,applyReducer:ls,compare:Os,deepClone:Yn,default:js,escapePathComponent:es,generate:_s,getValueByPointer:us,observe:bs,unescapePathComponent:is,unobserve:gs,validate:ps,validator:ds});function Ss(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)&&Object.keys(t).length>0&&Object.values(t).every((t=>"string"==typeof t))}function ks(t,e){return Ss(t)?e&&void 0!==t[e]?t[e]:Object.values(t)[0]:t}function Ps(t,e){if(!t)return t;const i={};for(const[r,n]of Object.entries(t))i[r]=ks(n,e);return i}var Is={en:{required:"This field is required",minLength:"Must be at least {value} characters",maxLength:"Must be at most {value} characters",min:"Must be at least {value}",max:"Must be at most {value}",pattern:"Invalid format",minItems:"Select at least {value} item(s)",maxItems:"Select at most {value} item(s)",email:"Invalid email address",url:"Invalid URL",type:"Invalid value",custom:"Invalid value"},fr:{required:"Ce champ est obligatoire",minLength:"Minimum {value} caractères",maxLength:"Maximum {value} caractères",min:"Minimum {value}",max:"Maximum {value}",pattern:"Format invalide",minItems:"Sélectionnez au moins {value} élément(s)",maxItems:"Sélectionnez au plus {value} élément(s)",email:"Adresse email invalide",url:"URL invalide",type:"Valeur invalide",custom:"Valeur invalide"}};function As(t,e,i){return((Is[e??"en"]??Is.en)[t]??Is.en[t]??"Invalid value").replace("{value}",String(i??""))}function*Cs(t,e="0"){if(t){yield{brick:t,path:e};for(const[i,r]of(t.children??[]).entries())yield*Cs(r,`${e}.${i}`)}}function*Ns(t){if(t&&(yield t,"collection"!==t.type))for(const e of t.children??[])yield*Ns(e)}class Ts{type;dataType;id;name;configsForm;category;styles;unWrapData;isPrivate;validators;defaultConfigs;constructor(t){this.type=t.type,this.dataType=t.dataType,this.id=t.id,this.name=t.name,this.configsForm=t.configsForm,this.category=t.category,this.styles=t.styles,this.unWrapData=t.unWrapData??!1,this.isPrivate=t.isPrivate??!1,this.validators=t.validators??[],this.defaultConfigs=t.defaultConfigs}getBrickEmptySpec(){return{type:this.type,dataType:this.dataType,id:this.id,name:this.name,...void 0!==this.category?{category:this.category}:{},...void 0!==this.configsForm?{configsForm:this.configsForm}:{},...void 0!==this.styles?{styles:this.styles}:{},...void 0!==this.defaultConfigs?{configs:{...this.defaultConfigs}}:{},validators:this.validators}}}var Ms=new Set(["__proto__","constructor","prototype"]);class Rs{value;constructor(t){this.value=t}}var Ds=(t,e,i)=>{t.scopes[t.scopes.length-1].set(e,i)},zs=t=>{if("number"==typeof t)return t;const e=String(t);if(Ms.has(e))throw new Error(`Access to "${e}" is not allowed`);return e},Ls=(t,e)=>({object:Us(t,e.object),prop:zs(e.computed?Us(t,e.property):e.property.name),optional:!0===e.optional}),Us=(t,e)=>{if(++t.steps>1e5)throw new Error("Sandbox execution budget exceeded");switch(e.type){case"Program":case"BlockStatement":for(const i of e.body){const e=Us(t,i);if(e instanceof Rs)return e}return;case"ReturnStatement":return new Rs(e.argument?Us(t,e.argument):void 0);case"IfStatement":return Us(t,e.test)?Us(t,e.consequent):e.alternate?Us(t,e.alternate):void 0;case"VariableDeclaration":for(const i of e.declarations){const e=i.id;if("Identifier"!==e.type)throw new Error("Only simple variable names are supported");Ds(t,e.name,i.init?Us(t,i.init):void 0)}return;case"ExpressionStatement":return void Us(t,e.expression);case"Literal":return e.value;case"TemplateLiteral":{const i=e.expressions;let r="";return e.quasis.forEach(((e,n)=>{r+=e.value.cooked??"",n<i.length&&(r+=String(Us(t,i[n])))})),r}case"Identifier":return((t,e)=>{for(let i=t.scopes.length-1;i>=0;i--)if(t.scopes[i].has(e))return t.scopes[i].get(e);throw new Error(`Unknown identifier "${e}"`)})(t,e.name);case"ThisExpression":return;case"ChainExpression":return Us(t,e.expression);case"MemberExpression":return((t,e)=>{const{object:i,prop:r,optional:n}=Ls(t,e);if(null==i){if(n)return;throw new Error(`Cannot read "${String(r)}" of ${String(i)}`)}return i[r]})(t,e);case"CallExpression":{const i=e.callee,r=[];for(const i of e.arguments)if("SpreadElement"===i.type){const e=Us(t,i.argument);Array.isArray(e)&&r.push(...e)}else r.push(Us(t,i));if("MemberExpression"===i.type){const{object:n,prop:s,optional:o}=Ls(t,i);if(null==n){if(o||!0===e.optional)return;throw new Error(`Cannot call "${String(s)}" of ${String(n)}`)}const a=n[s];if("function"!=typeof a){if(!0===e.optional&&null==a)return;throw new Error(`"${String(s)}" is not a function`)}if(a===Function||a===eval)throw new Error("This function is not allowed");return a.apply(n,r)}const n=Us(t,i);if("function"!=typeof n){if(!0===e.optional&&null==n)return;throw new Error("Value is not a function")}if(n===Function||n===eval)throw new Error("This function is not allowed");return n(...r)}case"ArrowFunctionExpression":{const i=e.params,r=e.body,n=[...t.scopes];return(...s)=>{const o=new Map;i.forEach(((t,e)=>{if("Identifier"!==t.type)throw new Error("Only simple parameters are supported");o.set(t.name,s[e])}));const a={steps:t.steps,scopes:[...n,o]},h=Us(a,r);return t.steps=a.steps,h instanceof Rs?h.value:!0===e.expression?h:void 0}}case"BinaryExpression":{const i=Us(t,e.left),r=Us(t,e.right);switch(e.operator){case"===":return i===r;case"!==":return i!==r;case"==":return i==r;case"!=":return i!=r;case"<":return i<r;case"<=":return i<=r;case">":return i>r;case">=":return i>=r;case"+":return i+r;case"-":return i-r;case"*":return i*r;case"/":return i/r;case"%":return i%r;case"**":return i**r;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"LogicalExpression":{const i=Us(t,e.left);switch(e.operator){case"&&":return i&&Us(t,e.right);case"||":return i||Us(t,e.right);case"??":return i??Us(t,e.right);default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"UnaryExpression":{const i=Us(t,e.argument);switch(e.operator){case"!":return!i;case"-":return-i;case"+":return+i;case"typeof":return typeof i;default:throw new Error(`Unsupported operator "${String(e.operator)}"`)}}case"ConditionalExpression":return Us(t,e.test)?Us(t,e.consequent):Us(t,e.alternate);case"AssignmentExpression":{const i=e.left;if("Identifier"!==i.type||"="!==e.operator)throw new Error("Only simple assignments are supported");const r=Us(t,e.right);return((t,e,i)=>{for(let r=t.scopes.length-1;r>=0;r--)if(t.scopes[r].has(e))return void t.scopes[r].set(e,i);throw new Error(`Cannot assign to unknown identifier "${e}"`)})(t,i.name,r),r}case"ArrayExpression":{const i=[];for(const r of e.elements)if(r)if("SpreadElement"===r.type){const e=Us(t,r.argument);Array.isArray(e)&&i.push(...e)}else i.push(Us(t,r));return i}case"ObjectExpression":{const i={};for(const r of e.properties){if("SpreadElement"===r.type){const e=Us(t,r.argument);if(e&&"object"==typeof e)for(const[t,r]of Object.entries(e))i[String(zs(t))]=r;continue}const e=r.key,n=zs(r.computed?Us(t,e):"Identifier"===e.type?e.name:e.value);i[String(n)]=Us(t,r.value)}return i}default:throw new Error(`Unsupported syntax: ${e.type}`)}},qs={undefined:void 0,NaN:NaN,Infinity:1/0,Math,JSON,Number,String,Boolean,Array,Object,Date,parseInt,parseFloat,isNaN,isFinite},Bs=Symbol.for("formkrafter.core.services"),Fs=globalThis,Vs=Fs[Bs]??={jsRunnerService:new class{validateJs(t,e={ecmaVersion:"latest",allowReturnOutsideFunction:!0}){try{return Xt(t,e),{valide:!0}}catch(t){return{valide:!1,error:t instanceof Error?t:new Error(String(t))}}}eval(t,e={}){return function(t,e={}){const i=Xt(t,{ecmaVersion:"latest",allowReturnOutsideFunction:!0}),r={steps:0,scopes:[new Map(Object.entries({...qs,...e})),new Map]},n=Us(r,i);return n instanceof Rs?n.value:void 0}(t,e)}},dataSourceService:new class{defaults;cache=new Map;constructor(t={}){this.defaults=t}fetchOptions(t,e){const i={...this.defaults.headers,...e?.headers},r={};Object.keys(i).length&&(r.headers=i),this.defaults.credentials&&(r.credentials=this.defaults.credentials);const n=`${t}|${JSON.stringify(r)}`;let s=this.cache.get(n);return s||(s=fetch(t,Object.keys(r).length?r:void 0).then((e=>{if(!e.ok)throw new Error(`Data source request failed (${e.status}): ${t}`);return e.json()})).then((t=>Array.isArray(t)?t:[])).catch((t=>{throw this.cache.delete(n),t})),this.cache.set(n,s)),s}},fileUploadService:new class{async upload(t){const e=globalThis.btoa;if(!e)throw new Error("No base64 encoder available");const i=new Uint8Array(await t.arrayBuffer());let r="";for(const t of i)r+=String.fromCharCode(t);return{name:t.name,type:t.type,size:t.size,url:`data:${t.type};base64,${e(r)}`}}}},Gs=(t,e)=>{try{return Vs.jsRunnerService.eval(t,{dataMap:e??{}})}catch(t){return t instanceof Error?t:new Error(String(t))}},Hs=(t,e)=>((t,e)=>((t,e)=>t?.filter((t=>((t,e)=>"jsonLogic"===t.type?null!=t.logic&&!0===n.apply(t.logic,e):"javaScript"===t.type&&!!t.code&&!0===Gs(t.code,e))(t,e))))(t,e)?.map((t=>t.effects)).flat().filter((t=>null!=t)))(t,e)?.map((t=>{let i;return t.property?("boolean"===t.property.type?i=t.boolean:"logic"===t.property.type&&null!=t.logic?i=n.apply(t.logic,e):"code"===t.property.type&&t.code?i=Gs(t.code,e):"string"===t.property.type&&(i=t.string),{[t.property.target]:i}):{}})).flat().reduce(((t,e)=>({...t,...e})),{})??{hidden:!1},Ks=new Un.Ajv({allErrors:!0});Wn(Ks,["email","uri"]),Fn(Ks);var Ws=new WeakMap,Js=t=>{if("required"===t.keyword)return t.params.missingProperty;if("errorMessage"===t.keyword){const e=t.params.errors?.[0];return e?Js(e):void 0}return t.instancePath.split("/").filter(Boolean)[0]},Zs=(t,e,i)=>{const r={},n=((t,e)=>{let i=Ws.get(t);i||(i=new Map,Ws.set(t,i));const r=e??"";let n=i.get(r);if(!n){const s=function(t,e){if(!t)return;const i={},r=[],n={},s=t=>{const i=ks(t,e);return"string"==typeof i?i:void 0};for(const o of Ns(t)){const t=o.configs?.key,a=o.dataType;if(!t||!a||"void"===a)continue;const h=o.validations?.find((t=>"required"===t.validator)),u={type:a,nullable:!h},c={type:As("type",e)};for(const t of o.validations??[]){const{validator:i,value:r}=t,n=s(t.message)??As(i,e,r);"minLength"===i&&null!=r?(u.minLength=Number(r),c.minLength=n):"maxLength"===i&&null!=r?(u.maxLength=Number(r),c.maxLength=n):"min"===i&&null!=r?(u.minimum=Number(r),c.minimum=n):"max"===i&&null!=r?(u.maximum=Number(r),c.maximum=n):"pattern"===i&&"string"==typeof r&&r?(u.pattern=r,c.pattern=n):"minItems"===i&&null!=r?(u.minItems=Number(r),c.minItems=n):"maxItems"===i&&null!=r?(u.maxItems=Number(r),c.maxItems=n):"email"===i?(u.format="email",c.format=n):"url"===i&&(u.format="uri",c.format=n)}u.errorMessage=c,i[t]=u,h&&(r.push(t),n[t]=s(h.message)??As("required",e))}return{type:"object",properties:i,required:r,...Object.keys(n).length?{errorMessage:{required:n}}:{},additionalProperties:!1}}(t,e);if(!s)return;try{n=Ks.compile(s)}catch{return}i.set(r,n)}return n})(t,i);if(n&&!n(e))for(const t of n.errors??[]){const e=Js(t);e&&!(e in r)&&t.message&&(r[e]=t.message)}for(const[n,s]of Object.entries(((t,e,i)=>{const r={},n=e??{};for(const e of Ns(t)){const t=e.configs?.key;if(t)for(const s of e.validations??[]){if("custom"!==s.validator||!s.customValidator)continue;const e=Gs(`const value = dataMap?.[${JSON.stringify(t)}];\n${s.customValidator}`,n);if(!0!==e&&null!=e&&!(t in r))if("string"==typeof e)r[t]=e;else if(e instanceof Error)r[t]=e.message;else{const e=ks(s.message,i);r[t]="string"==typeof e?e:As("custom",i)}}}return r})(t,e,i)))n in r||(r[n]=s);const s="object"==typeof e&&null!==e?e:void 0;for(const e of((t,e)=>{const i=new Set,r=(t,n)=>{const s=n||!!t.rules?.length&&!0===Hs(t.rules,e).hidden,o=t.configs?.key;if(s&&o&&i.add(o),"collection"!==t.type)for(const e of t.children??[])r(e,s)};return r(t,!1),i})(t,s))delete r[e];return{valid:0===Object.keys(r).length,errors:r}};function Xs(t){return t.split(".").slice(1).map((t=>`/children/${t}`)).join("")}function Qs(t,e){if(t.configs?.uid===e)return"";for(const[i,r]of(t.children??[]).entries()){const t=Qs(r,e);if(void 0!==t)return`/children/${i}${t}`}}function Ys(t,e){let i=t;for(const t of e.split(".").slice(1))i=i?.children?.[Number(t)];return i}var to=(js??xs).applyPatch,eo=(t,e,i)=>({spec:to(t,e,!0,!1).newDocument,patches:e,inverse:i}),io=(t,e)=>{const i=Ys(t,e);if(!i)throw new Error(`No brick at path "${e}"`);return i},ro=(t,e)=>{const i=Qs(t,e);if(void 0===i)throw new Error(`No brick with uid "${e}"`);let r=t;for(const t of i.split("/children/").slice(1))r=r.children[Number(t)];return{pointer:i,brick:r}},no=t=>JSON.parse(JSON.stringify(t));function so(t,e,i,r){const n=io(t,i),s=Xs(i),o=no(e);if(!n.children){const e=`${s}/children`;return eo(t,[{op:"add",path:e,value:[o]}],[{op:"remove",path:e}])}const a=`${s}/children/${Math.min(r??n.children.length,n.children.length)}`;return eo(t,[{op:"add",path:a,value:o}],[{op:"remove",path:a}])}function oo(t,e){if("0"===e)throw new Error("Cannot remove the root brick");const i=io(t,e),r=Xs(e);return eo(t,[{op:"remove",path:r}],[{op:"add",path:r,value:i}])}function ao(t,e,i){if("0"===e||"0"===i)throw new Error("Cannot move the root brick");const r=io(t,e),n=e.split(".").map(Number),s=i.split(".").map(Number),o=n.length-1,a=n[o],h=s.length>o&&n.slice(0,o).every(((t,e)=>t===s[e])),u=[...s];if(h){if(u[o]===a&&u.length>n.length)throw new Error(`Cannot move a brick into its own subtree ("${e}" → "${i}")`);u[o]>a&&(u[o]-=1)}const c=Xs(e),f=Xs(u.join("."));return eo(t,[{op:"remove",path:c},{op:"add",path:f,value:r}],[{op:"remove",path:f},{op:"add",path:c,value:r}])}var ho=t=>({...t,...t.configs?{configs:{...t.configs,uid:crypto.randomUUID()}}:{},...t.children?{children:t.children.map(ho)}:{}});function uo(t,e){if("0"===e)throw new Error("Cannot duplicate the root brick");const i=io(t,e),r=e.split("."),n=Number(r[r.length-1])+1,s=Xs([...r.slice(0,-1),String(n)].join(".")),o=ho(no(i));return eo(t,[{op:"add",path:s,value:o}],[{op:"remove",path:s}])}var co=(t,e,i,r,n)=>{const s=`${e}/${i}`;return void 0===n?eo(t,[{op:"add",path:s,value:r}],[{op:"remove",path:s}]):eo(t,[{op:"replace",path:s,value:r}],[{op:"replace",path:s,value:n}])};function fo(t,e,i){const{pointer:r,brick:n}=ro(t,e),s={...n.configs,...i};return co(t,r,"configs",s,n.configs)}function lo(t,e,i){const{pointer:r,brick:n}=ro(t,e),s={...n.styles,...i};return co(t,r,"styles",s,n.styles)}function po(t,e,i){const{pointer:r,brick:n}=ro(t,e);return co(t,r,"validations",i,n.validations)}function mo(t,e,i){const{pointer:r,brick:n}=ro(t,e);return co(t,r,"rules",i,n.rules)}class vo{past=[];future=[];record(t){this.past.push({patches:t.patches,inverse:t.inverse}),this.future=[]}get canUndo(){return this.past.length>0}get canRedo(){return this.future.length>0}undo(t){const e=this.past.pop();if(e)return this.future.push(e),to(t,e.inverse,!0,!1).newDocument}redo(t){const e=this.future.pop();if(e)return this.past.push(e),to(t,e.patches,!0,!1).newDocument}clear(){this.past=[],this.future=[]}}export{Ts as B,vo as S,Ss as a,Ns as b,so as c,Ys as d,oo as e,uo as f,Hs as g,lo as h,Cs as i,po as j,mo as k,Gs as l,ao as m,ks as n,Ps as r,Vs as s,fo as u,Zs as v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r,p as o,H as e,c as s,h as t}from"./p-
|
|
1
|
+
import{t as r,p as o,H as e,c as s,h as t}from"./p-BrOXMyOG.js";import{a}from"./p-92BozD8S.js";import{t as i}from"./p-Diknh4-7.js";import{a as n}from"./p-D7bf2ztq.js";const c=o(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.brickDrop=s(this,"brickDrop"),this.isOver=!1}componentDidLoad(){this.cleanup=a({element:this.host,onDragEnter:()=>this.isOver=!0,onDragLeave:()=>this.isOver=!1,onDrop:({source:r,location:o})=>{var e;if(this.isOver=!1,(null===(e=o.current.dropTargets[0])||void 0===e?void 0:e.element)!==this.host)return;const s=i(r.data,this.path);s&&this.brickDrop.emit(s)}})}disconnectedCallback(){var r;null===(r=this.cleanup)||void 0===r||r.call(this)}render(){return t("div",{key:"727b7005fcc58e3b6b2f455b03312fd91e3b063b",class:{"fk-drop":!0,"fk-drop--over":this.isOver}},t("span",{key:"41d1158e101100ebb229b74aec2ddfaf1aa57202",class:"fk-drop__hint"},n("drop.hint")))}get host(){return this}static get style(){return".fk-drop.sc-fk-drop-area{display:flex;align-items:center;justify-content:center;min-height:40px;margin-top:calc(var(--fk-spacing) / 2);border:1px dashed var(--fk-color-border);border-radius:var(--fk-radius);color:var(--fk-color-muted);font-size:0.75rem;transition:border-color 120ms ease, background-color 120ms ease}.fk-drop--over.sc-fk-drop-area{border-color:var(--fk-color-primary);background:color-mix(in srgb, var(--fk-color-primary) 8%, transparent);color:var(--fk-color-primary)}"}},[2,"fk-drop-area",{path:[1],isOver:[32]}]);function d(){"undefined"!=typeof customElements&&["fk-drop-area"].forEach((o=>{"fk-drop-area"===o&&(customElements.get(r(o))||customElements.define(r(o),c))}))}d();export{c as F,d}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-
|
|
2
|
-
import { g as getBrickMolds, f as fkT, a as getBrickMoldsGroupedByCategory, b as fkTOr, c as getBrick, d as getAffectedProperties, r as resolveLocalizedRecord, v as validateBrickSpecDataDetailed, s as services, S as SpecHistory, e as registerDefaultBricks, n as newBrickSpec, h as addBrick, i as getBrickAt, m as moveBrick, j as removeBrick, k as duplicateBrick, u as updateBrickConfigs, l as updateBrickStyles, o as updateBrickValidations, p as updateBrickRules, q as iterateBricks, t as isLocalizedObject, w as
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-DMDO6w5-.js';
|
|
2
|
+
import { g as getBrickMolds, f as fkT, a as getBrickMoldsGroupedByCategory, b as fkTOr, c as getBrick, d as getAffectedProperties, r as resolveLocalizedRecord, v as validateBrickSpecDataDetailed, s as services, S as SpecHistory, e as registerDefaultBricks, n as newBrickSpec, h as addBrick, i as getBrickAt, m as moveBrick, j as removeBrick, k as duplicateBrick, u as updateBrickConfigs, l as updateBrickStyles, o as updateBrickValidations, p as updateBrickRules, q as iterateBricks, t as isLocalizedObject, w as normalizeOptions, x as evalBrickCode, y as iterateSchemaBricks } from './index-BB2OOj__.js';
|
|
3
3
|
|
|
4
4
|
function _arrayWithHoles(r) {
|
|
5
5
|
if (Array.isArray(r)) return r;
|
|
@@ -2338,7 +2338,7 @@ const FkBrickRender = class {
|
|
|
2338
2338
|
this.errors = {};
|
|
2339
2339
|
}
|
|
2340
2340
|
render() {
|
|
2341
|
-
var _a, _b, _c, _d, _e;
|
|
2341
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2342
2342
|
const spec = this.brickSpec;
|
|
2343
2343
|
if (!spec)
|
|
2344
2344
|
return null;
|
|
@@ -2352,7 +2352,10 @@ const FkBrickRender = class {
|
|
|
2352
2352
|
return null;
|
|
2353
2353
|
const isContainer = spec.type === 'panel' || spec.type === 'collection';
|
|
2354
2354
|
const uid = (_b = spec.configs) === null || _b === void 0 ? void 0 : _b.uid;
|
|
2355
|
-
const childNodes = ((_c = spec.children) !== null && _c !== void 0 ? _c : []).map((childSpec, index) =>
|
|
2355
|
+
const childNodes = ((_c = spec.children) !== null && _c !== void 0 ? _c : []).map((childSpec, index) => {
|
|
2356
|
+
var _a;
|
|
2357
|
+
return (h("fk-brick-render", { brickSpec: childSpec, rootSpec: (_a = this.rootSpec) !== null && _a !== void 0 ? _a : this.brickSpec, data: this.data, dataMap: this.dataMap, errors: this.errors, locale: this.locale, path: `${this.path}.${index}`, editable: this.editable, selectedUid: this.selectedUid, utils: this.utils }));
|
|
2358
|
+
});
|
|
2356
2359
|
if (editing && isContainer) {
|
|
2357
2360
|
childNodes.push(h("fk-drop-area", { path: this.path }));
|
|
2358
2361
|
}
|
|
@@ -2364,7 +2367,8 @@ const FkBrickRender = class {
|
|
|
2364
2367
|
styles: (_d = spec.styles) !== null && _d !== void 0 ? _d : {},
|
|
2365
2368
|
data: getBrickData(spec, this.data),
|
|
2366
2369
|
dataMap: this.dataMap,
|
|
2367
|
-
|
|
2370
|
+
rootSpec: (_e = this.rootSpec) !== null && _e !== void 0 ? _e : this.brickSpec,
|
|
2371
|
+
error: ((_f = spec.configs) === null || _f === void 0 ? void 0 : _f.key) ? this.errors[spec.configs.key] : undefined,
|
|
2368
2372
|
disabled: editing ? false : affected.disabled === true,
|
|
2369
2373
|
path: this.path,
|
|
2370
2374
|
editable: editing,
|
|
@@ -24967,7 +24971,7 @@ const FkEmptyForm = class {
|
|
|
24967
24971
|
};
|
|
24968
24972
|
FkEmptyForm.style = fkEmptyFormCss();
|
|
24969
24973
|
|
|
24970
|
-
const fkFileInputCss = () => `.sc-fk-file-input-h{display:block}.fk-file.sc-fk-file-input{display:flex;flex-direction:column;gap:calc(var(--fk-spacing) / 2);align-items:flex-start}.fk-file__native.sc-fk-file-input{display:none}.fk-file__choose.sc-fk-file-input{font:inherit;font-size:0.85rem;padding:calc(var(--fk-spacing) / 1.5) var(--fk-spacing);border:1px dashed var(--fk-color-border);border-radius:var(--fk-radius);background:transparent;color:var(--fk-color-muted);cursor:pointer}.fk-file__choose.sc-fk-file-input:hover:not(:disabled){border-color:var(--fk-color-primary);color:var(--fk-color-primary)}.fk-file__choose.sc-fk-file-input:disabled{opacity:0.55;cursor:not-allowed}.fk-file__selected.sc-fk-file-input{display:flex;align-items:center;gap:
|
|
24974
|
+
const fkFileInputCss = () => `.sc-fk-file-input-h{display:block}.fk-file.sc-fk-file-input{display:flex;flex-direction:column;gap:calc(var(--fk-spacing) / 2);align-items:flex-start}.fk-file__native.sc-fk-file-input{display:none}.fk-file__choose.sc-fk-file-input{font:inherit;font-size:0.85rem;padding:calc(var(--fk-spacing) / 1.5) var(--fk-spacing);border:1px dashed var(--fk-color-border);border-radius:var(--fk-radius);background:transparent;color:var(--fk-color-muted);cursor:pointer}.fk-file__choose.sc-fk-file-input:hover:not(:disabled){border-color:var(--fk-color-primary);color:var(--fk-color-primary)}.fk-file__choose.sc-fk-file-input:disabled{opacity:0.55;cursor:not-allowed}.fk-file__selected.sc-fk-file-input{display:flex;align-items:center;gap:var(--fk-spacing);width:100%;box-sizing:border-box;padding:calc(var(--fk-spacing) * 0.75) var(--fk-spacing);border:1px solid var(--fk-color-border);border-radius:var(--fk-radius);background:var(--fk-color-surface)}.fk-file__icon.sc-fk-file-input{display:inline-flex;flex-shrink:0;color:var(--fk-color-primary)}.fk-file__meta.sc-fk-file-input{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.fk-file__name.sc-fk-file-input{font-size:0.85rem;font-weight:600;color:var(--fk-color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fk-file__size.sc-fk-file-input{font-size:0.72rem;color:var(--fk-color-muted);white-space:nowrap}.fk-file__remove.sc-fk-file-input{border:none;background:transparent;color:var(--fk-color-muted);font-size:0.8rem;cursor:pointer;padding:4px 6px;border-radius:calc(var(--fk-radius) / 2);flex-shrink:0}.fk-file__remove.sc-fk-file-input:hover:not(:disabled){background:color-mix(in srgb, var(--fk-color-danger) 12%, transparent)}.fk-file__remove.sc-fk-file-input:hover:not(:disabled){color:var(--fk-color-danger)}`;
|
|
24971
24975
|
|
|
24972
24976
|
const FkFileInput = class {
|
|
24973
24977
|
constructor(hostRef) {
|
|
@@ -24975,6 +24979,7 @@ const FkFileInput = class {
|
|
|
24975
24979
|
this.fileValueChange = createEvent(this, "fileValueChange");
|
|
24976
24980
|
this.disabled = false;
|
|
24977
24981
|
this.uploading = false;
|
|
24982
|
+
this.removing = false;
|
|
24978
24983
|
this.handleFile = async (event) => {
|
|
24979
24984
|
var _a;
|
|
24980
24985
|
const input = event.target;
|
|
@@ -24984,7 +24989,9 @@ const FkFileInput = class {
|
|
|
24984
24989
|
this.uploading = true;
|
|
24985
24990
|
this.uploadError = undefined;
|
|
24986
24991
|
try {
|
|
24987
|
-
const uploaded = await services.fileUploadService.upload(file
|
|
24992
|
+
const uploaded = await services.fileUploadService.upload(file, {
|
|
24993
|
+
url: this.uploadUrl,
|
|
24994
|
+
});
|
|
24988
24995
|
this.fileValueChange.emit(uploaded);
|
|
24989
24996
|
}
|
|
24990
24997
|
catch (error) {
|
|
@@ -24996,6 +25003,25 @@ const FkFileInput = class {
|
|
|
24996
25003
|
input.value = '';
|
|
24997
25004
|
}
|
|
24998
25005
|
};
|
|
25006
|
+
this.handleRemove = async (event) => {
|
|
25007
|
+
var _a, _b;
|
|
25008
|
+
event.preventDefault();
|
|
25009
|
+
const current = this.value;
|
|
25010
|
+
if (!current)
|
|
25011
|
+
return;
|
|
25012
|
+
this.removing = true;
|
|
25013
|
+
this.uploadError = undefined;
|
|
25014
|
+
try {
|
|
25015
|
+
await ((_b = (_a = services.fileUploadService).remove) === null || _b === void 0 ? void 0 : _b.call(_a, current, { url: this.uploadUrl }));
|
|
25016
|
+
}
|
|
25017
|
+
catch (error) {
|
|
25018
|
+
this.uploadError = error instanceof Error ? error.message : String(error);
|
|
25019
|
+
}
|
|
25020
|
+
finally {
|
|
25021
|
+
this.removing = false;
|
|
25022
|
+
this.fileValueChange.emit(undefined);
|
|
25023
|
+
}
|
|
25024
|
+
};
|
|
24999
25025
|
}
|
|
25000
25026
|
formatSize(size) {
|
|
25001
25027
|
if (size < 1024)
|
|
@@ -25005,19 +25031,16 @@ const FkFileInput = class {
|
|
|
25005
25031
|
return `${(size / (1024 * 1024)).toFixed(1)} MB`;
|
|
25006
25032
|
}
|
|
25007
25033
|
render() {
|
|
25008
|
-
return (h("div", { key: '
|
|
25009
|
-
event.preventDefault();
|
|
25010
|
-
this.fileValueChange.emit(undefined);
|
|
25011
|
-
} }, "\u2715"))) : (h("button", { type: "button", class: "fk-file__choose", disabled: this.disabled || this.uploading, onClick: (event) => {
|
|
25034
|
+
return (h("div", { key: 'f7705974fe50f568094cf1f2874716fad7b2e31b', class: "fk-file" }, this.value ? (h("div", { class: "fk-file__selected" }, h("span", { class: "fk-file__icon", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), h("polyline", { points: "14 2 14 8 20 8" }))), h("span", { class: "fk-file__meta" }, h("span", { class: "fk-file__name", title: this.value.name }, this.value.name), h("span", { class: "fk-file__size" }, this.formatSize(this.value.size))), h("button", { type: "button", class: "fk-file__remove", title: fkT('file.remove'), disabled: this.disabled || this.removing, onClick: this.handleRemove }, this.removing ? '…' : '✕'))) : (h("button", { type: "button", class: "fk-file__choose", disabled: this.disabled || this.uploading, onClick: (event) => {
|
|
25012
25035
|
var _a;
|
|
25013
25036
|
event.preventDefault();
|
|
25014
25037
|
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.click();
|
|
25015
|
-
} }, this.uploading ? fkT('file.uploading') : fkT('file.choose'))), h("input", { key: '
|
|
25038
|
+
} }, this.uploading ? fkT('file.uploading') : fkT('file.choose'))), h("input", { key: '170b1335f87a4ffdfa6cc29e005036384c4f04a6', class: "fk-file__native", type: "file", accept: this.accept, disabled: this.disabled, ref: (element) => (this.inputEl = element), onChange: this.handleFile }), this.uploadError ? (h("span", { class: "fk-field__error" }, this.uploadError)) : null));
|
|
25016
25039
|
}
|
|
25017
25040
|
};
|
|
25018
25041
|
FkFileInput.style = fkFileInputCss();
|
|
25019
25042
|
|
|
25020
|
-
const fkFormBuilderCss = () => `.fk-builder.sc-fk-form-builder{display:flex;gap:calc(var(--fk-spacing) * 2);align-items:flex-start;font-family:var(--fk-font);color:var(--fk-color-text)}.fk-builder__palette.sc-fk-form-builder{width:220px;flex-shrink:0;padding:calc(var(--fk-spacing) * 1.5);border:1px solid var(--fk-color-border);border-radius:var(--fk-radius);background:var(--fk-color-surface)}.fk-builder__main.sc-fk-form-builder{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--fk-spacing)}.fk-builder__toolbar.sc-fk-form-builder{display:flex;align-items:center;gap:calc(var(--fk-spacing) / 2)}.fk-builder__spacer.sc-fk-form-builder{flex:1}.fk-builder__import-error.sc-fk-form-builder{font-size:0.75rem;color:var(--fk-color-danger)}.fk-builder__tool.sc-fk-form-builder{padding:calc(var(--fk-spacing) / 2) var(--fk-spacing);border:1px solid var(--fk-color-border);border-radius:calc(var(--fk-radius) / 2);background:var(--fk-color-surface);color:var(--fk-color-text);font-size:0.8rem;cursor:pointer}.fk-builder__tool.sc-fk-form-builder:hover:not(:disabled){border-color:var(--fk-color-primary);color:var(--fk-color-primary)}.fk-builder__tool.sc-fk-form-builder:disabled{opacity:0.4;cursor:default}.fk-builder__canvas.sc-fk-form-builder{min-height:320px;padding:calc(var(--fk-spacing) * 2);border:1px solid var(--fk-color-border);border-radius:var(--fk-radius);background:var(--fk-color-surface)}.fk-builder__inspector.sc-fk-form-builder{width:260px;flex-shrink:0;padding:calc(var(--fk-spacing) * 1.5);border:1px solid var(--fk-color-border);border-radius:var(--fk-radius);background:var(--fk-color-surface)}.fk-builder__hint.sc-fk-form-builder{margin:0;font-size:0.8rem;color:var(--fk-color-muted)}`;
|
|
25043
|
+
const fkFormBuilderCss = () => `.sc-fk-form-builder-h{display:block;container-type:inline-size}.fk-builder.sc-fk-form-builder{display:flex;gap:calc(var(--fk-spacing) * 2);align-items:flex-start;font-family:var(--fk-font);color:var(--fk-color-text)}@container (max-width: 820px){.fk-builder{flex-wrap:wrap}.fk-builder__palette,.fk-builder__inspector{width:100%}.fk-builder__main{order:2;flex-basis:100%}.fk-builder__palette{order:1}.fk-builder__inspector{order:3}}.fk-builder__palette.sc-fk-form-builder{width:220px;flex-shrink:0;padding:calc(var(--fk-spacing) * 1.5);border:1px solid var(--fk-color-border);border-radius:var(--fk-radius);background:var(--fk-color-surface)}.fk-builder__main.sc-fk-form-builder{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--fk-spacing)}.fk-builder__toolbar.sc-fk-form-builder{display:flex;align-items:center;gap:calc(var(--fk-spacing) / 2)}.fk-builder__spacer.sc-fk-form-builder{flex:1}.fk-builder__import-error.sc-fk-form-builder{font-size:0.75rem;color:var(--fk-color-danger)}.fk-builder__tool.sc-fk-form-builder{padding:calc(var(--fk-spacing) / 2) var(--fk-spacing);border:1px solid var(--fk-color-border);border-radius:calc(var(--fk-radius) / 2);background:var(--fk-color-surface);color:var(--fk-color-text);font-size:0.8rem;cursor:pointer}.fk-builder__tool.sc-fk-form-builder:hover:not(:disabled){border-color:var(--fk-color-primary);color:var(--fk-color-primary)}.fk-builder__tool.sc-fk-form-builder:disabled{opacity:0.4;cursor:default}.fk-builder__canvas.sc-fk-form-builder{min-height:320px;padding:calc(var(--fk-spacing) * 2);border:1px solid var(--fk-color-border);border-radius:var(--fk-radius);background:var(--fk-color-surface);overflow-x:auto}.fk-builder__inspector.sc-fk-form-builder{width:260px;flex-shrink:0;padding:calc(var(--fk-spacing) * 1.5);border:1px solid var(--fk-color-border);border-radius:var(--fk-radius);background:var(--fk-color-surface)}.fk-builder__hint.sc-fk-form-builder{margin:0;font-size:0.8rem;color:var(--fk-color-muted)}`;
|
|
25021
25044
|
|
|
25022
25045
|
const FkFormBuilder = class {
|
|
25023
25046
|
constructor(hostRef) {
|
|
@@ -25382,7 +25405,7 @@ const FkFormRender = class {
|
|
|
25382
25405
|
render() {
|
|
25383
25406
|
if (!this.spec)
|
|
25384
25407
|
return null;
|
|
25385
|
-
return (h("form", { class: "fk-form", onSubmit: (event) => event.preventDefault() }, h("fk-brick-render", { brickSpec: this.spec, data: this.currentData, dataMap: this.currentData, errors: this.visibleErrors(), locale: this.locale, path: "0", editable: this.editable, selectedUid: this.selectedUid, utils: this.utils })));
|
|
25408
|
+
return (h("form", { class: "fk-form", onSubmit: (event) => event.preventDefault() }, h("fk-brick-render", { brickSpec: this.spec, rootSpec: this.spec, data: this.currentData, dataMap: this.currentData, errors: this.visibleErrors(), locale: this.locale, path: "0", editable: this.editable, selectedUid: this.selectedUid, utils: this.utils })));
|
|
25386
25409
|
}
|
|
25387
25410
|
get host() { return getElement(this); }
|
|
25388
25411
|
static get watchers() { return {
|
|
@@ -25846,28 +25869,6 @@ const FkRulesEditor = class {
|
|
|
25846
25869
|
};
|
|
25847
25870
|
FkRulesEditor.style = fkRulesEditorCss();
|
|
25848
25871
|
|
|
25849
|
-
function normalizeOptions(raw, labelKey = 'label', valueKey = 'value') {
|
|
25850
|
-
if (Array.isArray(raw)) {
|
|
25851
|
-
return raw
|
|
25852
|
-
.map((item) => {
|
|
25853
|
-
var _a, _b;
|
|
25854
|
-
if (typeof item === 'object' && item !== null) {
|
|
25855
|
-
const record = item;
|
|
25856
|
-
const label = (_a = record[labelKey]) !== null && _a !== void 0 ? _a : record[valueKey];
|
|
25857
|
-
const value = (_b = record[valueKey]) !== null && _b !== void 0 ? _b : record[labelKey];
|
|
25858
|
-
return { label: String(label !== null && label !== void 0 ? label : ''), value: String(value !== null && value !== void 0 ? value : '') };
|
|
25859
|
-
}
|
|
25860
|
-
return { label: String(item), value: String(item) };
|
|
25861
|
-
})
|
|
25862
|
-
.filter((option) => option.label !== '');
|
|
25863
|
-
}
|
|
25864
|
-
return String(raw !== null && raw !== void 0 ? raw : '')
|
|
25865
|
-
.split('\n')
|
|
25866
|
-
.map((line) => line.trim())
|
|
25867
|
-
.filter(Boolean)
|
|
25868
|
-
.map((line) => ({ label: line, value: line }));
|
|
25869
|
-
}
|
|
25870
|
-
|
|
25871
25872
|
function interpolateTemplate(template, dataMap) {
|
|
25872
25873
|
return template.replace(/\{(\w+)\}/g, (_, token) => {
|
|
25873
25874
|
const value = dataMap === null || dataMap === void 0 ? void 0 : dataMap[token];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-DMDO6w5-.js';
|
|
2
|
+
export { s as setNonce } from './index-DMDO6w5-.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -17,5 +17,5 @@ var patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(async (options) => {
|
|
19
19
|
await globalScripts();
|
|
20
|
-
return bootstrapLazy([["fk-brick-actions_18",[[2,"fk-form-builder",{"spec":[16],"data":[16],"locales":[16],"currentSpec":[32],"currentData":[32],"selectedUid":[32],"copied":[32],"importError":[32],"editLocale":[32]},[[0,"brickDrop","handleBrickDrop"],[0,"brickRemove","handleBrickRemove"],[0,"brickDuplicate","handleBrickDuplicate"],[0,"brickConfigsChange","handleConfigsChange"],[0,"brickStylesChange","handleStylesChange"],[0,"brickValidationsChange","handleValidationsChange"],[0,"brickRulesChange","handleRulesChange"],[0,"formDataChange","handleDataChange"],[4,"paste","handlePaste"],[0,"brickSelect","handleBrickSelect"]],{"spec":[{"syncSpec":0}]}],[2,"fk-data-grid",{"spec":[16],"value":[16],"disabled":[4],"locale":[1],"utils":[16],"touched":[32],"validateRows":[64]},[[0,"brickDataChange","handleRowChange"]]],[2,"fk-form-render",{"spec":[16],"data":[16],"editable":[4],"selectedUid":[1,"selected-uid"],"locale":[1],"currentData":[32],"touched":[32],"validate":[64]},[[0,"brickDataChange","handleBrickDataChange"],[0,"stepTouch","handleStepTouch"],[0,"stepperSubmit","handleStepperSubmit"]],{"data":[{"syncData":0}]}],[2,"fk-property-panel",{"brick":[16],"fields":[16],"locales":[16],"editLocale":[1,"edit-locale"],"activeTab":[32],"newStyleKey":[32]},null,{"brick":[{"onBrickChange":0}]}],[2,"fk-brick-list",{"query":[32],"collapsed":[32]}],[2,"fk-empty-form"],[2,"fk-file-input",{"value":[16],"disabled":[4],"accept":[1],"uploading":[32],"uploadError":[32]}],[2,"fk-select-input",{"configs":[16],"value":[1],"disabled":[4],"multiple":[4],"dataMap":[16],"open":[32],"query":[32],"remoteOptions":[32],"remoteError":[32]},null,{"configs":[{"onConfigsChange":0}],"dataMap":[{"onDataMapChange":0}]}],[2,"fk-signature-input",{"value":[1],"disabled":[4]},null,{"value":[{"onValueChange":0}]}],[262,"fk-stepper",{"stepLabels":[16],"editable":[4],"spec":[16],"dataMap":[16],"locale":[1],"active":[32]},null,{"stepLabels":[{"clampActive":0}]}],[262,"fk-tabs",{"tabLabels":[16],"editable":[4],"spec":[16],"dataMap":[16],"locale":[1],"active":[32]},null,{"tabLabels":[{"clampActive":0}]}],[2,"fk-rules-editor",{"brick":[16],"fields":[16],"forcedModes":[32],"jsonErrors":[32],"codeErrors":[32]}],[2,"fk-brick-mold-item",{"brickMold":[16],"isDragging":[32]}],[2,"fk-code-editor",{"value":[1],"placeholder":[1]},null,{"value":[{"syncValue":0}]}],[0,"fk-brick-render",{"brickSpec":[16],"data":[16],"dataMap":[16],"path":[1],"editable":[4],"selectedUid":[1,"selected-uid"],"errors":[16],"locale":[1],"utils":[16]}],[262,"fk-brick-actions",{"path":[1],"selected":[4],"isDragging":[32],"isDropTarget":[32]}],[262,"fk-brick-not-found"],[2,"fk-drop-area",{"path":[1],"isOver":[32]}]]]], options);
|
|
20
|
+
return bootstrapLazy([["fk-brick-actions_18",[[2,"fk-form-builder",{"spec":[16],"data":[16],"locales":[16],"currentSpec":[32],"currentData":[32],"selectedUid":[32],"copied":[32],"importError":[32],"editLocale":[32]},[[0,"brickDrop","handleBrickDrop"],[0,"brickRemove","handleBrickRemove"],[0,"brickDuplicate","handleBrickDuplicate"],[0,"brickConfigsChange","handleConfigsChange"],[0,"brickStylesChange","handleStylesChange"],[0,"brickValidationsChange","handleValidationsChange"],[0,"brickRulesChange","handleRulesChange"],[0,"formDataChange","handleDataChange"],[4,"paste","handlePaste"],[0,"brickSelect","handleBrickSelect"]],{"spec":[{"syncSpec":0}]}],[2,"fk-data-grid",{"spec":[16],"value":[16],"disabled":[4],"locale":[1],"utils":[16],"touched":[32],"validateRows":[64]},[[0,"brickDataChange","handleRowChange"]]],[2,"fk-form-render",{"spec":[16],"data":[16],"editable":[4],"selectedUid":[1,"selected-uid"],"locale":[1],"currentData":[32],"touched":[32],"validate":[64]},[[0,"brickDataChange","handleBrickDataChange"],[0,"stepTouch","handleStepTouch"],[0,"stepperSubmit","handleStepperSubmit"]],{"data":[{"syncData":0}]}],[2,"fk-property-panel",{"brick":[16],"fields":[16],"locales":[16],"editLocale":[1,"edit-locale"],"activeTab":[32],"newStyleKey":[32]},null,{"brick":[{"onBrickChange":0}]}],[2,"fk-brick-list",{"query":[32],"collapsed":[32]}],[2,"fk-empty-form"],[2,"fk-file-input",{"value":[16],"disabled":[4],"accept":[1],"uploadUrl":[1,"upload-url"],"uploading":[32],"removing":[32],"uploadError":[32]}],[2,"fk-select-input",{"configs":[16],"value":[1],"disabled":[4],"multiple":[4],"dataMap":[16],"open":[32],"query":[32],"remoteOptions":[32],"remoteError":[32]},null,{"configs":[{"onConfigsChange":0}],"dataMap":[{"onDataMapChange":0}]}],[2,"fk-signature-input",{"value":[1],"disabled":[4]},null,{"value":[{"onValueChange":0}]}],[262,"fk-stepper",{"stepLabels":[16],"editable":[4],"spec":[16],"dataMap":[16],"locale":[1],"active":[32]},null,{"stepLabels":[{"clampActive":0}]}],[262,"fk-tabs",{"tabLabels":[16],"editable":[4],"spec":[16],"dataMap":[16],"locale":[1],"active":[32]},null,{"tabLabels":[{"clampActive":0}]}],[2,"fk-rules-editor",{"brick":[16],"fields":[16],"forcedModes":[32],"jsonErrors":[32],"codeErrors":[32]}],[2,"fk-brick-mold-item",{"brickMold":[16],"isDragging":[32]}],[2,"fk-code-editor",{"value":[1],"placeholder":[1]},null,{"value":[{"syncValue":0}]}],[0,"fk-brick-render",{"brickSpec":[16],"rootSpec":[16],"data":[16],"dataMap":[16],"path":[1],"editable":[4],"selectedUid":[1,"selected-uid"],"errors":[16],"locale":[1],"utils":[16]}],[262,"fk-brick-actions",{"path":[1],"selected":[4],"isDragging":[32],"isDropTarget":[32]}],[262,"fk-brick-not-found"],[2,"fk-drop-area",{"path":[1],"isOver":[32]}]]]], options);
|
|
21
21
|
});
|