@budibase/server 1.0.192 → 1.0.193
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/builder/assets/{index.62e2344f.js → index.e175bec8.js} +2 -2
- package/builder/index.html +1 -1
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/threads/automation.js.html +1 -1
- package/coverage/lcov-report/threads/index.html +1 -1
- package/coverage/lcov-report/threads/query.js.html +1 -1
- package/coverage/lcov-report/threads/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/dist/package.json +5 -5
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -383,7 +383,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
383
383
|
`),n=U(t),i=U(`
|
|
384
384
|
row`),s=U(l),o=U("?")},m(a,u){$(a,e,u),$(a,n,u),$(a,i,u),$(a,s,u),$(a,o,u)},p(a,u){u&1&&t!==(t=a[0].length+"")&&ke(n,t),u&1&&l!==(l=(a[0].length>1?"s":"")+"")&&ke(s,l)},d(a){a&&b(e),a&&b(n),a&&b(i),a&&b(s),a&&b(o)}}}function Zq(r){let e,t,n,i;e=new lt({props:{icon:"Delete",size:"s",primary:!0,quiet:!0,$$slots:{default:[Qq]},$$scope:{ctx:r}}}),e.$on("click",function(){ft(r[1].show)&&r[1].show.apply(this,arguments)});let l={okText:"Delete",onOk:r[2],title:"Confirm Deletion",$$slots:{default:[Kq]},$$scope:{ctx:r}};return n=new nr({props:l}),r[4](n),{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment)},m(s,o){S(e,s,o),$(s,t,o),S(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&65&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};o&65&&(u.$$scope={dirty:o,ctx:r}),n.$set(u)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){A(e,s),s&&b(t),r[4](null),A(n,s)}}}function xq(r,e,t){let{selectedRows:n}=e,{deleteRows:i}=e;const l=_t();let s;async function o(){await i(),s==null||s.hide(),l("updaterows")}function a(u){Q[u?"unshift":"push"](()=>{s=u,t(1,s)})}return r.$$set=u=>{"selectedRows"in u&&t(0,n=u.selectedRows),"deleteRows"in u&&t(3,i=u.deleteRows)},[n,s,o,i,a]}class eU extends le{constructor(e){super();se(this,e,xq,Zq,ie,{selectedRows:0,deleteRows:3})}}function tU(r){let e,t,n;const i=[{label:r[1]},r[4],{processFiles:r[3]},{handleFileTooLarge:r[2]}];function l(o){r[5](o)}let s={};for(let o=0;o<i.length;o+=1)s=Yi(s,i[o]);return r[0]!==void 0&&(s.value=r[0]),e=new ea({props:s}),Q.push(()=>ce(e,"value",l)),{c(){C(e.$$.fragment)},m(o,a){S(e,o,a),n=!0},p(o,[a]){const u=a&30?Mu(i,[a&2&&{label:o[1]},a&16&&ju(o[4]),a&8&&{processFiles:o[3]},a&4&&{handleFileTooLarge:o[2]}]):{};!t&&a&1&&(t=!0,u.value=o[0],pe(()=>t=!1)),e.$set(u)},i(o){n||(m(e.$$.fragment,o),n=!0)},o(o){_(e.$$.fragment,o),n=!1},d(o){A(e,o)}}}const nU=1e6;function rU(r,e,t){const n=["value","label"];let i=Bu(e,n),{value:l=[]}=e,{label:s}=e;function o(f){$e.error(`Files cannot exceed ${f/nU}MB. Please try again with smaller files.`)}async function a(f){let c=new FormData;for(let p=0;p<f.length;p++)c.append("file",f[p]);try{return await Ge.uploadBuilderAttachment(c)}catch{return $e.error("Failed to upload attachment"),[]}}function u(f){l=f,t(0,l)}return r.$$set=f=>{e=Yi(Yi({},e),zu(f)),t(4,i=Bu(e,n)),"value"in f&&t(0,l=f.value),"label"in f&&t(1,s=f.label)},[l,s,o,a,i,u]}class iU extends le{constructor(e){super();se(this,e,rU,tU,ie,{value:0,label:1})}}function lU(r){let e,t,n;function i(s){r[10](s)}let l={label:r[4],options:r[2],getOptionLabel:r[5],getOptionValue:pU,sort:!0};return r[1]!==void 0&&(l.value=r[1]),e=new na({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&16&&(a.label=s[4]),o&4&&(a.options=s[2]),!t&&o&2&&(t=!0,a.value=s[1],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function sU(r){var n;let e,t;return e=new Xe({props:{value:(n=r[1])==null?void 0:n[0],options:r[2],getOptionLabel:r[5],getOptionValue:cU,label:r[4],sort:!0}}),e.$on("change",r[9]),{c(){C(e.$$.fragment)},m(i,l){S(e,i,l),t=!0},p(i,l){var o;const s={};l&2&&(s.value=(o=i[1])==null?void 0:o[0]),l&4&&(s.options=i[2]),l&16&&(s.label=i[4]),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){A(e,i)}}}function oU(r){let e,t,n,i;return e=new Qe({props:{extraSmall:!0,grey:!0,$$slots:{default:[aU]},$$scope:{ctx:r}}}),n=new Qe({props:{small:!0,black:!0,$$slots:{default:[uU]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment)},m(l,s){S(e,l,s),$(l,t,s),S(n,l,s),i=!0},p(l,s){const o={};s&4112&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&4104&&(a.$$scope={dirty:s,ctx:l}),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){A(e,l),l&&b(t),A(n,l)}}}function aU(r){let e;return{c(){e=U(r[4])},m(t,n){$(t,e,n)},p(t,n){n&16&&ke(e,t[4])},d(t){t&&b(e)}}}function uU(r){let e,t,n=r[3].name+"",i,l;return{c(){e=U(`Please choose a display column for the
|
|
385
385
|
`),t=M("b"),i=U(n),l=U(`
|
|
386
|
-
table.`)},m(s,o){$(s,e,o),$(s,t,o),P(t,i),$(s,l,o)},p(s,o){o&8&&n!==(n=s[3].name+"")&&ke(i,n)},d(s){s&&b(e),s&&b(t),s&&b(l)}}}function fU(r){let e,t,n,i;const l=[oU,sU,lU],s=[];function o(a,u){return a[3].primaryDisplay==null?0:a[0].relationshipType==="one-to-many"?1:2}return e=o(r),t=s[e]=l[e](r),{c(){t.c(),n=Oe()},m(a,u){s[e].m(a,u),$(a,n,u),i=!0},p(a,[u]){let f=e;e=o(a),e===f?s[e].p(a,u):(x(),_(s[f],1,1,()=>{s[f]=null}),ee(),t=s[e],t?t.p(a,u):(t=s[e]=l[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){s[e].d(a),a&&b(n)}}}const cU=r=>r._id,pU=r=>r._id;function dU(r,e,t){var h;let n,i,l,s;ae(r,Et,v=>t(8,s=v));let{schema:o}=e,{linkedRows:a=[]}=e,u=[],f=(h=a||[])==null?void 0:h.map(v=>(v==null?void 0:v._id)||v);async function c(v){try{t(2,u=await Ge.fetchTableData(v))}catch{t(2,u=[])}}function p(v){return v[l.primaryDisplay||"_id"]}const d=v=>t(1,f=v.detail?[v.detail]:[]);function g(v){f=v,t(1,f)}return r.$$set=v=>{"schema"in v&&t(0,o=v.schema),"linkedRows"in v&&t(6,a=v.linkedRows)},r.$$.update=()=>{r.$$.dirty&2&&t(6,a=f),r.$$.dirty&1&&t(4,n=Er(o.name)),r.$$.dirty&1&&t(7,i=o.tableId),r.$$.dirty&384&&t(3,l=s.list.find(v=>v._id===i)),r.$$.dirty&128&&c(i)},[o,f,u,l,n,p,a,i,s,d,g]}class Av extends le{constructor(e){super();se(this,e,dU,fU,ie,{schema:0,linkedRows:6})}}function mU(r){let e,t,n;function i(s){r[17](s)}let l={label:r[3],"data-cy":""+(r[1].name+"-input"),type:r[4],disabled:r[2]};return r[0]!==void 0&&(l.value=r[0]),e=new et({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),o&2&&(a["data-cy"]=""+(s[1].name+"-input")),o&16&&(a.type=s[4]),o&4&&(a.disabled=s[2]),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function gU(r){let e,t,n,i;return e=new Qe({props:{$$slots:{default:[kU]},$$scope:{ctx:r}}}),n=new rs({props:{editorHeight:"250",mode:"json",value:r[5]}}),n.$on("change",r[16]),{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment)},m(l,s){S(e,l,s),$(l,t,s),S(n,l,s),i=!0},p(l,s){const o={};s&1048584&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&32&&(a.value=l[5]),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){A(e,l),l&&b(t),A(n,l)}}}function _U(r){let e,t,n,i;const l=[SU,CU],s=[];function o(a,u){return a[1].useRichText?0:1}return e=o(r),t=s[e]=l[e](r),{c(){t.c(),n=Oe()},m(a,u){s[e].m(a,u),$(a,n,u),i=!0},p(a,u){let f=e;e=o(a),e===f?s[e].p(a,u):(x(),_(s[f],1,1,()=>{s[f]=null}),ee(),t=s[e],t?t.p(a,u):(t=s[e]=l[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){s[e].d(a),a&&b(n)}}}function hU(r){let e,t,n;function i(s){r[13](s)}let l={schema:r[1]};return r[0]!==void 0&&(l.linkedRows=r[0]),e=new Av({props:l}),Q.push(()=>ce(e,"linkedRows",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&2&&(a.schema=s[1]),!t&&o&1&&(t=!0,a.linkedRows=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function $U(r){let e,t,n;function i(s){r[12](s)}let l={label:r[3],options:r[1].constraints.inclusion};return r[0]!==void 0&&(l.value=r[0]),e=new na({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),o&2&&(a.options=s[1].constraints.inclusion),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function bU(r){let e,t,n;function i(s){r[11](s)}let l={text:r[3],"data-cy":""+(r[1].name+"-input")};return r[0]!==void 0&&(l.value=r[0]),e=new Yn({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.text=s[3]),o&2&&(a["data-cy"]=""+(s[1].name+"-input")),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function vU(r){let e,t,n;function i(s){r[10](s)}let l={label:r[3]};return r[0]!==void 0&&(l.value=r[0]),e=new iU({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function wU(r){var s;let e,t,n;function i(o){r[9](o)}let l={label:r[3],timeOnly:r[6],enableTime:!((s=r[1])==null?void 0:s.dateOnly)};return r[0]!==void 0&&(l.value=r[0]),e=new Fl({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(o,a){S(e,o,a),n=!0},p(o,a){var f;const u={};a&8&&(u.label=o[3]),a&2&&(u.enableTime=!((f=o[1])==null?void 0:f.dateOnly)),!t&&a&1&&(t=!0,u.value=o[0],pe(()=>t=!1)),e.$set(u)},i(o){n||(m(e.$$.fragment,o),n=!0)},o(o){_(e.$$.fragment,o),n=!1},d(o){A(e,o)}}}function yU(r){let e,t,n;function i(s){r[8](s)}let l={label:r[3],"data-cy":""+(r[1].name+"-select"),options:r[1].constraints.inclusion,sort:!0};return r[0]!==void 0&&(l.value=r[0]),e=new Xe({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),o&2&&(a["data-cy"]=""+(s[1].name+"-select")),o&2&&(a.options=s[1].constraints.inclusion),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function kU(r){let e;return{c(){e=U(r[3])},m(t,n){$(t,e,n)},p(t,n){n&8&&ke(e,t[3])},d(t){t&&b(e)}}}function CU(r){let e,t,n;function i(s){r[15](s)}let l={label:r[3],height:"150px"};return r[0]!==void 0&&(l.value=r[0]),e=new gi({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function SU(r){let e,t,n;function i(s){r[14](s)}let l={label:r[3],height:"150px"};return r[0]!==void 0&&(l.value=r[0]),e=new Zj({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function AU(r){let e,t,n,i;const l=[yU,wU,vU,bU,$U,hU,_U,gU,mU],s=[];function o(a,u){return a[4]==="options"&&a[1].constraints.inclusion.length!==0?0:a[4]==="datetime"?1:a[4]==="attachment"?2:a[4]==="boolean"?3:a[4]==="array"&&a[1].constraints.inclusion.length!==0?4:a[4]==="link"?5:a[4]==="longform"?6:a[4]==="json"?7:8}return e=o(r),t=s[e]=l[e](r),{c(){t.c(),n=Oe()},m(a,u){s[e].m(a,u),$(a,n,u),i=!0},p(a,[u]){let f=e;e=o(a),e===f?s[e].p(a,u):(x(),_(s[f],1,1,()=>{s[f]=null}),ee(),t=s[e],t?t.p(a,u):(t=s[e]=l[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){s[e].d(a),a&&b(n)}}}function EU(r,e,t){let n,i,l,{defaultValue:s}=e,{meta:o}=e,{value:a=s||(o.type==="boolean"?!1:"")}=e,{readonly:u}=e;const p=!!(D=>{if(!D)return null;let q=new Date(`0-${D}`);return q instanceof Date&&!isNaN(q.getTime())?q:null})(a)||(o==null?void 0:o.timeOnly);function d(D){a=D,t(0,a)}function g(D){a=D,t(0,a)}function h(D){a=D,t(0,a)}function v(D){a=D,t(0,a)}function w(D){a=D,t(0,a)}function k(D){a=D,t(0,a)}function T(D){a=D,t(0,a)}function O(D){a=D,t(0,a)}const I=({detail:D})=>t(0,a=D.value);function L(D){a=D,t(0,a)}return r.$$set=D=>{"defaultValue"in D&&t(7,s=D.defaultValue),"meta"in D&&t(1,o=D.meta),"value"in D&&t(0,a=D.value),"readonly"in D&&t(2,u=D.readonly)},r.$$.update=()=>{r.$$.dirty&1&&t(5,n=typeof a=="object"?JSON.stringify(a,null,2):a),r.$$.dirty&2&&t(4,i=o==null?void 0:o.type),r.$$.dirty&2&&t(3,l=o.name?Er(o.name):"")},[a,o,u,l,i,n,p,s,d,g,h,v,w,k,T,O,I,L]}class Ma extends le{constructor(e){super();se(this,e,EU,AU,ie,{defaultValue:7,meta:1,value:0,readonly:2})}}function Ev(r,e,t){const n=r.slice();return n[2]=e[t],n}function Ov(r){let e,t=r[0],n=[];for(let i=0;i<t.length;i+=1)n[i]=Tv(Ev(r,t,i));return{c(){e=M("div");for(let i=0;i<n.length;i+=1)n[i].c();y(e,"class","container svelte-xycztl")},m(i,l){$(i,e,l);for(let s=0;s<n.length;s+=1)n[s].m(e,null)},p(i,l){if(l&1){t=i[0];let s;for(s=0;s<t.length;s+=1){const o=Ev(i,t,s);n[s]?n[s].p(o,l):(n[s]=Tv(o),n[s].c(),n[s].m(e,null))}for(;s<n.length;s+=1)n[s].d(1);n.length=t.length}},d(i){i&&b(e),mt(n,i)}}}function Tv(r){let e,t=(r[2].dataPath||"")+"",n,i,l=r[2].message+"",s;return{c(){e=M("div"),n=U(t),i=R(),s=U(l),y(e,"class","error svelte-xycztl")},m(o,a){$(o,e,a),P(e,n),P(e,i),P(e,s)},p(o,a){a&1&&t!==(t=(o[2].dataPath||"")+"")&&ke(n,t),a&1&&l!==(l=o[2].message+"")&&ke(s,l)},d(o){o&&b(e)}}}function OU(r){let e,t=r[1]&&Ov(r);return{c(){t&&t.c(),e=Oe()},m(n,i){t&&t.m(n,i),$(n,e,i)},p(n,[i]){n[1]?t?t.p(n,i):(t=Ov(n),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:Ce,o:Ce,d(n){t&&t.d(n),n&&b(e)}}}function TU(r,e,t){let n,{errors:i=[]}=e;return r.$$set=l=>{"errors"in l&&t(0,i=l.errors)},r.$$.update=()=>{r.$$.dirty&1&&t(1,n=i.length>0)},[i,n]}class O1 extends le{constructor(e){super();se(this,e,TU,OU,ie,{errors:0})}}function Iv(r,e,t){const n=r.slice();return n[10]=e[t][0],n[11]=e[t][1],n[12]=e,n[13]=t,n}function Lv(r){let e,t,n,i,l;function s(a){r[8](a,r[10])}let o={meta:r[11]};return r[0][r[10]]!==void 0&&(o.value=r[0][r[10]]),t=new Ma({props:o}),Q.push(()=>ce(t,"value",s)),{c(){e=M("div"),C(t.$$.fragment),i=R(),y(e,"class","svelte-17qwzrs")},m(a,u){$(a,e,u),S(t,e,null),P(e,i),l=!0},p(a,u){r=a;const f={};u&4&&(f.meta=r[11]),!n&&u&5&&(n=!0,f.value=r[0][r[10]],pe(()=>n=!1)),t.$set(f)},i(a){l||(m(t.$$.fragment,a),l=!0)},o(a){_(t.$$.fragment,a),l=!1},d(a){a&&b(e),A(t)}}}function Pv(r){let e,t,n=!r[11].autocolumn&&r[11].type!==r[4]&&Lv(r);return{c(){n&&n.c(),e=Oe()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,l){!i[11].autocolumn&&i[11].type!==i[4]?n?(n.p(i,l),l&4&&m(n,1)):(n=Lv(i),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(x(),_(n,1,1,()=>{n=null}),ee())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function IU(r){let e,t,n,i;e=new O1({props:{errors:r[1]}});let l=r[2],s=[];for(let a=0;a<l.length;a+=1)s[a]=Pv(Iv(r,l,a));const o=a=>_(s[a],1,1,()=>{s[a]=null});return{c(){C(e.$$.fragment),t=R();for(let a=0;a<s.length;a+=1)s[a].c();n=Oe()},m(a,u){S(e,a,u),$(a,t,u);for(let f=0;f<s.length;f+=1)s[f].m(a,u);$(a,n,u),i=!0},p(a,u){const f={};if(u&2&&(f.errors=a[1]),e.$set(f),u&21){l=a[2];let c;for(c=0;c<l.length;c+=1){const p=Iv(a,l,c);s[c]?(s[c].p(p,u),m(s[c],1)):(s[c]=Pv(p),s[c].c(),m(s[c],1),s[c].m(n.parentNode,n))}for(x(),c=l.length;c<s.length;c+=1)o(c);ee()}},i(a){if(!i){m(e.$$.fragment,a);for(let u=0;u<l.length;u+=1)m(s[u]);i=!0}},o(a){_(e.$$.fragment,a),s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)_(s[u]);i=!1},d(a){A(e,a),a&&b(t),mt(s,a),a&&b(n)}}}function LU(r){let e,t;return e=new Pt({props:{title:r[3]?"Create Row":"Edit Row",confirmText:r[3]?"Create Row":"Save Row",onConfirm:r[5],$$slots:{default:[IU]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,[i]){const l={};i&8&&(l.title=n[3]?"Create Row":"Edit Row"),i&8&&(l.confirmText=n[3]?"Create Row":"Save Row"),i&16391&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function PU(r,e,t){let n,i,l,s;ae(r,Et,d=>t(7,s=d));const o=qt.FORMULA.type;let{row:a={}}=e,u=[];const f=_t();async function c(){t(1,u=[]);try{await Ge.saveRow(rt(Se({},a),{tableId:i._id})),$e.success("Row saved successfully"),H3.save(),f("updaterows")}catch(d){if(d.handled){const g=d.json;(g==null?void 0:g.errors)?t(1,u=Object.entries(g.errors).map(([h,v])=>({dataPath:h,message:v})).flat()):d.status===400&&(g==null?void 0:g.validationErrors)&&t(1,u=Object.keys(g.validationErrors).map(h=>({message:`${h} ${g.validationErrors[h][0]}`})))}else $e.error("Failed to save row");return!1}}function p(d,g){r.$$.not_equal(a[g],d)&&(a[g]=d,t(0,a))}return r.$$set=d=>{"row"in d&&t(0,a=d.row)},r.$$.update=()=>{var d;r.$$.dirty&1&&t(3,n=(a==null?void 0:a._id)==null),r.$$.dirty&129&&t(6,i=a.tableId?s.list.find(g=>g._id===(a==null?void 0:a.tableId)):s.selected),r.$$.dirty&64&&t(2,l=Object.entries((d=i==null?void 0:i.schema)!=null?d:{}))},[a,u,l,n,o,c,i,s,p]}class T1 extends le{constructor(e){super();se(this,e,PU,LU,ie,{row:0})}}function Nv(r,e,t){const n=r.slice();return n[17]=e[t][0],n[18]=e[t][1],n[19]=e,n[20]=t,n}function Rv(r){let e,t,n;function i(s){r[13](s,r[17])}let l={meta:r[18],creating:r[4]};return r[0][r[17]]!==void 0&&(l.value=r[0][r[17]]),e=new Ma({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){r=s;const a={};o&8&&(a.meta=r[18]),o&16&&(a.creating=r[4]),!t&&o&9&&(t=!0,a.value=r[0][r[17]],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function Dv(r){let e,t,n=!r[18].autocolumn&&Rv(r);return{c(){n&&n.c(),e=Oe()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,l){i[18].autocolumn?n&&(x(),_(n,1,1,()=>{n=null}),ee()):n?(n.p(i,l),l&8&&m(n,1)):(n=Rv(i),n.c(),m(n,1),n.m(e.parentNode,e))},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function NU(r){let e,t,n,i,l,s,o,a,u,f,c,p,d,g,h,v;e=new O1({props:{errors:r[2]}});function w(G){r[9](G)}let k={meta:rt(Se({},r[1].email),{name:"Email"}),readonly:!r[4]};r[0].email!==void 0&&(k.value=r[0].email),n=new Ma({props:k}),Q.push(()=>ce(n,"value",w));function T(G){r[10](G)}let O={meta:rt(Se({},r[1].firstName),{name:"First Name"}),readonly:!r[4]};r[0].firstName!==void 0&&(O.value=r[0].firstName),s=new Ma({props:O}),Q.push(()=>ce(s,"value",T));function I(G){r[11](G)}let L={meta:rt(Se({},r[1].lastName),{name:"Last Name"}),readonly:!r[4]};r[0].lastName!==void 0&&(L.value=r[0].lastName),u=new Ma({props:L}),Q.push(()=>ce(u,"value",I));function D(G){r[12](G)}let q={label:"Role","data-cy":"roleId-select",options:r[5],getOptionLabel:DU,getOptionValue:MU,disabled:!r[4]};r[0].roleId!==void 0&&(q.value=r[0].roleId),p=new Xe({props:q}),Q.push(()=>ce(p,"value",D));let j=r[3],z=[];for(let G=0;G<j.length;G+=1)z[G]=Dv(Nv(r,j,G));const F=G=>_(z[G],1,1,()=>{z[G]=null});return{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment),l=R(),C(s.$$.fragment),a=R(),C(u.$$.fragment),c=R(),C(p.$$.fragment),g=R();for(let G=0;G<z.length;G+=1)z[G].c();h=Oe()},m(G,Y){S(e,G,Y),$(G,t,Y),S(n,G,Y),$(G,l,Y),S(s,G,Y),$(G,a,Y),S(u,G,Y),$(G,c,Y),S(p,G,Y),$(G,g,Y);for(let V=0;V<z.length;V+=1)z[V].m(G,Y);$(G,h,Y),v=!0},p(G,Y){const V={};Y&4&&(V.errors=G[2]),e.$set(V);const H={};Y&2&&(H.meta=rt(Se({},G[1].email),{name:"Email"})),Y&16&&(H.readonly=!G[4]),!i&&Y&1&&(i=!0,H.value=G[0].email,pe(()=>i=!1)),n.$set(H);const W={};Y&2&&(W.meta=rt(Se({},G[1].firstName),{name:"First Name"})),Y&16&&(W.readonly=!G[4]),!o&&Y&1&&(o=!0,W.value=G[0].firstName,pe(()=>o=!1)),s.$set(W);const X={};Y&2&&(X.meta=rt(Se({},G[1].lastName),{name:"Last Name"})),Y&16&&(X.readonly=!G[4]),!f&&Y&1&&(f=!0,X.value=G[0].lastName,pe(()=>f=!1)),u.$set(X);const de={};if(Y&32&&(de.options=G[5]),Y&16&&(de.disabled=!G[4]),!d&&Y&1&&(d=!0,de.value=G[0].roleId,pe(()=>d=!1)),p.$set(de),Y&25){j=G[3];let K;for(K=0;K<j.length;K+=1){const ne=Nv(G,j,K);z[K]?(z[K].p(ne,Y),m(z[K],1)):(z[K]=Dv(ne),z[K].c(),m(z[K],1),z[K].m(h.parentNode,h))}for(x(),K=j.length;K<z.length;K+=1)F(K);ee()}},i(G){if(!v){m(e.$$.fragment,G),m(n.$$.fragment,G),m(s.$$.fragment,G),m(u.$$.fragment,G),m(p.$$.fragment,G);for(let Y=0;Y<j.length;Y+=1)m(z[Y]);v=!0}},o(G){_(e.$$.fragment,G),_(n.$$.fragment,G),_(s.$$.fragment,G),_(u.$$.fragment,G),_(p.$$.fragment,G),z=z.filter(Boolean);for(let Y=0;Y<z.length;Y+=1)_(z[Y]);v=!1},d(G){A(e,G),G&&b(t),A(n,G),G&&b(l),A(s,G),G&&b(a),A(u,G),G&&b(c),A(p,G),G&&b(g),mt(z,G),G&&b(h)}}}function RU(r){let e,t;return e=new Pt({props:{title:r[4]?"Create User":"Edit User",confirmText:r[4]?"Create User":"Save User",onConfirm:r[6],$$slots:{default:[NU]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,[i]){const l={};i&16&&(l.title=n[4]?"Create User":"Edit User"),i&16&&(l.confirmText=n[4]?"Create User":"Save User"),i&2097215&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}const DU=r=>r.name,MU=r=>r._id;function jU(r,e,t){let n,i,l,s,o,a;ae(r,Et,O=>t(8,o=O)),ae(r,ki,O=>t(5,a=O));let{row:u={}}=e;const f=_t();let c=[];const p=O=>{var L;let I=(L=O==null?void 0:O.schema)!=null?L:{};return I.username&&(I.username.name="Username"),I},d=O=>{let I=Se({},O);return delete I.email,delete I.roleId,delete I.status,delete I.firstName,delete I.lastName,Object.entries(I)},g=async()=>{if(t(2,c=[]),u.email||t(2,c=[...c,{message:"Email is required"}]),u.roleId||t(2,c=[...c,{message:"Role is required"}]),c.length)return!1;try{await Ge.saveRow(rt(Se({},u),{tableId:i._id})),$e.success("User saved successfully"),H3.save(),f("updaterows")}catch(O){if(O.handled){const I=O.json;(I==null?void 0:I.errors)?Array.isArray(I.errors)?t(2,c=I.errors.map(L=>({message:L}))):t(2,c=Object.entries(I.errors).map(([L,D])=>({dataPath:L,message:D})).flat()):O.status===400&&t(2,c=[{message:(I==null?void 0:I.message)||"Unknown error"}])}else $e.error("Error saving user");return!1}};function h(O){r.$$.not_equal(u.email,O)&&(u.email=O,t(0,u))}function v(O){r.$$.not_equal(u.firstName,O)&&(u.firstName=O,t(0,u))}function w(O){r.$$.not_equal(u.lastName,O)&&(u.lastName=O,t(0,u))}function k(O){r.$$.not_equal(u.roleId,O)&&(u.roleId=O,t(0,u))}function T(O,I){r.$$.not_equal(u[I],O)&&(u[I]=O,t(0,u))}return r.$$set=O=>{"row"in O&&t(0,u=O.row)},r.$$.update=()=>{r.$$.dirty&1&&(u.status||t(0,u.status="active",u)),r.$$.dirty&1&&t(4,n=(u==null?void 0:u._id)==null),r.$$.dirty&257&&t(7,i=u.tableId?o.list.find(O=>O._id===(u==null?void 0:u.tableId)):o.selected),r.$$.dirty&128&&t(1,l=p(i)),r.$$.dirty&2&&t(3,s=d(l))},[u,l,c,s,n,a,g,i,o,h,v,w,k,T]}class BU extends le{constructor(e){super();se(this,e,jU,RU,ie,{row:0})}}function Mv(r=!0){let e={};for(let[t,n]of Object.entries(qi))e[n]={enabled:r,name:JB[t]};return e}function jv(r,e,t){let n,i;switch(t){case qi.UPDATED_BY:case qi.CREATED_BY:n=qt.LINK.type,i=qt.LINK.constraints;break;case qi.AUTO_ID:n=qt.NUMBER.type,i=qt.NUMBER.constraints;break;case qi.UPDATED_AT:case qi.CREATED_AT:n=qt.DATETIME.type,i=qt.DATETIME.constraints;break;default:n=qt.STRING.type,i=qt.STRING.constraints;break}if(Object.values(qi).indexOf(t)===-1)throw"Cannot build auto column with supplied subtype";const l={name:e,type:n,subtype:t,icon:"ri-magic-line",autocolumn:!0,constraints:i};return XB(t)&&(l.tableId=Sl.USERS,l.fieldName=`${r}-${e}`),l}function zU(r){let e,t,n;return t=new gi({props:{label:r[0],value:r[1],thin:!0}}),t.$on("change",r[2]),{c(){e=M("div"),C(t.$$.fragment),y(e,"class","container svelte-1pg9lbe")},m(i,l){$(i,e,l),S(t,e,null),n=!0},p(i,[l]){const s={};l&1&&(s.label=i[0]),l&2&&(s.value=i[1]),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),A(t)}}}function qU(r,e,t){let n,{values:i}=e,{label:l}=e;const s=o=>{try{t(3,i=o.detail.split(`
|
|
386
|
+
table.`)},m(s,o){$(s,e,o),$(s,t,o),P(t,i),$(s,l,o)},p(s,o){o&8&&n!==(n=s[3].name+"")&&ke(i,n)},d(s){s&&b(e),s&&b(t),s&&b(l)}}}function fU(r){let e,t,n,i;const l=[oU,sU,lU],s=[];function o(a,u){return a[3].primaryDisplay==null?0:a[0].relationshipType==="one-to-many"?1:2}return e=o(r),t=s[e]=l[e](r),{c(){t.c(),n=Oe()},m(a,u){s[e].m(a,u),$(a,n,u),i=!0},p(a,[u]){let f=e;e=o(a),e===f?s[e].p(a,u):(x(),_(s[f],1,1,()=>{s[f]=null}),ee(),t=s[e],t?t.p(a,u):(t=s[e]=l[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){s[e].d(a),a&&b(n)}}}const cU=r=>r._id,pU=r=>r._id;function dU(r,e,t){var h;let n,i,l,s;ae(r,Et,v=>t(8,s=v));let{schema:o}=e,{linkedRows:a=[]}=e,u=[],f=(h=Array.isArray(a)?a:[])==null?void 0:h.map(v=>(v==null?void 0:v._id)||v);async function c(v){try{t(2,u=await Ge.fetchTableData(v))}catch{t(2,u=[])}}function p(v){return v[l.primaryDisplay||"_id"]}const d=v=>t(1,f=v.detail?[v.detail]:[]);function g(v){f=v,t(1,f)}return r.$$set=v=>{"schema"in v&&t(0,o=v.schema),"linkedRows"in v&&t(6,a=v.linkedRows)},r.$$.update=()=>{r.$$.dirty&2&&t(6,a=f),r.$$.dirty&1&&t(4,n=Er(o.name)),r.$$.dirty&1&&t(7,i=o.tableId),r.$$.dirty&384&&t(3,l=s.list.find(v=>v._id===i)),r.$$.dirty&128&&c(i)},[o,f,u,l,n,p,a,i,s,d,g]}class Av extends le{constructor(e){super();se(this,e,dU,fU,ie,{schema:0,linkedRows:6})}}function mU(r){let e,t,n;function i(s){r[17](s)}let l={label:r[3],"data-cy":""+(r[1].name+"-input"),type:r[4],disabled:r[2]};return r[0]!==void 0&&(l.value=r[0]),e=new et({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),o&2&&(a["data-cy"]=""+(s[1].name+"-input")),o&16&&(a.type=s[4]),o&4&&(a.disabled=s[2]),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function gU(r){let e,t,n,i;return e=new Qe({props:{$$slots:{default:[kU]},$$scope:{ctx:r}}}),n=new rs({props:{editorHeight:"250",mode:"json",value:r[5]}}),n.$on("change",r[16]),{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment)},m(l,s){S(e,l,s),$(l,t,s),S(n,l,s),i=!0},p(l,s){const o={};s&1048584&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&32&&(a.value=l[5]),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){A(e,l),l&&b(t),A(n,l)}}}function _U(r){let e,t,n,i;const l=[SU,CU],s=[];function o(a,u){return a[1].useRichText?0:1}return e=o(r),t=s[e]=l[e](r),{c(){t.c(),n=Oe()},m(a,u){s[e].m(a,u),$(a,n,u),i=!0},p(a,u){let f=e;e=o(a),e===f?s[e].p(a,u):(x(),_(s[f],1,1,()=>{s[f]=null}),ee(),t=s[e],t?t.p(a,u):(t=s[e]=l[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){s[e].d(a),a&&b(n)}}}function hU(r){let e,t,n;function i(s){r[13](s)}let l={schema:r[1]};return r[0]!==void 0&&(l.linkedRows=r[0]),e=new Av({props:l}),Q.push(()=>ce(e,"linkedRows",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&2&&(a.schema=s[1]),!t&&o&1&&(t=!0,a.linkedRows=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function $U(r){let e,t,n;function i(s){r[12](s)}let l={label:r[3],options:r[1].constraints.inclusion};return r[0]!==void 0&&(l.value=r[0]),e=new na({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),o&2&&(a.options=s[1].constraints.inclusion),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function bU(r){let e,t,n;function i(s){r[11](s)}let l={text:r[3],"data-cy":""+(r[1].name+"-input")};return r[0]!==void 0&&(l.value=r[0]),e=new Yn({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.text=s[3]),o&2&&(a["data-cy"]=""+(s[1].name+"-input")),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function vU(r){let e,t,n;function i(s){r[10](s)}let l={label:r[3]};return r[0]!==void 0&&(l.value=r[0]),e=new iU({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function wU(r){var s;let e,t,n;function i(o){r[9](o)}let l={label:r[3],timeOnly:r[6],enableTime:!((s=r[1])==null?void 0:s.dateOnly)};return r[0]!==void 0&&(l.value=r[0]),e=new Fl({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(o,a){S(e,o,a),n=!0},p(o,a){var f;const u={};a&8&&(u.label=o[3]),a&2&&(u.enableTime=!((f=o[1])==null?void 0:f.dateOnly)),!t&&a&1&&(t=!0,u.value=o[0],pe(()=>t=!1)),e.$set(u)},i(o){n||(m(e.$$.fragment,o),n=!0)},o(o){_(e.$$.fragment,o),n=!1},d(o){A(e,o)}}}function yU(r){let e,t,n;function i(s){r[8](s)}let l={label:r[3],"data-cy":""+(r[1].name+"-select"),options:r[1].constraints.inclusion,sort:!0};return r[0]!==void 0&&(l.value=r[0]),e=new Xe({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),o&2&&(a["data-cy"]=""+(s[1].name+"-select")),o&2&&(a.options=s[1].constraints.inclusion),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function kU(r){let e;return{c(){e=U(r[3])},m(t,n){$(t,e,n)},p(t,n){n&8&&ke(e,t[3])},d(t){t&&b(e)}}}function CU(r){let e,t,n;function i(s){r[15](s)}let l={label:r[3],height:"150px"};return r[0]!==void 0&&(l.value=r[0]),e=new gi({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function SU(r){let e,t,n;function i(s){r[14](s)}let l={label:r[3],height:"150px"};return r[0]!==void 0&&(l.value=r[0]),e=new Zj({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){const a={};o&8&&(a.label=s[3]),!t&&o&1&&(t=!0,a.value=s[0],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function AU(r){let e,t,n,i;const l=[yU,wU,vU,bU,$U,hU,_U,gU,mU],s=[];function o(a,u){return a[4]==="options"&&a[1].constraints.inclusion.length!==0?0:a[4]==="datetime"?1:a[4]==="attachment"?2:a[4]==="boolean"?3:a[4]==="array"&&a[1].constraints.inclusion.length!==0?4:a[4]==="link"?5:a[4]==="longform"?6:a[4]==="json"?7:8}return e=o(r),t=s[e]=l[e](r),{c(){t.c(),n=Oe()},m(a,u){s[e].m(a,u),$(a,n,u),i=!0},p(a,[u]){let f=e;e=o(a),e===f?s[e].p(a,u):(x(),_(s[f],1,1,()=>{s[f]=null}),ee(),t=s[e],t?t.p(a,u):(t=s[e]=l[e](a),t.c()),m(t,1),t.m(n.parentNode,n))},i(a){i||(m(t),i=!0)},o(a){_(t),i=!1},d(a){s[e].d(a),a&&b(n)}}}function EU(r,e,t){let n,i,l,{defaultValue:s}=e,{meta:o}=e,{value:a=s||(o.type==="boolean"?!1:"")}=e,{readonly:u}=e;const p=!!(D=>{if(!D)return null;let q=new Date(`0-${D}`);return q instanceof Date&&!isNaN(q.getTime())?q:null})(a)||(o==null?void 0:o.timeOnly);function d(D){a=D,t(0,a)}function g(D){a=D,t(0,a)}function h(D){a=D,t(0,a)}function v(D){a=D,t(0,a)}function w(D){a=D,t(0,a)}function k(D){a=D,t(0,a)}function T(D){a=D,t(0,a)}function O(D){a=D,t(0,a)}const I=({detail:D})=>t(0,a=D.value);function L(D){a=D,t(0,a)}return r.$$set=D=>{"defaultValue"in D&&t(7,s=D.defaultValue),"meta"in D&&t(1,o=D.meta),"value"in D&&t(0,a=D.value),"readonly"in D&&t(2,u=D.readonly)},r.$$.update=()=>{r.$$.dirty&1&&t(5,n=typeof a=="object"?JSON.stringify(a,null,2):a),r.$$.dirty&2&&t(4,i=o==null?void 0:o.type),r.$$.dirty&2&&t(3,l=o.name?Er(o.name):"")},[a,o,u,l,i,n,p,s,d,g,h,v,w,k,T,O,I,L]}class Ma extends le{constructor(e){super();se(this,e,EU,AU,ie,{defaultValue:7,meta:1,value:0,readonly:2})}}function Ev(r,e,t){const n=r.slice();return n[2]=e[t],n}function Ov(r){let e,t=r[0],n=[];for(let i=0;i<t.length;i+=1)n[i]=Tv(Ev(r,t,i));return{c(){e=M("div");for(let i=0;i<n.length;i+=1)n[i].c();y(e,"class","container svelte-xycztl")},m(i,l){$(i,e,l);for(let s=0;s<n.length;s+=1)n[s].m(e,null)},p(i,l){if(l&1){t=i[0];let s;for(s=0;s<t.length;s+=1){const o=Ev(i,t,s);n[s]?n[s].p(o,l):(n[s]=Tv(o),n[s].c(),n[s].m(e,null))}for(;s<n.length;s+=1)n[s].d(1);n.length=t.length}},d(i){i&&b(e),mt(n,i)}}}function Tv(r){let e,t=(r[2].dataPath||"")+"",n,i,l=r[2].message+"",s;return{c(){e=M("div"),n=U(t),i=R(),s=U(l),y(e,"class","error svelte-xycztl")},m(o,a){$(o,e,a),P(e,n),P(e,i),P(e,s)},p(o,a){a&1&&t!==(t=(o[2].dataPath||"")+"")&&ke(n,t),a&1&&l!==(l=o[2].message+"")&&ke(s,l)},d(o){o&&b(e)}}}function OU(r){let e,t=r[1]&&Ov(r);return{c(){t&&t.c(),e=Oe()},m(n,i){t&&t.m(n,i),$(n,e,i)},p(n,[i]){n[1]?t?t.p(n,i):(t=Ov(n),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},i:Ce,o:Ce,d(n){t&&t.d(n),n&&b(e)}}}function TU(r,e,t){let n,{errors:i=[]}=e;return r.$$set=l=>{"errors"in l&&t(0,i=l.errors)},r.$$.update=()=>{r.$$.dirty&1&&t(1,n=i.length>0)},[i,n]}class O1 extends le{constructor(e){super();se(this,e,TU,OU,ie,{errors:0})}}function Iv(r,e,t){const n=r.slice();return n[10]=e[t][0],n[11]=e[t][1],n[12]=e,n[13]=t,n}function Lv(r){let e,t,n,i,l;function s(a){r[8](a,r[10])}let o={meta:r[11]};return r[0][r[10]]!==void 0&&(o.value=r[0][r[10]]),t=new Ma({props:o}),Q.push(()=>ce(t,"value",s)),{c(){e=M("div"),C(t.$$.fragment),i=R(),y(e,"class","svelte-17qwzrs")},m(a,u){$(a,e,u),S(t,e,null),P(e,i),l=!0},p(a,u){r=a;const f={};u&4&&(f.meta=r[11]),!n&&u&5&&(n=!0,f.value=r[0][r[10]],pe(()=>n=!1)),t.$set(f)},i(a){l||(m(t.$$.fragment,a),l=!0)},o(a){_(t.$$.fragment,a),l=!1},d(a){a&&b(e),A(t)}}}function Pv(r){let e,t,n=!r[11].autocolumn&&r[11].type!==r[4]&&Lv(r);return{c(){n&&n.c(),e=Oe()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,l){!i[11].autocolumn&&i[11].type!==i[4]?n?(n.p(i,l),l&4&&m(n,1)):(n=Lv(i),n.c(),m(n,1),n.m(e.parentNode,e)):n&&(x(),_(n,1,1,()=>{n=null}),ee())},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function IU(r){let e,t,n,i;e=new O1({props:{errors:r[1]}});let l=r[2],s=[];for(let a=0;a<l.length;a+=1)s[a]=Pv(Iv(r,l,a));const o=a=>_(s[a],1,1,()=>{s[a]=null});return{c(){C(e.$$.fragment),t=R();for(let a=0;a<s.length;a+=1)s[a].c();n=Oe()},m(a,u){S(e,a,u),$(a,t,u);for(let f=0;f<s.length;f+=1)s[f].m(a,u);$(a,n,u),i=!0},p(a,u){const f={};if(u&2&&(f.errors=a[1]),e.$set(f),u&21){l=a[2];let c;for(c=0;c<l.length;c+=1){const p=Iv(a,l,c);s[c]?(s[c].p(p,u),m(s[c],1)):(s[c]=Pv(p),s[c].c(),m(s[c],1),s[c].m(n.parentNode,n))}for(x(),c=l.length;c<s.length;c+=1)o(c);ee()}},i(a){if(!i){m(e.$$.fragment,a);for(let u=0;u<l.length;u+=1)m(s[u]);i=!0}},o(a){_(e.$$.fragment,a),s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)_(s[u]);i=!1},d(a){A(e,a),a&&b(t),mt(s,a),a&&b(n)}}}function LU(r){let e,t;return e=new Pt({props:{title:r[3]?"Create Row":"Edit Row",confirmText:r[3]?"Create Row":"Save Row",onConfirm:r[5],$$slots:{default:[IU]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,[i]){const l={};i&8&&(l.title=n[3]?"Create Row":"Edit Row"),i&8&&(l.confirmText=n[3]?"Create Row":"Save Row"),i&16391&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function PU(r,e,t){let n,i,l,s;ae(r,Et,d=>t(7,s=d));const o=qt.FORMULA.type;let{row:a={}}=e,u=[];const f=_t();async function c(){t(1,u=[]);try{await Ge.saveRow(rt(Se({},a),{tableId:i._id})),$e.success("Row saved successfully"),H3.save(),f("updaterows")}catch(d){if(d.handled){const g=d.json;(g==null?void 0:g.errors)?t(1,u=Object.entries(g.errors).map(([h,v])=>({dataPath:h,message:v})).flat()):d.status===400&&(g==null?void 0:g.validationErrors)&&t(1,u=Object.keys(g.validationErrors).map(h=>({message:`${h} ${g.validationErrors[h][0]}`})))}else $e.error("Failed to save row");return!1}}function p(d,g){r.$$.not_equal(a[g],d)&&(a[g]=d,t(0,a))}return r.$$set=d=>{"row"in d&&t(0,a=d.row)},r.$$.update=()=>{var d;r.$$.dirty&1&&t(3,n=(a==null?void 0:a._id)==null),r.$$.dirty&129&&t(6,i=a.tableId?s.list.find(g=>g._id===(a==null?void 0:a.tableId)):s.selected),r.$$.dirty&64&&t(2,l=Object.entries((d=i==null?void 0:i.schema)!=null?d:{}))},[a,u,l,n,o,c,i,s,p]}class T1 extends le{constructor(e){super();se(this,e,PU,LU,ie,{row:0})}}function Nv(r,e,t){const n=r.slice();return n[17]=e[t][0],n[18]=e[t][1],n[19]=e,n[20]=t,n}function Rv(r){let e,t,n;function i(s){r[13](s,r[17])}let l={meta:r[18],creating:r[4]};return r[0][r[17]]!==void 0&&(l.value=r[0][r[17]]),e=new Ma({props:l}),Q.push(()=>ce(e,"value",i)),{c(){C(e.$$.fragment)},m(s,o){S(e,s,o),n=!0},p(s,o){r=s;const a={};o&8&&(a.meta=r[18]),o&16&&(a.creating=r[4]),!t&&o&9&&(t=!0,a.value=r[0][r[17]],pe(()=>t=!1)),e.$set(a)},i(s){n||(m(e.$$.fragment,s),n=!0)},o(s){_(e.$$.fragment,s),n=!1},d(s){A(e,s)}}}function Dv(r){let e,t,n=!r[18].autocolumn&&Rv(r);return{c(){n&&n.c(),e=Oe()},m(i,l){n&&n.m(i,l),$(i,e,l),t=!0},p(i,l){i[18].autocolumn?n&&(x(),_(n,1,1,()=>{n=null}),ee()):n?(n.p(i,l),l&8&&m(n,1)):(n=Rv(i),n.c(),m(n,1),n.m(e.parentNode,e))},i(i){t||(m(n),t=!0)},o(i){_(n),t=!1},d(i){n&&n.d(i),i&&b(e)}}}function NU(r){let e,t,n,i,l,s,o,a,u,f,c,p,d,g,h,v;e=new O1({props:{errors:r[2]}});function w(G){r[9](G)}let k={meta:rt(Se({},r[1].email),{name:"Email"}),readonly:!r[4]};r[0].email!==void 0&&(k.value=r[0].email),n=new Ma({props:k}),Q.push(()=>ce(n,"value",w));function T(G){r[10](G)}let O={meta:rt(Se({},r[1].firstName),{name:"First Name"}),readonly:!r[4]};r[0].firstName!==void 0&&(O.value=r[0].firstName),s=new Ma({props:O}),Q.push(()=>ce(s,"value",T));function I(G){r[11](G)}let L={meta:rt(Se({},r[1].lastName),{name:"Last Name"}),readonly:!r[4]};r[0].lastName!==void 0&&(L.value=r[0].lastName),u=new Ma({props:L}),Q.push(()=>ce(u,"value",I));function D(G){r[12](G)}let q={label:"Role","data-cy":"roleId-select",options:r[5],getOptionLabel:DU,getOptionValue:MU,disabled:!r[4]};r[0].roleId!==void 0&&(q.value=r[0].roleId),p=new Xe({props:q}),Q.push(()=>ce(p,"value",D));let j=r[3],z=[];for(let G=0;G<j.length;G+=1)z[G]=Dv(Nv(r,j,G));const F=G=>_(z[G],1,1,()=>{z[G]=null});return{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment),l=R(),C(s.$$.fragment),a=R(),C(u.$$.fragment),c=R(),C(p.$$.fragment),g=R();for(let G=0;G<z.length;G+=1)z[G].c();h=Oe()},m(G,Y){S(e,G,Y),$(G,t,Y),S(n,G,Y),$(G,l,Y),S(s,G,Y),$(G,a,Y),S(u,G,Y),$(G,c,Y),S(p,G,Y),$(G,g,Y);for(let V=0;V<z.length;V+=1)z[V].m(G,Y);$(G,h,Y),v=!0},p(G,Y){const V={};Y&4&&(V.errors=G[2]),e.$set(V);const H={};Y&2&&(H.meta=rt(Se({},G[1].email),{name:"Email"})),Y&16&&(H.readonly=!G[4]),!i&&Y&1&&(i=!0,H.value=G[0].email,pe(()=>i=!1)),n.$set(H);const W={};Y&2&&(W.meta=rt(Se({},G[1].firstName),{name:"First Name"})),Y&16&&(W.readonly=!G[4]),!o&&Y&1&&(o=!0,W.value=G[0].firstName,pe(()=>o=!1)),s.$set(W);const X={};Y&2&&(X.meta=rt(Se({},G[1].lastName),{name:"Last Name"})),Y&16&&(X.readonly=!G[4]),!f&&Y&1&&(f=!0,X.value=G[0].lastName,pe(()=>f=!1)),u.$set(X);const de={};if(Y&32&&(de.options=G[5]),Y&16&&(de.disabled=!G[4]),!d&&Y&1&&(d=!0,de.value=G[0].roleId,pe(()=>d=!1)),p.$set(de),Y&25){j=G[3];let K;for(K=0;K<j.length;K+=1){const ne=Nv(G,j,K);z[K]?(z[K].p(ne,Y),m(z[K],1)):(z[K]=Dv(ne),z[K].c(),m(z[K],1),z[K].m(h.parentNode,h))}for(x(),K=j.length;K<z.length;K+=1)F(K);ee()}},i(G){if(!v){m(e.$$.fragment,G),m(n.$$.fragment,G),m(s.$$.fragment,G),m(u.$$.fragment,G),m(p.$$.fragment,G);for(let Y=0;Y<j.length;Y+=1)m(z[Y]);v=!0}},o(G){_(e.$$.fragment,G),_(n.$$.fragment,G),_(s.$$.fragment,G),_(u.$$.fragment,G),_(p.$$.fragment,G),z=z.filter(Boolean);for(let Y=0;Y<z.length;Y+=1)_(z[Y]);v=!1},d(G){A(e,G),G&&b(t),A(n,G),G&&b(l),A(s,G),G&&b(a),A(u,G),G&&b(c),A(p,G),G&&b(g),mt(z,G),G&&b(h)}}}function RU(r){let e,t;return e=new Pt({props:{title:r[4]?"Create User":"Edit User",confirmText:r[4]?"Create User":"Save User",onConfirm:r[6],$$slots:{default:[NU]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,[i]){const l={};i&16&&(l.title=n[4]?"Create User":"Edit User"),i&16&&(l.confirmText=n[4]?"Create User":"Save User"),i&2097215&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}const DU=r=>r.name,MU=r=>r._id;function jU(r,e,t){let n,i,l,s,o,a;ae(r,Et,O=>t(8,o=O)),ae(r,ki,O=>t(5,a=O));let{row:u={}}=e;const f=_t();let c=[];const p=O=>{var L;let I=(L=O==null?void 0:O.schema)!=null?L:{};return I.username&&(I.username.name="Username"),I},d=O=>{let I=Se({},O);return delete I.email,delete I.roleId,delete I.status,delete I.firstName,delete I.lastName,Object.entries(I)},g=async()=>{if(t(2,c=[]),u.email||t(2,c=[...c,{message:"Email is required"}]),u.roleId||t(2,c=[...c,{message:"Role is required"}]),c.length)return!1;try{await Ge.saveRow(rt(Se({},u),{tableId:i._id})),$e.success("User saved successfully"),H3.save(),f("updaterows")}catch(O){if(O.handled){const I=O.json;(I==null?void 0:I.errors)?Array.isArray(I.errors)?t(2,c=I.errors.map(L=>({message:L}))):t(2,c=Object.entries(I.errors).map(([L,D])=>({dataPath:L,message:D})).flat()):O.status===400&&t(2,c=[{message:(I==null?void 0:I.message)||"Unknown error"}])}else $e.error("Error saving user");return!1}};function h(O){r.$$.not_equal(u.email,O)&&(u.email=O,t(0,u))}function v(O){r.$$.not_equal(u.firstName,O)&&(u.firstName=O,t(0,u))}function w(O){r.$$.not_equal(u.lastName,O)&&(u.lastName=O,t(0,u))}function k(O){r.$$.not_equal(u.roleId,O)&&(u.roleId=O,t(0,u))}function T(O,I){r.$$.not_equal(u[I],O)&&(u[I]=O,t(0,u))}return r.$$set=O=>{"row"in O&&t(0,u=O.row)},r.$$.update=()=>{r.$$.dirty&1&&(u.status||t(0,u.status="active",u)),r.$$.dirty&1&&t(4,n=(u==null?void 0:u._id)==null),r.$$.dirty&257&&t(7,i=u.tableId?o.list.find(O=>O._id===(u==null?void 0:u.tableId)):o.selected),r.$$.dirty&128&&t(1,l=p(i)),r.$$.dirty&2&&t(3,s=d(l))},[u,l,c,s,n,a,g,i,o,h,v,w,k,T]}class BU extends le{constructor(e){super();se(this,e,jU,RU,ie,{row:0})}}function Mv(r=!0){let e={};for(let[t,n]of Object.entries(qi))e[n]={enabled:r,name:JB[t]};return e}function jv(r,e,t){let n,i;switch(t){case qi.UPDATED_BY:case qi.CREATED_BY:n=qt.LINK.type,i=qt.LINK.constraints;break;case qi.AUTO_ID:n=qt.NUMBER.type,i=qt.NUMBER.constraints;break;case qi.UPDATED_AT:case qi.CREATED_AT:n=qt.DATETIME.type,i=qt.DATETIME.constraints;break;default:n=qt.STRING.type,i=qt.STRING.constraints;break}if(Object.values(qi).indexOf(t)===-1)throw"Cannot build auto column with supplied subtype";const l={name:e,type:n,subtype:t,icon:"ri-magic-line",autocolumn:!0,constraints:i};return XB(t)&&(l.tableId=Sl.USERS,l.fieldName=`${r}-${e}`),l}function zU(r){let e,t,n;return t=new gi({props:{label:r[0],value:r[1],thin:!0}}),t.$on("change",r[2]),{c(){e=M("div"),C(t.$$.fragment),y(e,"class","container svelte-1pg9lbe")},m(i,l){$(i,e,l),S(t,e,null),n=!0},p(i,[l]){const s={};l&1&&(s.label=i[0]),l&2&&(s.value=i[1]),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),A(t)}}}function qU(r,e,t){let n,{values:i}=e,{label:l}=e;const s=o=>{try{t(3,i=o.detail.split(`
|
|
387
387
|
`))}catch{t(3,i=[])}};return r.$$set=o=>{"values"in o&&t(3,i=o.values),"label"in o&&t(0,l=o.label)},r.$$.update=()=>{r.$$.dirty&8&&t(1,n=yn.join(`
|
|
388
388
|
`)(i))},[l,n,s,i]}class Bv extends le{constructor(e){super();se(this,e,qU,zU,ie,{values:3,label:0})}}const UU=[{name:"Save Row",component:"SaveRow",context:[{label:"Saved row",value:"row"}]},{name:"Duplicate Row",component:"DuplicateRow",context:[{label:"Duplicated row",value:"row"}]},{name:"Delete Row",component:"DeleteRow"},{name:"Navigate To",component:"NavigateTo"},{name:"Execute Query",component:"ExecuteQuery",context:[{label:"Query result",value:"result"}]},{name:"Trigger Automation",component:"TriggerAutomation"},{name:"Update Field Value",component:"UpdateFieldValue"},{name:"Validate Form",component:"ValidateForm"},{name:"Change Form Step",component:"ChangeFormStep"},{name:"Clear Form",component:"ClearForm"},{name:"Log Out",component:"LogOut"},{name:"Close Screen Modal",component:"CloseScreenModal"},{name:"Refresh Data Provider",component:"RefreshDataProvider"},{name:"Update State",component:"UpdateState",dependsOnFeature:"state"},{name:"Upload File to S3",component:"S3Upload",context:[{label:"File URL",value:"publicUrl"}]},{name:"Export Data",component:"ExportData"},{name:"Continue if / Stop if",component:"ContinueIf",dependsOnFeature:"continueIfAction"}];var zv={actions:UU};const FU=/{{([^}]+)}}/g,VU=/\$\("([^")]+)"\)/g,HU=(r,e)=>{const t=GU(r,e),n=YU(),i=KU(r),l=JU(),s=QU(),o=XU(r),a=ZU();return[...t,...i,...s,...n,...l,...o,...a]},WU=(r,e)=>{if(!r||!e)return[];const t=Ui(r.props,e),n=He.actions.components.getDefinition(t==null?void 0:t._component);return(n==null?void 0:n.context)?qv(r,t):[]},So=(r,e,t)=>{if(!r||!e)return[];const n=Al(r.props,e);return n.pop(),n.filter(i=>{const l=He.actions.components.getDefinition(i._component);return(l==null?void 0:l.context)?t?(Array.isArray(l.context)?l.context:[l.context]).find(o=>o.type===t)!=null:!0:!1})},ja=(r,e,t)=>{if(!r||!e)return[];const n=Al(r.props,e);return n.pop(),n.filter(i=>{var s;const l=He.actions.components.getDefinition(i._component);return(s=l==null?void 0:l.actions)==null?void 0:s.includes(t)})},Ol=(r,e)=>{const t=ko(e==null?void 0:e._component),n=t.find(s=>s.type==="dataProvider");if(n){const s=e[n.key],o=nF(s),a=Ui(r==null?void 0:r.props,o);return Ol(r,a)}const i=["dataSource","table","schema"],l=t.find(s=>i.includes(s.type));return l?l.type==="table"?{tableId:e[l==null?void 0:l.key],type:"table"}:e[l==null?void 0:l.key]:null},GU=(r,e)=>{const t=So(r,e);return qv(r,t)},qv=(r,e)=>{if(!r||!e)return[];Array.isArray(e)||(e=[e]);let t=[];return e.forEach(n=>{const i=He.actions.components.getDefinition(n._component);(Array.isArray(i.context)?i.context:[i.context]).forEach(s=>{var g;if(!(s==null?void 0:s.type))return;let o,a,u,f=s.suffix;if(s.type==="form")o=I1(n),u="Fields";else if(s.type==="static")o={},(s.values||[]).forEach(v=>{o[v.key]={name:v.label,type:"string"}});else if(s.type==="schema"){const h=Ol(r,n);if(!h)return;const v=Fi(r,h);if(o=v.schema,a=v.table,h.type==="jsonarray"){const w=h.label.split(".");u=w[w.length-1]}else u=(g=v.table)==null?void 0:g.name}if(!o)return;const c=Object.keys(o).sort();let p=n._id;f&&(p+=`-${f}`);const d=$n(p);c.forEach(h=>{const v=o[h],w=h.split(".").map($n).join("."),k=`${d}.${w}`;let T=n._instanceName;u&&(T+=`.${u}`),T+=`.${v.name||h}`,t.push({type:"context",runtimeBinding:k,readableBinding:T,fieldSchema:v,providerId:p,tableId:a==null?void 0:a._id})})})}),t},YU=()=>{let r=[];const{schema:e}=lc(Sl.USERS),t=Object.keys(e).sort(),n=$n("user");return t.forEach(i=>{const l=e[i];r.push({type:"context",runtimeBinding:`${n}.${$n(i)}`,readableBinding:`Current User.${i}`,fieldSchema:l,providerId:"user"})}),r},JU=()=>{var e;let r=[];if((e=tt(He).clientFeatures)==null?void 0:e.deviceAwareness){const t=$n("device");r.push({type:"context",runtimeBinding:`${t}.${$n("mobile")}`,readableBinding:"Device.Mobile"}),r.push({type:"context",runtimeBinding:`${t}.${$n("tablet")}`,readableBinding:"Device.Tablet"})}return r},XU=r=>{var t;let e=[];if((t=tt(He).clientFeatures)==null?void 0:t.rowSelection){let n=ns(r==null?void 0:r.props,s=>s._component.endsWith("table"));const i=$n("rowSelection");e=e.concat(n.map(s=>({type:"context",runtimeBinding:`${i}.${$n(s._id)}.${$n("selectedRows")}`,readableBinding:`${s._instanceName}.Selected rows`})));let l=ns(r==null?void 0:r.props,s=>s._component.endsWith("tableblock"));e=e.concat(l.map(s=>({type:"context",runtimeBinding:`${i}.${$n(s._id+"-table")}.${$n("selectedRows")}`,readableBinding:`${s._instanceName}.Selected rows`})))}return e},QU=()=>{var e;let r=[];if((e=tt(He).clientFeatures)==null?void 0:e.state){const t=$n("state");r=Uv().map(n=>({type:"context",runtimeBinding:`${t}.${$n(n)}`,readableBinding:`State.${n}`}))}return r},KU=r=>{var l,s;const t=((s=(l=r==null?void 0:r.routing)==null?void 0:l.route)!=null?s:"").split("/");let n=[];t.forEach(o=>{o.startsWith(":")&&o.length>1&&n.push(o.replace(/:/g,"").replace(/\?/g,""))});const i=$n("url");return n.map(o=>({type:"context",runtimeBinding:`${i}.${$n(o)}`,readableBinding:`URL.${o}`}))},ZU=()=>(tt(ki)||[]).map(r=>({type:"context",runtimeBinding:`trim "${r._id}"`,readableBinding:`Role.${r.name}`})),xU=(r,e,t,n,i)=>{var c;let l=[];const s=Ui(r.props,e),a=ko(s==null?void 0:s._component).find(p=>p.key===t);if(!a)return l;((c=a.context)==null?void 0:c.length)&&a.context.forEach(p=>{l.push({readableBinding:p.label,runtimeBinding:`${$n("eventContext")}.${$n(p.key)}`})});const u=n==null?void 0:n.findIndex(p=>p.id===i);return u==null||u===-1||n.slice(0,u).forEach((p,d)=>{const g=zv.actions.find(h=>h.name===p["##eventHandlerType"]);g.context&&g.context.forEach(h=>{l.push({readableBinding:`Action ${d+1}.${h.label}`,runtimeBinding:`actions.${d}.${h.value}`})})}),l},lc=(r,e)=>Fi(null,{type:"table",tableId:r},e),Fi=(r,e,t)=>{var l,s;t=t||{};let n,i;if(e){const{type:o}=e,a=tt(Et).list;if(o==="provider"){const g=Ui(r==null?void 0:r.props,e.providerId),h=Ol(r,g);return Fi(r,h,t)}else if(o==="query")i=tt(Cn).list.find(h=>h._id===e._id);else if(o==="field"){i={name:e.fieldName};const{fieldType:g}=e;g==="attachment"?n={url:{type:"string"},name:{type:"string"}}:g==="array"&&(n={value:{type:"string"}})}else if(o==="jsonarray"){i=a.find(h=>h._id===e.tableId);let g=i==null?void 0:i.schema;n=L3(g,e)}else i=a.find(g=>g._id===e.tableId);if(i&&!n&&(o==="view"?n=yn.cloneDeep((s=(l=i.views)==null?void 0:l[e.name])==null?void 0:s.schema):o==="query"&&(t.formSchema||t.searchableSchema)?(n={},(i.parameters||[]).forEach(h=>{(h==null?void 0:h.name)&&(n[h.name]=rt(Se({},h),{type:"string"}))})):n=yn.cloneDeep(i.schema)),n){let g={};Object.keys(n).forEach(h=>{const v=n[h];if((v==null?void 0:v.type)==="json"){const w=m1(v,{squashObjects:!0});Object.keys(w).forEach(k=>{g[`${h}.${k}`]={type:w[k].type,nestedJSON:!0}})}}),n=Se(Se({},n),g)}const u=i&&!i.sql,f=["table","link"].includes(e.type);let c=f,p=f&&u;t.formSchema?(c=!1,p=!1):t.searchableSchema&&(c=f&&u),n&&(c&&(n._id={type:"string"}),p&&(n._rev={type:"string"}));let d={};Object.entries(n||{}).forEach(([g,h])=>{typeof h=="string"?d[g]={type:h,name:g}:d[g]=rt(Se({},h),{name:g})}),n=d}return{schema:n,table:i}},I1=r=>{var i;let e={};if(!r)return e;const n=ko(r._component).find(l=>l.key==="field"&&l.type.startsWith("field/"));if(n&&r.field){const l=n.type.split("field/")[1];l&&(e[r.field]={type:l})}return(i=r._children)==null||i.forEach(l=>{const s=I1(l);e=Se(Se({},e),s)}),e},Uv=()=>{let r=[];eF().forEach(t=>{ns(t.props,n=>{ko(n._component).filter(l=>l.type==="event").forEach(l=>{r.push(n[l.key])})})});let e=new Set;return r.forEach(t=>{!Array.isArray(t)||t.forEach(n=>{var i,l,s;n["##eventHandlerType"]==="Update State"&&((i=n.parameters)==null?void 0:i.type)==="set"&&((l=n.parameters)==null?void 0:l.key)&&((s=n.parameters)==null?void 0:s.value)&&e.add(n.parameters.key)})}),Array.from(e)},eF=()=>{let r=[];return r=r.concat(tt(He).layouts||[]),r=r.concat(tt(He).screens||[]),r},tF=(r,e,t)=>{if(!(r==null?void 0:r.includes(e)))return!1;if(t==="readableBinding")return!0;const n=r.replace(/\s+/g,""),i=e.replace(/\s+/g,"");return![`[${i}]`,`"${i}"`,`'${i}'`].find(s=>n==null?void 0:n.includes(s))},Fv=(r,e,t,n)=>r.substring(0,e)+n+r.substring(t),Vv=(r,e,t)=>{const n=Wf(e);n&&(e=Na(e));const i=n?VU:FU,l=t==="runtimeBinding"?"readableBinding":"runtimeBinding";if(typeof e!="string")return e;const s=r.map(u=>u[l]).sort((u,f)=>f.length-u.length),o=e.match(i)||[];let a=e;for(let u of o){let f=u,c=f;for(let p of s)if(n||tF(f,p,t)){const d=r.find(h=>h[l]===p);let g;do if(g=c.indexOf(p),g!==-1){let h=g+p.length,v=Array(d[t].length+1).join("*");c=Fv(c,g,h,v),f=Fv(f,g,h,d[t])}while(g!==-1)}a=a.replace(u,f)}return n&&(a=Gf(a)),a},nF=r=>{var e;return(e=r==null?void 0:r.match(/{{\s*literal\s*\[+([^\]]+)].*}}/))==null?void 0:e[1]},Ls=(r,e)=>Vv(r,e,"runtimeBinding"),Ao=(r,e)=>Vv(r,e,"readableBinding");function rF(){const r=VM();return Object.keys(r).flatMap(e=>Object.entries(r[e]).map(([t,n])=>({text:t,path:t,example:n.example,label:t,displayText:t,description:n.description})))}function Hv(r,e,t){t=typeof t=="string"?t:t.path,r=r==null?"":r;const n=(e==null?void 0:e.start)?r.substring(0,e.start):"",i=(e==null?void 0:e.end)?r.substring(e.end):"";return(!n.includes("{{")||!i.includes("}}"))&&(t=`{{ ${t} }}`),e.start?r=r.substring(0,e.start)+t+r.substring(e.end,r.length):r+=t,r}function iF(r,e,t){return t=typeof t=="string"?t:t.path,r=r==null?"":r,t=`$("${t}")`,e.start?r=r.substring(0,e.start)+t+r.substring(e.end,r.length):r+=t,r}function Wv(r){let e,t,n;return t=new Qe({props:{small:!0,$$slots:{default:[lF]},$$scope:{ctx:r}}}),{c(){e=M("div"),C(t.$$.fragment),Ct(e,"margin-bottom","var(--spacing-s)"),y(e,"class","svelte-35ttya")},m(i,l){$(i,e,l),S(t,e,null),n=!0},p(i,l){const s={};l&32776&&(s.$$scope={dirty:l,ctx:i}),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),A(t)}}}function lF(r){let e;return{c(){e=U(r[3])},m(t,n){$(t,e,n)},p(t,n){n&8&&ke(e,t[3])},d(t){t&&b(e)}}}function sF(r){let e,t,n,i,l,s=r[3]&&Wv(r);return{c(){s&&s.c(),e=R(),t=M("div"),n=M("textarea"),y(n,"tabindex","0"),n.readOnly=!0,n.value=r[0],y(t,"style",i=`--code-mirror-height: ${r[1]}px; --code-mirror-resize: ${r[2]}`),y(t,"class","svelte-35ttya")},m(o,a){s&&s.m(o,a),$(o,e,a),$(o,t,a),P(t,n),r[10](n),l=!0},p(o,[a]){o[3]?s?(s.p(o,a),a&8&&m(s,1)):(s=Wv(o),s.c(),m(s,1),s.m(e.parentNode,e)):s&&(x(),_(s,1,1,()=>{s=null}),ee()),(!l||a&1)&&(n.value=o[0]),(!l||a&6&&i!==(i=`--code-mirror-height: ${o[1]}px; --code-mirror-resize: ${o[2]}`))&&y(t,"style",i)},i(o){l||(m(s),l=!0)},o(o){_(s),l=!1},d(o){s&&s.d(o),o&&b(e),o&&b(t),r[10](null)}}}const Ba={JS:{name:"javascript",json:!1},JSON:{name:"javascript",json:!0},XML:{name:"xml"},SQL:{name:"sql"},Handlebars:{name:"handlebars",base:"text/html"},Text:{name:"text/html"}};function oF(r,e,t){let n;ae(r,xf,w=>t(12,n=w));let{mode:i=Ba.JS}=e,{value:l=""}=e,{height:s=300}=e,{resize:o="none"}=e,{readonly:a=!1}=e,{hints:u=[]}=e,{label:f}=e;const c=_t();let p,d;async function g(w,k){if(!ei||!p)return;const T=n.theme.includes("light"),O={mode:w,value:k||"",readOnly:a,theme:T?"default":"tomorrow-night-eighties",lineNumbers:!0,lineWrapping:!0,indentWithTabs:!0,indentUnit:2,tabSize:2,extraKeys:{"Ctrl-Space":"autocomplete"},styleActiveLine:{nonEmpty:!0},autoCloseBrackets:!0,matchBrackets:!0};(u==null?void 0:u.length)&&(ei.registerHelper("hint","dictionaryHint",function(I){const L=I.getCursor();return{list:u,from:ei.Pos(L.line,L.ch),to:ei.Pos(L.line,L.ch)}}),ei.commands.autocomplete=function(I){ei.showHint(I,ei.hint.dictionaryHint)}),t(9,d=ei.fromTextArea(p,O)),d.on("blur",I=>{c("change",I.getValue())})}const h=()=>{const w=d.getCursor();return{start:w.ch,end:w.ch}};Lt(()=>(g(i,l),()=>{d&&d.toTextArea()}));function v(w){Q[w?"unshift":"push"](()=>{p=w,t(4,p)})}return r.$$set=w=>{"mode"in w&&t(5,i=w.mode),"value"in w&&t(0,l=w.value),"height"in w&&t(1,s=w.height),"resize"in w&&t(2,o=w.resize),"readonly"in w&&t(6,a=w.readonly),"hints"in w&&t(7,u=w.hints),"label"in w&&t(3,f=w.label)},r.$$.update=()=>{r.$$.dirty&544&&(d==null||d.setOption("mode",i)),r.$$.dirty&513&&(d==null||d.setValue(l||""))},[l,s,o,f,p,i,a,u,h,d,v]}class sc extends le{constructor(e){super();se(this,e,oF,sF,ie,{mode:5,value:0,height:1,resize:2,readonly:6,hints:7,label:3,getCaretPosition:8})}get getCaretPosition(){return this.$$.ctx[8]}}function Gv(r,e,t){const n=r.slice();return n[29]=e[t],n}function Yv(r,e,t){const n=r.slice();return n[32]=e[t],n}function Jv(r,e,t){const n=r.slice();return n[35]=e[t],n}function Xv(r){let e;return{c(){e=M("p"),e.innerHTML=`Current Handlebars syntax is invalid, please check the guide
|
|
389
389
|
<a href="https://handlebarsjs.com/guide/" class="svelte-14vef82">here</a>
|
|
@@ -1246,7 +1246,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
1246
1246
|
`),t=M("i"),i=U(n),l=U("?"),s=U(`
|
|
1247
1247
|
This action cannot be undone.`)},m(o,a){$(o,e,a),$(o,t,a),P(t,i),P(t,l),$(o,s,a)},p(o,a){a&1&&n!==(n=o[0].name+"")&&ke(i,n)},d(o){o&&b(e),o&&b(t),o&&b(s)}}}function V1e(r){let e,t,n,i,l,s;e=new _r({props:{$$slots:{control:[U1e],default:[q1e]},$$scope:{ctx:r}}});let o={okText:"Delete Automation",onOk:r[3],title:"Confirm Deletion",$$slots:{default:[F1e]},$$scope:{ctx:r}};n=new nr({props:o}),r[4](n);let a={automation:r[0]};return l=new j1e({props:a}),r[5](l),{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment),i=R(),C(l.$$.fragment)},m(u,f){S(e,u,f),$(u,t,f),S(n,u,f),$(u,i,f),S(l,u,f),s=!0},p(u,[f]){const c={};f&134&&(c.$$scope={dirty:f,ctx:u}),e.$set(c);const p={};f&129&&(p.$$scope={dirty:f,ctx:u}),n.$set(p);const d={};f&1&&(d.automation=u[0]),l.$set(d)},i(u){s||(m(e.$$.fragment,u),m(n.$$.fragment,u),m(l.$$.fragment,u),s=!0)},o(u){_(e.$$.fragment,u),_(n.$$.fragment,u),_(l.$$.fragment,u),s=!1},d(u){A(e,u),u&&b(t),r[4](null),A(n,u),u&&b(i),r[5](null),A(l,u)}}}function H1e(r,e,t){let n;ae(r,zt,f=>t(6,n=f));let{automation:i}=e,l,s;async function o(){try{await Vt.actions.delete(i),$e.success("Automation deleted successfully"),n("../automate")}catch{$e.error("Error deleting automation")}}function a(f){Q[f?"unshift":"push"](()=>{l=f,t(1,l)})}function u(f){Q[f?"unshift":"push"](()=>{s=f,t(2,s)})}return r.$$set=f=>{"automation"in f&&t(0,i=f.automation)},[i,l,s,o,a,u]}class W1e extends le{constructor(e){super();se(this,e,H1e,V1e,ie,{automation:0})}}function r7(r,e,t){const n=r.slice();return n[5]=e[t],n[7]=t,n}function G1e(r){let e,t,n;return e=new W1e({props:{automation:r[5]}}),{c(){C(e.$$.fragment),t=R()},m(i,l){S(e,i,l),$(i,t,l),n=!0},p(i,l){const s={};l&1&&(s.automation=i[5]),e.$set(s)},i(i){n||(m(e.$$.fragment,i),n=!0)},o(i){_(e.$$.fragment,i),n=!1},d(i){A(e,i),i&&b(t)}}}function i7(r){let e,t;function n(){return r[3](r[5])}return e=new Ll({props:{border:r[7]>0,icon:"ShareAndroid",text:r[5].name,selected:r[5]._id===r[1],$$slots:{default:[G1e]},$$scope:{ctx:r}}}),e.$on("click",n),{c(){C(e.$$.fragment)},m(i,l){S(e,i,l),t=!0},p(i,l){r=i;const s={};l&1&&(s.text=r[5].name),l&3&&(s.selected=r[5]._id===r[1]),l&257&&(s.$$scope={dirty:l,ctx:r}),e.$set(s)},i(i){t||(m(e.$$.fragment,i),t=!0)},o(i){_(e.$$.fragment,i),t=!1},d(i){A(e,i)}}}function Y1e(r){let e,t,n=r[0].automations,i=[];for(let s=0;s<n.length;s+=1)i[s]=i7(r7(r,n,s));const l=s=>_(i[s],1,1,()=>{i[s]=null});return{c(){e=M("div");for(let s=0;s<i.length;s+=1)i[s].c();y(e,"class","automations-list svelte-g64vb")},m(s,o){$(s,e,o);for(let a=0;a<i.length;a+=1)i[a].m(e,null);t=!0},p(s,[o]){if(o&7){n=s[0].automations;let a;for(a=0;a<n.length;a+=1){const u=r7(s,n,a);i[a]?(i[a].p(u,o),m(i[a],1)):(i[a]=i7(u),i[a].c(),m(i[a],1),i[a].m(e,null))}for(x(),a=n.length;a<i.length;a+=1)l(a);ee()}},i(s){if(!t){for(let o=0;o<n.length;o+=1)m(i[o]);t=!0}},o(s){i=i.filter(Boolean);for(let o=0;o<i.length;o+=1)_(i[o]);t=!1},d(s){s&&b(e),mt(i,s)}}}function J1e(r,e,t){let n,i,l;ae(r,zt,a=>t(4,i=a)),ae(r,Vt,a=>t(0,l=a)),Lt(async()=>{try{await Vt.actions.fetch()}catch{$e.error("Error getting automations list")}});function s(a){Vt.actions.select(a),i(`./${a._id}`)}const o=a=>s(a);return r.$$.update=()=>{var a,u;r.$$.dirty&1&&t(1,n=(u=(a=l.selectedAutomation)==null?void 0:a.automation)==null?void 0:u._id)},[l,n,s,o]}class X1e extends le{constructor(e){super();se(this,e,J1e,Y1e,ie,{})}}function l7(r,e,t){const n=r.slice();return n[17]=e[t][0],n[18]=e[t][1],n}function Q1e(r){let e;return{c(){e=U(`Please name your automation, then select a trigger. Every automation must
|
|
1248
1248
|
start with a trigger.`)},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function K1e(r){let e;return{c(){e=U("Triggers")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function Z1e(r){let e=r[18].name+"",t;return{c(){t=U(e)},m(n,i){$(n,t,i)},p(n,i){i&8&&e!==(e=n[18].name+"")&&ke(t,e)},d(n){n&&b(t)}}}function s7(r){let e,t,n,i,l,s,o,a,u,f;n=new ot({props:{name:r[18].icon}}),s=new Ve({props:{size:"S",$$slots:{default:[Z1e]},$$scope:{ctx:r}}});function c(){return r[13](r[18])}return{c(){e=M("div"),t=M("div"),C(n.$$.fragment),i=R(),l=M("span"),C(s.$$.fragment),o=R(),y(l,"class","icon-spacing svelte-d3iboa"),y(t,"class","item-body svelte-d3iboa"),y(e,"class","item svelte-d3iboa"),oe(e,"selected",r[2]===r[18].name)},m(p,d){$(p,e,d),P(e,t),S(n,t,null),P(t,i),P(t,l),S(s,l,null),P(e,o),a=!0,u||(f=Ne(e,"click",c),u=!0)},p(p,d){r=p;const g={};d&8&&(g.name=r[18].icon),n.$set(g);const h={};d&2097160&&(h.$$scope={dirty:d,ctx:r}),s.$set(h),d&12&&oe(e,"selected",r[2]===r[18].name)},i(p){a||(m(n.$$.fragment,p),m(s.$$.fragment,p),a=!0)},o(p){_(n.$$.fragment,p),_(s.$$.fragment,p),a=!1},d(p){p&&b(e),A(n),A(s),u=!1,f()}}}function x1e(r){let e,t,n,i;e=new Ve({props:{size:"S",$$slots:{default:[K1e]},$$scope:{ctx:r}}});let l=r[3],s=[];for(let a=0;a<l.length;a+=1)s[a]=s7(l7(r,l,a));const o=a=>_(s[a],1,1,()=>{s[a]=null});return{c(){C(e.$$.fragment),t=R(),n=M("div");for(let a=0;a<s.length;a+=1)s[a].c();y(n,"class","item-list svelte-d3iboa")},m(a,u){S(e,a,u),$(a,t,u),$(a,n,u);for(let f=0;f<s.length;f+=1)s[f].m(n,null);i=!0},p(a,u){const f={};if(u&2097152&&(f.$$scope={dirty:u,ctx:a}),e.$set(f),u&76){l=a[3];let c;for(c=0;c<l.length;c+=1){const p=l7(a,l,c);s[c]?(s[c].p(p,u),m(s[c],1)):(s[c]=s7(p),s[c].c(),m(s[c],1),s[c].m(n,null))}for(x(),c=l.length;c<s.length;c+=1)o(c);ee()}},i(a){if(!i){m(e.$$.fragment,a);for(let u=0;u<l.length;u+=1)m(s[u]);i=!0}},o(a){_(e.$$.fragment,a),s=s.filter(Boolean);for(let u=0;u<s.length;u+=1)_(s[u]);i=!1},d(a){A(e,a),a&&b(t),a&&b(n),mt(s,a)}}}function eme(r){let e,t,n,i,l,s,o,a,u,f;e=new d1({props:{header:"You must publish your app to activate your automations.",message:"To test your automation before publishing, you can use the 'Run Test' functionality on the next screen."}}),n=new Ve({props:{size:"XS",$$slots:{default:[Q1e]},$$scope:{ctx:r}}});function c(g){r[10](g)}function p(g){r[11](g)}let d={label:"Name"};return r[0]!==void 0&&(d.value=r[0]),r[4]!==void 0&&(d.error=r[4]),l=new et({props:d}),Q.push(()=>ce(l,"value",c)),Q.push(()=>ce(l,"error",p)),l.$on("change",r[12]),u=new Ue({props:{noPadding:!0,$$slots:{default:[x1e]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment),i=R(),C(l.$$.fragment),a=R(),C(u.$$.fragment)},m(g,h){S(e,g,h),$(g,t,h),S(n,g,h),$(g,i,h),S(l,g,h),$(g,a,h),S(u,g,h),f=!0},p(g,h){const v={};h&2097152&&(v.$$scope={dirty:h,ctx:g}),n.$set(v);const w={};!s&&h&1&&(s=!0,w.value=g[0],pe(()=>s=!1)),!o&&h&16&&(o=!0,w.error=g[4],pe(()=>o=!1)),l.$set(w);const k={};h&2097164&&(k.$$scope={dirty:h,ctx:g}),u.$set(k)},i(g){f||(m(e.$$.fragment,g),m(n.$$.fragment,g),m(l.$$.fragment,g),m(u.$$.fragment,g),f=!0)},o(g){_(e.$$.fragment,g),_(n.$$.fragment,g),_(l.$$.fragment,g),_(u.$$.fragment,g),f=!1},d(g){A(e,g),g&&b(t),A(n,g),g&&b(i),A(l,g),g&&b(a),A(u,g)}}}function tme(r){let e,t;return e=new Pt({props:{title:"Create Automation",confirmText:"Save",size:"M",onConfirm:r[5],disabled:!r[2]||!r[0],$$slots:{default:[eme]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,[i]){const l={};i&5&&(l.disabled=!n[2]||!n[0]),i&2097183&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function nme(r,e,t){let n,i,l,s,o,a;ae(r,Vt,O=>t(8,s=O)),ae(r,zt,O=>t(16,o=O)),ae(r,Ts,O=>t(9,a=O));let u,f,c=!1,p,{webhookModal:d}=e;async function g(){var O;try{await Vt.actions.create({name:u,instanceId:n});const I=s.selectedAutomation.constructBlock("TRIGGER",p.stepId,p);Vt.actions.addBlockToAutomation(I),p.stepId==="WEBHOOK"&&d.show,await Vt.actions.save((O=s.selectedAutomation)==null?void 0:O.automation),$e.success(`Automation ${u} created`),o(`./${s.selectedAutomation.automation._id}`),Sn.captureEvent(Tn.AUTOMATION.CREATED,{name:u})}catch{$e.error("Error creating automation")}}const h=O=>{p=O,t(2,f=O.name)};function v(O){u=O,t(0,u)}function w(O){i=O,t(4,i),t(1,c),t(0,u)}const k=()=>t(1,c=!0),T=O=>h(O);return r.$$set=O=>{"webhookModal"in O&&t(7,d=O.webhookModal)},r.$$.update=()=>{r.$$.dirty&512&&(n=a._id),r.$$.dirty&3&&t(4,i=c&&!u?"Please specify a name for the automation.":null),r.$$.dirty&256&&t(3,l=Object.entries(s.blockDefinitions.TRIGGER))},[u,c,f,l,i,g,h,d,s,a,v,w,k,T]}class o7 extends le{constructor(e){super();se(this,e,nme,tme,ie,{webhookModal:7})}}function rme(r){let e,t;return e=new o7({props:{webhookModal:r[1]}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,i){const l={};i&2&&(l.webhookModal=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function ime(r){let e,t,n,i;e=new X1e({});let l={$$slots:{default:[rme]},$$scope:{ctx:r}};return n=new yt({props:l}),r[2](n),{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment)},m(s,o){S(e,s,o),$(s,t,o),S(n,s,o),i=!0},p(s,o){const a={};o&10&&(a.$$scope={dirty:o,ctx:s}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){A(e,s),s&&b(t),r[2](null),A(n,s)}}}function lme(r){let e,t;return e=new _n({props:{title:"Automations",$$slots:{default:[ime]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,i){const l={};i&11&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function sme(r){let e,t,n,i,l,s;return t=new Sr({props:{selected:"Automations",$$slots:{default:[lme]},$$scope:{ctx:r}}}),l=new ot({props:{hoverable:!0,name:"AddCircle"}}),l.$on("click",function(){ft(r[0].show)&&r[0].show.apply(this,arguments)}),{c(){e=M("div"),C(t.$$.fragment),n=R(),i=M("div"),C(l.$$.fragment),y(i,"class","add-button svelte-mcmub4"),y(e,"class","title svelte-mcmub4")},m(o,a){$(o,e,a),S(t,e,null),P(e,n),P(e,i),S(l,i,null),s=!0},p(o,[a]){r=o;const u={};a&11&&(u.$$scope={dirty:a,ctx:r}),t.$set(u)},i(o){s||(m(t.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){o&&b(e),A(t),A(l)}}}function ome(r,e,t){let{modal:n}=e,{webhookModal:i}=e;function l(s){Q[s?"unshift":"push"](()=>{n=s,t(0,n)})}return r.$$set=s=>{"modal"in s&&t(0,n=s.modal),"webhookModal"in s&&t(1,i=s.webhookModal)},[n,i,l]}class ame extends le{constructor(e){super();se(this,e,ome,sme,ie,{modal:0,webhookModal:1})}}function a7(r,e,t){const n=r.slice();return n[7]=e[t],n[9]=t,n}function u7(r){let e,t,n,i,l;function s(u){r[6](u)}let o={showTestStatus:!0,block:r[7]};r[2]!==void 0&&(o.showParameters=r[2]),e=new vy({props:o}),Q.push(()=>ce(e,"showParameters",s));let a=r[2]&&r[2][r[7].id]&&f7(r);return{c(){C(e.$$.fragment),n=R(),a&&a.c(),i=Oe()},m(u,f){S(e,u,f),$(u,n,f),a&&a.m(u,f),$(u,i,f),l=!0},p(u,f){const c={};f&1&&(c.block=u[7]),!t&&f&4&&(t=!0,c.showParameters=u[2],pe(()=>t=!1)),e.$set(c),u[2]&&u[2][u[7].id]?a?(a.p(u,f),f&5&&m(a,1)):(a=f7(u),a.c(),m(a,1),a.m(i.parentNode,i)):a&&(x(),_(a,1,1,()=>{a=null}),ee())},i(u){l||(m(e.$$.fragment,u),m(a),l=!0)},o(u){_(e.$$.fragment,u),_(a),l=!1},d(u){A(e,u),u&&b(n),a&&a.d(u),u&&b(i)}}}function f7(r){var a,u;let e,t,n,i,l,s;e=new xt({props:{noMargin:!0}});let o=((u=(a=r[3])==null?void 0:a[r[9]])==null?void 0:u.outputs.iterations)&&c7(r);return l=new Sr({props:{quiet:!0,noPadding:!0,selected:"Input",$$slots:{default:[pme]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment),t=R(),o&&o.c(),n=R(),i=M("div"),C(l.$$.fragment),y(i,"class","tabs svelte-1mnmi2e")},m(f,c){S(e,f,c),$(f,t,c),o&&o.m(f,c),$(f,n,c),$(f,i,c),S(l,i,null),s=!0},p(f,c){var d,g;((g=(d=f[3])==null?void 0:d[f[9]])==null?void 0:g.outputs.iterations)?o?(o.p(f,c),c&8&&m(o,1)):(o=c7(f),o.c(),m(o,1),o.m(n.parentNode,n)):o&&(x(),_(o,1,1,()=>{o=null}),ee());const p={};c&1032&&(p.$$scope={dirty:c,ctx:f}),l.$set(p)},i(f){s||(m(e.$$.fragment,f),m(o),m(l.$$.fragment,f),s=!0)},o(f){_(e.$$.fragment,f),_(o),_(l.$$.fragment,f),s=!1},d(f){A(e,f),f&&b(t),o&&o.d(f),f&&b(n),f&&b(i),A(l)}}}function c7(r){let e,t,n,i,l,s;return t=new ot({props:{name:"Reuse"}}),l=new Qe({props:{$$slots:{default:[ume]},$$scope:{ctx:r}}}),{c(){e=M("div"),C(t.$$.fragment),n=R(),i=M("div"),C(l.$$.fragment),Ct(i,"margin-left","10px"),Ct(e,"display","flex"),Ct(e,"padding","10px 10px 0px 12px")},m(o,a){$(o,e,a),S(t,e,null),P(e,n),P(e,i),S(l,i,null),s=!0},p(o,a){const u={};a&1032&&(u.$$scope={dirty:a,ctx:o}),l.$set(u)},i(o){s||(m(t.$$.fragment,o),m(l.$$.fragment,o),s=!0)},o(o){_(t.$$.fragment,o),_(l.$$.fragment,o),s=!1},d(o){o&&b(e),A(t),A(l)}}}function ume(r){var l,s;let e,t=((s=(l=r[3])==null?void 0:l[r[9]])==null?void 0:s.outputs.iterations)+"",n,i;return{c(){e=U("This loop ran "),n=U(t),i=U(" times.")},m(o,a){$(o,e,a),$(o,n,a),$(o,i,a)},p(o,a){var u,f;a&8&&t!==(t=((f=(u=o[3])==null?void 0:u[o[9]])==null?void 0:f.outputs.iterations)+"")&&ke(n,t)},d(o){o&&b(e),o&&b(n),o&&b(i)}}}function fme(r){var i,l;let e,t,n;return t=new gi({props:{minHeight:"80px",disabled:!0,value:JSON.stringify((l=(i=r[3])==null?void 0:i[r[9]])==null?void 0:l.inputs,null,2)}}),{c(){e=M("div"),C(t.$$.fragment),Ct(e,"padding","10px 10px 10px 10px")},m(s,o){$(s,e,o),S(t,e,null),n=!0},p(s,o){var u,f;const a={};o&8&&(a.value=JSON.stringify((f=(u=s[3])==null?void 0:u[s[9]])==null?void 0:f.inputs,null,2)),t.$set(a)},i(s){n||(m(t.$$.fragment,s),n=!0)},o(s){_(t.$$.fragment,s),n=!1},d(s){s&&b(e),A(t)}}}function cme(r){var i,l;let e,t,n;return t=new gi({props:{minHeight:"100px",disabled:!0,value:JSON.stringify((l=(i=r[3])==null?void 0:i[r[9]])==null?void 0:l.outputs,null,2)}}),{c(){e=M("div"),C(t.$$.fragment),Ct(e,"padding","10px 10px 10px 10px")},m(s,o){$(s,e,o),S(t,e,null),n=!0},p(s,o){var u,f;const a={};o&8&&(a.value=JSON.stringify((f=(u=s[3])==null?void 0:u[s[9]])==null?void 0:f.outputs,null,2)),t.$set(a)},i(s){n||(m(t.$$.fragment,s),n=!0)},o(s){_(t.$$.fragment,s),n=!1},d(s){s&&b(e),A(t)}}}function pme(r){let e,t,n,i;return e=new _n({props:{title:"Input",$$slots:{default:[fme]},$$scope:{ctx:r}}}),n=new _n({props:{title:"Output",$$slots:{default:[cme]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment)},m(l,s){S(e,l,s),$(l,t,s),S(n,l,s),i=!0},p(l,s){const o={};s&1032&&(o.$$scope={dirty:s,ctx:l}),e.$set(o);const a={};s&1032&&(a.$$scope={dirty:s,ctx:l}),n.$set(a)},i(l){i||(m(e.$$.fragment,l),m(n.$$.fragment,l),i=!0)},o(l){_(e.$$.fragment,l),_(n.$$.fragment,l),i=!1},d(l){A(e,l),l&&b(t),A(n,l)}}}function p7(r){let e;return{c(){e=M("div"),y(e,"class","separator svelte-1mnmi2e")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function d7(r){let e,t,n,i,l=r[7].stepId!=="LOOP"&&u7(r),s=r[0].length-1!==r[9]&&p7();return{c(){e=M("div"),l&&l.c(),t=R(),s&&s.c(),n=Oe(),y(e,"class","block svelte-1mnmi2e")},m(o,a){$(o,e,a),l&&l.m(e,null),$(o,t,a),s&&s.m(o,a),$(o,n,a),i=!0},p(o,a){o[7].stepId!=="LOOP"?l?(l.p(o,a),a&1&&m(l,1)):(l=u7(o),l.c(),m(l,1),l.m(e,null)):l&&(x(),_(l,1,1,()=>{l=null}),ee()),o[0].length-1!==o[9]?s||(s=p7(),s.c(),s.m(n.parentNode,n)):s&&(s.d(1),s=null)},i(o){i||(m(l),i=!0)},o(o){_(l),i=!1},d(o){o&&b(e),l&&l.d(),o&&b(t),s&&s.d(o),o&&b(n)}}}function dme(r){let e,t,n,i,l,s,o,a,u,f,c,p,d;n=new ot({props:{name:"MultipleCheck"}}),a=new ot({props:{hoverable:!0,name:"Close"}}),a.$on("click",r[5]),f=new xt({});let g=r[0],h=[];for(let w=0;w<g.length;w+=1)h[w]=d7(a7(r,g,w));const v=w=>_(h[w],1,1,()=>{h[w]=null});return{c(){e=M("div"),t=M("div"),C(n.$$.fragment),i=R(),l=M("div"),l.textContent="Test Details",s=R(),o=M("div"),C(a.$$.fragment),u=R(),C(f.$$.fragment),c=R(),p=M("div");for(let w=0;w<h.length;w+=1)h[w].c();Ct(l,"padding-left","var(--spacing-l)"),y(t,"class","title-text svelte-1mnmi2e"),Ct(o,"padding-right","var(--spacing-xl)"),y(e,"class","title svelte-1mnmi2e"),y(p,"class","container svelte-1mnmi2e")},m(w,k){$(w,e,k),P(e,t),S(n,t,null),P(t,i),P(t,l),P(e,s),P(e,o),S(a,o,null),$(w,u,k),S(f,w,k),$(w,c,k),$(w,p,k);for(let T=0;T<h.length;T+=1)h[T].m(p,null);d=!0},p(w,[k]){if(k&13){g=w[0];let T;for(T=0;T<g.length;T+=1){const O=a7(w,g,T);h[T]?(h[T].p(O,k),m(h[T],1)):(h[T]=d7(O),h[T].c(),m(h[T],1),h[T].m(p,null))}for(x(),T=g.length;T<h.length;T+=1)v(T);ee()}},i(w){if(!d){m(n.$$.fragment,w),m(a.$$.fragment,w),m(f.$$.fragment,w);for(let k=0;k<g.length;k+=1)m(h[k]);d=!0}},o(w){_(n.$$.fragment,w),_(a.$$.fragment,w),_(f.$$.fragment,w),h=h.filter(Boolean);for(let k=0;k<h.length;k+=1)_(h[k]);d=!1},d(w){w&&b(e),A(n),A(a),w&&b(u),A(f,w),w&&b(c),w&&b(p),mt(h,w)}}}function mme(r,e,t){let n,i;ae(r,Vt,f=>t(1,i=f));let{automation:l}=e,s,o;const a=async()=>{An(Vt,i.selectedAutomation.automation.showTestPanel=!1,i)};function u(f){s=f,t(2,s)}return r.$$set=f=>{"automation"in f&&t(4,l=f.automation)},r.$$.update=()=>{var f,c;r.$$.dirty&17&&(t(0,o=[]),l&&(l.definition.trigger&&o.push(l.definition.trigger),t(0,o=o.concat(l.definition.steps||[]).filter(p=>p.stepId!=="LOOP")))),r.$$.dirty&2&&t(3,n=(c=(f=i.selectedAutomation)==null?void 0:f.testResults)==null?void 0:c.steps.filter(p=>p.stepId!=="LOOP"||[]))},[o,i,s,n,l,a,u]}class gme extends le{constructor(e){super();se(this,e,mme,dme,ie,{automation:4})}}function _me(r){let e,t,n,i;return n=new Ue({props:{gap:"S",justifyItems:"center",$$slots:{default:[wme]},$$scope:{ctx:r}}}),{c(){e=M("div"),t=M("div"),C(n.$$.fragment),y(t,"class","main svelte-374m3f"),y(e,"class","centered svelte-374m3f")},m(l,s){$(l,e,s),P(e,t),S(n,t,null),i=!0},p(l,s){const o={};s&257&&(o.$$scope={dirty:s,ctx:l}),n.$set(o)},i(l){i||(m(n.$$.fragment,l),i=!0)},o(l){_(n.$$.fragment,l),i=!1},d(l){l&&b(e),A(n)}}}function hme(r){let e;const t=r[4].default,n=$t(t,r,r[8],null);return{c(){n&&n.c()},m(i,l){n&&n.m(i,l),e=!0},p(i,l){n&&n.p&&(!e||l&256)&&bt(n,t,i,i[8],e?wt(t,i[8],l,null):vt(i[8]),null)},i(i){e||(m(n,i),e=!0)},o(i){_(n,i),e=!1},d(i){n&&n.d(i)}}}function $me(r){let e;return{c(){e=U("You have no automations")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function bme(r){let e;return{c(){e=U("Let's fix that. Call the bots!")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function vme(r){let e;return{c(){e=U("Create automation")},m(t,n){$(t,e,n)},d(t){t&&b(e)}}}function wme(r){let e,t,n,i,l,s,o,a,u;return i=new pt({props:{size:"M",$$slots:{default:[$me]},$$scope:{ctx:r}}}),s=new Ve({props:{size:"M",$$slots:{default:[bme]},$$scope:{ctx:r}}}),a=new lt({props:{size:"M",cta:!0,$$slots:{default:[vme]},$$scope:{ctx:r}}}),a.$on("click",r[5]),{c(){e=_e("svg"),t=_e("use"),n=R(),C(i.$$.fragment),l=R(),C(s.$$.fragment),o=R(),C(a.$$.fragment),Jt(t,"xlink:href","#spectrum-icon-18-WorkflowAdd"),y(e,"width","60px"),y(e,"height","60px"),y(e,"class","spectrum-Icon"),y(e,"focusable","false")},m(f,c){$(f,e,c),P(e,t),$(f,n,c),S(i,f,c),$(f,l,c),S(s,f,c),$(f,o,c),S(a,f,c),u=!0},p(f,c){const p={};c&256&&(p.$$scope={dirty:c,ctx:f}),i.$set(p);const d={};c&256&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const g={};c&256&&(g.$$scope={dirty:c,ctx:f}),a.$set(g)},i(f){u||(m(i.$$.fragment,f),m(s.$$.fragment,f),m(a.$$.fragment,f),u=!0)},o(f){_(i.$$.fragment,f),_(s.$$.fragment,f),_(a.$$.fragment,f),u=!1},d(f){f&&b(e),f&&b(n),A(i,f),f&&b(l),A(s,f),f&&b(o),A(a,f)}}}function m7(r){let e,t,n;return t=new gme({props:{automation:r[2]}}),{c(){e=M("div"),C(t.$$.fragment),y(e,"class","setup svelte-374m3f")},m(i,l){$(i,e,l),S(t,e,null),n=!0},p(i,l){const s={};l&4&&(s.automation=i[2]),t.$set(s)},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),A(t)}}}function yme(r){let e,t;return e=new o7({props:{webhookModal:r[1]}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,i){const l={};i&2&&(l.webhookModal=n[1]),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function kme(r){let e,t;return e=new X1({}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function Cme(r){var O;let e,t,n,i,l,s,o,a,u,f,c,p,d;n=new ame({props:{modal:r[0],webhookModal:r[1]}});const g=[hme,_me],h=[];function v(I,L){return I[2]?0:1}s=v(r),o=h[s]=g[s](r);let w=((O=r[2])==null?void 0:O.showTestPanel)&&m7(r),k={$$slots:{default:[yme]},$$scope:{ctx:r}};f=new yt({props:k}),r[6](f);let T={width:"30%",$$slots:{default:[kme]},$$scope:{ctx:r}};return p=new yt({props:T}),r[7](p),{c(){e=M("div"),t=M("div"),C(n.$$.fragment),i=R(),l=M("div"),o.c(),a=R(),w&&w.c(),u=R(),C(f.$$.fragment),c=R(),C(p.$$.fragment),y(t,"class","nav svelte-374m3f"),y(l,"class","content svelte-374m3f"),y(e,"class","root svelte-374m3f")},m(I,L){$(I,e,L),P(e,t),S(n,t,null),P(e,i),P(e,l),h[s].m(l,null),P(e,a),w&&w.m(e,null),P(e,u),S(f,e,null),P(e,c),S(p,e,null),d=!0},p(I,[L]){var F;const D={};L&1&&(D.modal=I[0]),L&2&&(D.webhookModal=I[1]),n.$set(D);let q=s;s=v(I),s===q?h[s].p(I,L):(x(),_(h[q],1,1,()=>{h[q]=null}),ee(),o=h[s],o?o.p(I,L):(o=h[s]=g[s](I),o.c()),m(o,1),o.m(l,null)),((F=I[2])==null?void 0:F.showTestPanel)?w?(w.p(I,L),L&4&&m(w,1)):(w=m7(I),w.c(),m(w,1),w.m(e,u)):w&&(x(),_(w,1,1,()=>{w=null}),ee());const j={};L&258&&(j.$$scope={dirty:L,ctx:I}),f.$set(j);const z={};L&256&&(z.$$scope={dirty:L,ctx:I}),p.$set(z)},i(I){d||(m(n.$$.fragment,I),m(o),m(w),m(f.$$.fragment,I),m(p.$$.fragment,I),d=!0)},o(I){_(n.$$.fragment,I),_(o),_(w),_(f.$$.fragment,I),_(p.$$.fragment,I),d=!1},d(I){I&&b(e),A(n),h[s].d(),w&&w.d(),r[6](null),A(f),r[7](null),A(p)}}}function Sme(r,e,t){let n,i;ae(r,Vt,p=>t(3,i=p));let{$$slots:l={},$$scope:s}=e,o,a;const u=()=>o.show();function f(p){Q[p?"unshift":"push"](()=>{o=p,t(0,o)})}function c(p){Q[p?"unshift":"push"](()=>{a=p,t(1,a)})}return r.$$set=p=>{"$$scope"in p&&t(8,s=p.$$scope)},r.$$.update=()=>{var p;r.$$.dirty&8&&t(2,n=((p=i.selectedAutomation)==null?void 0:p.automation)||i.automations[0])},[o,a,n,i,l,u,f,c,s]}class Ame extends le{constructor(e){super();se(this,e,Sme,Cme,ie,{})}}function Eme(r){let e,t,n,i,l,s,o;function a(f){r[4](f)}let u={};return r[2]!==void 0&&(u.value=r[2]),l=new et({props:u}),Q.push(()=>ce(l,"value",a)),{c(){e=M("span"),e.textContent=`The changes you have made will be deleted and the application reverted
|
|
1249
|
-
back to its production state.`,t=R(),n=M("span"),n.textContent="Please enter your app name to continue.",i=R(),C(l.$$.fragment)},m(f,c){$(f,e,c),$(f,t,c),$(f,n,c),$(f,i,c),S(l,f,c),o=!0},p(f,c){const p={};!s&&c&4&&(s=!0,p.value=f[2],pe(()=>s=!1)),l.$set(p)},i(f){o||(m(l.$$.fragment,f),o=!0)},o(f){_(l.$$.fragment,f),o=!1},d(f){f&&b(e),f&&b(t),f&&b(n),f&&b(i),A(l,f)}}}function Ome(r){let e,t;return e=new Pt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[Eme]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,i){const l={};i&5&&(l.disabled=n[2]!==n[0].name),i&132&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function Tme(r){let e,t,n,i;e=new ot({props:{name:"Revert",hoverable:!0}}),e.$on("click",function(){ft(r[1].show)&&r[1].show.apply(this,arguments)});let l={$$slots:{default:[Ome]},$$scope:{ctx:r}};return n=new yt({props:l}),r[5](n),{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment)},m(s,o){S(e,s,o),$(s,t,o),S(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&133&&(a.$$scope={dirty:o,ctx:r}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){A(e,s),s&&b(t),r[5](null),A(n,s)}}}function Ime(r,e,t){let n,i;ae(r,He,f=>t(0,i=f));let l,s;const o=async()=>{try{await Ge.revertAppChanges(n);const f=await Ge.fetchAppPackage(n);await He.actions.initialise(f),$e.info("Changes reverted successfully")}catch(f){$e.error(`Error reverting changes: ${f}`)}};function a(f){s=f,t(2,s)}function u(f){Q[f?"unshift":"push"](()=>{l=f,t(1,l)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=i.appId)},[i,l,s,o,a,u]}class Lme extends le{constructor(e){super();se(this,e,Ime,Tme,ie,{})}}const Pme="@budibase/client",Nme="1.0.192
|
|
1249
|
+
back to its production state.`,t=R(),n=M("span"),n.textContent="Please enter your app name to continue.",i=R(),C(l.$$.fragment)},m(f,c){$(f,e,c),$(f,t,c),$(f,n,c),$(f,i,c),S(l,f,c),o=!0},p(f,c){const p={};!s&&c&4&&(s=!0,p.value=f[2],pe(()=>s=!1)),l.$set(p)},i(f){o||(m(l.$$.fragment,f),o=!0)},o(f){_(l.$$.fragment,f),o=!1},d(f){f&&b(e),f&&b(t),f&&b(n),f&&b(i),A(l,f)}}}function Ome(r){let e,t;return e=new Pt({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:r[3],disabled:r[2]!==r[0].name,$$slots:{default:[Eme]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,i){const l={};i&5&&(l.disabled=n[2]!==n[0].name),i&132&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function Tme(r){let e,t,n,i;e=new ot({props:{name:"Revert",hoverable:!0}}),e.$on("click",function(){ft(r[1].show)&&r[1].show.apply(this,arguments)});let l={$$slots:{default:[Ome]},$$scope:{ctx:r}};return n=new yt({props:l}),r[5](n),{c(){C(e.$$.fragment),t=R(),C(n.$$.fragment)},m(s,o){S(e,s,o),$(s,t,o),S(n,s,o),i=!0},p(s,[o]){r=s;const a={};o&133&&(a.$$scope={dirty:o,ctx:r}),n.$set(a)},i(s){i||(m(e.$$.fragment,s),m(n.$$.fragment,s),i=!0)},o(s){_(e.$$.fragment,s),_(n.$$.fragment,s),i=!1},d(s){A(e,s),s&&b(t),r[5](null),A(n,s)}}}function Ime(r,e,t){let n,i;ae(r,He,f=>t(0,i=f));let l,s;const o=async()=>{try{await Ge.revertAppChanges(n);const f=await Ge.fetchAppPackage(n);await He.actions.initialise(f),$e.info("Changes reverted successfully")}catch(f){$e.error(`Error reverting changes: ${f}`)}};function a(f){s=f,t(2,s)}function u(f){Q[f?"unshift":"push"](()=>{l=f,t(1,l)})}return r.$$.update=()=>{r.$$.dirty&1&&(n=i.appId)},[i,l,s,o,a,u]}class Lme extends le{constructor(e){super();se(this,e,Ime,Tme,ie,{})}}const Pme="@budibase/client",Nme="1.0.192",Rme="MPL-2.0",Dme="dist/budibase-client.js",Mme="dist/budibase-client.js",jme="module",Bme="src/index.js",zme={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},qme={build:"rollup -c","dev:builder":"rollup -cw"},Ume={"@budibase/bbui":"^1.0.192","@budibase/frontend-core":"^1.0.192","@budibase/string-templates":"^1.0.192","@spectrum-css/button":"^3.0.3","@spectrum-css/card":"^3.0.3","@spectrum-css/divider":"^1.0.3","@spectrum-css/link":"^3.1.3","@spectrum-css/page":"^3.0.1","@spectrum-css/tag":"^3.1.4","@spectrum-css/typography":"^3.0.2","@spectrum-css/vars":"^3.0.1",apexcharts:"^3.22.1",dayjs:"^1.10.5",downloadjs:"1.4.7",leaflet:"^1.7.1",regexparam:"^1.3.0","rollup-plugin-polyfill-node":"^0.8.0","sanitize-html":"^2.7.0",screenfull:"^6.0.1",shortid:"^2.2.15",svelte:"^3.38.2","svelte-apexcharts":"^1.0.2","svelte-flatpickr":"^3.1.0","svelte-spa-router":"^3.0.5"},Fme={"@rollup/plugin-alias":"^3.1.5","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-node-resolve":"^11.2.1",postcss:"^8.2.10",rollup:"^2.44.0","rollup-plugin-json":"^4.0.0","rollup-plugin-postcss":"^4.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-svg":"^2.0.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-visualizer":"^5.5.4"},Vme="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc";var Ds={name:Pme,version:Nme,license:Rme,module:Dme,main:Mme,type:jme,svelte:Bme,exports:zme,scripts:qme,dependencies:Ume,devDependencies:Fme,gitHead:Vme};function g7(r){let e,t,n;return t=new ot({props:{name:"Refresh",hoverable:!0}}),t.$on("click",function(){ft(r[2].show)&&r[2].show.apply(this,arguments)}),{c(){e=M("div"),C(t.$$.fragment),y(e,"class","icon-wrapper svelte-18djg2h"),oe(e,"highlight",r[4])},m(i,l){$(i,e,l),S(t,e,null),n=!0},p(i,l){r=i,l&16&&oe(e,"highlight",r[4])},i(i){n||(m(t.$$.fragment,i),n=!0)},o(i){_(t.$$.fragment,i),n=!1},d(i){i&&b(e),A(t)}}}function Hme(r){let e,t;return e=new Ve({props:{size:"S",$$slots:{default:[Gme]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,i){const l={};i&4098&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function Wme(r){let e,t;return e=new Ve({props:{size:"S",$$slots:{default:[Yme]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,i){const l={};i&4098&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function Gme(r){let e,t,n=r[1].version+"",i,l;return{c(){e=U("This app is currently using version "),t=M("b"),i=U(n),l=U(` which is the
|
|
1250
1250
|
latest version available.`)},m(s,o){$(s,e,o),$(s,t,o),P(t,i),$(s,l,o)},p(s,o){o&2&&n!==(n=s[1].version+"")&&ke(i,n)},d(s){s&&b(e),s&&b(t),s&&b(l)}}}function Yme(r){let e,t,n=r[1].version+"",i,l,s,o;return{c(){e=U("This app is currently using version "),t=M("b"),i=U(n),l=U(`, but version
|
|
1251
1251
|
`),s=M("b"),s.textContent=`${Ds.version}`,o=U(` is available. Updates can contain new features,
|
|
1252
1252
|
performance improvements and bug fixes.`)},m(a,u){$(a,e,u),$(a,t,u),P(t,i),$(a,l,u),$(a,s,u),$(a,o,u)},p(a,u){u&2&&n!==(n=a[1].version+"")&&ke(i,n)},d(a){a&&b(e),a&&b(t),a&&b(l),a&&b(s),a&&b(o)}}}function _7(r){let e,t;return e=new Ve({props:{size:"S",$$slots:{default:[Jme]},$$scope:{ctx:r}}}),{c(){C(e.$$.fragment)},m(n,i){S(e,n,i),t=!0},p(n,i){const l={};i&4098&&(l.$$scope={dirty:i,ctx:n}),e.$set(l)},i(n){t||(m(e.$$.fragment,n),t=!0)},o(n){_(e.$$.fragment,n),t=!1},d(n){A(e,n)}}}function Jme(r){let e,t,n=r[1].revertableVersion+"",i,l;return{c(){e=U(`You can revert this app to version
|
package/builder/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
|
|
11
11
|
rel="stylesheet"
|
|
12
12
|
/>
|
|
13
|
-
<script type="module" crossorigin src="/builder/assets/index.
|
|
13
|
+
<script type="module" crossorigin src="/builder/assets/index.e175bec8.js"></script>
|
|
14
14
|
<link rel="modulepreload" href="/builder/assets/vendor.9bf2fcb4.js">
|
|
15
15
|
<link rel="stylesheet" href="/builder/assets/vendor.5e1fe644.css">
|
|
16
16
|
<link rel="stylesheet" href="/builder/assets/index.8a6f249b.css">
|
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1654087081562" clover="3.2.0">
|
|
3
|
+
<project timestamp="1654087081562" name="All files">
|
|
4
4
|
<metrics statements="4176" coveredstatements="3003" conditionals="1725" coveredconditionals="890" methods="613" coveredmethods="433" elements="6514" coveredelements="4326" complexity="0" loc="4176" ncloc="4176" packages="23" files="130" classes="130"/>
|
|
5
5
|
<package name="api">
|
|
6
6
|
<metrics statements="35" coveredstatements="33" conditionals="5" coveredconditionals="2" methods="4" coveredmethods="4"/>
|
|
@@ -187,7 +187,7 @@ exports.endUserPing = <span class="fstat-no" title="function not covered" >as</s
|
|
|
187
187
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
188
188
|
Code coverage generated by
|
|
189
189
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
190
|
-
at Wed Jun 01 2022
|
|
190
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
191
191
|
</div>
|
|
192
192
|
<script src="../../prettify.js"></script>
|
|
193
193
|
<script>
|
|
@@ -232,7 +232,7 @@ exports.update = async function (ctx) {
|
|
|
232
232
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
233
233
|
Code coverage generated by
|
|
234
234
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
235
|
-
at Wed Jun 01 2022
|
|
235
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
236
236
|
</div>
|
|
237
237
|
<script src="../../prettify.js"></script>
|
|
238
238
|
<script>
|
|
@@ -244,7 +244,7 @@ exports.fetchSelf = async ctx => {
|
|
|
244
244
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
245
245
|
Code coverage generated by
|
|
246
246
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
247
|
-
at Wed Jun 01 2022
|
|
247
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
248
248
|
</div>
|
|
249
249
|
<script src="../../prettify.js"></script>
|
|
250
250
|
<script>
|
|
@@ -724,7 +724,7 @@ exports.test = async function (ctx) {
|
|
|
724
724
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
725
725
|
Code coverage generated by
|
|
726
726
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
727
|
-
at Wed Jun 01 2022
|
|
727
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
728
728
|
</div>
|
|
729
729
|
<script src="../../prettify.js"></script>
|
|
730
730
|
<script>
|
|
@@ -97,7 +97,7 @@ exports.exportAppDump = async function (ctx) {
|
|
|
97
97
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
98
98
|
Code coverage generated by
|
|
99
99
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
100
|
-
at Wed Jun 01 2022
|
|
100
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
101
101
|
</div>
|
|
102
102
|
<script src="../../prettify.js"></script>
|
|
103
103
|
<script>
|
|
@@ -409,7 +409,7 @@ exports.importApps = <span class="fstat-no" title="function not covered" >as</sp
|
|
|
409
409
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
410
410
|
Code coverage generated by
|
|
411
411
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
412
|
-
at Wed Jun 01 2022
|
|
412
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
413
413
|
</div>
|
|
414
414
|
<script src="../../prettify.js"></script>
|
|
415
415
|
<script>
|
|
@@ -172,7 +172,7 @@ exports.fetchAppComponentDefinitions = async function (ctx) {
|
|
|
172
172
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
173
173
|
Code coverage generated by
|
|
174
174
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
175
|
-
at Wed Jun 01 2022
|
|
175
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
176
176
|
</div>
|
|
177
177
|
<script src="../../prettify.js"></script>
|
|
178
178
|
<script>
|
|
@@ -847,7 +847,7 @@ const buildSchemaHelper = <span class="fstat-no" title="function not covered" >a
|
|
|
847
847
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
848
848
|
Code coverage generated by
|
|
849
849
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
850
|
-
at Wed Jun 01 2022
|
|
850
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
851
851
|
</div>
|
|
852
852
|
<script src="../../prettify.js"></script>
|
|
853
853
|
<script>
|
|
@@ -451,7 +451,7 @@ exports.getBudibaseVersion = <span class="fstat-no" title="function not covered"
|
|
|
451
451
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
452
452
|
Code coverage generated by
|
|
453
453
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
454
|
-
at Wed Jun 01 2022
|
|
454
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
455
455
|
</div>
|
|
456
456
|
<script src="../../prettify.js"></script>
|
|
457
457
|
<script>
|
|
@@ -401,7 +401,7 @@
|
|
|
401
401
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
402
402
|
Code coverage generated by
|
|
403
403
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
404
|
-
at Wed Jun 01 2022
|
|
404
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
405
405
|
</div>
|
|
406
406
|
<script src="../../prettify.js"></script>
|
|
407
407
|
<script>
|
|
@@ -136,7 +136,7 @@ exports.find = async function (ctx) {
|
|
|
136
136
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
137
137
|
Code coverage generated by
|
|
138
138
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
139
|
-
at Wed Jun 01 2022
|
|
139
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
140
140
|
</div>
|
|
141
141
|
<script src="../../prettify.js"></script>
|
|
142
142
|
<script>
|
|
@@ -223,7 +223,7 @@ exports.destroy = async function (ctx) {
|
|
|
223
223
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
224
224
|
Code coverage generated by
|
|
225
225
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
226
|
-
at Wed Jun 01 2022
|
|
226
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
227
227
|
</div>
|
|
228
228
|
<script src="../../prettify.js"></script>
|
|
229
229
|
<script>
|
|
@@ -193,7 +193,7 @@ exports.getMetadata = async ctx => {
|
|
|
193
193
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
194
194
|
Code coverage generated by
|
|
195
195
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
196
|
-
at Wed Jun 01 2022
|
|
196
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
197
197
|
</div>
|
|
198
198
|
<script src="../../prettify.js"></script>
|
|
199
199
|
<script>
|
|
@@ -109,7 +109,7 @@ exports.fetchDefinitions = <span class="fstat-no" title="function not covered" >
|
|
|
109
109
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
110
110
|
Code coverage generated by
|
|
111
111
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
112
|
-
at Wed Jun 01 2022
|
|
112
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
113
113
|
</div>
|
|
114
114
|
<script src="../../prettify.js"></script>
|
|
115
115
|
<script>
|
|
@@ -595,7 +595,7 @@ exports.removePermission = async function (ctx) {
|
|
|
595
595
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
596
596
|
Code coverage generated by
|
|
597
597
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
598
|
-
at Wed Jun 01 2022
|
|
598
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
599
599
|
</div>
|
|
600
600
|
<script src="../../prettify.js"></script>
|
|
601
601
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at Wed Jun 01 2022
|
|
104
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -220,7 +220,7 @@ exports.generateQueryPreviewValidation = () => {
|
|
|
220
220
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
221
221
|
Code coverage generated by
|
|
222
222
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
223
|
-
at Wed Jun 01 2022
|
|
223
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
224
224
|
</div>
|
|
225
225
|
<script src="../../../prettify.js"></script>
|
|
226
226
|
<script>
|
|
@@ -364,7 +364,7 @@ exports.destroy = async function (ctx) {
|
|
|
364
364
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
365
365
|
Code coverage generated by
|
|
366
366
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
367
|
-
at Wed Jun 01 2022
|
|
367
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
368
368
|
</div>
|
|
369
369
|
<script src="../../prettify.js"></script>
|
|
370
370
|
<script>
|
|
@@ -346,7 +346,7 @@ exports.clientFetch = async ctx => {
|
|
|
346
346
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
347
347
|
Code coverage generated by
|
|
348
348
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
349
|
-
at Wed Jun 01 2022
|
|
349
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
350
350
|
</div>
|
|
351
351
|
<script src="../../prettify.js"></script>
|
|
352
352
|
<script>
|
|
@@ -769,7 +769,7 @@ exports.fetchEnrichedRow = <span class="fstat-no" title="function not covered" >
|
|
|
769
769
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
770
770
|
Code coverage generated by
|
|
771
771
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
772
|
-
at Wed Jun 01 2022
|
|
772
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
773
773
|
</div>
|
|
774
774
|
<script src="../../../prettify.js"></script>
|
|
775
775
|
<script>
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
162
162
|
Code coverage generated by
|
|
163
163
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
164
|
-
at Wed Jun 01 2022
|
|
164
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
165
165
|
</div>
|
|
166
166
|
<script src="../../../prettify.js"></script>
|
|
167
167
|
<script>
|
|
@@ -1435,7 +1435,7 @@ exports.fetchEnrichedRow = async ctx => {
|
|
|
1435
1435
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1436
1436
|
Code coverage generated by
|
|
1437
1437
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1438
|
-
at Wed Jun 01 2022
|
|
1438
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
1439
1439
|
</div>
|
|
1440
1440
|
<script src="../../../prettify.js"></script>
|
|
1441
1441
|
<script>
|
|
@@ -1264,7 +1264,7 @@ exports.fullSearch = async (query, params) => {
|
|
|
1264
1264
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1265
1265
|
Code coverage generated by
|
|
1266
1266
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1267
|
-
at Wed Jun 01 2022
|
|
1267
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
1268
1268
|
</div>
|
|
1269
1269
|
<script src="../../../prettify.js"></script>
|
|
1270
1270
|
<script>
|
|
@@ -538,7 +538,7 @@ exports.finaliseRow = async (
|
|
|
538
538
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
539
539
|
Code coverage generated by
|
|
540
540
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
541
|
-
at Wed Jun 01 2022
|
|
541
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
542
542
|
</div>
|
|
543
543
|
<script src="../../../prettify.js"></script>
|
|
544
544
|
<script>
|
|
@@ -346,7 +346,7 @@ exports.validate = async ({ tableId, row, table }) => {
|
|
|
346
346
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
347
347
|
Code coverage generated by
|
|
348
348
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
349
|
-
at Wed Jun 01 2022
|
|
349
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
350
350
|
</div>
|
|
351
351
|
<script src="../../../prettify.js"></script>
|
|
352
352
|
<script>
|
|
@@ -208,7 +208,7 @@ exports.destroy = async ctx => {
|
|
|
208
208
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
209
209
|
Code coverage generated by
|
|
210
210
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
211
|
-
at Wed Jun 01 2022
|
|
211
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
212
212
|
</div>
|
|
213
213
|
<script src="../../prettify.js"></script>
|
|
214
214
|
<script>
|
|
@@ -103,7 +103,7 @@ exports.save = <span class="fstat-no" title="function not covered" >as</span>ync
|
|
|
103
103
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
104
104
|
Code coverage generated by
|
|
105
105
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
106
|
-
at Wed Jun 01 2022
|
|
106
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
107
107
|
</div>
|
|
108
108
|
<script src="../../prettify.js"></script>
|
|
109
109
|
<script>
|
|
@@ -589,7 +589,7 @@ exports.runStaticFormulaChecks = async (table, { oldTable, deletion }) => {
|
|
|
589
589
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
590
590
|
Code coverage generated by
|
|
591
591
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
592
|
-
at Wed Jun 01 2022
|
|
592
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
593
593
|
</div>
|
|
594
594
|
<script src="../../../prettify.js"></script>
|
|
595
595
|
<script>
|
|
@@ -1024,7 +1024,7 @@ exports.bulkImport = <span class="fstat-no" title="function not covered" >as</sp
|
|
|
1024
1024
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1025
1025
|
Code coverage generated by
|
|
1026
1026
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1027
|
-
at Wed Jun 01 2022
|
|
1027
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
1028
1028
|
</div>
|
|
1029
1029
|
<script src="../../../prettify.js"></script>
|
|
1030
1030
|
<script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at Wed Jun 01 2022
|
|
134
|
+
at Wed Jun 01 2022 12:38:01 GMT+0000 (Coordinated Universal Time)
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../../../prettify.js"></script>
|
|
137
137
|
<script>
|