@genesislcap/design-system-configurator 15.98.1 → 15.98.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{249.249.597e43a656ace3f10b97.js → 249.249.8c25cf2adb44dbaaffbe.js} +2 -2
- package/dist/249.8f85fa887336fa5379f7958c4ef9785b.js.map +1 -0
- package/dist/{65.65.5dc213a9cf86c20b423f.js → 65.65.3dfcf7b4f70e9a0c8922.js} +106 -105
- package/dist/65.7bcc07df70f2d8b27fa413b681d275cc.js.map +1 -0
- package/dist/{designSystemConfigurator.3b70a7317258dc28f42377c734d2e0ff.js.map → designSystemConfigurator.db265fc065cec970c274abb374006ba2.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.c5004dc69fff58d0e45e.js → main.2573aac10e7afa90447a.js} +2 -2
- package/dist/{main.a8b2795dd231df141ee0ce9e25692ea2.js.map → main.ffa3ed49f8c74e50d39d8cb34cc55f92.js.map} +1 -1
- package/dist/remoteEntry.js +2 -2
- package/package.json +11 -11
- package/dist/249.da8d7567b6fd9c7cb5c05d5e25e3c06b.js.map +0 -1
- package/dist/65.2b105e1848ee3262ccd322159887ce9f.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[65],{31274(e,t,o){o.d(t,{u:()=>i});var r=o(60416);const i=(e,t,o)=>{(0,r.u_)(e);const i=t.split("-")[0],a=document.createElement(`${i}-dialog`),n=o?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(o):(0,r.jE)("dialog-container",t);n.appendChild(a),a.notification=e,a.show()}},60416(e,t,o){o.d(t,{cL:()=>u,jE:()=>p,uP:()=>d,u_:()=>c});var r=o(66506),i=o(52945),a=o(68424);const n=(0,r.createLogger)("foundation-notifications");let s=null;const l=new Map,d=e=>{var t,o;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(o=null==e?void 0:e.body)&&void 0!==o?o:"Something went wrong"}`},c=e=>{var t,o;n.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(o=null==t?void 0:t.config)||void 0===o?void 0:o.logLevel)||r.LogLevels.debug)})},p=(e,t)=>{let o=document.querySelector(`#${e}`);if(!o)if(l.has(e))o=l.get(e);else{const t=(0,i.fI)(document).find(t=>t.id===e);t&&(o=t,l.set(e,t))}if(!o){o=document.createElement("div"),o.setAttribute("id",e),o.style.zIndex="9999";const{element:t,prefix:r}=(0,a.DW)(document.body,"rapid");if(t)t.appendChild(o),s=t;else if(s)s.appendChild(o);else{const e=document.createElement(`${r}-design-system-provider`);e.appendChild(o),document.body.appendChild(e),s=e}}return o},u=e=>{for(var t,o;e&&!(e instanceof ShadowRoot);){const r=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(r)return r.style.position="relative",r;e=null===(o=null==e?void 0:e.getRootNode())||void 0===o?void 0:o.host}return m()},m=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},70997(e,t,o){function r(e,t,o){const r=e=>"function"==typeof e?e:()=>e,i=r(t),a=r(o);return(t,o)=>e(t,o)?i(t,o):a(t,o)}o.d(t,{q:()=>r})},80273(e,t,o){o.d(t,{Du:()=>l,IT:()=>n,WP:()=>i,f4:()=>s,zz:()=>a});var r=o(52945);const i=(e,t)=>{(0,r.O5)(e,t)};var a,n;!function(e){e.Italic="italic",e.Normal="normal"}(a||(a={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(n||(n={}));const s=(e,t=a.Normal,o=n.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${o};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}},80065(e,t,o){o.r(t),o.d(t,{ColorPalette:()=>
|
|
1
|
+
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[65],{31274(e,t,o){o.d(t,{u:()=>i});var r=o(60416);const i=(e,t,o)=>{(0,r.u_)(e);const i=t.split("-")[0],a=document.createElement(`${i}-dialog`),n=o?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(o):(0,r.jE)("dialog-container",t);n.appendChild(a),a.notification=e,a.show()}},60416(e,t,o){o.d(t,{cL:()=>u,jE:()=>p,uP:()=>d,u_:()=>c});var r=o(66506),i=o(52945),a=o(68424);const n=(0,r.createLogger)("foundation-notifications");let s=null;const l=new Map,d=e=>{var t,o;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(o=null==e?void 0:e.body)&&void 0!==o?o:"Something went wrong"}`},c=e=>{var t,o;n.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(o=null==t?void 0:t.config)||void 0===o?void 0:o.logLevel)||r.LogLevels.debug)})},p=(e,t)=>{let o=document.querySelector(`#${e}`);if(!o)if(l.has(e))o=l.get(e);else{const t=(0,i.fI)(document).find(t=>t.id===e);t&&(o=t,l.set(e,t))}if(!o){o=document.createElement("div"),o.setAttribute("id",e),o.style.zIndex="9999";const{element:t,prefix:r}=(0,a.DW)(document.body,"rapid");if(t)t.appendChild(o),s=t;else if(s)s.appendChild(o);else{const e=document.createElement(`${r}-design-system-provider`);e.appendChild(o),document.body.appendChild(e),s=e}}return o},u=e=>{for(var t,o;e&&!(e instanceof ShadowRoot);){const r=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(r)return r.style.position="relative",r;e=null===(o=null==e?void 0:e.getRootNode())||void 0===o?void 0:o.host}return m()},m=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},70997(e,t,o){function r(e,t,o){const r=e=>"function"==typeof e?e:()=>e,i=r(t),a=r(o);return(t,o)=>e(t,o)?i(t,o):a(t,o)}o.d(t,{q:()=>r})},80273(e,t,o){o.d(t,{Du:()=>l,IT:()=>n,WP:()=>i,f4:()=>s,zz:()=>a});var r=o(52945);const i=(e,t)=>{(0,r.O5)(e,t)};var a,n;!function(e){e.Italic="italic",e.Normal="normal"}(a||(a={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(n||(n={}));const s=(e,t=a.Normal,o=n.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${o};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}},80065(e,t,o){o.r(t),o.d(t,{ColorPalette:()=>gr,ColorToken:()=>fr,ColorTokens:()=>Cr,DesignSystemEditor:()=>tr,DesignSystemExport:()=>mr,DesignSystemPreview:()=>Vr,EventName:()=>Ho,PreviewApp:()=>Tr,PreviewComponents:()=>cr,PreviewForm:()=>Or,PreviewGrid:()=>Yr,TypographyTokens:()=>kr,defaultBodyFont:()=>Wo,fontFamilies:()=>Vo});var r=o(55823),i=o(90778),a=o(21409),n=o(83453),s=o.n(n),l=o(60496),d=o(33681),c=o(38370),p=o(54634),u=o(85090),m=o(31679),h=o(66506);const v=(0,h.createLogger)("foundation-form"),g=(e,t,o,r)=>{var i,a,n;if(!e||!o)return"";const s=e.filter(e=>e&&"anyOf"===e.keyword);if(0===s.length)return"";const l=null===(i=null==t?void 0:t.errorMessage)||void 0===i?void 0:i.anyOf,d=r||l,c="/"+o.replace(/\./g,"/"),p=s.find(e=>{const t=e.instancePath||"",o=e.schema;if(t===c)return!0;if(Array.isArray(o)){return o.flatMap(e=>t+"/"+Object.keys(e).flatMap(t=>e[t])).includes(c)}return!1});if(p){const e=p.schema||(null===(a=p.parentSchema)||void 0===a?void 0:a.anyOf);if(Array.isArray(e)){const t=new Set;e.forEach(e=>{(e&&Array.isArray(e.required)?e.required:[]).forEach(e=>t.add(e))});const r=o.split(".").pop();if(!r||!t.has(r))return"";const i=(null===(n=p.parentSchema)||void 0===n?void 0:n.properties)||{},a=Array.from(t).map(e=>((e,t)=>{const o=t[e]||{},r=["required"];return"number"==typeof o.minLength&&r.push("minLength"),"number"==typeof o.maxLength&&r.push("maxLength"),"number"==typeof o.minimum&&r.push("minimum"),"number"==typeof o.maximum&&r.push("maximum"),"number"!=typeof o.exclusiveMinimum&&!0!==o.exclusiveMinimum||r.push("exclusiveMinimum"),"number"!=typeof o.exclusiveMaximum&&!0!==o.exclusiveMaximum||r.push("exclusiveMaximum"),"string"==typeof o.pattern&&r.push("pattern"),o.type&&r.push(`type:${o.type}`),`${e}${r.length>1?` (${r.join(", ")})`:""}`})(e,i));if(1===a.length)return d||`Field ${a[0]} is required.`;const s=2===a.length?`${a[0]} or ${a[1]}`:`${a.slice(0,-1).join(", ")}, or ${a[a.length-1]}`;return d||`One of ${s} must be provided.`}return d||p.message||""}return""},b=(y="foundation-form",d.css`
|
|
2
2
|
${y} .foundation-control-wrapper-root {
|
|
3
3
|
margin-bottom: var(--wrapper-root-margin-bottom, calc(var(--design-unit) * 4px));
|
|
4
4
|
}
|
|
@@ -1243,25 +1243,26 @@
|
|
|
1243
1243
|
</template>
|
|
1244
1244
|
`,Be={renderer:d.html`
|
|
1245
1245
|
${e=>Ue(e.prefix)}
|
|
1246
|
-
`,tester:(0,l.Hc7)(4,(0,l.or)(Ne("allOptionsResourceName"),Ne("data"))),mapper:l.kOB},He=e=>{var t,o;return(null===(t=e.schema)||void 0===t?void 0:t.hasOwnProperty("oneOf"))?e.schema.oneOf.some(e=>e.genesisType===ie.DATETIME)?"datetime-local":"date":(null===(o=e.schema)||void 0===o?void 0:o.genesisType)===ie.DATETIME?"datetime-local":"date"};const Ye=(e="rapid")=>d.html`
|
|
1246
|
+
`,tester:(0,l.Hc7)(4,(0,l.or)(Ne("allOptionsResourceName"),Ne("data"))),mapper:l.kOB},He=e=>{var t,o;return(null===(t=e.schema)||void 0===t?void 0:t.hasOwnProperty("oneOf"))?e.schema.oneOf.some(e=>e.genesisType===ie.DATETIME)?"datetime-local":"date":(null===(o=e.schema)||void 0===o?void 0:o.genesisType)===ie.DATETIME?"datetime-local":"date"};const Ye=e=>e?new Date(e).getTime():void 0,Ge=(e="rapid")=>d.html`
|
|
1247
1247
|
<template>
|
|
1248
1248
|
${f({prefix:e,innerTemplate:d.html`
|
|
1249
1249
|
<${e}-text-field
|
|
1250
|
-
:value=${e=>function(e){if(null==e.data||""===e.data)return"";const t=He(e),o=new Date(e.data),r=e=>e.toString().padStart(2,"0"),i="datetime-local"!==t,a=i?o.getUTCFullYear():o.getFullYear(),n=r((i?o.getUTCMonth():o.getMonth())+1),s=r(i?o.getUTCDate():o.getDate()),l=r(o.getHours()),d=r(o.getMinutes());return`${a}-${n}-${s}`+("datetime-local"===t?`T${l}:${d}`:"")}(e.control)}
|
|
1250
|
+
:value=${e=>function(e){if(null==e.data||""===e.data)return"";const t=He(e),o=new Date(e.data),r=e=>e.toString().padStart(2,"0"),i="datetime-local"!==t,a=String(i?o.getUTCFullYear():o.getFullYear()).padStart(4,"0"),n=r((i?o.getUTCMonth():o.getMonth())+1),s=r(i?o.getUTCDate():o.getDate()),l=r(o.getHours()),d=r(o.getMinutes());return`${a}-${n}-${s}`+("datetime-local"===t?`T${l}:${d}`:"")}(e.control)}
|
|
1251
1251
|
id=${e=>e.control.path}
|
|
1252
1252
|
type="${e=>He(e.control)}"
|
|
1253
1253
|
data-test-id=${e=>e.control.path}
|
|
1254
1254
|
?required=${e=>e.control.required}
|
|
1255
1255
|
?disabled=${e=>!e.control.enabled}
|
|
1256
1256
|
tabindex="${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.tabIndex}}"
|
|
1257
|
-
@
|
|
1257
|
+
@change=${(e,t)=>{const{value:o}=t.event.target;var r;(""===(r=o)||/^[1-9]\d{3}-/.test(r))&&e.control.handleChange(e.control.path,Ye(o))}}
|
|
1258
|
+
@blur=${(e,t)=>{e.onBlur();const o=Ye(t.event.target.value);o!==(e=>{var t;return null!==(t=e.data)&&void 0!==t?t:void 0})(e.control)&&e.control.handleChange(e.control.path,o)}}"
|
|
1258
1259
|
style="width: 100%"
|
|
1259
1260
|
></${e}-text-field>
|
|
1260
1261
|
`})}
|
|
1261
1262
|
</template>
|
|
1262
|
-
`,
|
|
1263
|
-
${e=>
|
|
1264
|
-
`,tester:(0,l.Hc7)(4,he),mapper:l.kOB},
|
|
1263
|
+
`,Ve={renderer:d.html`
|
|
1264
|
+
${e=>Ge(e.prefix)}
|
|
1265
|
+
`,tester:(0,l.Hc7)(4,he),mapper:l.kOB},We={renderer:d.html`
|
|
1265
1266
|
${e=>((e="rapid")=>d.html`
|
|
1266
1267
|
<template>
|
|
1267
1268
|
${(0,d.when)(e=>e.control.visible,d.html`
|
|
@@ -1271,7 +1272,7 @@
|
|
|
1271
1272
|
`)}
|
|
1272
1273
|
</template>
|
|
1273
1274
|
`)(e.prefix)}
|
|
1274
|
-
`,tester:(0,l.Hc7)(5,e=>{var t;return!0===(null===(t=e.options)||void 0===t?void 0:t.divider)}),mapper:l.kOB},
|
|
1275
|
+
`,tester:(0,l.Hc7)(5,e=>{var t;return!0===(null===(t=e.options)||void 0===t?void 0:t.divider)}),mapper:l.kOB},Ze=(0,l.or)(l.pyz,(0,l.f4S)(e=>e.hasOwnProperty("oneOf")&&e.oneOf.some(e=>e.hasOwnProperty("enum")))),qe=(e,t)=>t?t(e.label):(0,ce.capitalCase)(e.label),Xe=e=>{var t,o;let r=e.control.data;if(!r&&(r=(e=>{var t,o,r,i,a,n;const s=null===(r=null===(o=null===(t=e.control.schema)||void 0===t?void 0:t.oneOf)||void 0===o?void 0:o.find(e=>e.hasOwnProperty("default")))||void 0===r?void 0:r.default;if(!s)return;const l=(0,ce.capitalCase)(s),d=null===(a=null===(i=e.control.uischema)||void 0===i?void 0:i.options)||void 0===a?void 0:a.labelRowFormatter,c=null===(n=e.control.options.find(e=>qe(e,d)===l))||void 0===n?void 0:n.value;return c?(e.control.handleChange(e.control.path,c),c):void 0})(e),!r))return"";const i=e.control.options.find(e=>e.value===r);if(!i)return"";const a=null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.labelRowFormatter;return qe(i,a)},Je=(e="rapid")=>d.html`
|
|
1275
1276
|
<template>
|
|
1276
1277
|
<style>
|
|
1277
1278
|
${A(e)}
|
|
@@ -1282,21 +1283,21 @@
|
|
|
1282
1283
|
autocomplete=${e=>{var t;return"startsWith"===(null===(t=e.control.uischema.options)||void 0===t?void 0:t.filterMode)?"both":"list"}}
|
|
1283
1284
|
filter-mode=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.filterMode)||"contains"}}
|
|
1284
1285
|
?disabled=${e=>!e.control.enabled}
|
|
1285
|
-
:value=${e=>
|
|
1286
|
+
:value=${e=>Xe(e)}
|
|
1286
1287
|
tabindex="${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.tabIndex}}"
|
|
1287
|
-
@change=${(e,t)=>((e,t)=>{var o,r,i;const a=null===(r=null===(o=e.control.uischema)||void 0===o?void 0:o.options)||void 0===r?void 0:r.labelRowFormatter;e.control.handleChange(e.control.path,null===(i=e.control.options.find(e=>
|
|
1288
|
+
@change=${(e,t)=>((e,t)=>{var o,r,i;const a=null===(r=null===(o=e.control.uischema)||void 0===o?void 0:o.options)||void 0===r?void 0:r.labelRowFormatter;e.control.handleChange(e.control.path,null===(i=e.control.options.find(e=>qe(e,a)===t))||void 0===i?void 0:i.value),e.onBlur()})(e,t.event.target.value)}
|
|
1288
1289
|
id=${e=>e.control.path}
|
|
1289
1290
|
data-test-id=${e=>e.control.path}
|
|
1290
1291
|
>
|
|
1291
1292
|
${(0,d.repeat)(e=>e.control.options,d.html`
|
|
1292
|
-
<${e}-option>${(e,t)=>{var o,r,i,a;return
|
|
1293
|
+
<${e}-option>${(e,t)=>{var o,r,i,a;return qe(e,null===(a=null===(i=null===(r=null===(o=t.parent)||void 0===o?void 0:o.control)||void 0===r?void 0:r.uischema)||void 0===i?void 0:i.options)||void 0===a?void 0:a.labelRowFormatter)}}</${e}-option>
|
|
1293
1294
|
`)}
|
|
1294
1295
|
</${e}-combobox>
|
|
1295
1296
|
`})}
|
|
1296
1297
|
</template>
|
|
1297
|
-
`,
|
|
1298
|
-
${e=>
|
|
1299
|
-
`,tester:(0,l.Hc7)(3,
|
|
1298
|
+
`,Qe={renderer:d.html`
|
|
1299
|
+
${e=>Je(e.prefix)}
|
|
1300
|
+
`,tester:(0,l.Hc7)(3,Ze),mapper:(e,t)=>{const o=(0,l.kOB)(e,t),r=t.options||(o.schema.enum||o.schema.oneOf.find(e=>e.hasOwnProperty("enum")).enum).map(t=>(0,l.Gem)(t,(0,l.tIO)()(e),(0,l.G9g)(o.schema,o.uischema,o.path)))||o.schema.const&&[(0,l.Gem)(o.schema.const,(0,l.tIO)()(e),(0,l.G9g)(o.schema,o.uischema,o.path))];return Object.assign(Object.assign({},o),{options:r})}},Ke={renderer:d.html`
|
|
1300
1301
|
${e=>((e="rapid")=>d.html`
|
|
1301
1302
|
<template>
|
|
1302
1303
|
<style>
|
|
@@ -1318,7 +1319,7 @@
|
|
|
1318
1319
|
`})}
|
|
1319
1320
|
</template>
|
|
1320
1321
|
`)(e.prefix)}
|
|
1321
|
-
`,tester:(0,l.Hc7)(10,Ne("radio")),mapper:l.kOB},
|
|
1322
|
+
`,tester:(0,l.Hc7)(10,Ne("radio")),mapper:l.kOB},et={renderer:d.html`
|
|
1322
1323
|
<template>
|
|
1323
1324
|
<pre
|
|
1324
1325
|
:value=${e=>e.control.data||""}
|
|
@@ -1327,7 +1328,7 @@
|
|
|
1327
1328
|
style="display: none"
|
|
1328
1329
|
></pre>
|
|
1329
1330
|
</template>
|
|
1330
|
-
`,tester:(0,l.Hc7)(5,(e,t,o)=>{var r,i;return null!==(i=null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.hidden)&&void 0!==i&&i}),mapper:l.kOB},
|
|
1331
|
+
`,tester:(0,l.Hc7)(5,(e,t,o)=>{var r,i;return null!==(i=null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.hidden)&&void 0!==i&&i}),mapper:l.kOB},tt=e=>t=>(0,l.dfR)(t,"array")&&t.hasOwnProperty("items")&&t.items.type===e,ot=e=>(0,l.f4S)(t=>t.hasOwnProperty("oneOf")&&t.oneOf.some(tt(e))||tt(e)(t)),rt=d.html`
|
|
1331
1332
|
<template>
|
|
1332
1333
|
<div style="${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.border)?"padding: 5px; border-radius: 3px; border: 1px solid var(--neutral-stroke-rest);":""}}">
|
|
1333
1334
|
${f({prefix:"rapid",innerTemplate:d.html`
|
|
@@ -1335,18 +1336,18 @@
|
|
|
1335
1336
|
`})}
|
|
1336
1337
|
</div>
|
|
1337
1338
|
</template>
|
|
1338
|
-
`,
|
|
1339
|
+
`,it={renderer:rt,tester:(0,l.Hc7)(2,ot("object")),mapper:l.i8T,dispatchMapper:l.oid},at={renderer:d.html`
|
|
1339
1340
|
<template>
|
|
1340
1341
|
<categorization-wrapper :form=${e=>e} :control=${e=>e.control}></categorization-wrapper>
|
|
1341
1342
|
</template>
|
|
1342
|
-
`,tester:(0,l.Hc7)(2,e=>"Categorization"===e.type),mapper:l.n93},
|
|
1343
|
+
`,tester:(0,l.Hc7)(2,e=>"Categorization"===e.type),mapper:l.n93},nt=e=>{const{innerTemplate:t,hideLabel:o=!1}=e;return d.html`
|
|
1343
1344
|
${(0,d.when)(e=>{var t;return!!(null===(t=e.control)||void 0===t?void 0:t.label)&&!o},d.html`
|
|
1344
1345
|
<div class="fl-layout-label">${e=>e.control.label}</div>
|
|
1345
1346
|
`)}
|
|
1346
1347
|
${(0,d.when)(e=>{var t;return null===(t=e.control)||void 0===t?void 0:t.visible},t)}
|
|
1347
|
-
`},
|
|
1348
|
+
`},st={renderer:d.html`
|
|
1348
1349
|
<template>
|
|
1349
|
-
${
|
|
1350
|
+
${nt({innerTemplate:d.html`
|
|
1350
1351
|
<div class="fl-vertical-layout">
|
|
1351
1352
|
${(0,d.repeat)(e=>e.control.uischema.elements,d.html`
|
|
1352
1353
|
<dispatch-renderer
|
|
@@ -1360,16 +1361,16 @@
|
|
|
1360
1361
|
</div>
|
|
1361
1362
|
`})}
|
|
1362
1363
|
</template>
|
|
1363
|
-
`,tester:(0,l.Hc7)(2,l.nWz),mapper:l.n93};let
|
|
1364
|
+
`,tester:(0,l.Hc7)(2,l.nWz),mapper:l.n93};let lt=class extends d.FASTElement{constructor(){super(...arguments),this.hideLabel=!1}connectedCallback(){super.connectedCallback(),v.warn("<layout-wrapper> is deprecated and will be removed in a future major version. Migrate to the `layoutWrapperTemplate` function for light-DOM rendering.")}};(0,r.Cg)([d.observable],lt.prototype,"control",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean",attribute:"hide-label"})],lt.prototype,"hideLabel",void 0),lt=(0,r.Cg)([(0,d.customElement)({name:"layout-wrapper",template:d.html`
|
|
1364
1365
|
${(0,d.when)(e=>e.control.label&&!e.hideLabel,d.html`
|
|
1365
1366
|
<div style="color: var(--neutral-foreground-hint);">${e=>e.control.label}</div>
|
|
1366
1367
|
`)}
|
|
1367
1368
|
${(0,d.when)(e=>{var t;return null===(t=e.control)||void 0===t?void 0:t.visible},d.html`
|
|
1368
1369
|
<slot></slot>
|
|
1369
1370
|
`)}
|
|
1370
|
-
`})],
|
|
1371
|
+
`})],lt);const dt={renderer:d.html`
|
|
1371
1372
|
<template>
|
|
1372
|
-
${
|
|
1373
|
+
${nt({innerTemplate:d.html`
|
|
1373
1374
|
<div class="fl-form-grid-layout">
|
|
1374
1375
|
${(0,d.repeat)(e=>e.control.uischema.elements,d.html`
|
|
1375
1376
|
<dispatch-renderer
|
|
@@ -1383,9 +1384,9 @@
|
|
|
1383
1384
|
</div>
|
|
1384
1385
|
`})}
|
|
1385
1386
|
</template>
|
|
1386
|
-
`,tester:(0,l.Hc7)(2,e=>"FormGridLayout"===e.type),mapper:l.n93},
|
|
1387
|
+
`,tester:(0,l.Hc7)(2,e=>"FormGridLayout"===e.type),mapper:l.n93},ct={renderer:d.html`
|
|
1387
1388
|
<template>
|
|
1388
|
-
${
|
|
1389
|
+
${nt({hideLabel:!0,innerTemplate:d.html`
|
|
1389
1390
|
<div class="fl-group-layout">
|
|
1390
1391
|
${(0,d.when)(e=>e.control.label,d.html`
|
|
1391
1392
|
<div for="${e=>e.control.path+"-wrapper"}" class="fl-group-label">
|
|
@@ -1404,9 +1405,9 @@
|
|
|
1404
1405
|
</div>
|
|
1405
1406
|
`})}
|
|
1406
1407
|
</template>
|
|
1407
|
-
`,tester:(0,l.Hc7)(2,l.IZG),mapper:l.n93},
|
|
1408
|
+
`,tester:(0,l.Hc7)(2,l.IZG),mapper:l.n93},pt={renderer:d.html`
|
|
1408
1409
|
<template>
|
|
1409
|
-
${
|
|
1410
|
+
${nt({innerTemplate:d.html`
|
|
1410
1411
|
<div class="fl-horizontal-layout">
|
|
1411
1412
|
${(0,d.repeat)(e=>e.control.uischema.elements,d.html`
|
|
1412
1413
|
<dispatch-renderer
|
|
@@ -1421,13 +1422,13 @@
|
|
|
1421
1422
|
</div>
|
|
1422
1423
|
`})}
|
|
1423
1424
|
</template>
|
|
1424
|
-
`,tester:(0,l.Hc7)(2,e=>"HorizontalLayout"===e.type),mapper:l.n93},
|
|
1425
|
+
`,tester:(0,l.Hc7)(2,e=>"HorizontalLayout"===e.type),mapper:l.n93},ut={renderer:d.html`
|
|
1425
1426
|
<template>
|
|
1426
1427
|
<stepper-wrapper :form=${e=>e} :control=${e=>e.control}></stepper-wrapper>
|
|
1427
1428
|
</template>
|
|
1428
|
-
`,tester:(0,l.Hc7)(3,e=>"Stepper"===e.type),mapper:l.n93},
|
|
1429
|
+
`,tester:(0,l.Hc7)(3,e=>"Stepper"===e.type),mapper:l.n93},mt={renderer:d.html`
|
|
1429
1430
|
<template>
|
|
1430
|
-
${
|
|
1431
|
+
${nt({innerTemplate:d.html`
|
|
1431
1432
|
<div class="fl-2-column-layout">
|
|
1432
1433
|
${(0,d.repeat)(e=>e.control.uischema.elements,d.html`
|
|
1433
1434
|
<div class="fl-2-column-item">
|
|
@@ -1443,7 +1444,7 @@
|
|
|
1443
1444
|
</div>
|
|
1444
1445
|
`})}
|
|
1445
1446
|
</template>
|
|
1446
|
-
`,tester:(0,l.Hc7)(2,e=>"LayoutVertical2Columns"===e.type),mapper:l.n93};const
|
|
1447
|
+
`,tester:(0,l.Hc7)(2,e=>"LayoutVertical2Columns"===e.type),mapper:l.n93};const ht=d.html`
|
|
1447
1448
|
<template>
|
|
1448
1449
|
<vertical-categorization-wrapper
|
|
1449
1450
|
:form=${e=>e}
|
|
@@ -1451,24 +1452,24 @@
|
|
|
1451
1452
|
height=${e=>{var t,o;return null!==(o=function(e){if("object"==typeof e&&null!==e&&"vertical"===e.type)return e.height}(null===(t=e.control.uischema.options)||void 0===t?void 0:t.layout))&&void 0!==o?o:""}}
|
|
1452
1453
|
></vertical-categorization-wrapper>
|
|
1453
1454
|
</template>
|
|
1454
|
-
`,
|
|
1455
|
+
`,vt={renderer:ht,tester:(0,l.Hc7)(3,e=>{var t,o;return"Categorization"===e.type&&(void 0!==(o=null===(t=e.options)||void 0===t?void 0:t.layout)&&("vertical"===o||"object"==typeof o&&"vertical"===o.type))}),mapper:l.n93},gt=e=>e.control.uischema.options,bt={renderer:d.html`
|
|
1455
1456
|
${e=>((e="rapid")=>d.html`
|
|
1456
1457
|
<template>
|
|
1457
1458
|
${f({prefix:e,innerTemplate:d.html`
|
|
1458
1459
|
<${e}-multicolumn-dropdown
|
|
1459
1460
|
style="width: 100%;"
|
|
1460
|
-
resource-name=${e=>
|
|
1461
|
-
value-key=${e=>
|
|
1462
|
-
label-key=${e=>
|
|
1461
|
+
resource-name=${e=>gt(e).allOptionsResourceName}
|
|
1462
|
+
value-key=${e=>gt(e).valueField}
|
|
1463
|
+
label-key=${e=>gt(e).labelField}
|
|
1463
1464
|
?disabled=${e=>!e.control.enabled}
|
|
1464
|
-
?dropdown-above=${e=>{var t,o;return null!==(o=null===(t=
|
|
1465
|
-
?dropdown-left=${e=>{var t,o;return null!==(o=null===(t=
|
|
1466
|
-
?advanced-search-req=${e=>!!
|
|
1467
|
-
:searchKey=${e=>
|
|
1468
|
-
:request=${e=>
|
|
1469
|
-
:columnDefinitions=${e=>
|
|
1470
|
-
:baseCriteria=${e=>
|
|
1471
|
-
:dropdownWidth=${e=>
|
|
1465
|
+
?dropdown-above=${e=>{var t,o;return null!==(o=null===(t=gt(e).dropdownPlacement)||void 0===t?void 0:t.startsWith("top"))&&void 0!==o&&o}}
|
|
1466
|
+
?dropdown-left=${e=>{var t,o;return null!==(o=null===(t=gt(e).dropdownPlacement)||void 0===t?void 0:t.endsWith("left"))&&void 0!==o&&o}}
|
|
1467
|
+
?advanced-search-req=${e=>!!gt(e).advancedSearchReq}
|
|
1468
|
+
:searchKey=${e=>gt(e).searchKey}
|
|
1469
|
+
:request=${e=>gt(e).request}
|
|
1470
|
+
:columnDefinitions=${e=>gt(e).columnDefinitions}
|
|
1471
|
+
:baseCriteria=${e=>gt(e).baseCriteria}
|
|
1472
|
+
:dropdownWidth=${e=>gt(e).dropdownWidth}
|
|
1472
1473
|
:value=${e=>e.control.data}
|
|
1473
1474
|
id=${e=>e.control.path}
|
|
1474
1475
|
data-test-id=${e=>e.control.path}
|
|
@@ -1477,22 +1478,22 @@
|
|
|
1477
1478
|
`})}
|
|
1478
1479
|
</template>
|
|
1479
1480
|
`)(e.prefix)}
|
|
1480
|
-
`,tester:(0,l.Hc7)(5,Ne("columnDefinitions")),mapper:l.kOB},
|
|
1481
|
+
`,tester:(0,l.Hc7)(5,Ne("columnDefinitions")),mapper:l.kOB},yt={maximumFractionDigits:3,minimumFractionDigits:0},ft=e=>e.schema,$t=(e,t)=>null!=(null==t?void 0:t.maximumInputPrecision)?t.maximumInputPrecision:(e=>{var t,o;return ye(e)||null!==(o=null===(t=e.oneOf)||void 0===t?void 0:t.some(e=>ye(e)))&&void 0!==o&&o})(e)?18:12;function wt(e,t){var o;const r=t.event.currentTarget,i=String(null!==(o=null==r?void 0:r.value)&&void 0!==o?o:"");if(""===i)return e.control.handleChange(e.control.path,R(t.event,e.control.schema));const a=parseFloat(i);if(isNaN(a))return;const n=(e=>{var t,o;return(0,l.dfR)(e,"string")||null!==(o=null===(t=e.oneOf)||void 0===t?void 0:t.some(e=>(0,l.dfR)(e,"string")))&&void 0!==o&&o})(ft(e.control))?i:a;return e.control.handleChange(e.control.path,n)}const xt={renderer:d.html`
|
|
1481
1482
|
${e=>((e="rapid")=>d.html`
|
|
1482
1483
|
<template>
|
|
1483
1484
|
${f({prefix:e,innerTemplate:d.html`
|
|
1484
1485
|
<${e}-number-field
|
|
1485
1486
|
withFormatting=${e=>{var t;return!(null===(t=e.control.uischema.options)||void 0===t?void 0:t.withoutFormatting)}}
|
|
1486
|
-
:options=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.formatOptions)||
|
|
1487
|
+
:options=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.formatOptions)||yt}}
|
|
1487
1488
|
autocomplete=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.autocomplete)||"off"}}
|
|
1488
1489
|
prefix=${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.prefix}}
|
|
1489
1490
|
suffix=${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.suffix}}
|
|
1490
1491
|
?hide-affix-from-screen-reader=${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.hideAffixFromScreenReader}}
|
|
1491
1492
|
:value=${e=>null==e.control.data?"":String(e.control.data)}
|
|
1492
|
-
:maximumInputPrecision=${e
|
|
1493
|
+
:maximumInputPrecision=${e=>$t(ft(e.control),e.control.uischema.options)}
|
|
1493
1494
|
tabindex="${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.tabIndex}}"
|
|
1494
|
-
@change=${
|
|
1495
|
-
@input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)
|
|
1495
|
+
@change=${wt}
|
|
1496
|
+
@input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?wt(e,t):void 0}}
|
|
1496
1497
|
placeholder=${e=>e.control.uischema.placeholder||""}
|
|
1497
1498
|
id=${e=>e.control.path}
|
|
1498
1499
|
data-test-id=${e=>e.control.path}
|
|
@@ -1505,7 +1506,7 @@
|
|
|
1505
1506
|
`})}
|
|
1506
1507
|
</template>
|
|
1507
1508
|
`)(e.prefix)}
|
|
1508
|
-
`,tester:(0,l.Hc7)(3,fe),mapper:l.kOB},
|
|
1509
|
+
`,tester:(0,l.Hc7)(3,fe),mapper:l.kOB},St={renderer:d.html`
|
|
1509
1510
|
${e=>((e="rapid")=>d.html`
|
|
1510
1511
|
<template>
|
|
1511
1512
|
<style>
|
|
@@ -1543,14 +1544,14 @@
|
|
|
1543
1544
|
`})}
|
|
1544
1545
|
</template>
|
|
1545
1546
|
`)(e.prefix)}
|
|
1546
|
-
`,tester:(0,l.Hc7)(5,Ne("segmented")),mapper:l.kOB};function
|
|
1547
|
+
`,tester:(0,l.Hc7)(5,Ne("segmented")),mapper:l.kOB};function Ct(e,t){const o=t.event.target.value;e.control.handleChange(e.control.path,""===o?[]:o.split(",").map(e=>e.trimStart()))}const At={renderer:d.html`
|
|
1547
1548
|
${e=>((e="rapid")=>d.html`
|
|
1548
1549
|
<template>
|
|
1549
1550
|
${f({prefix:e,innerTemplate:d.html`
|
|
1550
1551
|
<${e}-text-field
|
|
1551
1552
|
:value=${e=>(e=>{var t;const o=e.control.data;return"string"==typeof o&&e.control.handleChange(e.control.path,o.split(",")),(null===(t=e.control.data)||void 0===t?void 0:t.toString())||""})(e)}
|
|
1552
1553
|
tabindex="${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.tabIndex}}"
|
|
1553
|
-
@change=${
|
|
1554
|
+
@change=${Ct}
|
|
1554
1555
|
placeholder=${e=>e.control.uischema.placeholder||e.control.label}
|
|
1555
1556
|
id=${e=>e.control.path}
|
|
1556
1557
|
data-test-id=${e=>e.control.path}
|
|
@@ -1562,11 +1563,11 @@
|
|
|
1562
1563
|
`})}
|
|
1563
1564
|
</template>
|
|
1564
1565
|
`)(e.prefix)}
|
|
1565
|
-
`,tester:(0,l.Hc7)(3,
|
|
1566
|
+
`,tester:(0,l.Hc7)(3,ot("string")),mapper:l.kOB};var It=o(70997);function kt(e,t){var o,r;const i=function(e,t="none"){const o="function"==typeof t?t(e):"uppercase"===t?e.toUpperCase():"lowercase"===t?e.toLowerCase():e;return""===o?void 0:o}(t.event.target.value,null===(r=null===(o=e.control.uischema)||void 0===o?void 0:o.options)||void 0===r?void 0:r.textTransform);e.control.handleChange(e.control.path,null!=i?i:R(t.event,e.control.schema))}const Mt=d.html`
|
|
1566
1567
|
${e=>((e="rapid")=>d.html`
|
|
1567
1568
|
<template>
|
|
1568
1569
|
${f({prefix:e,innerTemplate:d.html`
|
|
1569
|
-
${(0,
|
|
1570
|
+
${(0,It.q)(e=>{var t,o;return!(null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.textarea)},d.html`
|
|
1570
1571
|
<${e}-text-field
|
|
1571
1572
|
part="text-field"
|
|
1572
1573
|
autocomplete=${e=>{var t;return(null===(t=e.control.uischema.options)||void 0===t?void 0:t.autocomplete)||"off"}}
|
|
@@ -1575,8 +1576,8 @@
|
|
|
1575
1576
|
?hide-affix-from-screen-reader=${e=>{var t,o;return null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.hideAffixFromScreenReader}}
|
|
1576
1577
|
type=${e=>{var t,o;return(null===(o=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===o?void 0:o.isPassword)?"password":"text"}}
|
|
1577
1578
|
:value=${e=>e.control.data||""}
|
|
1578
|
-
@input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?
|
|
1579
|
-
@change=${
|
|
1579
|
+
@input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?kt(e,t):void 0}}
|
|
1580
|
+
@change=${kt}
|
|
1580
1581
|
placeholder=${e=>e.control.uischema.placeholder||""}
|
|
1581
1582
|
id=${e=>e.control.path}
|
|
1582
1583
|
data-test-id=${e=>e.control.path}
|
|
@@ -1589,8 +1590,8 @@
|
|
|
1589
1590
|
<${e}-text-area
|
|
1590
1591
|
part="text-area"
|
|
1591
1592
|
:value=${e=>e.control.data||""}
|
|
1592
|
-
@input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?
|
|
1593
|
-
@change=${
|
|
1593
|
+
@input=${(e,t)=>{var o;return(null===(o=e.control.uischema.options)||void 0===o?void 0:o.changeOnInput)?kt(e,t):void 0}}
|
|
1594
|
+
@change=${kt}
|
|
1594
1595
|
placeholder=${e=>e.control.uischema.placeholder||""}
|
|
1595
1596
|
id=${e=>e.control.path}
|
|
1596
1597
|
data-test-id=${e=>e.control.path}
|
|
@@ -1604,11 +1605,11 @@
|
|
|
1604
1605
|
`})}
|
|
1605
1606
|
</template>
|
|
1606
1607
|
`)(e.prefix)}
|
|
1607
|
-
`;var Mt=o(85031),Lt=o.n(Mt);function Et(e,t){if(""===e)return e;if(!t)return e;switch(Tt(t)){case"integer":case"number":{const t=parseFloat(e);return isNaN(t)?e:t}case"boolean":{const t=e.toLowerCase();return!!["true","yes","1"].includes(t)||!["false","no","0"].includes(t)&&e}default:return e}}function Tt(e){if(e.type)return Array.isArray(e.type)?e.type[0]:e.type;const t=e.oneOf||e.anyOf;if(t)for(const e of t)if("object"==typeof e&&e.type&&"null"!==e.type)return Array.isArray(e.type)?e.type[0]:e.type}function Rt(e){const t=[];function o(e){var r,i,a;if("Control"===e.type&&e.scope){const o=function(e){const t=e.match(/^#\/properties\/(.+)$/);return t?t[1]:null}(e.scope);if(o){if("items"===o&&(null===(r=e.options)||void 0===r?void 0:r.childUiSchema)){const o=e.options.childUiSchema,r="function"==typeof o?o(0,void 0,void 0):o;if(r){const e=Rt(r);t.push(...e)}return}const a=!0===(null===(i=e.options)||void 0===i?void 0:i.hidden),n=e.label;t.push({fieldName:o,label:n,isHidden:a})}}if(e.elements)for(const t of e.elements)o(t);if(null===(a=e.options)||void 0===a?void 0:a.childElements)for(const t of e.options.childElements)o(t)}if(e.elements)for(const t of e.elements)o(t);const r=e.options,i=null==r?void 0:r.childElements;if(i)for(const e of i)o(e);return t}function _t(e,t,o){const r=Tt(t);if(t.enum&&t.enum.length>0)return String(t.enum[0]);if(void 0!==t.const)return String(t.const);if(void 0!==t.default)return String(t.default);if(t.examples&&Array.isArray(t.examples)&&t.examples.length>0)return String(t.examples[0]);switch(r){case"string":return function(e,t){const o=e.toLowerCase();if(t.format)switch(t.format){case"date":return"2024-01-15";case"date-time":return"2024-01-15T10:30:00Z";case"time":return"10:30:00";case"email":return"user@example.com";case"uri":case"url":return"https://example.com";case"uuid":return"550e8400-e29b-41d4-a716-446655440000";case"hostname":return"example.com";case"ipv4":return"192.168.1.1";case"ipv6":return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}if(o.includes("email"))return"user@example.com";if(o.includes("phone")||o.includes("tel"))return"+1234567890";if(o.includes("date")||o.includes("time"))return o.includes("time")&&!o.includes("date")?"10:30:00":"2024-01-15";if(o.includes("url")||o.includes("link")||o.includes("website"))return"https://example.com";if(o.includes("name"))return o.includes("first")?"John":o.includes("last")?"Doe":"Sample Name";if(o.includes("address"))return"123 Main Street";if(o.includes("city"))return"New York";if(o.includes("country"))return"USA";if(o.includes("description")||o.includes("comment")||o.includes("notes"))return"Sample description";if(o.includes("id")||o.includes("code"))return"ABC123";const r=t.minLength||0,i=50,a=t.maxLength||i;let n=`Sample ${e}`;n.length<r&&(n=n.padEnd(r,"_"));n.length>a&&(n=n.substring(0,a));return n}(e,t);case"integer":return function(e){var t,o;const r=null!==(t=e.minimum)&&void 0!==t?t:0,i=null!==(o=e.maximum)&&void 0!==o?o:100;if(void 0!==e.minimum)return String(Math.ceil(r));const a=Math.min(Math.max(1,r),i);return String(Math.floor(a))}(t);case"number":return function(e){var t,o;const r=null!==(t=e.minimum)&&void 0!==t?t:0,i=null!==(o=e.maximum)&&void 0!==o?o:100;if(void 0!==e.minimum)return String(r);const a=1.5,n=Math.min(Math.max(a,r),i);return String(n)}(t);case"boolean":return"true";case"array":case"object":return"";default:return o?`sample_${e.toLowerCase()}`:""}}function Dt(e){if(!e)return"";if(e.includes(",")||e.includes('"')||e.includes("\n")||e.includes("\r")){return`"${e.replace(/"/g,'""')}"`}return e}function Nt(e){return e.replace(/^\$/,"").replace(/\[(\d+)\]/g,".$1").split(/[./]/).filter(Boolean)}function Pt(e,t,o){return(null==e?void 0:e.length)?e.map(e=>{const r=function(e,t,o){let r=null;if(t){const o=Nt(t),i=e?Nt(e):[];i.length<=o.length&&i.every((e,t)=>o[o.length-i.length+t]===e)||o.push(...i),"DETAILS"===o[0]&&o.shift(),r=o.length?`/${o.join("/")}`:null}else e&&(r=e.startsWith("/")?e:`/${e}`);if(!r)return null;if(o)return`${o.startsWith("/")?o.replace(/\/$/,""):`/${o.replace(/\/$/,"")}`}${r}`;return r}(e.FIELD,e.PATH,o);if(!r)return null;const i={keyword:"serverValidation",message:e.TEXT,instancePath:r,schemaPath:"",params:{code:e.CODE}};if(t)try{const e=function(e){const t=e.replace(/^\//,"").split("/").filter(Boolean);if(0===t.length)return"#";let o="#";for(let e=0;e<t.length;e+=1){const r=t[e];0===e?o+=`/properties/${r}`:/^\d+$/.test(r)?o+=`/items/${r}`:o+=`/properties/${r}`}return o}(r),o=t,a=l.XKv.schema(o,e,o);a&&(i.parentSchema=a)}catch(e){}return i}).filter(e=>null!==e):[]}var zt=o(31274);const Ot=(e,t,o)=>new Promise(r=>{((e,t,o)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let r={title:e.title,body:e.body},i={};null!=e.logLevel&&(r=Object.assign({logLevel:e.logLevel},r)),e.dialog&&(i=Object.assign({dialog:e.dialog},i),r=Object.assign({config:i},r)),(0,zt.u)(r,t,o)})({title:"Confirm Submission",body:e,dialog:{confirmingActions:[{label:"Submit",action:()=>r(!0)}],dismissingAction:{label:"Cancel",action:()=>r(!1)}}},`${t}-form`,o)});const Ft={renderer:kt,tester:(0,l.Hc7)(2,l.Nyt),mapper:l.kOB},jt=[{renderer:kt,tester:(0,l.Hc7)(1,l.c0N),mapper:l.kOB},Ft,De,Ct,rt,it,ht,dt,ct,lt,ut,nt,pt,wt,Fe,Je,Qe,Be,Ge,Ke,Ve,gt,xt];let Ut=class extends((0,a.S)(c.FoundationElement)){constructor(){super(...arguments),this.prefix="rapid",this.approvalMessageLabel="Approval Message",this.serverFieldErrors=[],this.approvalMessage="",this.pendingPayload=null,this.renderers=jt,this.additionalRenderers=[],this.mergedRenderers=jt,this.errors=[],this.data={},this.submitButtonText="Submit",this.bulkSubmitButtonText="Submit All",this.resetButtonText="Reset",this.bulkInsertMinItems=1,this.reviewButtonText="Review",this.reviewHeading="Review",this.rowSubmitStatuses=new Map,this.reviewMode=!1,this.reviewSections=[]}resourceNameChanged(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;if(this.jsonSchema=void 0,this.originalDetailsSchema=void 0,this.resourceName){const o=yield this.connect.getJSONSchema(this.resourceName);if(!o)return;const r=new(s())(o.INBOUND),i=null===(e=(yield r.resolve()).properties)||void 0===e?void 0:e.DETAILS,a=null===(t=(yield r.resolve()).properties)||void 0===t?void 0:t.APPROVAL_MESSAGE;this.originalDetailsSchema=i,this.setApprovalMessage&&i?this.jsonSchema=Object.assign(Object.assign({},i),{properties:Object.assign(Object.assign({},i.properties),{APPROVAL_MESSAGE:a})}):this.jsonSchema=i,this.bulkInsert&&this.jsonSchema&&(this.transformSchemaForBulkInsert(),yield d.DOM.nextUpdate(),this.initializeBulkInsertData())}})}initializeBulkInsertData(){var e;if(!(null===(e=this.data)||void 0===e?void 0:e.items)||0===this.data.items.length){const e=[];for(let t=0;t<this.bulkInsertMinItems;t+=1)e.push({});this.data=Object.assign(Object.assign({},this.data),{items:e})}}transformSchemaForBulkInsert(){if(!this.originalDetailsSchema)return;const e={type:"array",items:this.originalDetailsSchema,minItems:this.bulkInsertMinItems};void 0!==this.bulkInsertMaxItems&&(e.maxItems=this.bulkInsertMaxItems),this.jsonSchema={type:"object",properties:{items:e},required:["items"]},this.userProvidedUiSchema||(this.userProvidedUiSchema=this.uischema),this.uischema&&function(e){var t;return null===(t=null==e?void 0:e.elements)||void 0===t?void 0:t.some(e=>"#/properties/items"===e.scope&&"Control"===e.type)}(this.uischema)||(this.uischema=function(e){const t={addLabel:"Add another",deleteLabel:""};return e&&(t.childUiSchema=e),{type:"VerticalLayout",elements:[{type:"Control",scope:"#/properties/items",options:t}]}}(this.userProvidedUiSchema))}renderersChanged(){this.updateMergedRenderers()}additionalRenderersChanged(){this.updateMergedRenderers()}updateMergedRenderers(){const{renderers:e=[],additionalRenderers:t=[]}=this;this.mergedRenderers=[...e,...t]}get reviewRecordId(){if(!this.reviewIdField)return;const e=Le(this.data,this.reviewIdField);return null==e?void 0:String(e)}_submit(){return(0,r.sH)(this,void 0,void 0,function*(){if(!this.submitting){if(this.confirmationMessage){const e=(e=>{let t=e.parentElement;for(;t;){if(t.tagName&&(t.tagName.toLowerCase().includes("modal")||t.classList.contains("edit-modal")))return t;t=t.parentElement}})(this);e||v.warn("No modal parent found for confirmation dialog. Dialog may not display as expected.");if(!(yield Ot(this.confirmationMessage,this.prefix,e)))return}if(function(e,t){if(!t||!e)return!1;const o=Object.keys(t.properties);let r=0;return Object.keys(e).forEach(t=>{o.includes(t)||(delete e[t],r+=1,v.debug("Removing key ",t,"from provided data because it is not part of the payload"))}),r>0}(this.data,this.jsonSchema)&&(this.data=Object.assign({},this.data),yield d.DOM.nextUpdate()),this.submitted=!0,!this.bulkInsert)return this.showSubmitReview&&!this.hasValidationErrors()?(this.reviewSections=yield $e(this.data||{},this.userProvidedUiSchema||this.uischema,this.originalDetailsSchema||this.jsonSchema),void(this.reviewMode=!0)):void(yield this._performSubmit());yield this._submitBulk()}})}backFromReview(){this.reviewMode=!1}_submitFromReview(){return(0,r.sH)(this,void 0,void 0,function*(){this.reviewMode=!1,yield this._performSubmit()})}hasValidationErrors(){var e,t,o,r,i,a,n,s;const l=this.jsonFormsEl;return l?(null!==(r=null===(o=null===(t=null===(e=l.jsonforms)||void 0===e?void 0:e.core)||void 0===t?void 0:t.errors)||void 0===o?void 0:o.length)&&void 0!==r?r:0)>0||(null!==(s=null===(n=null===(a=null===(i=l.jsonforms)||void 0===i?void 0:i.core)||void 0===a?void 0:a.additionalErrors)||void 0===n?void 0:n.length)&&void 0!==s?s:0)>0:this.errors.length>0}_performSubmit(){return(0,r.sH)(this,void 0,void 0,function*(){const e=Object.assign({},this.data),t=this.buildCommitPayload(e);if(v.debug({payload:e,errors:this.errors}),this.$emit("submit",{payload:e,errors:this.errors}),0!==Object.entries(e).length&&!this.hasValidationErrors()&&this.resourceName){let o;this.submitting=!0;try{o=yield this.connect.commitEvent(this.resourceName,t)}catch(t){const o=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];return this.submitting=!1,void this.$emit("submit-failure",{payload:e,errors:o})}if(this.submitting=!1,o.ERROR){o.ERROR.find(e=>"APPROVAL_MESSAGE_MISSING"===e.CODE)&&!this.setApprovalMessage?(this.pendingPayload=e,this.showApprovalModal()):(this.applyServerFieldErrors(o.ERROR),this.$emit("submit-failure",{payload:e,errors:o.ERROR}))}else this.$emit("submit-success",{payload:e,response:o})}})}_submitBulk(){return(0,r.sH)(this,void 0,void 0,function*(){var e;const t=(null===(e=this.data)||void 0===e?void 0:e.items)||[];if(t.length<this.bulkInsertMinItems){const e={CODE:"BULK_INSERT_MIN_ITEMS",TEXT:`At least ${this.bulkInsertMinItems} item(s) required`};return void this.$emit("submit-failure",{payload:this.data,errors:[e]})}if(void 0!==this.bulkInsertMaxItems&&t.length>this.bulkInsertMaxItems){const e={CODE:"BULK_INSERT_MAX_ITEMS",TEXT:`Maximum ${this.bulkInsertMaxItems} item(s) allowed`};return void this.$emit("submit-failure",{payload:this.data,errors:[e]})}if(v.debug({bulkItems:t,errors:this.errors}),this.$emit("submit",{payload:this.data,errors:this.errors}),0===t.length||this.errors.length||!this.resourceName)return;this.submitting=!0;const o={successful:[],failed:[]};try{for(let e=0;e<t.length;e+=1){const t=this.rowSubmitStatuses.get(e);"success"!==(null==t?void 0:t.status)&&this.rowSubmitStatuses.set(e,{status:"pending"})}this.rowSubmitStatuses=new Map(this.rowSubmitStatuses),this.$emit("row-status-changed",{statuses:this.rowSubmitStatuses});for(let e=0;e<t.length;e+=1){const r=this.rowSubmitStatuses.get(e);if("success"===(null==r?void 0:r.status))continue;const i=t[e],a=this.buildCommitPayload(i,!0);this.updateRowStatus(e,{status:"submitting"});try{const t=yield this.connect.commitEvent(this.resourceName,a);t.ERROR?(o.failed.push({item:i,index:e,errors:t.ERROR}),this.updateRowStatus(e,{status:"failed",errors:t.ERROR})):(o.successful.push({item:i,index:e,response:t}),this.updateRowStatus(e,{status:"success",response:t}))}catch(t){const r=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];o.failed.push({item:i,index:e,errors:r}),this.updateRowStatus(e,{status:"failed",errors:r})}}}finally{this.submitting=!1}this.$emit("bulk-submit-complete",o),0===o.failed.length?(this.serverFieldErrors=[],this.$emit("submit-success",{payload:this.data,results:o})):0===o.successful.length?(this.applyBulkServerFieldErrors(o.failed),this.$emit("submit-failure",{payload:this.data,errors:o.failed.flatMap(e=>e.errors)})):(this.applyBulkServerFieldErrors(o.failed),this.$emit("submit-partial-success",{payload:this.data,results:o}))})}updateRowStatus(e,t){this.rowSubmitStatuses.set(e,t),this.rowSubmitStatuses=new Map(this.rowSubmitStatuses),this.$emit("row-status-changed",{statuses:this.rowSubmitStatuses,index:e,status:t})}clearRowSubmitStatuses(){this.rowSubmitStatuses=new Map}submitSingleRow(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;if(!this.bulkInsert)return void v.warn("submitSingleRow called but bulkInsert is not enabled");const o=((null===(t=this.data)||void 0===t?void 0:t.items)||[])[e];if(!o)return void v.warn(`submitSingleRow: No item found at index ${e}`);const r=this.rowSubmitStatuses.get(e);if("success"===(null==r?void 0:r.status))return void v.debug(`Row ${e} already submitted successfully`);if(!this.resourceName)return void v.warn("submitSingleRow: No resourceName configured");this.updateRowStatus(e,{status:"submitting"});const i=this.buildCommitPayload(o,!0);try{const t=yield this.connect.commitEvent(this.resourceName,i);t.ERROR?(this.updateRowStatus(e,{status:"failed",errors:t.ERROR}),this.applyServerFieldErrors(t.ERROR,`/items/${e}`),this.$emit("row-submit-failure",{index:e,item:o,errors:t.ERROR})):(this.updateRowStatus(e,{status:"success",response:t}),this.$emit("row-submit-success",{index:e,item:o,response:t}))}catch(t){const r=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];this.updateRowStatus(e,{status:"failed",errors:r}),this.$emit("row-submit-failure",{index:e,item:o,errors:r})}})}filterDataByUiSchema(e){if(!this.userProvidedUiSchema)return e;const t=Rt(this.userProvidedUiSchema).filter(e=>!e.isHidden).map(e=>e.fieldName);if(0===t.length)return e;const o={};for(const r of t)r in e&&(o[r]=e[r]);return o}buildCommitPayload(e,t=!1){const o=t?this.filterDataByUiSchema(e):e;if(this.setApprovalMessage){const{APPROVAL_MESSAGE:e}=o;return{DETAILS:(0,r.Tt)(o,["APPROVAL_MESSAGE"]),APPROVAL_MESSAGE:e}}return{DETAILS:o}}get isSubmitHidden(){return!this.readonly&&!this.hideSubmit}get isResetVisible(){return!this.readonly&&this.showReset}deepClone(){const e=super.deepClone();try{e.uischema=structuredClone(this.uischema),e.jsonSchema=structuredClone(this.jsonSchema)}catch(e){v.error("Error cloning form",e)}return e}submitPart(e){this.submitted=!0}onChange(e){v.debug("Form data changed:",e.detail),e.detail&&(e.stopPropagation(),this.data=e.detail.data,this.errors=e.detail.errors,e.detail.additionalErrors.length&&(this.errors=[...this.errors,...e.detail.additionalErrors]),this.$emit("data-change",e.detail))}disconnectedCallback(){super.disconnectedCallback(),this.reset()}handleResetClicked(){this.reset(),this.$emit("reset-clicked")}reset(e=!0){this.submitted=!1,this.reviewMode=!1,this.reviewSections=[],this.clearRowSubmitStatuses(),this.serverFieldErrors=[],e&&(this.data={}),d.Observable.notify(this,"submitted")}applyServerFieldErrors(e,t){this.serverFieldErrors=Pt(e,this.jsonSchema,t)}applyBulkServerFieldErrors(e){this.serverFieldErrors=e.flatMap(({index:e,errors:t})=>Pt(t,this.jsonSchema,`/items/${e}`))}showApprovalModal(){this.approvalMessage="",this.approvalModal&&this.approvalModal.show()}closeApprovalModal(){this.approvalMessage="",this.pendingPayload=null,this.approvalModal&&this.approvalModal.close()}submitWithApproval(){return(0,r.sH)(this,void 0,void 0,function*(){if(!this.approvalMessage||!this.approvalMessage.trim())return void v.warn("Approval message is required");if(!this.pendingPayload)return v.error("No pending payload to submit"),void this.closeApprovalModal();this.submitting=!0;const e={DETAILS:this.pendingPayload,APPROVAL_MESSAGE:this.approvalMessage},t=this.pendingPayload;let o;try{o=yield this.connect.commitEvent(this.resourceName,e)}catch(e){const o=[{CODE:"SUBMIT_ERROR",TEXT:String(e)}];return this.submitting=!1,void this.$emit("submit-failure",{payload:t,errors:o})}this.submitting=!1,o.ERROR?(this.applyServerFieldErrors(o.ERROR),this.$emit("submit-failure",{payload:t,errors:o.ERROR})):(this.$emit("submit-success",{payload:t,response:o}),this.closeApprovalModal())})}handleCsvFileSelected(e){return(0,r.sH)(this,void 0,void 0,function*(){var t,o;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(r){try{const e=function(e){var t,o,r;const i=[];if(!(null==e?void 0:e.trim()))return i.push("CSV file is empty"),{headers:[],rows:[],errors:i};const a=Lt().parse(e,{header:!0,skipEmptyLines:!0,dynamicTyping:!1}),n=null!==(t=a.meta.fields)&&void 0!==t?t:[];if(0===n.length)return i.push("CSV file has no headers"),{headers:[],rows:[],errors:i};for(const e of a.errors)i.push(null!==(o=e.message)&&void 0!==o?o:`Parse error at row ${null!==(r=e.row)&&void 0!==r?r:"?"}`);const s=a.data.map(e=>{const t={};for(const o of n){const r=e[o];t[o]=null==r?"":String(r)}return t});return{headers:n,rows:s,errors:i}}(yield r.text());if(e.errors.length>0)return this.$emit("csv-parse-error",{errors:e.errors,fileName:r.name}),v.warn("CSV parse errors:",e.errors),void this.clearCsvFileInput();if(0===e.rows.length)return this.$emit("csv-parse-error",{errors:["CSV file contains no data rows"],fileName:r.name}),void this.clearCsvFileInput();const{mappedRows:t,unmappedColumns:i}=function(e,t,o){var r,i;if(!(null==t?void 0:t.properties)||0===e.length)return{mappedRows:[],unmappedColumns:[]};const a=Object.keys(t.properties),n=new Map;if(o){const e=Rt(o);for(const{fieldName:o,label:r}of e)r&&r.trim()&&t.properties[o]&&n.set(r.trim().toLowerCase(),o)}const s=new Map,l=[];if(e.length>0){const t=Object.keys(null!==(r=e[0])&&void 0!==r?r:{});for(const e of t){const t=e.toUpperCase();let r=a.find(e=>e.toUpperCase()===t);!r&&o&&(r=null!==(i=n.get(e.trim().toLowerCase()))&&void 0!==i?i:void 0),r?s.set(e,r):l.push(e)}}const d=e.map(e=>{var o;const r={};for(const[i,a]of s){const n=e[i],s=null===(o=t.properties)||void 0===o?void 0:o[a];r[a]=Et(n,s)}return r});return{mappedRows:d,unmappedColumns:l}}(e.rows,this.originalDetailsSchema,this.uischema);if(0===t.length)return this.$emit("csv-parse-error",{errors:["No CSV columns could be matched to form fields"],fileName:r.name}),void this.clearCsvFileInput();const a=(null===(o=this.data)||void 0===o?void 0:o.items)||[];let n=t;if(void 0!==this.bulkInsertMaxItems){const e=this.bulkInsertMaxItems-a.length;if(e<=0)return this.$emit("csv-parse-error",{errors:[`Maximum of ${this.bulkInsertMaxItems} items already reached`],fileName:r.name}),void this.clearCsvFileInput();t.length>e&&(n=t.slice(0,e),v.warn(`Truncated CSV import from ${t.length} to ${e} rows due to max items limit`))}this.data={items:[...a,...n]},this.$emit("csv-imported",{rowCount:n.length,totalRowsInFile:t.length,unmappedColumns:i,fileName:r.name}),v.debug("CSV imported successfully",{rowCount:n.length,unmappedColumns:i})}catch(e){this.$emit("csv-parse-error",{errors:[`Failed to read CSV file: ${String(e)}`],fileName:r.name}),v.error("CSV import error:",e)}this.clearCsvFileInput()}})}clearCsvFileInput(){this.csvFileInput&&(this.csvFileInput.value="")}downloadCsvTemplate(){if(!this.originalDetailsSchema)return v.warn("Cannot download CSV template: schema not available"),void this.$emit("csv-template-error",{error:"Schema not available"});const e=function(e,t,o=!0,r=!0){if(!(null==e?void 0:e.properties))return"";const i=new Set(e.required||[]),a=[],n=[],s=t?Rt(t):null;if(s&&s.length>0)for(const{fieldName:t,label:o,isHidden:r}of s){if(r)continue;const s=e.properties[t];if(!s)continue;a.push(o&&o.trim()?o.trim():t);const l=_t(t,s,i.has(t));n.push(Dt(l))}else for(const[t,r]of Object.entries(e.properties)){const e=i.has(t);if(!o&&!e)continue;a.push(t);const s=_t(t,r,e);n.push(Dt(s))}if(0===a.length)return"";const l=`${a.map(e=>Dt(e)).join(",")}\n${n.join(",")}`;return r?"\ufeff"+l:l}(this.originalDetailsSchema,this.uischema);if(!e)return v.warn("Cannot download CSV template: no fields in schema"),void this.$emit("csv-template-error",{error:"No fields found in schema"});const t=`${this.resourceName?this.resourceName.replace(/^EVENT_/,"").toLowerCase():"bulk_insert"}_template.csv`;!function(e,t="template.csv"){const o=new Blob([e],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=t,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}(e,t),this.$emit("csv-template-downloaded",{fileName:t}),v.debug("CSV template downloaded:",t)}};(0,r.Cg)([(0,d.attr)({attribute:"design-system-prefix"})],Ut.prototype,"prefix",void 0),(0,r.Cg)([d.attr],Ut.prototype,"resourceName",void 0),(0,r.Cg)([(0,d.attr)({attribute:"confirmation-message"})],Ut.prototype,"confirmationMessage",void 0),(0,r.Cg)([(0,d.attr)({attribute:"set-approval-message",mode:"boolean"})],Ut.prototype,"setApprovalMessage",void 0),(0,r.Cg)([(0,d.attr)({attribute:"approval-message-label"})],Ut.prototype,"approvalMessageLabel",void 0),(0,r.Cg)([d.observable],Ut.prototype,"serverFieldErrors",void 0),(0,r.Cg)([d.observable],Ut.prototype,"approvalMessage",void 0),(0,r.Cg)([d.observable],Ut.prototype,"uischema",void 0),(0,r.Cg)([d.observable],Ut.prototype,"renderers",void 0),(0,r.Cg)([d.observable],Ut.prototype,"additionalRenderers",void 0),(0,r.Cg)([d.observable],Ut.prototype,"mergedRenderers",void 0),(0,r.Cg)([d.observable],Ut.prototype,"jsonSchema",void 0),(0,r.Cg)([i.dm],Ut.prototype,"connect",void 0),(0,r.Cg)([d.observable],Ut.prototype,"data",void 0),(0,r.Cg)([d.observable],Ut.prototype,"submitting",void 0),(0,r.Cg)([d.observable],Ut.prototype,"submitted",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean"})],Ut.prototype,"readonly",void 0),(0,r.Cg)([(0,d.attr)({attribute:"hide-submit-button",mode:"boolean"})],Ut.prototype,"hideSubmit",void 0),(0,r.Cg)([(0,d.attr)({attribute:"show-reset-button",mode:"boolean"})],Ut.prototype,"showReset",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert",mode:"boolean"})],Ut.prototype,"bulkInsert",void 0),(0,r.Cg)([(0,d.attr)({attribute:"submit-button-text"})],Ut.prototype,"submitButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-submit-button-text"})],Ut.prototype,"bulkSubmitButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"reset-button-text"})],Ut.prototype,"resetButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert-min-items",converter:{fromView:e=>parseInt(e,10)||1,toView:e=>String(e)}})],Ut.prototype,"bulkInsertMinItems",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert-max-items",converter:{fromView:e=>e?parseInt(e,10):void 0,toView:e=>void 0!==e?String(e):""}})],Ut.prototype,"bulkInsertMaxItems",void 0),(0,r.Cg)([(0,d.attr)({attribute:"show-submit-review",mode:"boolean"})],Ut.prototype,"showSubmitReview",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-button-text"})],Ut.prototype,"reviewButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-heading"})],Ut.prototype,"reviewHeading",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-id-field"})],Ut.prototype,"reviewIdField",void 0),(0,r.Cg)([d.observable],Ut.prototype,"rowSubmitStatuses",void 0),(0,r.Cg)([d.observable],Ut.prototype,"reviewMode",void 0),(0,r.Cg)([d.observable],Ut.prototype,"reviewSections",void 0),(0,r.Cg)([d.volatile],Ut.prototype,"isSubmitHidden",null),(0,r.Cg)([d.volatile],Ut.prototype,"isResetVisible",null),Ut=(0,r.Cg)([(0,d.customElement)({name:"foundation-form",template:Re,styles:I,shadowOptions:null})],Ut);const Bt=Symbol("component-type"),Ht=Symbol("component-instance"),Yt="foundation-layout-autosave",Gt="f-layout-key",Vt="36px",Wt=()=>{const e=(0,le.designTokensMap)();if(!e.value)return Vt;const{style:t,space:o}=e.value.design_tokens;return(t.baseHeightMultiplier.$value+t.density.$value)*o.designUnit.$value-4+"px"},Zt=()=>{const e=(0,le.selectCustomToken)("rapid","layout","item","border","width");if(!(null==e?void 0:e.$value))return 0;const t=parseFloat(String(e.$value));return Number.isNaN(t)?0:t};class qt extends Error{constructor(e){super(e)}}class Xt extends Error{constructor(e){super(e)}}const Jt="first-loaded",Qt="item-added",Kt="item-removed",eo="item-resized",to="state-changed",oo="change-title",ro="autosave",io=(0,h.createLogger)("foundation-layout");const ao=new Map;function no(e){return ao.get(e)}function so(){const e=this.parentElement;switch(e[Bt]){case"root":case"horizontal":case"vertical":case"tabs":return e;default:throw new qt("Using layout region outside of layout root")}}const lo=e=>({horizontal:"column",vertical:"row",tabs:"stack"}[e]),co=d.html`
|
|
1608
|
+
`;var Lt=o(85031),Et=o.n(Lt);function Tt(e,t){if(""===e)return e;if(!t)return e;switch(Rt(t)){case"integer":case"number":{const t=parseFloat(e);return isNaN(t)?e:t}case"boolean":{const t=e.toLowerCase();return!!["true","yes","1"].includes(t)||!["false","no","0"].includes(t)&&e}default:return e}}function Rt(e){if(e.type)return Array.isArray(e.type)?e.type[0]:e.type;const t=e.oneOf||e.anyOf;if(t)for(const e of t)if("object"==typeof e&&e.type&&"null"!==e.type)return Array.isArray(e.type)?e.type[0]:e.type}function _t(e){const t=[];function o(e){var r,i,a;if("Control"===e.type&&e.scope){const o=function(e){const t=e.match(/^#\/properties\/(.+)$/);return t?t[1]:null}(e.scope);if(o){if("items"===o&&(null===(r=e.options)||void 0===r?void 0:r.childUiSchema)){const o=e.options.childUiSchema,r="function"==typeof o?o(0,void 0,void 0):o;if(r){const e=_t(r);t.push(...e)}return}const a=!0===(null===(i=e.options)||void 0===i?void 0:i.hidden),n=e.label;t.push({fieldName:o,label:n,isHidden:a})}}if(e.elements)for(const t of e.elements)o(t);if(null===(a=e.options)||void 0===a?void 0:a.childElements)for(const t of e.options.childElements)o(t)}if(e.elements)for(const t of e.elements)o(t);const r=e.options,i=null==r?void 0:r.childElements;if(i)for(const e of i)o(e);return t}function Dt(e,t,o){const r=Rt(t);if(t.enum&&t.enum.length>0)return String(t.enum[0]);if(void 0!==t.const)return String(t.const);if(void 0!==t.default)return String(t.default);if(t.examples&&Array.isArray(t.examples)&&t.examples.length>0)return String(t.examples[0]);switch(r){case"string":return function(e,t){const o=e.toLowerCase();if(t.format)switch(t.format){case"date":return"2024-01-15";case"date-time":return"2024-01-15T10:30:00Z";case"time":return"10:30:00";case"email":return"user@example.com";case"uri":case"url":return"https://example.com";case"uuid":return"550e8400-e29b-41d4-a716-446655440000";case"hostname":return"example.com";case"ipv4":return"192.168.1.1";case"ipv6":return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}if(o.includes("email"))return"user@example.com";if(o.includes("phone")||o.includes("tel"))return"+1234567890";if(o.includes("date")||o.includes("time"))return o.includes("time")&&!o.includes("date")?"10:30:00":"2024-01-15";if(o.includes("url")||o.includes("link")||o.includes("website"))return"https://example.com";if(o.includes("name"))return o.includes("first")?"John":o.includes("last")?"Doe":"Sample Name";if(o.includes("address"))return"123 Main Street";if(o.includes("city"))return"New York";if(o.includes("country"))return"USA";if(o.includes("description")||o.includes("comment")||o.includes("notes"))return"Sample description";if(o.includes("id")||o.includes("code"))return"ABC123";const r=t.minLength||0,i=50,a=t.maxLength||i;let n=`Sample ${e}`;n.length<r&&(n=n.padEnd(r,"_"));n.length>a&&(n=n.substring(0,a));return n}(e,t);case"integer":return function(e){var t,o;const r=null!==(t=e.minimum)&&void 0!==t?t:0,i=null!==(o=e.maximum)&&void 0!==o?o:100;if(void 0!==e.minimum)return String(Math.ceil(r));const a=Math.min(Math.max(1,r),i);return String(Math.floor(a))}(t);case"number":return function(e){var t,o;const r=null!==(t=e.minimum)&&void 0!==t?t:0,i=null!==(o=e.maximum)&&void 0!==o?o:100;if(void 0!==e.minimum)return String(r);const a=1.5,n=Math.min(Math.max(a,r),i);return String(n)}(t);case"boolean":return"true";case"array":case"object":return"";default:return o?`sample_${e.toLowerCase()}`:""}}function Nt(e){if(!e)return"";if(e.includes(",")||e.includes('"')||e.includes("\n")||e.includes("\r")){return`"${e.replace(/"/g,'""')}"`}return e}function Pt(e){return e.replace(/^\$/,"").replace(/\[(\d+)\]/g,".$1").split(/[./]/).filter(Boolean)}function zt(e,t,o){return(null==e?void 0:e.length)?e.map(e=>{const r=function(e,t,o){let r=null;if(t){const o=Pt(t),i=e?Pt(e):[];i.length<=o.length&&i.every((e,t)=>o[o.length-i.length+t]===e)||o.push(...i),"DETAILS"===o[0]&&o.shift(),r=o.length?`/${o.join("/")}`:null}else e&&(r=e.startsWith("/")?e:`/${e}`);if(!r)return null;if(o)return`${o.startsWith("/")?o.replace(/\/$/,""):`/${o.replace(/\/$/,"")}`}${r}`;return r}(e.FIELD,e.PATH,o);if(!r)return null;const i={keyword:"serverValidation",message:e.TEXT,instancePath:r,schemaPath:"",params:{code:e.CODE}};if(t)try{const e=function(e){const t=e.replace(/^\//,"").split("/").filter(Boolean);if(0===t.length)return"#";let o="#";for(let e=0;e<t.length;e+=1){const r=t[e];0===e?o+=`/properties/${r}`:/^\d+$/.test(r)?o+=`/items/${r}`:o+=`/properties/${r}`}return o}(r),o=t,a=l.XKv.schema(o,e,o);a&&(i.parentSchema=a)}catch(e){}return i}).filter(e=>null!==e):[]}var Ot=o(31274);const Ft=(e,t,o)=>new Promise(r=>{((e,t,o)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let r={title:e.title,body:e.body},i={};null!=e.logLevel&&(r=Object.assign({logLevel:e.logLevel},r)),e.dialog&&(i=Object.assign({dialog:e.dialog},i),r=Object.assign({config:i},r)),(0,Ot.u)(r,t,o)})({title:"Confirm Submission",body:e,dialog:{confirmingActions:[{label:"Submit",action:()=>r(!0)}],dismissingAction:{label:"Cancel",action:()=>r(!1)}}},`${t}-form`,o)});const jt={renderer:Mt,tester:(0,l.Hc7)(2,l.Nyt),mapper:l.kOB},Ut=[{renderer:Mt,tester:(0,l.Hc7)(1,l.c0N),mapper:l.kOB},jt,De,At,it,at,vt,ct,pt,dt,mt,st,ut,xt,Fe,Qe,Ke,Be,Ve,et,We,bt,St];let Bt=class extends((0,a.S)(c.FoundationElement)){constructor(){super(...arguments),this.prefix="rapid",this.approvalMessageLabel="Approval Message",this.serverFieldErrors=[],this.approvalMessage="",this.pendingPayload=null,this.renderers=Ut,this.additionalRenderers=[],this.mergedRenderers=Ut,this.errors=[],this.data={},this.submitButtonText="Submit",this.bulkSubmitButtonText="Submit All",this.resetButtonText="Reset",this.bulkInsertMinItems=1,this.reviewButtonText="Review",this.reviewHeading="Review",this.rowSubmitStatuses=new Map,this.reviewMode=!1,this.reviewSections=[]}resourceNameChanged(){return(0,r.sH)(this,void 0,void 0,function*(){var e,t;if(this.jsonSchema=void 0,this.originalDetailsSchema=void 0,this.resourceName){const o=yield this.connect.getJSONSchema(this.resourceName);if(!o)return;const r=new(s())(o.INBOUND),i=null===(e=(yield r.resolve()).properties)||void 0===e?void 0:e.DETAILS,a=null===(t=(yield r.resolve()).properties)||void 0===t?void 0:t.APPROVAL_MESSAGE;this.originalDetailsSchema=i,this.setApprovalMessage&&i?this.jsonSchema=Object.assign(Object.assign({},i),{properties:Object.assign(Object.assign({},i.properties),{APPROVAL_MESSAGE:a})}):this.jsonSchema=i,this.bulkInsert&&this.jsonSchema&&(this.transformSchemaForBulkInsert(),yield d.DOM.nextUpdate(),this.initializeBulkInsertData())}})}initializeBulkInsertData(){var e;if(!(null===(e=this.data)||void 0===e?void 0:e.items)||0===this.data.items.length){const e=[];for(let t=0;t<this.bulkInsertMinItems;t+=1)e.push({});this.data=Object.assign(Object.assign({},this.data),{items:e})}}transformSchemaForBulkInsert(){if(!this.originalDetailsSchema)return;const e={type:"array",items:this.originalDetailsSchema,minItems:this.bulkInsertMinItems};void 0!==this.bulkInsertMaxItems&&(e.maxItems=this.bulkInsertMaxItems),this.jsonSchema={type:"object",properties:{items:e},required:["items"]},this.userProvidedUiSchema||(this.userProvidedUiSchema=this.uischema),this.uischema&&function(e){var t;return null===(t=null==e?void 0:e.elements)||void 0===t?void 0:t.some(e=>"#/properties/items"===e.scope&&"Control"===e.type)}(this.uischema)||(this.uischema=function(e){const t={addLabel:"Add another",deleteLabel:""};return e&&(t.childUiSchema=e),{type:"VerticalLayout",elements:[{type:"Control",scope:"#/properties/items",options:t}]}}(this.userProvidedUiSchema))}renderersChanged(){this.updateMergedRenderers()}additionalRenderersChanged(){this.updateMergedRenderers()}updateMergedRenderers(){const{renderers:e=[],additionalRenderers:t=[]}=this;this.mergedRenderers=[...e,...t]}get reviewRecordId(){if(!this.reviewIdField)return;const e=Le(this.data,this.reviewIdField);return null==e?void 0:String(e)}_submit(){return(0,r.sH)(this,void 0,void 0,function*(){if(!this.submitting){if(this.confirmationMessage){const e=(e=>{let t=e.parentElement;for(;t;){if(t.tagName&&(t.tagName.toLowerCase().includes("modal")||t.classList.contains("edit-modal")))return t;t=t.parentElement}})(this);e||v.warn("No modal parent found for confirmation dialog. Dialog may not display as expected.");if(!(yield Ft(this.confirmationMessage,this.prefix,e)))return}if(function(e,t){if(!t||!e)return!1;const o=Object.keys(t.properties);let r=0;return Object.keys(e).forEach(t=>{o.includes(t)||(delete e[t],r+=1,v.debug("Removing key ",t,"from provided data because it is not part of the payload"))}),r>0}(this.data,this.jsonSchema)&&(this.data=Object.assign({},this.data),yield d.DOM.nextUpdate()),this.submitted=!0,!this.bulkInsert)return this.showSubmitReview&&!this.hasValidationErrors()?(this.reviewSections=yield $e(this.data||{},this.userProvidedUiSchema||this.uischema,this.originalDetailsSchema||this.jsonSchema),void(this.reviewMode=!0)):void(yield this._performSubmit());yield this._submitBulk()}})}backFromReview(){this.reviewMode=!1}_submitFromReview(){return(0,r.sH)(this,void 0,void 0,function*(){this.reviewMode=!1,yield this._performSubmit()})}hasValidationErrors(){var e,t,o,r,i,a,n,s;const l=this.jsonFormsEl;return l?(null!==(r=null===(o=null===(t=null===(e=l.jsonforms)||void 0===e?void 0:e.core)||void 0===t?void 0:t.errors)||void 0===o?void 0:o.length)&&void 0!==r?r:0)>0||(null!==(s=null===(n=null===(a=null===(i=l.jsonforms)||void 0===i?void 0:i.core)||void 0===a?void 0:a.additionalErrors)||void 0===n?void 0:n.length)&&void 0!==s?s:0)>0:this.errors.length>0}_performSubmit(){return(0,r.sH)(this,void 0,void 0,function*(){const e=Object.assign({},this.data),t=this.buildCommitPayload(e);if(v.debug({payload:e,errors:this.errors}),this.$emit("submit",{payload:e,errors:this.errors}),0!==Object.entries(e).length&&!this.hasValidationErrors()&&this.resourceName){let o;this.submitting=!0;try{o=yield this.connect.commitEvent(this.resourceName,t)}catch(t){const o=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];return this.submitting=!1,void this.$emit("submit-failure",{payload:e,errors:o})}if(this.submitting=!1,o.ERROR){o.ERROR.find(e=>"APPROVAL_MESSAGE_MISSING"===e.CODE)&&!this.setApprovalMessage?(this.pendingPayload=e,this.showApprovalModal()):(this.applyServerFieldErrors(o.ERROR),this.$emit("submit-failure",{payload:e,errors:o.ERROR}))}else this.$emit("submit-success",{payload:e,response:o})}})}_submitBulk(){return(0,r.sH)(this,void 0,void 0,function*(){var e;const t=(null===(e=this.data)||void 0===e?void 0:e.items)||[];if(t.length<this.bulkInsertMinItems){const e={CODE:"BULK_INSERT_MIN_ITEMS",TEXT:`At least ${this.bulkInsertMinItems} item(s) required`};return void this.$emit("submit-failure",{payload:this.data,errors:[e]})}if(void 0!==this.bulkInsertMaxItems&&t.length>this.bulkInsertMaxItems){const e={CODE:"BULK_INSERT_MAX_ITEMS",TEXT:`Maximum ${this.bulkInsertMaxItems} item(s) allowed`};return void this.$emit("submit-failure",{payload:this.data,errors:[e]})}if(v.debug({bulkItems:t,errors:this.errors}),this.$emit("submit",{payload:this.data,errors:this.errors}),0===t.length||this.errors.length||!this.resourceName)return;this.submitting=!0;const o={successful:[],failed:[]};try{for(let e=0;e<t.length;e+=1){const t=this.rowSubmitStatuses.get(e);"success"!==(null==t?void 0:t.status)&&this.rowSubmitStatuses.set(e,{status:"pending"})}this.rowSubmitStatuses=new Map(this.rowSubmitStatuses),this.$emit("row-status-changed",{statuses:this.rowSubmitStatuses});for(let e=0;e<t.length;e+=1){const r=this.rowSubmitStatuses.get(e);if("success"===(null==r?void 0:r.status))continue;const i=t[e],a=this.buildCommitPayload(i,!0);this.updateRowStatus(e,{status:"submitting"});try{const t=yield this.connect.commitEvent(this.resourceName,a);t.ERROR?(o.failed.push({item:i,index:e,errors:t.ERROR}),this.updateRowStatus(e,{status:"failed",errors:t.ERROR})):(o.successful.push({item:i,index:e,response:t}),this.updateRowStatus(e,{status:"success",response:t}))}catch(t){const r=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];o.failed.push({item:i,index:e,errors:r}),this.updateRowStatus(e,{status:"failed",errors:r})}}}finally{this.submitting=!1}this.$emit("bulk-submit-complete",o),0===o.failed.length?(this.serverFieldErrors=[],this.$emit("submit-success",{payload:this.data,results:o})):0===o.successful.length?(this.applyBulkServerFieldErrors(o.failed),this.$emit("submit-failure",{payload:this.data,errors:o.failed.flatMap(e=>e.errors)})):(this.applyBulkServerFieldErrors(o.failed),this.$emit("submit-partial-success",{payload:this.data,results:o}))})}updateRowStatus(e,t){this.rowSubmitStatuses.set(e,t),this.rowSubmitStatuses=new Map(this.rowSubmitStatuses),this.$emit("row-status-changed",{statuses:this.rowSubmitStatuses,index:e,status:t})}clearRowSubmitStatuses(){this.rowSubmitStatuses=new Map}submitSingleRow(e){return(0,r.sH)(this,void 0,void 0,function*(){var t;if(!this.bulkInsert)return void v.warn("submitSingleRow called but bulkInsert is not enabled");const o=((null===(t=this.data)||void 0===t?void 0:t.items)||[])[e];if(!o)return void v.warn(`submitSingleRow: No item found at index ${e}`);const r=this.rowSubmitStatuses.get(e);if("success"===(null==r?void 0:r.status))return void v.debug(`Row ${e} already submitted successfully`);if(!this.resourceName)return void v.warn("submitSingleRow: No resourceName configured");this.updateRowStatus(e,{status:"submitting"});const i=this.buildCommitPayload(o,!0);try{const t=yield this.connect.commitEvent(this.resourceName,i);t.ERROR?(this.updateRowStatus(e,{status:"failed",errors:t.ERROR}),this.applyServerFieldErrors(t.ERROR,`/items/${e}`),this.$emit("row-submit-failure",{index:e,item:o,errors:t.ERROR})):(this.updateRowStatus(e,{status:"success",response:t}),this.$emit("row-submit-success",{index:e,item:o,response:t}))}catch(t){const r=[{CODE:"SUBMIT_ERROR",TEXT:String(t)}];this.updateRowStatus(e,{status:"failed",errors:r}),this.$emit("row-submit-failure",{index:e,item:o,errors:r})}})}filterDataByUiSchema(e){if(!this.userProvidedUiSchema)return e;const t=_t(this.userProvidedUiSchema).filter(e=>!e.isHidden).map(e=>e.fieldName);if(0===t.length)return e;const o={};for(const r of t)r in e&&(o[r]=e[r]);return o}buildCommitPayload(e,t=!1){const o=t?this.filterDataByUiSchema(e):e;if(this.setApprovalMessage){const{APPROVAL_MESSAGE:e}=o;return{DETAILS:(0,r.Tt)(o,["APPROVAL_MESSAGE"]),APPROVAL_MESSAGE:e}}return{DETAILS:o}}get isSubmitHidden(){return!this.readonly&&!this.hideSubmit}get isResetVisible(){return!this.readonly&&this.showReset}deepClone(){const e=super.deepClone();try{e.uischema=structuredClone(this.uischema),e.jsonSchema=structuredClone(this.jsonSchema)}catch(e){v.error("Error cloning form",e)}return e}submitPart(e){this.submitted=!0}onChange(e){v.debug("Form data changed:",e.detail),e.detail&&(e.stopPropagation(),this.data=e.detail.data,this.errors=e.detail.errors,e.detail.additionalErrors.length&&(this.errors=[...this.errors,...e.detail.additionalErrors]),this.$emit("data-change",e.detail))}disconnectedCallback(){super.disconnectedCallback(),this.reset()}handleResetClicked(){this.reset(),this.$emit("reset-clicked")}reset(e=!0){this.submitted=!1,this.reviewMode=!1,this.reviewSections=[],this.clearRowSubmitStatuses(),this.serverFieldErrors=[],e&&(this.data={}),d.Observable.notify(this,"submitted")}applyServerFieldErrors(e,t){this.serverFieldErrors=zt(e,this.jsonSchema,t)}applyBulkServerFieldErrors(e){this.serverFieldErrors=e.flatMap(({index:e,errors:t})=>zt(t,this.jsonSchema,`/items/${e}`))}showApprovalModal(){this.approvalMessage="",this.approvalModal&&this.approvalModal.show()}closeApprovalModal(){this.approvalMessage="",this.pendingPayload=null,this.approvalModal&&this.approvalModal.close()}submitWithApproval(){return(0,r.sH)(this,void 0,void 0,function*(){if(!this.approvalMessage||!this.approvalMessage.trim())return void v.warn("Approval message is required");if(!this.pendingPayload)return v.error("No pending payload to submit"),void this.closeApprovalModal();this.submitting=!0;const e={DETAILS:this.pendingPayload,APPROVAL_MESSAGE:this.approvalMessage},t=this.pendingPayload;let o;try{o=yield this.connect.commitEvent(this.resourceName,e)}catch(e){const o=[{CODE:"SUBMIT_ERROR",TEXT:String(e)}];return this.submitting=!1,void this.$emit("submit-failure",{payload:t,errors:o})}this.submitting=!1,o.ERROR?(this.applyServerFieldErrors(o.ERROR),this.$emit("submit-failure",{payload:t,errors:o.ERROR})):(this.$emit("submit-success",{payload:t,response:o}),this.closeApprovalModal())})}handleCsvFileSelected(e){return(0,r.sH)(this,void 0,void 0,function*(){var t,o;const r=null===(t=e.target.files)||void 0===t?void 0:t[0];if(r){try{const e=function(e){var t,o,r;const i=[];if(!(null==e?void 0:e.trim()))return i.push("CSV file is empty"),{headers:[],rows:[],errors:i};const a=Et().parse(e,{header:!0,skipEmptyLines:!0,dynamicTyping:!1}),n=null!==(t=a.meta.fields)&&void 0!==t?t:[];if(0===n.length)return i.push("CSV file has no headers"),{headers:[],rows:[],errors:i};for(const e of a.errors)i.push(null!==(o=e.message)&&void 0!==o?o:`Parse error at row ${null!==(r=e.row)&&void 0!==r?r:"?"}`);const s=a.data.map(e=>{const t={};for(const o of n){const r=e[o];t[o]=null==r?"":String(r)}return t});return{headers:n,rows:s,errors:i}}(yield r.text());if(e.errors.length>0)return this.$emit("csv-parse-error",{errors:e.errors,fileName:r.name}),v.warn("CSV parse errors:",e.errors),void this.clearCsvFileInput();if(0===e.rows.length)return this.$emit("csv-parse-error",{errors:["CSV file contains no data rows"],fileName:r.name}),void this.clearCsvFileInput();const{mappedRows:t,unmappedColumns:i}=function(e,t,o){var r,i;if(!(null==t?void 0:t.properties)||0===e.length)return{mappedRows:[],unmappedColumns:[]};const a=Object.keys(t.properties),n=new Map;if(o){const e=_t(o);for(const{fieldName:o,label:r}of e)r&&r.trim()&&t.properties[o]&&n.set(r.trim().toLowerCase(),o)}const s=new Map,l=[];if(e.length>0){const t=Object.keys(null!==(r=e[0])&&void 0!==r?r:{});for(const e of t){const t=e.toUpperCase();let r=a.find(e=>e.toUpperCase()===t);!r&&o&&(r=null!==(i=n.get(e.trim().toLowerCase()))&&void 0!==i?i:void 0),r?s.set(e,r):l.push(e)}}const d=e.map(e=>{var o;const r={};for(const[i,a]of s){const n=e[i],s=null===(o=t.properties)||void 0===o?void 0:o[a];r[a]=Tt(n,s)}return r});return{mappedRows:d,unmappedColumns:l}}(e.rows,this.originalDetailsSchema,this.uischema);if(0===t.length)return this.$emit("csv-parse-error",{errors:["No CSV columns could be matched to form fields"],fileName:r.name}),void this.clearCsvFileInput();const a=(null===(o=this.data)||void 0===o?void 0:o.items)||[];let n=t;if(void 0!==this.bulkInsertMaxItems){const e=this.bulkInsertMaxItems-a.length;if(e<=0)return this.$emit("csv-parse-error",{errors:[`Maximum of ${this.bulkInsertMaxItems} items already reached`],fileName:r.name}),void this.clearCsvFileInput();t.length>e&&(n=t.slice(0,e),v.warn(`Truncated CSV import from ${t.length} to ${e} rows due to max items limit`))}this.data={items:[...a,...n]},this.$emit("csv-imported",{rowCount:n.length,totalRowsInFile:t.length,unmappedColumns:i,fileName:r.name}),v.debug("CSV imported successfully",{rowCount:n.length,unmappedColumns:i})}catch(e){this.$emit("csv-parse-error",{errors:[`Failed to read CSV file: ${String(e)}`],fileName:r.name}),v.error("CSV import error:",e)}this.clearCsvFileInput()}})}clearCsvFileInput(){this.csvFileInput&&(this.csvFileInput.value="")}downloadCsvTemplate(){if(!this.originalDetailsSchema)return v.warn("Cannot download CSV template: schema not available"),void this.$emit("csv-template-error",{error:"Schema not available"});const e=function(e,t,o=!0,r=!0){if(!(null==e?void 0:e.properties))return"";const i=new Set(e.required||[]),a=[],n=[],s=t?_t(t):null;if(s&&s.length>0)for(const{fieldName:t,label:o,isHidden:r}of s){if(r)continue;const s=e.properties[t];if(!s)continue;a.push(o&&o.trim()?o.trim():t);const l=Dt(t,s,i.has(t));n.push(Nt(l))}else for(const[t,r]of Object.entries(e.properties)){const e=i.has(t);if(!o&&!e)continue;a.push(t);const s=Dt(t,r,e);n.push(Nt(s))}if(0===a.length)return"";const l=`${a.map(e=>Nt(e)).join(",")}\n${n.join(",")}`;return r?"\ufeff"+l:l}(this.originalDetailsSchema,this.uischema);if(!e)return v.warn("Cannot download CSV template: no fields in schema"),void this.$emit("csv-template-error",{error:"No fields found in schema"});const t=`${this.resourceName?this.resourceName.replace(/^EVENT_/,"").toLowerCase():"bulk_insert"}_template.csv`;!function(e,t="template.csv"){const o=new Blob([e],{type:"text/csv;charset=utf-8;"}),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=t,i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}(e,t),this.$emit("csv-template-downloaded",{fileName:t}),v.debug("CSV template downloaded:",t)}};(0,r.Cg)([(0,d.attr)({attribute:"design-system-prefix"})],Bt.prototype,"prefix",void 0),(0,r.Cg)([d.attr],Bt.prototype,"resourceName",void 0),(0,r.Cg)([(0,d.attr)({attribute:"confirmation-message"})],Bt.prototype,"confirmationMessage",void 0),(0,r.Cg)([(0,d.attr)({attribute:"set-approval-message",mode:"boolean"})],Bt.prototype,"setApprovalMessage",void 0),(0,r.Cg)([(0,d.attr)({attribute:"approval-message-label"})],Bt.prototype,"approvalMessageLabel",void 0),(0,r.Cg)([d.observable],Bt.prototype,"serverFieldErrors",void 0),(0,r.Cg)([d.observable],Bt.prototype,"approvalMessage",void 0),(0,r.Cg)([d.observable],Bt.prototype,"uischema",void 0),(0,r.Cg)([d.observable],Bt.prototype,"renderers",void 0),(0,r.Cg)([d.observable],Bt.prototype,"additionalRenderers",void 0),(0,r.Cg)([d.observable],Bt.prototype,"mergedRenderers",void 0),(0,r.Cg)([d.observable],Bt.prototype,"jsonSchema",void 0),(0,r.Cg)([i.dm],Bt.prototype,"connect",void 0),(0,r.Cg)([d.observable],Bt.prototype,"data",void 0),(0,r.Cg)([d.observable],Bt.prototype,"submitting",void 0),(0,r.Cg)([d.observable],Bt.prototype,"submitted",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean"})],Bt.prototype,"readonly",void 0),(0,r.Cg)([(0,d.attr)({attribute:"hide-submit-button",mode:"boolean"})],Bt.prototype,"hideSubmit",void 0),(0,r.Cg)([(0,d.attr)({attribute:"show-reset-button",mode:"boolean"})],Bt.prototype,"showReset",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert",mode:"boolean"})],Bt.prototype,"bulkInsert",void 0),(0,r.Cg)([(0,d.attr)({attribute:"submit-button-text"})],Bt.prototype,"submitButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-submit-button-text"})],Bt.prototype,"bulkSubmitButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"reset-button-text"})],Bt.prototype,"resetButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert-min-items",converter:{fromView:e=>parseInt(e,10)||1,toView:e=>String(e)}})],Bt.prototype,"bulkInsertMinItems",void 0),(0,r.Cg)([(0,d.attr)({attribute:"bulk-insert-max-items",converter:{fromView:e=>e?parseInt(e,10):void 0,toView:e=>void 0!==e?String(e):""}})],Bt.prototype,"bulkInsertMaxItems",void 0),(0,r.Cg)([(0,d.attr)({attribute:"show-submit-review",mode:"boolean"})],Bt.prototype,"showSubmitReview",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-button-text"})],Bt.prototype,"reviewButtonText",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-heading"})],Bt.prototype,"reviewHeading",void 0),(0,r.Cg)([(0,d.attr)({attribute:"review-id-field"})],Bt.prototype,"reviewIdField",void 0),(0,r.Cg)([d.observable],Bt.prototype,"rowSubmitStatuses",void 0),(0,r.Cg)([d.observable],Bt.prototype,"reviewMode",void 0),(0,r.Cg)([d.observable],Bt.prototype,"reviewSections",void 0),(0,r.Cg)([d.volatile],Bt.prototype,"isSubmitHidden",null),(0,r.Cg)([d.volatile],Bt.prototype,"isResetVisible",null),Bt=(0,r.Cg)([(0,d.customElement)({name:"foundation-form",template:Re,styles:I,shadowOptions:null})],Bt);const Ht=Symbol("component-type"),Yt=Symbol("component-instance"),Gt="foundation-layout-autosave",Vt="f-layout-key",Wt="36px",Zt=()=>{const e=(0,le.designTokensMap)();if(!e.value)return Wt;const{style:t,space:o}=e.value.design_tokens;return(t.baseHeightMultiplier.$value+t.density.$value)*o.designUnit.$value-4+"px"},qt=()=>{const e=(0,le.selectCustomToken)("rapid","layout","item","border","width");if(!(null==e?void 0:e.$value))return 0;const t=parseFloat(String(e.$value));return Number.isNaN(t)?0:t};class Xt extends Error{constructor(e){super(e)}}class Jt extends Error{constructor(e){super(e)}}const Qt="first-loaded",Kt="item-added",eo="item-removed",to="item-resized",oo="state-changed",ro="change-title",io="autosave",ao=(0,h.createLogger)("foundation-layout");const no=new Map;function so(e){return no.get(e)}function lo(){const e=this.parentElement;switch(e[Ht]){case"root":case"horizontal":case"vertical":case"tabs":return e;default:throw new Xt("Using layout region outside of layout root")}}const co=e=>({horizontal:"column",vertical:"row",tabs:"stack"}[e]),po=d.html`
|
|
1608
1609
|
<template>
|
|
1609
1610
|
<slot class="target"></slot>
|
|
1610
1611
|
</template>
|
|
1611
|
-
`,po=["horizontal","vertical","tabs"];var uo;class mo extends c.FoundationElement{constructor(){super(...arguments),this.closable=!1,this[uo]="item"}connectedCallback(){var e;let t;super.connectedCallback();const o=no(this.registration);if(this.slottedElements=this.shadowRoot.querySelector("slot.target").assignedElements(),o&&this.slottedElements.length>0)throw new qt(`Cannot use both factory registration and slotted content for registration "${this.registration}". Either register a factory via registerFactory() OR provide slotted content, but not both.`);t=o?this.cacheElementsAndRegister({factory:o,id:this.registration}):this.cacheElementsAndRegister({elements:this.slottedElements,id:this.registration});const r={type:"component",componentType:t,title:null!==(e=this.title)&&void 0!==e?e:`Item ${t}`,reorderEnabled:!0,isClosable:this.closable,size:this.size};this.getParentLayoutComponent().addItemFromChild(r),this.requestLayoutReload()}getParentLayoutComponent(){return so.apply(this)}requestLayoutReload(){this.getParentLayoutComponent().requestLayoutReload()}cacheElementsAndRegister(e){return this.getParentLayoutComponent().cacheElementsAndRegister(e)}}uo=Bt,(0,r.Cg)([d.attr],mo.prototype,"title",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean"})],mo.prototype,"closable",void 0),(0,r.Cg)([d.attr],mo.prototype,"size",void 0),(0,r.Cg)([d.attr],mo.prototype,"registration",void 0);const ho=mo.compose({baseName:"layout-item",template:co});var vo;const go=po[0];class bo extends c.FoundationElement{constructor(){super(...arguments),this.type=go,this[vo]="horizontal"}connectedCallback(){super.connectedCallback(),po.includes(this.type)||(this.type=go,io.warn(`Using invalid attribute "type", defaulting to ${go}`)),this[Bt]=this.type,this.setupLayoutRegion()}setupLayoutRegion(){this.layoutConfig=this.getParentLayoutComponent().addItemFromChild(this.constructLayoutConfig())}constructLayoutConfig(){return{type:lo(this[Bt]),content:[],size:this.size}}getParentLayoutComponent(){return so.apply(this)}addItemFromChild(e){return this.layoutConfig.content.push(e),this.layoutConfig.content[this.layoutConfig.content.length-1]}requestLayoutReload(){this.getParentLayoutComponent().requestLayoutReload()}cacheElementsAndRegister(e){return this.getParentLayoutComponent().cacheElementsAndRegister(e)}}vo=Bt,(0,r.Cg)([d.attr],bo.prototype,"size",void 0),(0,r.Cg)([d.attr],bo.prototype,"type",void 0);const yo=bo.compose({baseName:"layout-region",template:co});var fo=o(37619),$o=o(34814),wo=o(79271),xo=o(98316),So=o(32808);const Co="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMTQ0IDMyaC0xMjhDNy4xNTYgMzIgMCAzOS4xNiAwIDQ4djEyOEMwIDE4NC44IDcuMTU2IDE5MiAxNiAxOTJTMzIgMTg0LjggMzIgMTc2VjY0aDExMkMxNTIuOCA2NCAxNjAgNTYuODQgMTYwIDQ4UzE1Mi44IDMyIDE0NCAzMnpNMTQ0IDQ0OEgzMnYtMTEyQzMyIDMyNy4yIDI0Ljg0IDMyMCAxNiAzMjBTMCAzMjcuMiAwIDMzNnYxMjhDMCA0NzIuOCA3LjE1NiA0ODAgMTYgNDgwaDEyOEMxNTIuOCA0ODAgMTYwIDQ3Mi44IDE2MCA0NjRTMTUyLjggNDQ4IDE0NCA0NDh6TTQzMiAzMjBjLTguODQ0IDAtMTYgNy4xNTYtMTYgMTZWNDQ4aC0xMTJjLTguODQ0IDAtMTYgNy4xNTYtMTYgMTZzNy4xNTYgMTYgMTYgMTZoMTI4YzguODQ0IDAgMTYtNy4xNTYgMTYtMTZ2LTEyOEM0NDggMzI3LjIgNDQwLjggMzIwIDQzMiAzMjB6TTQzMiAzMmgtMTI4QzI5NS4yIDMyIDI4OCAzOS4xNiAyODggNDhTMjk1LjIgNjQgMzA0IDY0SDQxNnYxMTJDNDE2IDE4NC44IDQyMy4yIDE5MiA0MzIgMTkyUzQ0OCAxODQuOCA0NDggMTc2di0xMjhDNDQ4IDM5LjE2IDQ0MC44IDMyIDQzMiAzMnoiIGZpbGw9IiM4NzliYTYiLz48L3N2Zz4=",Ao="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMCA0NjRDMCA0NTUuMiA3LjE2NCA0NDggMTYgNDQ4SDQ5NkM1MDQuOCA0NDggNTEyIDQ1NS4yIDUxMiA0NjRDNTEyIDQ3Mi44IDUwNC44IDQ4MCA0OTYgNDgwSDE2QzcuMTY0IDQ4MCAwIDQ3Mi44IDAgNDY0eiIgZmlsbD0iIzg3OWJhNiIvPjwvc3ZnPg==",Io="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMjAgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMzE1LjMgNDExLjNjLTYuMjUzIDYuMjUzLTE2LjM3IDYuMjUzLTIyLjYzIDBMMTYwIDI3OC42bC0xMzIuNyAxMzIuN2MtNi4yNTMgNi4yNTMtMTYuMzcgNi4yNTMtMjIuNjMgMGMtNi4yNTMtNi4yNTMtNi4yNTMtMTYuMzcgMC0yMi42M0wxMzcuNCAyNTZMNC42OSAxMjMuM2MtNi4yNTMtNi4yNTMtNi4yNTMtMTYuMzcgMC0yMi42M2M2LjI1My02LjI1MyAxNi4zNy02LjI1MyAyMi42MyAwTDE2MCAyMzMuNGwxMzIuNy0xMzIuN2M2LjI1My02LjI1MyAxNi4zNy02LjI1MyAyMi42MyAwYzYuMjUzIDYuMjUzIDYuMjUzIDE2LjM3IDAgMjIuNjNMMTgyLjYgMjU2bDEzMi43IDEzMi43QzMyMS42IDM5NC45IDMyMS42IDQwNS4xIDMxNS4zIDQxMS4zeiIgZmlsbD0iIzg3OWJhNiIvPjwvc3ZnPg==",ko="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNC4yNTEgMTgxLjFDNy4zOTIgMTc3LjcgMTEuNjkgMTc1LjEgMTYgMTc1LjFjMy44OTEgMCA3Ljc4MSAxLjQwNiAxMC44NiA0LjI1bDE5Ny4xIDE4MS4xbDE5Ny4xLTE4MS4xYzYuNS02IDE2LjY0LTUuNjI1IDIyLjYxIC45MDYyYzYgNi41IDUuNTk0IDE2LjU5LS44OTA2IDIyLjU5bC0yMDggMTkyYy02LjE1NiA1LjY4OC0xNS41NiA1LjY4OC0yMS43MiAwbC0yMDgtMTkyQy0xLjM0MyAxOTcuNy0xLjc0OSAxODcuNiA0LjI1MSAxODEuMXoiIGZpbGw9IiM4NzliYTYiLz48L3N2Zz4=",Mo="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAwIiBoZWlnaHQ9IjEwMDAiIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDApIi8+IDxnIHRyYW5zZm9ybT0ibWF0cml4KDEuNDY5MiAwIDAgMS40NjkyIDQ5OS45OTA2IDQ5OS45OTA2KSIgaWQ9IjE3OTM0MSI+IDxnIHN0eWxlPSIiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSI+IDxnIHRyYW5zZm9ybT0ibWF0cml4KDIyLjIyMjIgMCAwIDIyLjIyMjIgLTQ0LjQ0NDcgNDQuNDQ0MSkiPiA8cGF0aCBzdHlsZT0ic3Ryb2tlOiBub25lOyBzdHJva2Utd2lkdGg6IDE7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGlzLWN1c3RvbS1mb250OiBub25lOyBmb250LWZpbGUtdXJsOiBub25lOyBmaWxsOiByZ2IoMTA5LDEyNywxMzgpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTE2LCAtMjApIiBkPSJNIDI3IDMzIEggNSBhIDIgMiAwIDAgMSAtMiAtMiBWIDkgQSAyIDIgMCAwIDEgNSA3IEggMTUgViA5IEggNSBWIDMxIEggMjcgViAyMSBoIDIgViAzMSBBIDIgMiAwIDAgMSAyNyAzMyBaIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4gPC9nPiA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgyMi4yMjIyIDAgMCAyMi4yMjIyIDEzNy42NzEyIC0xMzcuNjcxNSkiPiA8cGF0aCBzdHlsZT0ic3Ryb2tlOiBub25lOyBzdHJva2Utd2lkdGg6IDE7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGlzLWN1c3RvbS1mb250OiBub25lOyBmb250LWZpbGUtdXJsOiBub25lOyBmaWxsOiByZ2IoMTA5LDEyNywxMzgpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTI0LjE5NTIsIC0xMS44MDQ4KSIgZD0iTSAxOCAzIGEgMSAxIDAgMCAwIDAgMiBIIDI5LjU5IEwgMTUuNzQgMTguODUgYSAxIDEgMCAxIDAgMS40MSAxLjQxIEwgMzEgNi40MSBWIDE4IGEgMSAxIDAgMCAwIDIgMCBWIDMgWiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+IDwvZz4gPGcgdHJhbnNmb3JtPSJtYXRyaXgoMjIuMjIyMiAwIDAgMjIuMjIyMiAtMC4wMDA0IC0wLjAwMDQpIj4gPHJlY3Qgc3R5bGU9InN0cm9rZTogbm9uZTsgc3Ryb2tlLXdpZHRoOiAxOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBpcy1jdXN0b20tZm9udDogbm9uZTsgZm9udC1maWxlLXVybDogbm9uZTsgZmlsbDogcmdiKDAsMCwwKTsgZmlsbC1vcGFjaXR5OiAwOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB4PSItMTgiIHk9Ii0xOCIgcng9IjAiIHJ5PSIwIiB3aWR0aD0iMzYiIGhlaWdodD0iMzYiLz4gPC9nPiA8L2c+IDwvZz4gPC9zdmc+Cg==",Lo=`\n .lm_dragProxy .lm_content {\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);\n }\n .lm_dropTargetIndicator {\n outline: 1px dashed #cccccc;\n transition: all 200ms ease;\n }\n .lm_dropTargetIndicator .lm_inner {\n background: var(${p.neutralFillStealthRest.cssCustomProperty});\n opacity: 0.2;\n }\n .lm_dragProxy.lm_left .lm_header,\n .lm_dragProxy.lm_right .lm_header {\n width: 20px;\n float: left;\n vertical-align: top;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform-origin: left top;\n top: 0;\n width: 1000px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_controls,\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n bottom: 0;\n }\n .lm_dragProxy.lm_left .lm_items,\n .lm_dragProxy.lm_right .lm_items {\n float: left;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs {\n transform: rotate(-90deg) scaleX(-1);\n left: 0;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab {\n transform: scaleX(-1);\n margin-top: 1px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list {\n top: initial;\n right: initial;\n left: 20px;\n }\n .lm_dragProxy.lm_right .lm_content {\n float: left;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform: rotate(90deg) scaleX(1);\n left: 100%;\n margin-left: 0;\n }\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n left: 3px;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list {\n top: initial;\n right: 20px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tab {\n margin-top: 0;\n border-top: none;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_controls,\n .lm_stack.lm_bottom .lm_header .lm_controls {\n top: 3px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {\n top: initial;\n bottom: 20px;\n }\n .lm_dragProxy {\n cursor: move;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 30;\n }\n .lm_dragProxy .lm_header {\n background: transparent;\n }\n .lm_dragProxy .lm_title {\n color: white;\n padding-left: 10px;\n }\n .lm_dragProxy .lm_content {\n border-top: none;\n overflow: hidden;\n }\n .lm_dropTargetIndicator {\n display: none;\n position: absolute;\n z-index: 20;\n }\n .lm_dropTargetIndicator .lm_inner {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n .lm_transition_indicator {\n display: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n }\n`,Eo=d.css`
|
|
1612
|
+
`,uo=["horizontal","vertical","tabs"];var mo;class ho extends c.FoundationElement{constructor(){super(...arguments),this.closable=!1,this[mo]="item"}connectedCallback(){var e;let t;super.connectedCallback();const o=so(this.registration);if(this.slottedElements=this.shadowRoot.querySelector("slot.target").assignedElements(),o&&this.slottedElements.length>0)throw new Xt(`Cannot use both factory registration and slotted content for registration "${this.registration}". Either register a factory via registerFactory() OR provide slotted content, but not both.`);t=o?this.cacheElementsAndRegister({factory:o,id:this.registration}):this.cacheElementsAndRegister({elements:this.slottedElements,id:this.registration});const r={type:"component",componentType:t,title:null!==(e=this.title)&&void 0!==e?e:`Item ${t}`,reorderEnabled:!0,isClosable:this.closable,size:this.size};this.getParentLayoutComponent().addItemFromChild(r),this.requestLayoutReload()}getParentLayoutComponent(){return lo.apply(this)}requestLayoutReload(){this.getParentLayoutComponent().requestLayoutReload()}cacheElementsAndRegister(e){return this.getParentLayoutComponent().cacheElementsAndRegister(e)}}mo=Ht,(0,r.Cg)([d.attr],ho.prototype,"title",void 0),(0,r.Cg)([(0,d.attr)({mode:"boolean"})],ho.prototype,"closable",void 0),(0,r.Cg)([d.attr],ho.prototype,"size",void 0),(0,r.Cg)([d.attr],ho.prototype,"registration",void 0);const vo=ho.compose({baseName:"layout-item",template:po});var go;const bo=uo[0];class yo extends c.FoundationElement{constructor(){super(...arguments),this.type=bo,this[go]="horizontal"}connectedCallback(){super.connectedCallback(),uo.includes(this.type)||(this.type=bo,ao.warn(`Using invalid attribute "type", defaulting to ${bo}`)),this[Ht]=this.type,this.setupLayoutRegion()}setupLayoutRegion(){this.layoutConfig=this.getParentLayoutComponent().addItemFromChild(this.constructLayoutConfig())}constructLayoutConfig(){return{type:co(this[Ht]),content:[],size:this.size}}getParentLayoutComponent(){return lo.apply(this)}addItemFromChild(e){return this.layoutConfig.content.push(e),this.layoutConfig.content[this.layoutConfig.content.length-1]}requestLayoutReload(){this.getParentLayoutComponent().requestLayoutReload()}cacheElementsAndRegister(e){return this.getParentLayoutComponent().cacheElementsAndRegister(e)}}go=Ht,(0,r.Cg)([d.attr],yo.prototype,"size",void 0),(0,r.Cg)([d.attr],yo.prototype,"type",void 0);const fo=yo.compose({baseName:"layout-region",template:po});var $o=o(37619),wo=o(34814),xo=o(79271),So=o(98316),Co=o(32808);const Ao="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMTQ0IDMyaC0xMjhDNy4xNTYgMzIgMCAzOS4xNiAwIDQ4djEyOEMwIDE4NC44IDcuMTU2IDE5MiAxNiAxOTJTMzIgMTg0LjggMzIgMTc2VjY0aDExMkMxNTIuOCA2NCAxNjAgNTYuODQgMTYwIDQ4UzE1Mi44IDMyIDE0NCAzMnpNMTQ0IDQ0OEgzMnYtMTEyQzMyIDMyNy4yIDI0Ljg0IDMyMCAxNiAzMjBTMCAzMjcuMiAwIDMzNnYxMjhDMCA0NzIuOCA3LjE1NiA0ODAgMTYgNDgwaDEyOEMxNTIuOCA0ODAgMTYwIDQ3Mi44IDE2MCA0NjRTMTUyLjggNDQ4IDE0NCA0NDh6TTQzMiAzMjBjLTguODQ0IDAtMTYgNy4xNTYtMTYgMTZWNDQ4aC0xMTJjLTguODQ0IDAtMTYgNy4xNTYtMTYgMTZzNy4xNTYgMTYgMTYgMTZoMTI4YzguODQ0IDAgMTYtNy4xNTYgMTYtMTZ2LTEyOEM0NDggMzI3LjIgNDQwLjggMzIwIDQzMiAzMjB6TTQzMiAzMmgtMTI4QzI5NS4yIDMyIDI4OCAzOS4xNiAyODggNDhTMjk1LjIgNjQgMzA0IDY0SDQxNnYxMTJDNDE2IDE4NC44IDQyMy4yIDE5MiA0MzIgMTkyUzQ0OCAxODQuOCA0NDggMTc2di0xMjhDNDQ4IDM5LjE2IDQ0MC44IDMyIDQzMiAzMnoiIGZpbGw9IiM4NzliYTYiLz48L3N2Zz4=",Io="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMCA0NjRDMCA0NTUuMiA3LjE2NCA0NDggMTYgNDQ4SDQ5NkM1MDQuOCA0NDggNTEyIDQ1NS4yIDUxMiA0NjRDNTEyIDQ3Mi44IDUwNC44IDQ4MCA0OTYgNDgwSDE2QzcuMTY0IDQ4MCAwIDQ3Mi44IDAgNDY0eiIgZmlsbD0iIzg3OWJhNiIvPjwvc3ZnPg==",ko="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMjAgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMzE1LjMgNDExLjNjLTYuMjUzIDYuMjUzLTE2LjM3IDYuMjUzLTIyLjYzIDBMMTYwIDI3OC42bC0xMzIuNyAxMzIuN2MtNi4yNTMgNi4yNTMtMTYuMzcgNi4yNTMtMjIuNjMgMGMtNi4yNTMtNi4yNTMtNi4yNTMtMTYuMzcgMC0yMi42M0wxMzcuNCAyNTZMNC42OSAxMjMuM2MtNi4yNTMtNi4yNTMtNi4yNTMtMTYuMzcgMC0yMi42M2M2LjI1My02LjI1MyAxNi4zNy02LjI1MyAyMi42MyAwTDE2MCAyMzMuNGwxMzIuNy0xMzIuN2M2LjI1My02LjI1MyAxNi4zNy02LjI1MyAyMi42MyAwYzYuMjUzIDYuMjUzIDYuMjUzIDE2LjM3IDAgMjIuNjNMMTgyLjYgMjU2bDEzMi43IDEzMi43QzMyMS42IDM5NC45IDMyMS42IDQwNS4xIDMxNS4zIDQxMS4zeiIgZmlsbD0iIzg3OWJhNiIvPjwvc3ZnPg==",Mo="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMi4wIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNNC4yNTEgMTgxLjFDNy4zOTIgMTc3LjcgMTEuNjkgMTc1LjEgMTYgMTc1LjFjMy44OTEgMCA3Ljc4MSAxLjQwNiAxMC44NiA0LjI1bDE5Ny4xIDE4MS4xbDE5Ny4xLTE4MS4xYzYuNS02IDE2LjY0LTUuNjI1IDIyLjYxIC45MDYyYzYgNi41IDUuNTk0IDE2LjU5LS44OTA2IDIyLjU5bC0yMDggMTkyYy02LjE1NiA1LjY4OC0xNS41NiA1LjY4OC0yMS43MiAwbC0yMDgtMTkyQy0xLjM0MyAxOTcuNy0xLjc0OSAxODcuNiA0LjI1MSAxODEuMXoiIGZpbGw9IiM4NzliYTYiLz48L3N2Zz4=",Lo="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAwIiBoZWlnaHQ9IjEwMDAiIHZpZXdCb3g9IjAgMCAxMDAwIDEwMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDApIi8+IDxnIHRyYW5zZm9ybT0ibWF0cml4KDEuNDY5MiAwIDAgMS40NjkyIDQ5OS45OTA2IDQ5OS45OTA2KSIgaWQ9IjE3OTM0MSI+IDxnIHN0eWxlPSIiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSI+IDxnIHRyYW5zZm9ybT0ibWF0cml4KDIyLjIyMjIgMCAwIDIyLjIyMjIgLTQ0LjQ0NDcgNDQuNDQ0MSkiPiA8cGF0aCBzdHlsZT0ic3Ryb2tlOiBub25lOyBzdHJva2Utd2lkdGg6IDE7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGlzLWN1c3RvbS1mb250OiBub25lOyBmb250LWZpbGUtdXJsOiBub25lOyBmaWxsOiByZ2IoMTA5LDEyNywxMzgpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTE2LCAtMjApIiBkPSJNIDI3IDMzIEggNSBhIDIgMiAwIDAgMSAtMiAtMiBWIDkgQSAyIDIgMCAwIDEgNSA3IEggMTUgViA5IEggNSBWIDMxIEggMjcgViAyMSBoIDIgViAzMSBBIDIgMiAwIDAgMSAyNyAzMyBaIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4gPC9nPiA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgyMi4yMjIyIDAgMCAyMi4yMjIyIDEzNy42NzEyIC0xMzcuNjcxNSkiPiA8cGF0aCBzdHlsZT0ic3Ryb2tlOiBub25lOyBzdHJva2Utd2lkdGg6IDE7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGlzLWN1c3RvbS1mb250OiBub25lOyBmb250LWZpbGUtdXJsOiBub25lOyBmaWxsOiByZ2IoMTA5LDEyNywxMzgpOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB0cmFuc2Zvcm09IiB0cmFuc2xhdGUoLTI0LjE5NTIsIC0xMS44MDQ4KSIgZD0iTSAxOCAzIGEgMSAxIDAgMCAwIDAgMiBIIDI5LjU5IEwgMTUuNzQgMTguODUgYSAxIDEgMCAxIDAgMS40MSAxLjQxIEwgMzEgNi40MSBWIDE4IGEgMSAxIDAgMCAwIDIgMCBWIDMgWiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+IDwvZz4gPGcgdHJhbnNmb3JtPSJtYXRyaXgoMjIuMjIyMiAwIDAgMjIuMjIyMiAtMC4wMDA0IC0wLjAwMDQpIj4gPHJlY3Qgc3R5bGU9InN0cm9rZTogbm9uZTsgc3Ryb2tlLXdpZHRoOiAxOyBzdHJva2UtZGFzaGFycmF5OiBub25lOyBzdHJva2UtbGluZWNhcDogYnV0dDsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7IHN0cm9rZS1saW5lam9pbjogbWl0ZXI7IHN0cm9rZS1taXRlcmxpbWl0OiA0OyBpcy1jdXN0b20tZm9udDogbm9uZTsgZm9udC1maWxlLXVybDogbm9uZTsgZmlsbDogcmdiKDAsMCwwKTsgZmlsbC1vcGFjaXR5OiAwOyBmaWxsLXJ1bGU6IG5vbnplcm87IG9wYWNpdHk6IDE7IiB4PSItMTgiIHk9Ii0xOCIgcng9IjAiIHJ5PSIwIiB3aWR0aD0iMzYiIGhlaWdodD0iMzYiLz4gPC9nPiA8L2c+IDwvZz4gPC9zdmc+Cg==",Eo=`\n .lm_dragProxy .lm_content {\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);\n }\n .lm_dropTargetIndicator {\n outline: 1px dashed #cccccc;\n transition: all 200ms ease;\n }\n .lm_dropTargetIndicator .lm_inner {\n background: var(${p.neutralFillStealthRest.cssCustomProperty});\n opacity: 0.2;\n }\n .lm_dragProxy.lm_left .lm_header,\n .lm_dragProxy.lm_right .lm_header {\n width: 20px;\n float: left;\n vertical-align: top;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs,\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform-origin: left top;\n top: 0;\n width: 1000px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_controls,\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n bottom: 0;\n }\n .lm_dragProxy.lm_left .lm_items,\n .lm_dragProxy.lm_right .lm_items {\n float: left;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs {\n transform: rotate(-90deg) scaleX(-1);\n left: 0;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabs .lm_tab {\n transform: scaleX(-1);\n margin-top: 1px;\n }\n .lm_dragProxy.lm_left .lm_header .lm_tabdropdown_list {\n top: initial;\n right: initial;\n left: 20px;\n }\n .lm_dragProxy.lm_right .lm_content {\n float: left;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabs {\n transform: rotate(90deg) scaleX(1);\n left: 100%;\n margin-left: 0;\n }\n .lm_dragProxy.lm_right .lm_header .lm_controls {\n left: 3px;\n }\n .lm_dragProxy.lm_right .lm_header .lm_tabdropdown_list {\n top: initial;\n right: 20px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tab {\n margin-top: 0;\n border-top: none;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_controls,\n .lm_stack.lm_bottom .lm_header .lm_controls {\n top: 3px;\n }\n .lm_dragProxy.lm_bottom .lm_header .lm_tabdropdown_list,\n .lm_stack.lm_bottom .lm_header .lm_tabdropdown_list {\n top: initial;\n bottom: 20px;\n }\n .lm_dragProxy {\n cursor: move;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 30;\n }\n .lm_dragProxy .lm_header {\n background: transparent;\n }\n .lm_dragProxy .lm_title {\n color: white;\n padding-left: 10px;\n }\n .lm_dragProxy .lm_content {\n border-top: none;\n overflow: hidden;\n }\n .lm_dropTargetIndicator {\n display: none;\n position: absolute;\n z-index: 20;\n }\n .lm_dropTargetIndicator .lm_inner {\n width: 100%;\n height: 100%;\n position: relative;\n top: 0;\n left: 0;\n }\n .lm_transition_indicator {\n display: none;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 20;\n }\n`,To=d.css`
|
|
1612
1613
|
* {
|
|
1613
1614
|
--spinner-size: 50px;
|
|
1614
1615
|
}
|
|
@@ -1676,9 +1677,9 @@
|
|
|
1676
1677
|
left: calc(50% - (calc(var(--spinner-size) / 2)));
|
|
1677
1678
|
top: calc(50% - (calc(var(--spinner-size) / 2)));
|
|
1678
1679
|
}
|
|
1679
|
-
`,
|
|
1680
|
+
`,Ro=d.css`
|
|
1680
1681
|
${"\n :host {\n display: block;\n position: relative;\n height: 100%;\n width: 100%;\n }\n .layout-container {\n position: absolute;\n height: 100%;\n width: 100%;\n }\n"}
|
|
1681
|
-
${
|
|
1682
|
+
${To}
|
|
1682
1683
|
|
|
1683
1684
|
:host {
|
|
1684
1685
|
--foundation-tab-height: calc(
|
|
@@ -1749,7 +1750,7 @@
|
|
|
1749
1750
|
font-family: inherit;
|
|
1750
1751
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
1751
1752
|
font-weight: 400;
|
|
1752
|
-
height: var(--foundation-tab-height, ${
|
|
1753
|
+
height: var(--foundation-tab-height, ${Wt});
|
|
1753
1754
|
margin-right: 2px;
|
|
1754
1755
|
padding: 0 calc((12 + var(--design-unit) * 2 * var(--density)) * 1px);
|
|
1755
1756
|
float: left;
|
|
@@ -1767,11 +1768,11 @@
|
|
|
1767
1768
|
display: flex;
|
|
1768
1769
|
}
|
|
1769
1770
|
.lm_header .lm_controls > * {
|
|
1770
|
-
width: calc(var(--foundation-tab-height, ${
|
|
1771
|
-
height: calc(var(--foundation-tab-height, ${
|
|
1771
|
+
width: calc(var(--foundation-tab-height, ${Wt}) - 8px);
|
|
1772
|
+
height: calc(var(--foundation-tab-height, ${Wt}) - 8px);
|
|
1772
1773
|
background-repeat: no-repeat;
|
|
1773
1774
|
background-position: center;
|
|
1774
|
-
background-size: calc(var(--foundation-tab-height, ${
|
|
1775
|
+
background-size: calc(var(--foundation-tab-height, ${Wt}) * 0.45);
|
|
1775
1776
|
background-color: var(
|
|
1776
1777
|
--icon-button-background,
|
|
1777
1778
|
color-mix(in srgb, var(--neutral-fill-strong-rest), transparent 90%)
|
|
@@ -1787,17 +1788,17 @@
|
|
|
1787
1788
|
}
|
|
1788
1789
|
|
|
1789
1790
|
.lm_controls .lm_maximise {
|
|
1790
|
-
background-image: url('${
|
|
1791
|
+
background-image: url('${Ao}');
|
|
1791
1792
|
}
|
|
1792
1793
|
.lm_maximised .lm_controls .lm_maximise {
|
|
1793
|
-
background-image: url('${
|
|
1794
|
+
background-image: url('${Io}');
|
|
1794
1795
|
}
|
|
1795
1796
|
.lm_controls .lm_close {
|
|
1796
|
-
background-image: url('${
|
|
1797
|
+
background-image: url('${ko}');
|
|
1797
1798
|
}
|
|
1798
1799
|
.lm_header .lm_tab .lm_close_tab {
|
|
1799
|
-
background-image: url('${
|
|
1800
|
-
background-size: calc(var(--foundation-tab-height, ${
|
|
1800
|
+
background-image: url('${ko}');
|
|
1801
|
+
background-size: calc(var(--foundation-tab-height, ${Wt}) * 0.2777);
|
|
1801
1802
|
background-repeat: no-repeat;
|
|
1802
1803
|
background-position: center;
|
|
1803
1804
|
margin-left: calc((12 + var(--design-unit) * 2 * var(--density)) * 1px);
|
|
@@ -1812,10 +1813,10 @@
|
|
|
1812
1813
|
content: none;
|
|
1813
1814
|
}
|
|
1814
1815
|
.lm_header .lm_controls .lm_tabdropdown {
|
|
1815
|
-
background-image: url('${
|
|
1816
|
+
background-image: url('${Mo}');
|
|
1816
1817
|
}
|
|
1817
1818
|
.lm_header .lm_tabdropdown_list {
|
|
1818
|
-
top: var(--foundation-tab-height, ${
|
|
1819
|
+
top: var(--foundation-tab-height, ${Wt});
|
|
1819
1820
|
right: 108px;
|
|
1820
1821
|
background-color: var(--neutral-layer-3);
|
|
1821
1822
|
border: 1px solid;
|
|
@@ -1829,7 +1830,7 @@
|
|
|
1829
1830
|
white-space: nowrap;
|
|
1830
1831
|
background-color: transparent;
|
|
1831
1832
|
color: var(--neutral-foreground-rest);
|
|
1832
|
-
height: var(--foundation-tab-height, ${
|
|
1833
|
+
height: var(--foundation-tab-height, ${Wt});
|
|
1833
1834
|
border-radius: 0;
|
|
1834
1835
|
overflow: visible;
|
|
1835
1836
|
text-overflow: unset;
|
|
@@ -1935,8 +1936,8 @@
|
|
|
1935
1936
|
user-select: none;
|
|
1936
1937
|
}
|
|
1937
1938
|
.lm_header .lm_tab .lm_close_tab {
|
|
1938
|
-
width: calc(var(--foundation-tab-height, ${
|
|
1939
|
-
height: calc(var(--foundation-tab-height, ${
|
|
1939
|
+
width: calc(var(--foundation-tab-height, ${Wt}) * 0.3888);
|
|
1940
|
+
height: calc(var(--foundation-tab-height, ${Wt}) * 0.3888);
|
|
1940
1941
|
text-align: center;
|
|
1941
1942
|
}
|
|
1942
1943
|
.lm_stack.lm_left .lm_header,
|
|
@@ -2099,9 +2100,9 @@
|
|
|
2099
2100
|
.lm_popin > .lm_icon {
|
|
2100
2101
|
z-index: 20;
|
|
2101
2102
|
} /*# sourceMappingURL=goldenlayout-base.css.map */
|
|
2102
|
-
`;var Ro=o(79780);let _o=class extends d.FASTElement{constructor(){super(...arguments),this.popoutRegistry=new Map}connectedCallback(){super.connectedCallback(),this.layoutKey=new URLSearchParams(window.location.search).get(Gt),this.setupChannel(),this.setupUnloadListener(),this.layoutKey?(this.startPolling(),this.channel.postMessage("popout-handshake",{layoutKey:this.layoutKey})):this.setupListener()}disconnectedCallback(){super.disconnectedCallback(),this.channel&&this.channel.close(),this.stopPolling(),this.teardownUnloadListener(),this.layoutKey||this.closeAllPopouts()}setupChannel(){const e=this.channelName||"f-layout-popout-channel";this.channel=(0,Ro.vp)(e),this.layoutKey&&(this.channel.onmessage=e=>{if(this.channel.isMessageType("popout-sync",e)){const{layoutKey:t,state:o}=e.data.detail;t===this.layoutKey&&void 0!==o&&this.applyStateToParent(o)}})}setupListener(){this.channel&&(this.channel.onmessage=e=>{if(this.channel.isMessageType("popout-update",e)){const{layoutKey:t,geometry:o,state:r}=e.data.detail,i=this.popoutRegistry.get(t);this.popoutRegistry.set(t,Object.assign(Object.assign({},i),{geometry:o,state:r})),this.emitAutosave()}else if(this.channel.isMessageType("popout-closed",e)){const{layoutKey:t}=e.data.detail;this.popoutRegistry.delete(t),this.emitAutosave()}else if(this.channel.isMessageType("popout-handshake",e)){const{layoutKey:t}=e.data.detail,o=this.popoutRegistry.get(t);o&&this.channel.postMessage("popout-sync",{layoutKey:t,geometry:o.geometry,state:o.state})}})}applyStateToParent(e){if(!this.parentLayout)return;const t=this.parentLayout.getLayoutComponents();for(const o of t)for(const t of o)t&&"function"==typeof t.applyState&&t.applyState(e)}setupUnloadListener(){this.unloadHandler=()=>{this.layoutKey?this.channel&&this.channel.postMessage("popout-closed",{layoutKey:this.layoutKey}):this.closeAllPopouts()},window.addEventListener("beforeunload",this.unloadHandler)}teardownUnloadListener(){this.unloadHandler&&(window.removeEventListener("beforeunload",this.unloadHandler),this.unloadHandler=null)}emitAutosave(){this.$emit(ro,void 0,{bubbles:!0,composed:!0})}startPolling(){this.pollInterval=setInterval(()=>(0,r.sH)(this,void 0,void 0,function*(){const e=yield this.getGeometry(),t=this.getComponentState(),o={geometry:e,state:t},r=JSON.stringify(o);r!==this.lastUpdate&&(this.broadcastUpdate(e,t),this.lastUpdate=r)}),1e3)}stopPolling(){this.pollInterval&&clearInterval(this.pollInterval)}getGeometry(){return(0,r.sH)(this,void 0,void 0,function*(){const e=yield(()=>(0,r.sH)(this,void 0,void 0,function*(){var e;if("getScreenDetails"in window)try{return null===(e=(yield window.getScreenDetails()).currentScreen)||void 0===e?void 0:e.label}catch(e){return}}))();return{screenX:window.screenX,screenY:window.screenY,outerWidth:window.outerWidth,outerHeight:window.outerHeight,screenId:e}})}getComponentState(){if(!this.parentLayout)return;const e=this.parentLayout.getLayoutComponents();for(const t of e)for(const e of t)if(e&&"function"==typeof e.getCurrentState)return e.getCurrentState()}broadcastUpdate(e,t){this.channel&&this.layoutKey&&this.channel.postMessage("popout-update",{layoutKey:this.layoutKey,geometry:e,state:t})}openPopout(e,t,o){return(0,r.sH)(this,void 0,void 0,function*(){const r=new URL(window.location.toString()),i=new URLSearchParams;i.append(Gt,e),r.search=i.toString();let a="popup";const n=null==t?void 0:t.geometry;let s=null==n?void 0:n.screenX,l=null==n?void 0:n.screenY;if((null==n?void 0:n.screenId)&&"getScreenDetails"in window)try{const e=(yield window.getScreenDetails()).screens.find(e=>e.label===n.screenId);if(e){s>=e.availLeft&&s<e.availLeft+e.availWidth&&l>=e.availTop&&l<e.availTop+e.availHeight||(s=e.availLeft,l=e.availTop)}else s=void 0,l=void 0}catch(e){}n?(a+=`,width=${n.outerWidth},height=${n.outerHeight}`,void 0!==s&&(a+=`,left=${s}`),void 0!==l&&(a+=`,top=${l}`)):a+=",width=800,height=600";const d=window.open(r,`popout-${e}-${(null==o?void 0:o.createId())||Date.now()}`,a);return d?(this.popoutRegistry.set(e,{geometry:n||{},state:null==t?void 0:t.state,window:d}),d):(console.warn(`Popout window for ${e} was blocked.`),null)})}getRegistry(){const e={};for(const[t,o]of this.popoutRegistry.entries())e[t]={geometry:o.geometry,state:o.state};return e}restorePopouts(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.closeAllPopouts();for(const[t,o]of Object.entries(e))this.popoutRegistry.set(t,{geometry:o.geometry,state:o.state});const o=Array.from(this.popoutRegistry.keys());0!==o.length&&(yield Promise.all(o.map(e=>{const o=this.popoutRegistry.get(e);return this.openPopout(e,o,t)})))})}closeAllPopouts(){for(const e of this.popoutRegistry.values())e.window&&!e.window.closed&&e.window.close();this.popoutRegistry.clear()}};var Do,No;(0,r.Cg)([(0,d.attr)({attribute:"channel-name"})],_o.prototype,"channelName",void 0),(0,r.Cg)([d.observable],_o.prototype,"parentLayout",void 0),_o=(0,r.Cg)([(0,d.customElement)({name:"foundation-layout-popout-controller",template:null,styles:null})],_o);let Po=!1;const zo={area:"right",multiple:{type:"tabs",size:"33%"}};class Oo extends c.FoundationElement{constructor(){super(),this.layoutConfig={root:void 0},this.defaultLayoutConfig={root:void 0},this[No]="root",this.reloadBuffer=500,this.reloadPending=!1,this.registeredComponents=0,this.missingItemPlaceholder=e=>`"${e}" cannot be loaded as it isn't registered with the layout system`,this.hasFirstLoaded=!1,this.usingDeclerativeAPI=!1,this.customButtons=[],this.dragging=!1,this.class="FoundationLayoutMain",this.lifecycleUpdateToken=void 0,this.popupMode=!1,this.popoutConfig=void 0,Do.set(this,void 0),this.customTokensMap=(0,le.designTokensMap)(),this.onDragStart=this.onDragStart.bind(this),this.onDragStop=this.onDragStop.bind(this),this.cacheAndSaveLayout=this.cacheAndSaveLayout.bind(this),this.onPostItemRemoved=this.onPostItemRemoved.bind(this),this.onPreItemRemoved=this.onPreItemRemoved.bind(this),this.onAutosaveRequest=this.onAutosaveRequest.bind(this),this.onPreItemMaximised=this.onPreItemMaximised.bind(this),this.onPreItemMinimised=this.onPreItemMinimised.bind(this)}connectedCallback(){super.connectedCallback(),io.debug("FoundationLayout connected to the DOM"),this.updateLifecycleToken(),this.layout=new fo.C(this.layoutElement),this.layout.resizeWithContainerAutomatically=!0,Po||((new CSSStyleSheet).replace(Lo).then(e=>document.adoptedStyleSheets.push(e)).catch(e=>io.error("Failed to replace styles:",e)),Po=!0),this.shadowRoot.addEventListener("dragStart",this.onDragStart,!0),this.shadowRoot.addEventListener("dragStop",this.onDragStop,!0),this.shadowRoot.addEventListener("closeButtonPre",this.onPreItemRemoved,!0),this.shadowRoot.addEventListener("closeButtonPressed",this.onPostItemRemoved,!0),this.shadowRoot.addEventListener("maximised",this.onPreItemMaximised,!0),this.shadowRoot.addEventListener("minimised",this.onPreItemMinimised,!0),this.shadowRoot.addEventListener(ro,this.onAutosaveRequest,!0),this.initPopoutModeIfEnabled(),this.setupCustomButtons()}disconnectedCallback(){this.shadowRoot.removeEventListener("dragStart",this.onDragStart),this.shadowRoot.removeEventListener("dragStop",this.onDragStop),this.shadowRoot.removeEventListener("closeButtonPre",this.onPreItemRemoved),this.shadowRoot.removeEventListener("closeButtonPressed",this.onPostItemRemoved),this.shadowRoot.removeEventListener("maximised",this.onPreItemMaximised),this.shadowRoot.removeEventListener("minimised",this.onPreItemMinimised),this.shadowRoot.addEventListener(ro,this.onAutosaveRequest)}onDragStart(){this.dragging=!0}onDragStop(){this.dragging=!1,this.cacheAndSaveLayout(),this.attatchResizeEvents()}onPostItemAdded(){this.$emit(Qt),this.cacheAndSaveLayout()}onPreItemRemoved(){this.updateLifecycleToken()}onPostItemRemoved(){this.$emit(Kt),this.cacheAndSaveLayout()}onPostItemResized(){this.$emit(eo),this.cacheAndSaveLayout()}onAutosaveRequest(){this.cacheAndSaveLayout()}onPreItemMaximised(){this.updateLifecycleToken()}onPreItemMinimised(){this.updateLifecycleToken()}customTokensMapChanged(){this.customTokensMap.value&&this.hasFirstLoaded&&this.loadGLConfigAndSetup(this.layoutConfig)}static layoutRequiredRegistrations(e){const{c:t}=e,o=$o.bP.fromResolved(wo.nh.unminifyConfig(t)),r=[];return JSON.stringify(o,(e,t)=>("componentType"===e&&r.push(t),t)),r.sort()}registeredItems(){return this.layout.getRegisteredComponentTypeNames()}getLayout(){var e,t;return this.getLayoutComponents().forEach(e=>{if(!e.length)return;const t=[...e].map(e=>{var t;return null===(t=e.getCurrentState)||void 0===t?void 0:t.call(e)}),o=e[0][Ht];o?o.container.setState({instance:o.instance,orderedStates:t}):io.warn("Component instance container not found for items:",e)}),{v:"1",c:wo.nh.minifyConfig(this.layout.saveLayout()),popouts:null!==(t=null===(e=this.popoutController)||void 0===e?void 0:e.getRegistry())&&void 0!==t?t:{}}}tryActivatePopoutMode(){if(!this.popupMode)return!1;const e={root:{type:"component",componentType:new URLSearchParams(window.location.search).get(Gt),isClosable:!1},settings:{hasHeaders:!1}};this.loadGLConfigAndSetup(e);const t=e=>{if(e.classList.contains("f-layout-popout"))return e;if(null===e.parentElement){const o=e.getRootNode().host;return o?t(o):null}return t(e.parentElement)},o=t(this);if(o){o.appendChild(this);let e=this.previousElementSibling;for(;e;)e.remove(),e=this.previousElementSibling}return this.autoSaveKey=void 0,!0}tryLoadLayoutFromLocalStorage(){if(!this.autoSaveKey||this.popupMode)return!1;const e=JSON.parse(this.session.getLocalStorageItem(Yt)||"{}");if(!(this.autoSaveKey in e))return!1;const t=JSON.parse(e[this.autoSaveKey]);return this.loadLayout(t,"placeholder",!0),!0}clearAutosaveAndRevertToDefault(){if(!this.autoSaveKey||this.popupMode)return!1;const e=JSON.parse(this.session.getLocalStorageItem(Yt)||"{}");return this.autoSaveKey in e&&(delete e[this.autoSaveKey],this.session.setLocalStorageItem(Yt,JSON.stringify(e))),!!this.defaultLayoutConfig.root&&(this.updateLifecycleToken(),this.layoutConfig=JSON.parse(JSON.stringify(this.defaultLayoutConfig)),this.loadGLConfigAndSetup(this.layoutConfig),this.cacheAndSaveLayout(),!0)}loadLayout(e,t="error",o=!1){var r;const i=this.registeredItems(),a=Oo.layoutRequiredRegistrations(e),n=(s=i,a.filter(e=>!s.includes(e)));var s;if(0!==n.length&&"error"===t)throw new qt(`Trying to load layout with extra components. The component(s) not currently loaded are "${[...new Set(n)]}"`);const l=$o.bP.fromResolved(wo.nh.unminifyConfig(e.c));o&&this.removeConfigCacheInformation(l),!this.popupMode&&this.popoutController&&this.popoutController.restorePopouts(null!==(r=e.popouts)&&void 0!==r?r:{},this.uuid),0!==n.length&&"placeholder"===t&&this.registerPlaceholdersAndSetClosable(l,n),this.loadGLConfigAndSetup(l);this.getLayoutComponents().forEach(e=>{if(!e.length)return;const t=e[0][Ht].container.getState().orderedStates;t&&[...e].map((e,o)=>{var r,i;return null===(r=e.applyState)||void 0===r?void 0:r.call(e,null!==(i=t[o])&&void 0!==i?i:null)})}),this.cacheAndSaveLayout()}addItem(e,t=zo){var o,r,i;if("area"in t&&"100%"===(null===(o=t.multiple)||void 0===o?void 0:o.size))throw new qt("Adding an item taking up 100% size is not defined behaviour. The size attribute is a relative size of the item inside its layout stack. If you’re trying to set an initial layout with a single item, you can omit the size attribute as implicitly it takes up the full layout. If you already have layout items and you’re trying to add a new one that takes up the entire layout then you need to delete all of the other items and add this item only.");const a=Array.isArray(e)?e:[e],n=1===a.length,s=a.map(e=>{const{registration:t,title:o,size:r,closable:i,showMaximiseButton:a}=e;if(!this.layout.getRegisteredComponentTypeNames().includes(t))throw new Xt(`Cannot add item '${t}' which is not registered with the layout system.`);return{type:"component",componentType:t,title:null!=o?o:`Item ${t}`,reorderEnabled:!0,isClosable:i||!1,size:n?void 0:r,header:{maximise:!1!==a&&"maximise"}}});if(this.updateLifecycleToken(),"nearRegistration"in t){if(!n)throw new qt("nearRegistration placement only supports adding a single item at a time. Pass one RegisteredElementConfig, not an array.");if(void 0===this.layoutConfig.root)return this.layoutConfig={root:{type:"stack",content:s}},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded();const e=(Array.isArray(t.nearRegistration)?t.nearRegistration:[t.nearRegistration]).map(e=>({typeId:9,componentType:e}));return void 0!==this.layout.addItemAtLocation(s[0],e)?(this.cacheAndSaveLayout(),void this.onPostItemAdded()):(this.layoutConfig={root:{type:"row",content:[this.layoutConfig.root,{type:"stack",content:s}]}},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded())}const l={type:lo((null===(r=t.multiple)||void 0===r?void 0:r.type)||"tabs"),content:s,size:n?a[0].size:null===(i=t.multiple)||void 0===i?void 0:i.size};if(void 0===this.layoutConfig.root)return this.layoutConfig={root:l},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded();this.cacheAndSaveLayout();const{area:d}=t;this.layoutConfig={root:{type:"top"===d||"bottom"===d?"column":"row",content:"right"===d||"bottom"===d?[this.layoutConfig.root,l]:[l,this.layoutConfig.root]}},this.loadGLConfigAndSetup(this.layoutConfig),this.onPostItemAdded()}removeItems(e,t=!1){let o=0;const r=r=>{var i;return!(0===(null===(i=r.content)||void 0===i?void 0:i.length)||"component"===r.type&&r.componentType===e&&(e=>t||e.isClosable)(r)&&(o+=1,1))},i=(e=>{var t,o;const i=e=>{var t,o;"component"!==e.type&&(null===(t=e.content)||void 0===t||t.forEach(i),e.content=null===(o=e.content)||void 0===o?void 0:o.filter(r),"stack"===e.type&&delete e.activeItemIndex)};return null===(t=null==e?void 0:e.content)||void 0===t||t.forEach(i),"stack"===e.type&&delete e.activeItemIndex,null===(o=null==e?void 0:e.content)||void 0===o?void 0:o.filter(r)})(this.layoutConfig.root);return 0===o?0:(this.layoutConfig=Object.assign(Object.assign({},this.layoutConfig),{root:i.length>0?Object.assign(Object.assign({},this.layoutConfig.root),{content:i}):void 0}),this.updateLifecycleToken(),this.loadGLConfigAndSetup(this.layoutConfig),this.onPostItemRemoved(),o)}registerItem(e,t){if(!this.layout.isInitialised)throw new qt("Cannot add item via JS API until initialised");if(no(e))throw new Xt(`Registration "${e}" already has a factory registered via registerFactory(). Cannot register the same name via the JavaScript API. Use a different registration name or unregister the factory first.`);return"function"==typeof t?this.cacheElementsAndRegister({factory:t,id:e}):this.cacheElementsAndRegister({elements:t,id:e})}updateLifecycleToken(){this.lifecycleUpdateToken=this.uuid.createId()}requestLayoutReload(){this.reloadPending||(this.reloadPending=!0,setTimeout(()=>{var e;if(this.reloadPending=!1,this.hasFirstLoaded)this.loadGLConfigAndSetup(this.layoutConfig);else{this.hasFirstLoaded=!0,this.defaultLayoutConfig=JSON.parse(JSON.stringify(this.layoutConfig));this.tryLoadLayoutFromLocalStorage()||!1!==(null===(e=this.popoutConfig)||void 0===e?void 0:e.loadAutomatically)&&this.tryActivatePopoutMode()||this.loadGLConfigAndSetup(this.layoutConfig),this.$emit(Jt)}},this.reloadBuffer))}addItemFromChild(e){if(void 0!==this.layoutConfig.root)throw new qt("Cannot have multiple layout items as direct descendants of the layout root. You need to put the layout items within a layout region.");return this.usingDeclerativeAPI=!0,this.layoutConfig={root:e},this.layoutConfig.root}cacheElementsAndRegister(e){const t=e.id||`${this.registeredComponents+=1}`;if(this.layout.getRegisteredComponentTypeNames().includes(t))throw new Xt(`Cannot register item with already registered name: '${t}'`);const o=(()=>{if("factory"in e){const o=new Map,r=new Map,i=new Map;return(a,n)=>{var s;(null==n?void 0:n.instance)||(n.instance=this.uuid.createId()),a.state.instance=n.instance,a.state.originalTitle=null!==(s=n.originalTitle)&&void 0!==s?s:a.title;const l={container:a,instance:n.instance,registration:t},d=n.instance,c=i.get(d);if(c&&c!==a){io.debug(`Recreating instance ${d} for registration ${t} due to container change`);const e=r.get(d);if(e&&"function"==typeof e)try{e()}catch(e){io.error(`Error calling cleanup for instance ${d}:`,e)}o.delete(d),r.delete(d)}if(!o.has(d)){const t=document.createElement("div");t.style.width="100%",t.style.height="100%",t[Ht]=l;const i=e.factory(t);o.set(d,t),i&&r.set(d,i)}const p=o.get(d);p?(p[Ht]=l,a.element.appendChild(p),i.set(d,a),this.setupLayoutReceiveEvents(a,n)):io.error(`Failed to get component container for instance ${d}`)}}{const o=document.createDocumentFragment();o[a.a]=!0,e.elements.forEach(e=>o.appendChild(e));const r=new Map;return(e,i)=>{var a;if((null==i?void 0:i.instance)||(i.instance=this.uuid.createId()),e.state.instance=i.instance,e.state.originalTitle=null!==(a=i.originalTitle)&&void 0!==a?a:e.title,!r.has(null==i?void 0:i.instance)){const e=document.createDocumentFragment();Array.from(o.children).forEach(t=>{e.appendChild(t.cloneNode(!0))}),r.set(i.instance,[...e.children])}const n={container:e,instance:i.instance,registration:t};r.get(i.instance).forEach(t=>{e.element.appendChild(t),t[Ht]=n}),this.setupLayoutReceiveEvents(e,i)}}})();return this.layout.registerComponentFactoryFunction(t,o),t}setupLayoutReceiveEvents(e,t){const o=e.state.originalTitle;e.element.addEventListener(oo,t=>{const r=null==t?void 0:t.detail;(null==r?void 0:r.title)&&(null==r?void 0:r.mode)||io.error("Invalid change-title event.detail:",null==t?void 0:t.detail),e.setTitle(`${"suffix"===r.mode?o+" ":""}${r.title}`)})}cacheAndSaveLayout(){if(this.layoutConfig=$o.bP.fromResolved(this.layout.saveLayout()),this.autoSaveKey){const e=JSON.parse(this.session.getLocalStorageItem(Yt)||"{}");e[this.autoSaveKey]=JSON.stringify(this.getLayout()),this.session.setLocalStorageItem(Yt,JSON.stringify(e))}this.$emit(to)}registerPlaceholdersAndSetClosable(e,t){const o=document.createElement("p");o.style.textAlign="center",o.style.position="relative",o.style.top="50%";const r=e=>{var i;if("component"===e.type&&t.includes(e.componentType.toString())){const t=e.componentType.toString();e.isClosable=!0;const r=o.cloneNode();r.textContent=this.missingItemPlaceholder(t),this.registerItem(t,[r])}null===(i=e.content)||void 0===i||i.forEach(r)};r(e.root)}loadGLConfigAndSetup(e){const t={dimensions:{headerHeight:parseInt(Wt().replace("px","")),borderWidth:12,itemBorder:Zt()},header:{maximise:"maximise",minimise:"minimise",popout:!1}};this.hasFirstLoaded=!0;try{this.layout.loadLayout(Object.assign(Object.assign(Object.assign({},e),t),{dimensions:Object.assign(Object.assign({},t.dimensions),this.dimensionsConfig)}))}catch(e){this.handleGLRunErrors(e)}this.attatchResizeEvents()}handleGLRunErrors(e){if(e.message.includes("ROCCAS6692"))throw new qt('Golden layout internal error ROCCAS6692. A maths error has accoured while calculating the layout item sizes. Verify you have not added an item with "size: 100%".');throw e}attatchResizeEvents(){void 0===(0,r.gn)(this,Do,"f")&&(0,r.GG)(this,Do,()=>this.onPostItemResized.bind(this)(),"f"),this.shadowRoot.querySelectorAll("div.lm_drag_handle").forEach(e=>{e.removeEventListener("click",(0,r.gn)(this,Do,"f")),e.addEventListener("click",(0,r.gn)(this,Do,"f"))})}setupCustomButtons(){this.layout.on("stackCreated",e=>{var t;const o=e.target.header.controlsContainerElement;null===(t=this.customButtons)||void 0===t||t.forEach(t=>{const r=document.createElement("div");r.classList.add("lm_custom_button"),r.style["background-image"]=`url('${t.svg}')`,r.addEventListener("click",()=>t.onClick(r,e.target.getActiveContentItem().container.element)),o.prepend(r)})})}getLayoutComponents(){return[...this.shadowRoot.querySelectorAll("div.lm_content")].map(e=>[...e.children])}removeConfigCacheInformation(e){const t=e=>{var o;null===(o=e.content)||void 0===o||o.forEach(e=>t(e)),"component"===e.type&&delete e.componentState.instance};return t(e.root),e}initPopoutModeIfEnabled(){if(!this.popoutConfig)return;io.warn("Layout pop-out mode is enabled, this is an experimental feature and may change in future versions");const e=Object.assign(Object.assign({},this.popoutConfig),{loadAutomatically:!0,popoutDimension:Object.assign(Object.assign({},this.popoutConfig.popoutDimension),{width:960,height:720})});this.customButtons.push({svg:Mo,onClick:(t,o)=>{var r,i;const a=o.firstChild[Ht].registration,n=o.firstChild,s=null===(r=null==n?void 0:n.getCurrentState)||void 0===r?void 0:r.call(n),l={screenX:void 0,screenY:void 0,outerWidth:e.popoutDimension.width,outerHeight:e.popoutDimension.height};null===(i=this.popoutController)||void 0===i||i.openPopout(a,{geometry:l,state:s},this.uuid),this.cacheAndSaveLayout()}}),this.popupMode=window.location.search.includes(Gt)}}Do=new WeakMap,No=Bt,(0,r.Cg)([(0,d.attr)({attribute:"reload-buffer"})],Oo.prototype,"reloadBuffer",void 0),(0,r.Cg)([So.k],Oo.prototype,"uuid",void 0),(0,r.Cg)([xo.N],Oo.prototype,"session",void 0),(0,r.Cg)([(0,d.attr)({attribute:"auto-save-key"})],Oo.prototype,"autoSaveKey",void 0),(0,r.Cg)([d.observable],Oo.prototype,"missingItemPlaceholder",void 0),(0,r.Cg)([d.observable],Oo.prototype,"hasFirstLoaded",void 0),(0,r.Cg)([d.observable],Oo.prototype,"usingDeclerativeAPI",void 0),(0,r.Cg)([d.observable],Oo.prototype,"dragging",void 0),(0,r.Cg)([d.observable],Oo.prototype,"popupMode",void 0),(0,r.Cg)([d.observable],Oo.prototype,"popoutConfig",void 0),(0,r.Cg)([d.observable],Oo.prototype,"customTokensMap",void 0);const Fo=d.html`
|
|
2103
|
+
`;var _o=o(79780);let Do=class extends d.FASTElement{constructor(){super(...arguments),this.popoutRegistry=new Map}connectedCallback(){super.connectedCallback(),this.layoutKey=new URLSearchParams(window.location.search).get(Vt),this.setupChannel(),this.setupUnloadListener(),this.layoutKey?(this.startPolling(),this.channel.postMessage("popout-handshake",{layoutKey:this.layoutKey})):this.setupListener()}disconnectedCallback(){super.disconnectedCallback(),this.channel&&this.channel.close(),this.stopPolling(),this.teardownUnloadListener(),this.layoutKey||this.closeAllPopouts()}setupChannel(){const e=this.channelName||"f-layout-popout-channel";this.channel=(0,_o.vp)(e),this.layoutKey&&(this.channel.onmessage=e=>{if(this.channel.isMessageType("popout-sync",e)){const{layoutKey:t,state:o}=e.data.detail;t===this.layoutKey&&void 0!==o&&this.applyStateToParent(o)}})}setupListener(){this.channel&&(this.channel.onmessage=e=>{if(this.channel.isMessageType("popout-update",e)){const{layoutKey:t,geometry:o,state:r}=e.data.detail,i=this.popoutRegistry.get(t);this.popoutRegistry.set(t,Object.assign(Object.assign({},i),{geometry:o,state:r})),this.emitAutosave()}else if(this.channel.isMessageType("popout-closed",e)){const{layoutKey:t}=e.data.detail;this.popoutRegistry.delete(t),this.emitAutosave()}else if(this.channel.isMessageType("popout-handshake",e)){const{layoutKey:t}=e.data.detail,o=this.popoutRegistry.get(t);o&&this.channel.postMessage("popout-sync",{layoutKey:t,geometry:o.geometry,state:o.state})}})}applyStateToParent(e){if(!this.parentLayout)return;const t=this.parentLayout.getLayoutComponents();for(const o of t)for(const t of o)t&&"function"==typeof t.applyState&&t.applyState(e)}setupUnloadListener(){this.unloadHandler=()=>{this.layoutKey?this.channel&&this.channel.postMessage("popout-closed",{layoutKey:this.layoutKey}):this.closeAllPopouts()},window.addEventListener("beforeunload",this.unloadHandler)}teardownUnloadListener(){this.unloadHandler&&(window.removeEventListener("beforeunload",this.unloadHandler),this.unloadHandler=null)}emitAutosave(){this.$emit(io,void 0,{bubbles:!0,composed:!0})}startPolling(){this.pollInterval=setInterval(()=>(0,r.sH)(this,void 0,void 0,function*(){const e=yield this.getGeometry(),t=this.getComponentState(),o={geometry:e,state:t},r=JSON.stringify(o);r!==this.lastUpdate&&(this.broadcastUpdate(e,t),this.lastUpdate=r)}),1e3)}stopPolling(){this.pollInterval&&clearInterval(this.pollInterval)}getGeometry(){return(0,r.sH)(this,void 0,void 0,function*(){const e=yield(()=>(0,r.sH)(this,void 0,void 0,function*(){var e;if("getScreenDetails"in window)try{return null===(e=(yield window.getScreenDetails()).currentScreen)||void 0===e?void 0:e.label}catch(e){return}}))();return{screenX:window.screenX,screenY:window.screenY,outerWidth:window.outerWidth,outerHeight:window.outerHeight,screenId:e}})}getComponentState(){if(!this.parentLayout)return;const e=this.parentLayout.getLayoutComponents();for(const t of e)for(const e of t)if(e&&"function"==typeof e.getCurrentState)return e.getCurrentState()}broadcastUpdate(e,t){this.channel&&this.layoutKey&&this.channel.postMessage("popout-update",{layoutKey:this.layoutKey,geometry:e,state:t})}openPopout(e,t,o){return(0,r.sH)(this,void 0,void 0,function*(){const r=new URL(window.location.toString()),i=new URLSearchParams;i.append(Vt,e),r.search=i.toString();let a="popup";const n=null==t?void 0:t.geometry;let s=null==n?void 0:n.screenX,l=null==n?void 0:n.screenY;if((null==n?void 0:n.screenId)&&"getScreenDetails"in window)try{const e=(yield window.getScreenDetails()).screens.find(e=>e.label===n.screenId);if(e){s>=e.availLeft&&s<e.availLeft+e.availWidth&&l>=e.availTop&&l<e.availTop+e.availHeight||(s=e.availLeft,l=e.availTop)}else s=void 0,l=void 0}catch(e){}n?(a+=`,width=${n.outerWidth},height=${n.outerHeight}`,void 0!==s&&(a+=`,left=${s}`),void 0!==l&&(a+=`,top=${l}`)):a+=",width=800,height=600";const d=window.open(r,`popout-${e}-${(null==o?void 0:o.createId())||Date.now()}`,a);return d?(this.popoutRegistry.set(e,{geometry:n||{},state:null==t?void 0:t.state,window:d}),d):(console.warn(`Popout window for ${e} was blocked.`),null)})}getRegistry(){const e={};for(const[t,o]of this.popoutRegistry.entries())e[t]={geometry:o.geometry,state:o.state};return e}restorePopouts(e,t){return(0,r.sH)(this,void 0,void 0,function*(){this.closeAllPopouts();for(const[t,o]of Object.entries(e))this.popoutRegistry.set(t,{geometry:o.geometry,state:o.state});const o=Array.from(this.popoutRegistry.keys());0!==o.length&&(yield Promise.all(o.map(e=>{const o=this.popoutRegistry.get(e);return this.openPopout(e,o,t)})))})}closeAllPopouts(){for(const e of this.popoutRegistry.values())e.window&&!e.window.closed&&e.window.close();this.popoutRegistry.clear()}};var No,Po;(0,r.Cg)([(0,d.attr)({attribute:"channel-name"})],Do.prototype,"channelName",void 0),(0,r.Cg)([d.observable],Do.prototype,"parentLayout",void 0),Do=(0,r.Cg)([(0,d.customElement)({name:"foundation-layout-popout-controller",template:null,styles:null})],Do);let zo=!1;const Oo={area:"right",multiple:{type:"tabs",size:"33%"}};class Fo extends c.FoundationElement{constructor(){super(),this.layoutConfig={root:void 0},this.defaultLayoutConfig={root:void 0},this[Po]="root",this.reloadBuffer=500,this.reloadPending=!1,this.registeredComponents=0,this.missingItemPlaceholder=e=>`"${e}" cannot be loaded as it isn't registered with the layout system`,this.hasFirstLoaded=!1,this.usingDeclerativeAPI=!1,this.customButtons=[],this.dragging=!1,this.class="FoundationLayoutMain",this.lifecycleUpdateToken=void 0,this.popupMode=!1,this.popoutConfig=void 0,No.set(this,void 0),this.customTokensMap=(0,le.designTokensMap)(),this.onDragStart=this.onDragStart.bind(this),this.onDragStop=this.onDragStop.bind(this),this.cacheAndSaveLayout=this.cacheAndSaveLayout.bind(this),this.onPostItemRemoved=this.onPostItemRemoved.bind(this),this.onPreItemRemoved=this.onPreItemRemoved.bind(this),this.onAutosaveRequest=this.onAutosaveRequest.bind(this),this.onPreItemMaximised=this.onPreItemMaximised.bind(this),this.onPreItemMinimised=this.onPreItemMinimised.bind(this)}connectedCallback(){super.connectedCallback(),ao.debug("FoundationLayout connected to the DOM"),this.updateLifecycleToken(),this.layout=new $o.C(this.layoutElement),this.layout.resizeWithContainerAutomatically=!0,zo||((new CSSStyleSheet).replace(Eo).then(e=>document.adoptedStyleSheets.push(e)).catch(e=>ao.error("Failed to replace styles:",e)),zo=!0),this.shadowRoot.addEventListener("dragStart",this.onDragStart,!0),this.shadowRoot.addEventListener("dragStop",this.onDragStop,!0),this.shadowRoot.addEventListener("closeButtonPre",this.onPreItemRemoved,!0),this.shadowRoot.addEventListener("closeButtonPressed",this.onPostItemRemoved,!0),this.shadowRoot.addEventListener("maximised",this.onPreItemMaximised,!0),this.shadowRoot.addEventListener("minimised",this.onPreItemMinimised,!0),this.shadowRoot.addEventListener(io,this.onAutosaveRequest,!0),this.initPopoutModeIfEnabled(),this.setupCustomButtons()}disconnectedCallback(){this.shadowRoot.removeEventListener("dragStart",this.onDragStart),this.shadowRoot.removeEventListener("dragStop",this.onDragStop),this.shadowRoot.removeEventListener("closeButtonPre",this.onPreItemRemoved),this.shadowRoot.removeEventListener("closeButtonPressed",this.onPostItemRemoved),this.shadowRoot.removeEventListener("maximised",this.onPreItemMaximised),this.shadowRoot.removeEventListener("minimised",this.onPreItemMinimised),this.shadowRoot.addEventListener(io,this.onAutosaveRequest)}onDragStart(){this.dragging=!0}onDragStop(){this.dragging=!1,this.cacheAndSaveLayout(),this.attatchResizeEvents()}onPostItemAdded(){this.$emit(Kt),this.cacheAndSaveLayout()}onPreItemRemoved(){this.updateLifecycleToken()}onPostItemRemoved(){this.$emit(eo),this.cacheAndSaveLayout()}onPostItemResized(){this.$emit(to),this.cacheAndSaveLayout()}onAutosaveRequest(){this.cacheAndSaveLayout()}onPreItemMaximised(){this.updateLifecycleToken()}onPreItemMinimised(){this.updateLifecycleToken()}customTokensMapChanged(){this.customTokensMap.value&&this.hasFirstLoaded&&this.loadGLConfigAndSetup(this.layoutConfig)}static layoutRequiredRegistrations(e){const{c:t}=e,o=wo.bP.fromResolved(xo.nh.unminifyConfig(t)),r=[];return JSON.stringify(o,(e,t)=>("componentType"===e&&r.push(t),t)),r.sort()}registeredItems(){return this.layout.getRegisteredComponentTypeNames()}getLayout(){var e,t;return this.getLayoutComponents().forEach(e=>{if(!e.length)return;const t=[...e].map(e=>{var t;return null===(t=e.getCurrentState)||void 0===t?void 0:t.call(e)}),o=e[0][Yt];o?o.container.setState({instance:o.instance,orderedStates:t}):ao.warn("Component instance container not found for items:",e)}),{v:"1",c:xo.nh.minifyConfig(this.layout.saveLayout()),popouts:null!==(t=null===(e=this.popoutController)||void 0===e?void 0:e.getRegistry())&&void 0!==t?t:{}}}tryActivatePopoutMode(){if(!this.popupMode)return!1;const e={root:{type:"component",componentType:new URLSearchParams(window.location.search).get(Vt),isClosable:!1},settings:{hasHeaders:!1}};this.loadGLConfigAndSetup(e);const t=e=>{if(e.classList.contains("f-layout-popout"))return e;if(null===e.parentElement){const o=e.getRootNode().host;return o?t(o):null}return t(e.parentElement)},o=t(this);if(o){o.appendChild(this);let e=this.previousElementSibling;for(;e;)e.remove(),e=this.previousElementSibling}return this.autoSaveKey=void 0,!0}tryLoadLayoutFromLocalStorage(){if(!this.autoSaveKey||this.popupMode)return!1;const e=JSON.parse(this.session.getLocalStorageItem(Gt)||"{}");if(!(this.autoSaveKey in e))return!1;const t=JSON.parse(e[this.autoSaveKey]);return this.loadLayout(t,"placeholder",!0),!0}clearAutosaveAndRevertToDefault(){if(!this.autoSaveKey||this.popupMode)return!1;const e=JSON.parse(this.session.getLocalStorageItem(Gt)||"{}");return this.autoSaveKey in e&&(delete e[this.autoSaveKey],this.session.setLocalStorageItem(Gt,JSON.stringify(e))),!!this.defaultLayoutConfig.root&&(this.updateLifecycleToken(),this.layoutConfig=JSON.parse(JSON.stringify(this.defaultLayoutConfig)),this.loadGLConfigAndSetup(this.layoutConfig),this.cacheAndSaveLayout(),!0)}loadLayout(e,t="error",o=!1){var r;const i=this.registeredItems(),a=Fo.layoutRequiredRegistrations(e),n=(s=i,a.filter(e=>!s.includes(e)));var s;if(0!==n.length&&"error"===t)throw new Xt(`Trying to load layout with extra components. The component(s) not currently loaded are "${[...new Set(n)]}"`);const l=wo.bP.fromResolved(xo.nh.unminifyConfig(e.c));o&&this.removeConfigCacheInformation(l),!this.popupMode&&this.popoutController&&this.popoutController.restorePopouts(null!==(r=e.popouts)&&void 0!==r?r:{},this.uuid),0!==n.length&&"placeholder"===t&&this.registerPlaceholdersAndSetClosable(l,n),this.loadGLConfigAndSetup(l);this.getLayoutComponents().forEach(e=>{if(!e.length)return;const t=e[0][Yt].container.getState().orderedStates;t&&[...e].map((e,o)=>{var r,i;return null===(r=e.applyState)||void 0===r?void 0:r.call(e,null!==(i=t[o])&&void 0!==i?i:null)})}),this.cacheAndSaveLayout()}addItem(e,t=Oo){var o,r,i;if("area"in t&&"100%"===(null===(o=t.multiple)||void 0===o?void 0:o.size))throw new Xt("Adding an item taking up 100% size is not defined behaviour. The size attribute is a relative size of the item inside its layout stack. If you’re trying to set an initial layout with a single item, you can omit the size attribute as implicitly it takes up the full layout. If you already have layout items and you’re trying to add a new one that takes up the entire layout then you need to delete all of the other items and add this item only.");const a=Array.isArray(e)?e:[e],n=1===a.length,s=a.map(e=>{const{registration:t,title:o,size:r,closable:i,showMaximiseButton:a}=e;if(!this.layout.getRegisteredComponentTypeNames().includes(t))throw new Jt(`Cannot add item '${t}' which is not registered with the layout system.`);return{type:"component",componentType:t,title:null!=o?o:`Item ${t}`,reorderEnabled:!0,isClosable:i||!1,size:n?void 0:r,header:{maximise:!1!==a&&"maximise"}}});if(this.updateLifecycleToken(),"nearRegistration"in t){if(!n)throw new Xt("nearRegistration placement only supports adding a single item at a time. Pass one RegisteredElementConfig, not an array.");if(void 0===this.layoutConfig.root)return this.layoutConfig={root:{type:"stack",content:s}},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded();const e=(Array.isArray(t.nearRegistration)?t.nearRegistration:[t.nearRegistration]).map(e=>({typeId:9,componentType:e}));return void 0!==this.layout.addItemAtLocation(s[0],e)?(this.cacheAndSaveLayout(),void this.onPostItemAdded()):(this.layoutConfig={root:{type:"row",content:[this.layoutConfig.root,{type:"stack",content:s}]}},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded())}const l={type:co((null===(r=t.multiple)||void 0===r?void 0:r.type)||"tabs"),content:s,size:n?a[0].size:null===(i=t.multiple)||void 0===i?void 0:i.size};if(void 0===this.layoutConfig.root)return this.layoutConfig={root:l},this.loadGLConfigAndSetup(this.layoutConfig),void this.onPostItemAdded();this.cacheAndSaveLayout();const{area:d}=t;this.layoutConfig={root:{type:"top"===d||"bottom"===d?"column":"row",content:"right"===d||"bottom"===d?[this.layoutConfig.root,l]:[l,this.layoutConfig.root]}},this.loadGLConfigAndSetup(this.layoutConfig),this.onPostItemAdded()}removeItems(e,t=!1){let o=0;const r=r=>{var i;return!(0===(null===(i=r.content)||void 0===i?void 0:i.length)||"component"===r.type&&r.componentType===e&&(e=>t||e.isClosable)(r)&&(o+=1,1))},i=(e=>{var t,o;const i=e=>{var t,o;"component"!==e.type&&(null===(t=e.content)||void 0===t||t.forEach(i),e.content=null===(o=e.content)||void 0===o?void 0:o.filter(r),"stack"===e.type&&delete e.activeItemIndex)};return null===(t=null==e?void 0:e.content)||void 0===t||t.forEach(i),"stack"===e.type&&delete e.activeItemIndex,null===(o=null==e?void 0:e.content)||void 0===o?void 0:o.filter(r)})(this.layoutConfig.root);return 0===o?0:(this.layoutConfig=Object.assign(Object.assign({},this.layoutConfig),{root:i.length>0?Object.assign(Object.assign({},this.layoutConfig.root),{content:i}):void 0}),this.updateLifecycleToken(),this.loadGLConfigAndSetup(this.layoutConfig),this.onPostItemRemoved(),o)}registerItem(e,t){if(!this.layout.isInitialised)throw new Xt("Cannot add item via JS API until initialised");if(so(e))throw new Jt(`Registration "${e}" already has a factory registered via registerFactory(). Cannot register the same name via the JavaScript API. Use a different registration name or unregister the factory first.`);return"function"==typeof t?this.cacheElementsAndRegister({factory:t,id:e}):this.cacheElementsAndRegister({elements:t,id:e})}updateLifecycleToken(){this.lifecycleUpdateToken=this.uuid.createId()}requestLayoutReload(){this.reloadPending||(this.reloadPending=!0,setTimeout(()=>{var e;if(this.reloadPending=!1,this.hasFirstLoaded)this.loadGLConfigAndSetup(this.layoutConfig);else{this.hasFirstLoaded=!0,this.defaultLayoutConfig=JSON.parse(JSON.stringify(this.layoutConfig));this.tryLoadLayoutFromLocalStorage()||!1!==(null===(e=this.popoutConfig)||void 0===e?void 0:e.loadAutomatically)&&this.tryActivatePopoutMode()||this.loadGLConfigAndSetup(this.layoutConfig),this.$emit(Qt)}},this.reloadBuffer))}addItemFromChild(e){if(void 0!==this.layoutConfig.root)throw new Xt("Cannot have multiple layout items as direct descendants of the layout root. You need to put the layout items within a layout region.");return this.usingDeclerativeAPI=!0,this.layoutConfig={root:e},this.layoutConfig.root}cacheElementsAndRegister(e){const t=e.id||`${this.registeredComponents+=1}`;if(this.layout.getRegisteredComponentTypeNames().includes(t))throw new Jt(`Cannot register item with already registered name: '${t}'`);const o=(()=>{if("factory"in e){const o=new Map,r=new Map,i=new Map;return(a,n)=>{var s;(null==n?void 0:n.instance)||(n.instance=this.uuid.createId()),a.state.instance=n.instance,a.state.originalTitle=null!==(s=n.originalTitle)&&void 0!==s?s:a.title;const l={container:a,instance:n.instance,registration:t},d=n.instance,c=i.get(d);if(c&&c!==a){ao.debug(`Recreating instance ${d} for registration ${t} due to container change`);const e=r.get(d);if(e&&"function"==typeof e)try{e()}catch(e){ao.error(`Error calling cleanup for instance ${d}:`,e)}o.delete(d),r.delete(d)}if(!o.has(d)){const t=document.createElement("div");t.style.width="100%",t.style.height="100%",t[Yt]=l;const i=e.factory(t);o.set(d,t),i&&r.set(d,i)}const p=o.get(d);p?(p[Yt]=l,a.element.appendChild(p),i.set(d,a),this.setupLayoutReceiveEvents(a,n)):ao.error(`Failed to get component container for instance ${d}`)}}{const o=document.createDocumentFragment();o[a.a]=!0,e.elements.forEach(e=>o.appendChild(e));const r=new Map;return(e,i)=>{var a;if((null==i?void 0:i.instance)||(i.instance=this.uuid.createId()),e.state.instance=i.instance,e.state.originalTitle=null!==(a=i.originalTitle)&&void 0!==a?a:e.title,!r.has(null==i?void 0:i.instance)){const e=document.createDocumentFragment();Array.from(o.children).forEach(t=>{e.appendChild(t.cloneNode(!0))}),r.set(i.instance,[...e.children])}const n={container:e,instance:i.instance,registration:t};r.get(i.instance).forEach(t=>{e.element.appendChild(t),t[Yt]=n}),this.setupLayoutReceiveEvents(e,i)}}})();return this.layout.registerComponentFactoryFunction(t,o),t}setupLayoutReceiveEvents(e,t){const o=e.state.originalTitle;e.element.addEventListener(ro,t=>{const r=null==t?void 0:t.detail;(null==r?void 0:r.title)&&(null==r?void 0:r.mode)||ao.error("Invalid change-title event.detail:",null==t?void 0:t.detail),e.setTitle(`${"suffix"===r.mode?o+" ":""}${r.title}`)})}cacheAndSaveLayout(){if(this.layoutConfig=wo.bP.fromResolved(this.layout.saveLayout()),this.autoSaveKey){const e=JSON.parse(this.session.getLocalStorageItem(Gt)||"{}");e[this.autoSaveKey]=JSON.stringify(this.getLayout()),this.session.setLocalStorageItem(Gt,JSON.stringify(e))}this.$emit(oo)}registerPlaceholdersAndSetClosable(e,t){const o=document.createElement("p");o.style.textAlign="center",o.style.position="relative",o.style.top="50%";const r=e=>{var i;if("component"===e.type&&t.includes(e.componentType.toString())){const t=e.componentType.toString();e.isClosable=!0;const r=o.cloneNode();r.textContent=this.missingItemPlaceholder(t),this.registerItem(t,[r])}null===(i=e.content)||void 0===i||i.forEach(r)};r(e.root)}loadGLConfigAndSetup(e){const t={dimensions:{headerHeight:parseInt(Zt().replace("px","")),borderWidth:12,itemBorder:qt()},header:{maximise:"maximise",minimise:"minimise",popout:!1}};this.hasFirstLoaded=!0;try{this.layout.loadLayout(Object.assign(Object.assign(Object.assign({},e),t),{dimensions:Object.assign(Object.assign({},t.dimensions),this.dimensionsConfig)}))}catch(e){this.handleGLRunErrors(e)}this.attatchResizeEvents()}handleGLRunErrors(e){if(e.message.includes("ROCCAS6692"))throw new Xt('Golden layout internal error ROCCAS6692. A maths error has accoured while calculating the layout item sizes. Verify you have not added an item with "size: 100%".');throw e}attatchResizeEvents(){void 0===(0,r.gn)(this,No,"f")&&(0,r.GG)(this,No,()=>this.onPostItemResized.bind(this)(),"f"),this.shadowRoot.querySelectorAll("div.lm_drag_handle").forEach(e=>{e.removeEventListener("click",(0,r.gn)(this,No,"f")),e.addEventListener("click",(0,r.gn)(this,No,"f"))})}setupCustomButtons(){this.layout.on("stackCreated",e=>{var t;const o=e.target.header.controlsContainerElement;null===(t=this.customButtons)||void 0===t||t.forEach(t=>{const r=document.createElement("div");r.classList.add("lm_custom_button"),r.style["background-image"]=`url('${t.svg}')`,r.addEventListener("click",()=>t.onClick(r,e.target.getActiveContentItem().container.element)),o.prepend(r)})})}getLayoutComponents(){return[...this.shadowRoot.querySelectorAll("div.lm_content")].map(e=>[...e.children])}removeConfigCacheInformation(e){const t=e=>{var o;null===(o=e.content)||void 0===o||o.forEach(e=>t(e)),"component"===e.type&&delete e.componentState.instance};return t(e.root),e}initPopoutModeIfEnabled(){if(!this.popoutConfig)return;ao.warn("Layout pop-out mode is enabled, this is an experimental feature and may change in future versions");const e=Object.assign(Object.assign({},this.popoutConfig),{loadAutomatically:!0,popoutDimension:Object.assign(Object.assign({},this.popoutConfig.popoutDimension),{width:960,height:720})});this.customButtons.push({svg:Lo,onClick:(t,o)=>{var r,i;const a=o.firstChild[Yt].registration,n=o.firstChild,s=null===(r=null==n?void 0:n.getCurrentState)||void 0===r?void 0:r.call(n),l={screenX:void 0,screenY:void 0,outerWidth:e.popoutDimension.width,outerHeight:e.popoutDimension.height};null===(i=this.popoutController)||void 0===i||i.openPopout(a,{geometry:l,state:s},this.uuid),this.cacheAndSaveLayout()}}),this.popupMode=window.location.search.includes(Vt)}}No=new WeakMap,Po=Ht,(0,r.Cg)([(0,d.attr)({attribute:"reload-buffer"})],Fo.prototype,"reloadBuffer",void 0),(0,r.Cg)([Co.k],Fo.prototype,"uuid",void 0),(0,r.Cg)([So.N],Fo.prototype,"session",void 0),(0,r.Cg)([(0,d.attr)({attribute:"auto-save-key"})],Fo.prototype,"autoSaveKey",void 0),(0,r.Cg)([d.observable],Fo.prototype,"missingItemPlaceholder",void 0),(0,r.Cg)([d.observable],Fo.prototype,"hasFirstLoaded",void 0),(0,r.Cg)([d.observable],Fo.prototype,"usingDeclerativeAPI",void 0),(0,r.Cg)([d.observable],Fo.prototype,"dragging",void 0),(0,r.Cg)([d.observable],Fo.prototype,"popupMode",void 0),(0,r.Cg)([d.observable],Fo.prototype,"popoutConfig",void 0),(0,r.Cg)([d.observable],Fo.prototype,"customTokensMap",void 0);const jo=d.html`
|
|
2103
2104
|
<div class="html-spinner"></div>
|
|
2104
|
-
`,
|
|
2105
|
+
`,Uo=d.html`
|
|
2105
2106
|
<template>
|
|
2106
2107
|
${(0,d.when)(e=>Boolean(e.popoutConfig),d.html`
|
|
2107
2108
|
<foundation-layout-popout-controller
|
|
@@ -2110,10 +2111,10 @@
|
|
|
2110
2111
|
channel-name="${e=>{var t;return null===(t=e.popoutConfig)||void 0===t?void 0:t.channelName}}"
|
|
2111
2112
|
></foundation-layout-popout-controller>
|
|
2112
2113
|
`)}
|
|
2113
|
-
${(0,d.when)(e=>!e.hasFirstLoaded&&e.usingDeclerativeAPI,
|
|
2114
|
+
${(0,d.when)(e=>!e.hasFirstLoaded&&e.usingDeclerativeAPI,jo)}
|
|
2114
2115
|
<div class="layout-container" ${(0,d.ref)("layoutElement")}></div>
|
|
2115
2116
|
</template>
|
|
2116
|
-
`,
|
|
2117
|
+
`,Bo={foundationLayout:Fo.compose({baseName:"layout",styles:Ro,template:Uo}),foundationLayoutRegion:fo,foundationLayoutItem:vo,register(e,...t){if(e)for(const o in this)"register"!==o&&this[o]().register(e,...t)}};var Ho,Yo=o(93188),Go=o(4852);!function(e){e.STYLES_CHANGED="styles-changed",e.DS_CHANGED="design-system-changed",e.APPLY_CUSTOM_DESIGN="apply-custom-design"}(Ho||(Ho={}));const Vo={Roboto:Yo.robotoFontFamily,"Segoe UI":'"Segoe UI", Arial, Helvetica, sans-serif',Monospace:'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace',"Times New Roman":'Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif',Garamond:'"Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif',Georgia:'Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif',Helvetica:'Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif',Verdana:'Candara, "Bitstream Vera Sans", "DejaVu Sans", "Bitstream Vera Sans", "Trebuchet MS", Verdana, "Verdana Ref", sans-serif'},Wo=Vo["Segoe UI"],Zo=d.css`
|
|
2117
2118
|
${(0,c.display)("block")} :host {
|
|
2118
2119
|
width: 100%;
|
|
2119
2120
|
display: inline-flex;
|
|
@@ -2245,7 +2246,7 @@
|
|
|
2245
2246
|
rapid-button {
|
|
2246
2247
|
margin: 0;
|
|
2247
2248
|
}
|
|
2248
|
-
`,
|
|
2249
|
+
`,qo=d.html`
|
|
2249
2250
|
<template>
|
|
2250
2251
|
<div class="configuration">
|
|
2251
2252
|
${(0,d.when)(e=>!e.customDesignMode,d.html`
|
|
@@ -2468,7 +2469,7 @@
|
|
|
2468
2469
|
<slot></slot>
|
|
2469
2470
|
</div>
|
|
2470
2471
|
</template>
|
|
2471
|
-
`,
|
|
2472
|
+
`,Xo=({design_tokens:e})=>({accentColor:e.color.accent.$value,neutralColor:e.color.neutral.$value,luminance:e.mode.luminance.$value,density:e.style.density.$value,designUnit:e.space.designUnit.$value,borderRadius:e.style.borderRadius.$value,strokeWidth:e.style.strokeWidth.$value,baseHeightMultiplier:e.style.baseHeightMultiplier.$value,bodyFont:Object.keys(Vo).find(t=>Vo[t]===e.fontFamily.bodyFont.$value),baseFontSize:e.typography.baseFontSize.$value,baseLineHeight:e.typography.baseLineHeight.$value}),Jo=Xo(Yo.designTokens),Qo={accent:"primary",neutral:"neutral",outline:"primary-outline",text:"link"},Ko={accent:"primary",neutral:"neutral",font:"text"},er={rapid:{prefix:"rapid",tokenDefaults:Jo,buttons:Qo,badge:Ko},custom:{prefix:"rapid",tokenDefaults:null,buttons:Qo,badge:Ko}};let tr=class extends d.FASTElement{constructor(){super(...arguments),this.customDesignMode=!1,this.userSelections={},this.ds="rapid",this.darkMode=Jo.luminance===p.StandardLuminance.DarkMode,this.luminance=Jo.luminance,this.neutralColor=Jo.neutralColor,this.accentColor=Jo.accentColor,this.bodyFont=Jo.bodyFont,this.density=Jo.density,this.borderRadius=Jo.borderRadius,this.strokeWidth=Jo.strokeWidth,this.baseHeightMultiplier=Jo.baseHeightMultiplier,this.designUnit=Jo.designUnit,this.baseFontSize=Jo.baseFontSize,this.baseLineHeight=Jo.baseLineHeight,this.preserveOptions=!0,this.tokenUpdateInProgress=!1,this.changeHandler=e=>{if(e.target instanceof c.RadioGroup||e.target instanceof HTMLInputElement||e.target instanceof p.Combobox||e.target instanceof p.Select){const{name:t,value:o}=e.target;t&&o&&(this[t]=o,this.updateUserSelections(t,o),this.styleUpdate())}else if(e.target instanceof c.Slider){const t=parseInt(e.target.value),o=e.target.name;o&&Number.isInteger(t)&&(this[o]=t,this.updateUserSelections(o,t),this.styleUpdate())}},this.updateUserSelections=(e,t)=>{"ds"===e||this.tokenUpdateInProgress||(this.userSelections[e]=t)},this.modeChangeHandler=e=>{this.darkMode=e.target.checked,this.luminance=this.darkMode?p.StandardLuminance.DarkMode:p.StandardLuminance.LightMode,this.updateUserSelections("luminance",this.luminance),this.styleUpdate()},this.applyCustomDSTokens=e=>{const t=e.detail;t&&d.DOM.queueUpdate(()=>{const e=Xo(t);er.custom.tokenDefaults=e,this.setTokensFromDs(e),this.styleUpdate()})},this.resetChanges=()=>(0,r.sH)(this,void 0,void 0,function*(){this.userSelections={},this.setTokensFromDs(er[this.ds].tokenDefaults),this.styleUpdate()})}customDesignModeChanged(e,t){return(0,r.sH)(this,void 0,void 0,function*(){const e=[{name:"Rapid",value:"rapid"}];if(this.customDesignMode){const{appName:e="Custom Design",dsPrefix:t="custom"}=yield this.getAppDetails(),o={name:e,value:t};this.designSystems=[o],er.custom.prefix=t,er.custom.buttons=er[t].buttons,er.custom.badge=er[t].badge,this.ds="custom"}else this.designSystems=e})}dsChanged(e,t){const o={prefix:er[this.ds].prefix,buttonAppearanceAccent:er[this.ds].buttons.accent,buttonAppearanceNeutral:er[this.ds].buttons.neutral,buttonAppearanceOutline:er[this.ds].buttons.outline,buttonAppearanceText:er[this.ds].buttons.text,badgeAppearanceAccent:er[this.ds].badge.accent,badgeAppearanceNeutral:er[this.ds].badge.neutral,badgeText:er[this.ds].badge.font};this.$emit(Ho.DS_CHANGED,o),this.preserveOptions||(this.userSelections={}),this.setTokensFromDs(er[this.ds].tokenDefaults),this.styleUpdate()}styleUpdate(){const e={accentColor:this.accentColor,neutralColor:this.neutralColor,bodyFont:Vo[this.bodyFont],luminance:this.luminance,density:this.density,designUnit:this.designUnit,borderRadius:this.borderRadius,strokeWidth:this.strokeWidth,baseHeightMultiplier:this.baseHeightMultiplier,baseFontSize:this.baseFontSize,baseLineHeight:this.baseLineHeight};this.$emit(Ho.STYLES_CHANGED,e)}setTokensFromDs(e){this.tokenUpdateInProgress=!0,Object.keys(e).forEach(t=>{this.preserveOptions&&void 0!==this.userSelections[t]?this[t]=this.userSelections[t]:this[t]=e[t]}),this.darkMode=this.luminance===p.StandardLuminance.DarkMode,d.DOM.queueUpdate(()=>{this.tokenUpdateInProgress=!1})}getAppDetails(){return fetch("api/details").then(e=>e.ok&&e.json()).then(e=>e).catch(e=>{console.error("Error fetching tokens:",e)})}connectedCallback(){super.connectedCallback(),this.userSelections={},(0,Yo.loadRobotoFontFaces)(),d.DOM.queueUpdate(()=>{this.styleUpdate()}),document.body.addEventListener(Ho.APPLY_CUSTOM_DESIGN,e=>{this.applyCustomDSTokens(e)})}};(0,r.Cg)([(0,d.attr)({mode:"boolean",attribute:"custom-design-mode"})],tr.prototype,"customDesignMode",void 0),(0,r.Cg)([d.observable],tr.prototype,"designSystems",void 0),(0,r.Cg)([d.observable],tr.prototype,"ds",void 0),(0,r.Cg)([d.attr],tr.prototype,"darkMode",void 0),(0,r.Cg)([d.observable],tr.prototype,"neutralColor",void 0),(0,r.Cg)([d.observable],tr.prototype,"accentColor",void 0),(0,r.Cg)([d.observable],tr.prototype,"bodyFont",void 0),(0,r.Cg)([d.observable],tr.prototype,"density",void 0),(0,r.Cg)([d.observable],tr.prototype,"borderRadius",void 0),(0,r.Cg)([d.observable],tr.prototype,"strokeWidth",void 0),(0,r.Cg)([d.observable],tr.prototype,"baseHeightMultiplier",void 0),(0,r.Cg)([d.observable],tr.prototype,"designUnit",void 0),(0,r.Cg)([d.observable],tr.prototype,"baseFontSize",void 0),(0,r.Cg)([d.observable],tr.prototype,"baseLineHeight",void 0),(0,r.Cg)([d.observable],tr.prototype,"preserveOptions",void 0),tr=(0,r.Cg)([(0,d.customElement)({name:"design-system-editor",template:qo,styles:Zo})],tr);const or=(0,h.createLogger)("documentation-components");var rr=o(80273),ir=o(83912);const ar=e=>{const t=(e=>{const t=(0,ir.parseColorHexRGB)(e);return t?p.SwatchRGB.from(t):null})(e);return t?p.PaletteRGB.create(t):null},nr=(e,t,o)=>{const r=e.getValueFor(o).match(/^(\d+)([a-z]+)/i),i=r[1],a=r[2];return Number(i)+t+a},sr=(e,t)=>{const o=ar(e.neutralColor);p.neutralPalette.setValueFor(t,o);const r=ar(e.accentColor);p.accentPalette.setValueFor(t,r),p.baseLayerLuminance.setValueFor(t,e.luminance),p.density.setValueFor(t,e.density),p.controlCornerRadius.setValueFor(t,e.borderRadius),p.strokeWidth.setValueFor(t,e.strokeWidth),p.designUnit.setValueFor(t,e.designUnit),p.bodyFont.setValueFor(t,e.bodyFont),p.typeRampBaseFontSize.setValueFor(t,e.baseFontSize),p.typeRampBaseLineHeight.setValueFor(t,e.baseLineHeight),p.typeRampMinus1FontSize.setValueFor(t,nr(p.typeRampBaseFontSize,rr.Du.minusOne,t)),p.typeRampMinus1LineHeight.setValueFor(t,nr(p.typeRampBaseLineHeight,rr.Du.minusOne,t)),p.typeRampMinus2FontSize.setValueFor(t,nr(p.typeRampBaseFontSize,rr.Du.minusTwo,t)),p.typeRampMinus2LineHeight.setValueFor(t,nr(p.typeRampBaseLineHeight,rr.Du.minusTwo,t)),p.typeRampPlus1FontSize.setValueFor(t,nr(p.typeRampBaseFontSize,rr.Du.plusOne,t)),p.typeRampPlus1LineHeight.setValueFor(t,nr(p.typeRampBaseLineHeight,rr.Du.plusOne,t)),p.typeRampPlus2FontSize.setValueFor(t,nr(p.typeRampBaseFontSize,rr.Du.plusTwo,t)),p.typeRampPlus2LineHeight.setValueFor(t,nr(p.typeRampBaseLineHeight,rr.Du.plusTwo,t)),p.typeRampPlus3FontSize.setValueFor(t,nr(p.typeRampBaseFontSize,rr.Du.plusThree,t)),p.typeRampPlus3LineHeight.setValueFor(t,nr(p.typeRampBaseLineHeight,rr.Du.plusThree,t)),p.typeRampPlus4FontSize.setValueFor(t,nr(p.typeRampBaseFontSize,rr.Du.plusFour,t)),p.typeRampPlus4LineHeight.setValueFor(t,nr(p.typeRampBaseLineHeight,rr.Du.plusFour,t)),p.typeRampPlus5FontSize.setValueFor(t,nr(p.typeRampBaseFontSize,rr.Du.plusFive,t)),p.typeRampPlus5LineHeight.setValueFor(t,nr(p.typeRampBaseLineHeight,rr.Du.plusFive,t)),p.typeRampPlus6FontSize.setValueFor(t,nr(p.typeRampBaseFontSize,rr.Du.plusSix,t)),p.typeRampPlus6LineHeight.setValueFor(t,nr(p.typeRampBaseLineHeight,rr.Du.plusSix,t))},lr=d.css`
|
|
2472
2473
|
:host {
|
|
2473
2474
|
--badge-fill-primary: var(--accent-fill-rest);
|
|
2474
2475
|
--badge-fill-neutral: var(--neutral-fill-rest);
|
|
@@ -2561,7 +2562,7 @@
|
|
|
2561
2562
|
display: flex;
|
|
2562
2563
|
flex-direction: column;
|
|
2563
2564
|
}
|
|
2564
|
-
`,
|
|
2565
|
+
`,dr=d.html`
|
|
2565
2566
|
${e=>{return t=e.prefix,d.html`
|
|
2566
2567
|
<template>
|
|
2567
2568
|
<${t}-design-system-provider ${(0,d.ref)("provider")}>
|
|
@@ -2988,7 +2989,7 @@
|
|
|
2988
2989
|
</${t}-design-system-provider>
|
|
2989
2990
|
</template>
|
|
2990
2991
|
`;var t}}
|
|
2991
|
-
`;let
|
|
2992
|
+
`;let cr=class extends d.FASTElement{constructor(){super(...arguments),this.prefix="rapid",this.buttonAppearanceAccent="primary-blue",this.buttonAppearanceNeutral="primary-grey",this.buttonAppearanceOutline="primary-gradient",this.buttonAppearanceText="lightweight",this.badgeAppearanceAccent="primary",this.badgeAppearanceNeutral="secondary",this.badgeText="white",this.cards=Array.from({length:8},(e,t)=>t+1),this.countries=["Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bonaire, Sint Eustatius and Saba","Cambodia","Cameroon","Canada"],this.menuActions=[{name:"View",callback:e=>or.debug("VIEWW!!!",e)},{name:"Delete",callback:e=>or.debug("DELETE!!!",e)},{name:"Edit",callback:e=>or.debug("EDIT!!!",e)},{name:"Wait",callback:e=>or.debug("WAIT???",e)}],this.menuDefinition={actions:this.menuActions,buttonAppearance:"stealth",data:{name:"test"}},this.dropDownMenuItems=[{name:"Menu item 1",callback:()=>alert("Menu item 1 clicked"),icon:{name:"glasses"}},{name:"Menu item 2",callback:()=>alert("Menu item 2 clicked")},{name:"Menu item 3",callback:()=>alert("Menu item 3 clicked"),submenu:[{name:"Menu item 5",callback:()=>alert("Menu item 5 clicked"),icon:{name:"address-card"}},{name:"Menu item 6",callback:()=>alert("Menu item 6 clicked"),submenu:[{name:"Menu item 7",callback:()=>alert("Menu item 7 clicked"),color:"red",icon:{name:"address-card"}},{name:"Menu item 8",callback:()=>alert("Menu item 8 clicked"),isDisabled:()=>!0}]}]}]}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Ho.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(Ho.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{p.bodyFont.withDefault(Wo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{sr(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix,this.buttonAppearanceAccent=e.detail.buttonAppearanceAccent,this.buttonAppearanceNeutral=e.detail.buttonAppearanceNeutral,this.buttonAppearanceOutline=e.detail.buttonAppearanceOutline,this.buttonAppearanceText=e.detail.buttonAppearanceText,this.badgeAppearanceAccent=e.detail.badgeAppearanceAccent,this.badgeAppearanceNeutral=e.detail.badgeAppearanceNeutral,this.badgeText=e.detail.badgeText}showDialog(e){this[e].show()}closeDialog(e){this[e].close()}dismissBanner(){this.banner.dismiss()}};(0,r.Cg)([d.observable],cr.prototype,"modal",void 0),(0,r.Cg)([d.attr],cr.prototype,"prefix",void 0),(0,r.Cg)([d.observable],cr.prototype,"buttonAppearanceAccent",void 0),(0,r.Cg)([d.observable],cr.prototype,"buttonAppearanceNeutral",void 0),(0,r.Cg)([d.observable],cr.prototype,"buttonAppearanceOutline",void 0),(0,r.Cg)([d.observable],cr.prototype,"buttonAppearanceText",void 0),(0,r.Cg)([d.observable],cr.prototype,"badgeAppearanceAccent",void 0),(0,r.Cg)([d.observable],cr.prototype,"badgeAppearanceNeutral",void 0),(0,r.Cg)([d.observable],cr.prototype,"badgeText",void 0),(0,r.Cg)([d.observable],cr.prototype,"cards",void 0),(0,r.Cg)([d.observable],cr.prototype,"countries",void 0),(0,r.Cg)([d.observable],cr.prototype,"menuActions",void 0),(0,r.Cg)([d.observable],cr.prototype,"menuDefinition",void 0),(0,r.Cg)([d.observable],cr.prototype,"dropDownMenuItems",void 0),(0,r.Cg)([d.observable],cr.prototype,"provider",void 0),cr=(0,r.Cg)([(0,d.customElement)({name:"preview-components",template:dr,styles:lr})],cr);const pr=d.css`
|
|
2992
2993
|
.export {
|
|
2993
2994
|
display: flex;
|
|
2994
2995
|
justify-content: center;
|
|
@@ -2999,7 +3000,7 @@
|
|
|
2999
3000
|
display: flex;
|
|
3000
3001
|
justify-content: space-between;
|
|
3001
3002
|
}
|
|
3002
|
-
`,
|
|
3003
|
+
`,ur=d.html`
|
|
3003
3004
|
<template>
|
|
3004
3005
|
<div class="export">
|
|
3005
3006
|
<rapid-button appearance="accent" @click="${e=>e.showModal()}">Save Changes</rapid-button>
|
|
@@ -3020,7 +3021,7 @@
|
|
|
3020
3021
|
</rapid-modal>
|
|
3021
3022
|
</div>
|
|
3022
3023
|
</template>
|
|
3023
|
-
`;let
|
|
3024
|
+
`;let mr=class extends d.FASTElement{constructor(){super(...arguments),this.formatValues=e=>{const t={design_tokens:{color:{accent:{$value:e.accentColor,$type:"color"},neutral:{$value:e.neutralColor,$type:"color"}},fontFamily:{bodyFont:{$value:e.bodyFont,$type:"fontFamily"}},typography:{baseFontSize:{$value:e.baseFontSize,$type:"dimension"},baseLineHeight:{$value:e.baseLineHeight,$type:"dimension"}},mode:{luminance:{$value:e.luminance,$type:"number"}},style:{density:{$value:e.density,$type:"number"},baseHeightMultiplier:{$value:e.baseHeightMultiplier,$type:"number"},borderRadius:{$value:e.borderRadius,$type:"number"},strokeWidth:{$value:e.strokeWidth,$type:"number"}},space:{designUnit:{$value:e.designUnit,$type:"number"}}}};return JSON.stringify(t,null,3)},this.showModal=()=>this.modal.show(),this.closeModal=()=>this.modal.close(),this.updateTokens=()=>{fetch("api/tokens",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokens:this.value})}).then(e=>{if(!e.ok)throw new Error(`API request failed with status ${e.status}`);return e.json()}).then(e=>{or.log("Tokens saved successfully:",e),this.$emit(Ho.APPLY_CUSTOM_DESIGN,e.message)}).catch(e=>{or.error("Error saving tokens:",e)}),this.closeModal()}}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Ho.STYLES_CHANGED,e=>{const t=e;this.value=this.formatValues(t.detail)})}};(0,r.Cg)([d.attr],mr.prototype,"value",void 0),(0,r.Cg)([d.attr],mr.prototype,"tokensPath",void 0),mr=(0,r.Cg)([(0,d.customElement)({name:"design-system-export",template:ur,styles:pr})],mr);const hr=d.css`
|
|
3024
3025
|
.colors {
|
|
3025
3026
|
display: flex;
|
|
3026
3027
|
flex-wrap: wrap;
|
|
@@ -3033,23 +3034,23 @@
|
|
|
3033
3034
|
flex-grow: 1;
|
|
3034
3035
|
height: 20px;
|
|
3035
3036
|
}
|
|
3036
|
-
`,
|
|
3037
|
+
`,vr=d.html`
|
|
3037
3038
|
<ul class="colors">
|
|
3038
3039
|
${(0,d.repeat)(e=>e.swatches,d.html`
|
|
3039
3040
|
<li class="color" style="background-color: ${e=>e.toColorString()}"></li>
|
|
3040
3041
|
`)}
|
|
3041
3042
|
</ul>
|
|
3042
|
-
`;let
|
|
3043
|
+
`;let gr=class extends d.FASTElement{constructor(){super(...arguments),this.swatches=[]}typeChanged(){if(this.type){p[this.type+"Palette"].subscribe({handleChange:e=>{const t=e.token.getValueFor(this);this.swatches=[...t.swatches]}},this)}}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{const e=ar(t[`${this.type}Color`]);this.swatches=[...e.swatches]})}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Ho.STYLES_CHANGED,e=>{this.handleStyleChanges(e)})}};(0,r.Cg)([d.observable],gr.prototype,"swatches",void 0),(0,r.Cg)([d.attr],gr.prototype,"type",void 0),gr=(0,r.Cg)([(0,d.customElement)({name:"color-palette",styles:hr,template:vr})],gr);const br=d.css`
|
|
3043
3044
|
.preview {
|
|
3044
3045
|
width: 40px;
|
|
3045
3046
|
height: 40px;
|
|
3046
3047
|
}
|
|
3047
|
-
`,
|
|
3048
|
+
`,yr=d.html`
|
|
3048
3049
|
<div
|
|
3049
3050
|
class="preview"
|
|
3050
3051
|
style="background-color: ${e=>p[e.tokenName].createCSS()}"
|
|
3051
3052
|
></div>
|
|
3052
|
-
`;let
|
|
3053
|
+
`;let fr=class extends d.FASTElement{};(0,r.Cg)([d.attr],fr.prototype,"tokenName",void 0),fr=(0,r.Cg)([(0,d.customElement)({name:"color-token",styles:br,template:yr})],fr);const $r=d.css`
|
|
3053
3054
|
.container {
|
|
3054
3055
|
display: flex;
|
|
3055
3056
|
width: 100%;
|
|
@@ -3097,7 +3098,7 @@
|
|
|
3097
3098
|
.container > div:not(:last-child) {
|
|
3098
3099
|
border-right: 1px solid #fafafa;
|
|
3099
3100
|
}
|
|
3100
|
-
|
|
3101
|
+
`,wr=[{title:"Fill",subcategories:[{title:"Fill Colour",tokens:[{name:"fillColor",cssProperty:"--fill-color"}]},{title:"Accent Fill",tokens:[{name:"accentFillRest",cssProperty:"--accent-fill-rest"},{name:"accentFillHover",cssProperty:"--accent-fill-hover"},{name:"accentFillActive",cssProperty:"--accent-fill-active"},{name:"accentFillFocus",cssProperty:"--accent-fill-focus"}]},{title:"Neutral Fill",tokens:[{name:"neutralFillRest",cssProperty:"--neutral-fill-rest"},{name:"neutralFillHover",cssProperty:"--neutral-fill-hover"},{name:"neutralFillActive",cssProperty:"--neutral-fill-active"},{name:"neutralFillFocus",cssProperty:"--neutral-fill-focus"}]},{title:"Neutral Fill Input",tokens:[{name:"neutralFillInputRest",cssProperty:"--neutral-fill-input-rest"},{name:"neutralFillInputHover",cssProperty:"--neutral-fill-input-hover"},{name:"neutralFillInputActive",cssProperty:"--neutral-fill-input-active"},{name:"neutralFillInputFocus",cssProperty:"--neutral-fill-input-focus"}]},{title:"Neutral Fill Stealth",tokens:[{name:"neutralFillStealthRest",cssProperty:"--neutral-fill-stealth-rest"},{name:"neutralFillStealthHover",cssProperty:"--neutral-fill-stealth-hover"},{name:"neutralFillStealthActive",cssProperty:"--neutral-fill-stealth-active"},{name:"neutralFillStealthFocus",cssProperty:"--neutral-fill-stealth-focus"}]},{title:"Neutral Fill Strong",tokens:[{name:"neutralFillStrongRest",cssProperty:"--neutral-fill-strong-rest"},{name:"neutralFillStrongHover",cssProperty:"--neutral-fill-strong-hover"},{name:"neutralFillStrongActive",cssProperty:"--neutral-fill-strong-active"},{name:"neutralFillStrongFocus",cssProperty:"--neutral-fill-strong-focus"}]}]},{title:"Foreground",subcategories:[{title:"Neutral Foreground",tokens:[{name:"neutralForegroundRest",cssProperty:"--neutral-foreground-rest"},{name:"neutralForegroundHint",cssProperty:"--neutral-foreground-hint"}]},{title:"Accent Foreground",tokens:[{name:"accentForegroundRest",cssProperty:"--accent-foreground-rest"},{name:"accentForegroundHover",cssProperty:"--accent-foreground-hover"},{name:"accentForegroundActive",cssProperty:"--accent-foreground-active"},{name:"accentForegroundFocus",cssProperty:"--accent-foreground-focus"}]},{title:"Foreground on Accent",tokens:[{name:"foregroundOnAccentRest",cssProperty:"--foreground-on-accent-rest"},{name:"foregroundOnAccentHover",cssProperty:"--foreground-on-accent-hover"},{name:"foregroundOnAccentActive",cssProperty:"--foreground-on-accent-active"},{name:"foregroundOnAccentFocus",cssProperty:"--foreground-on-accent-focus"}]},{title:"Foreground on accent large",tokens:[{name:"foregroundOnAccentRestLarge",cssProperty:"--foreground-on-accent-rest-large"},{name:"foregroundOnAccentHoverLarge",cssProperty:"--foreground-on-accent-hover-large"},{name:"foregroundOnAccentActiveLarge",cssProperty:"--foreground-on-accent-active-large"},{name:"foregroundOnAccentFocusLarge",cssProperty:"--foreground-on-accent-focus-large"}]}]},{title:"Stroke",subcategories:[{title:"Focus Stroke",tokens:[{name:"focusStrokeOuter",cssProperty:"--focus-stroke-outer"},{name:"focusStrokeInner",cssProperty:"--focus-stroke-inner"}]},{title:"Neutral Stroke",tokens:[{name:"neutralStrokeRest",cssProperty:"---neutral-stroke-rest"},{name:"neutralStrokeHover",cssProperty:"--neutral-stroke-hover"},{name:"neutralStrokeActive",cssProperty:"--neutral-stroke-active"},{name:"neutralStrokeFocus",cssProperty:"--neutral-stroke-focus"}]},{title:"Neutral stroke divider",tokens:[{name:"neutralStrokeDividerRest",cssProperty:"--neutral-stroke-divider-rest"}]}]},{title:"Layer",subcategories:[{title:"Neutral Layers",tokens:[{name:"neutralLayer1",cssProperty:"--neutral-layer-1"},{name:"neutralLayer2",cssProperty:"--neutral-layer-2"},{name:"neutralLayer3",cssProperty:"--neutral-layer-3"},{name:"neutralLayer4",cssProperty:"--neutral-layer-4"}]},{title:"Neutral Layer Card Container",tokens:[{name:"neutralLayerCardContainer",cssProperty:"--neutral-layer-card-container"}]},{title:"Neutral Fill Layer",tokens:[{name:"neutralFillLayerRest",cssProperty:"--neutral-fill-layer-rest"}]},{title:"Neutral Layer Floating",tokens:[{name:"neutralLayerFloating",cssProperty:"--neutral-layer-floating"}]}]}],xr=d.html`
|
|
3101
3102
|
<div class="row">
|
|
3102
3103
|
<div
|
|
3103
3104
|
class="preview"
|
|
@@ -3109,19 +3110,19 @@
|
|
|
3109
3110
|
${(e,t)=>p[e.name].getValueFor(t.parentContext.parentContext.parent.provider).toColorString().toUpperCase()}
|
|
3110
3111
|
</div>
|
|
3111
3112
|
</div>
|
|
3112
|
-
`,
|
|
3113
|
+
`,Sr=d.html`
|
|
3113
3114
|
<div class="container" ${(0,d.ref)("provider")}>
|
|
3114
|
-
${(0,d.repeat)(()
|
|
3115
|
+
${(0,d.repeat)(()=>wr,d.html`
|
|
3115
3116
|
<div class="column">
|
|
3116
3117
|
<h3 class="header-title">${e=>e.title}</h3>
|
|
3117
3118
|
${(0,d.repeat)(e=>e.subcategories,d.html`
|
|
3118
3119
|
<h4>${e=>e.title}</h4>
|
|
3119
|
-
${(0,d.repeat)(e=>e.tokens,
|
|
3120
|
+
${(0,d.repeat)(e=>e.tokens,xr)}
|
|
3120
3121
|
`)}
|
|
3121
3122
|
</div>
|
|
3122
3123
|
`)}
|
|
3123
3124
|
</div>
|
|
3124
|
-
`;let
|
|
3125
|
+
`;let Cr=class extends d.FASTElement{connectedCallback(){super.connectedCallback(),document.body.addEventListener(Ho.STYLES_CHANGED,e=>{const t=e.detail;sr(t,this.provider)})}};(0,r.Cg)([d.observable],Cr.prototype,"provider",void 0),Cr=(0,r.Cg)([(0,d.customElement)({name:"color-tokens",template:Sr,styles:$r})],Cr);const Ar=d.css`
|
|
3125
3126
|
table {
|
|
3126
3127
|
background: var(--neutral-fill-rest);
|
|
3127
3128
|
color: var(--neutral-foreground-rest);
|
|
@@ -3130,7 +3131,7 @@
|
|
|
3130
3131
|
th {
|
|
3131
3132
|
text-align: left;
|
|
3132
3133
|
}
|
|
3133
|
-
`,
|
|
3134
|
+
`,Ir=d.html`
|
|
3134
3135
|
<table ${(0,d.ref)("provider")} style="font-family: ${()=>p.bodyFont.createCSS()}">
|
|
3135
3136
|
<colgroup>
|
|
3136
3137
|
<col style="width: 15%;" />
|
|
@@ -3358,7 +3359,7 @@
|
|
|
3358
3359
|
</tr>
|
|
3359
3360
|
</tbody>
|
|
3360
3361
|
</table>
|
|
3361
|
-
`;let
|
|
3362
|
+
`;let kr=class extends d.FASTElement{connectedCallback(){super.connectedCallback(),document.body.addEventListener(Ho.STYLES_CHANGED,e=>{const t=e.detail;sr(t,this.provider)})}};(0,r.Cg)([d.observable],kr.prototype,"provider",void 0),kr=(0,r.Cg)([(0,d.customElement)({name:"typography-tokens",template:Ir,styles:Ar})],kr);const Mr=d.css`
|
|
3362
3363
|
:host {
|
|
3363
3364
|
background: var(--fill-color);
|
|
3364
3365
|
color: var(--neutral-foreground-rest);
|
|
@@ -3374,7 +3375,7 @@
|
|
|
3374
3375
|
margin-top: 24px;
|
|
3375
3376
|
padding: 0 calc((6 + (var(--design-unit) * 2 * var(--density))) * 1px);
|
|
3376
3377
|
}
|
|
3377
|
-
`,
|
|
3378
|
+
`,Lr=d.css`
|
|
3378
3379
|
:host {
|
|
3379
3380
|
--badge-fill-primary: var(--accent-fill-rest);
|
|
3380
3381
|
--badge-fill-neutral: var(--neutral-fill-rest);
|
|
@@ -3407,7 +3408,7 @@
|
|
|
3407
3408
|
grid-area: 1 / 2 / 3 / 3;
|
|
3408
3409
|
}
|
|
3409
3410
|
}
|
|
3410
|
-
`,
|
|
3411
|
+
`,Er=d.html`
|
|
3411
3412
|
${e=>{return t=e.prefix,d.html`
|
|
3412
3413
|
<template>
|
|
3413
3414
|
<${t}-design-system-provider ${(0,d.ref)("provider")}>
|
|
@@ -3428,7 +3429,7 @@
|
|
|
3428
3429
|
</${t}-design-system-provider>
|
|
3429
3430
|
</template>
|
|
3430
3431
|
`;var t}}
|
|
3431
|
-
`;let
|
|
3432
|
+
`;let Tr=class extends d.FASTElement{constructor(){super(...arguments),this.prefix="rapid",this.buttonAppearanceAccent="primary-blue",this.buttonAppearanceNeutral="primary-grey",this.buttonAppearanceOutline="primary-gradient",this.buttonAppearanceText="lightweight",this.badgeAppearanceAccent="primary",this.badgeAppearanceNeutral="secondary",this.badgeText="white",this.cards=Array.from({length:8},(e,t)=>t+1),this.countries=["Afghanistan","Aland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bonaire, Sint Eustatius and Saba","Cambodia","Cameroon","Canada"],this.menuActions=[{name:"View",callback:e=>or.debug("VIEWW!!!",e)},{name:"Delete",callback:e=>or.debug("DELETE!!!",e)},{name:"Edit",callback:e=>or.debug("EDIT!!!",e)},{name:"Wait",callback:e=>or.debug("WAIT???",e)}],this.menuDefinition={actions:this.menuActions,buttonAppearance:"stealth",data:{name:"test"}},this.dropDownMenuItems=[{name:"Menu item 1",callback:()=>alert("Menu item 1 clicked"),icon:{name:"glasses"}},{name:"Menu item 2",callback:()=>alert("Menu item 2 clicked")},{name:"Menu item 3",callback:()=>alert("Menu item 3 clicked"),submenu:[{name:"Menu item 5",callback:()=>alert("Menu item 5 clicked"),icon:{name:"address-card"}},{name:"Menu item 6",callback:()=>alert("Menu item 6 clicked"),submenu:[{name:"Menu item 7",callback:()=>alert("Menu item 7 clicked"),color:"red",icon:{name:"address-card"}},{name:"Menu item 8",callback:()=>alert("Menu item 8 clicked"),isDisabled:()=>!0}]}]}]}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Ho.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(Ho.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{p.bodyFont.withDefault(Wo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{sr(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix,this.buttonAppearanceAccent=e.detail.buttonAppearanceAccent,this.buttonAppearanceNeutral=e.detail.buttonAppearanceNeutral,this.buttonAppearanceOutline=e.detail.buttonAppearanceOutline,this.buttonAppearanceText=e.detail.buttonAppearanceText,this.badgeAppearanceAccent=e.detail.badgeAppearanceAccent,this.badgeAppearanceNeutral=e.detail.badgeAppearanceNeutral,this.badgeText=e.detail.badgeText}showDialog(e){this[e].show()}closeDialog(e){this[e].close()}dismissBanner(){this.banner.dismiss()}};(0,r.Cg)([d.observable],Tr.prototype,"modal",void 0),(0,r.Cg)([d.attr],Tr.prototype,"prefix",void 0),(0,r.Cg)([d.observable],Tr.prototype,"buttonAppearanceAccent",void 0),(0,r.Cg)([d.observable],Tr.prototype,"buttonAppearanceNeutral",void 0),(0,r.Cg)([d.observable],Tr.prototype,"buttonAppearanceOutline",void 0),(0,r.Cg)([d.observable],Tr.prototype,"buttonAppearanceText",void 0),(0,r.Cg)([d.observable],Tr.prototype,"badgeAppearanceAccent",void 0),(0,r.Cg)([d.observable],Tr.prototype,"badgeAppearanceNeutral",void 0),(0,r.Cg)([d.observable],Tr.prototype,"badgeText",void 0),(0,r.Cg)([d.observable],Tr.prototype,"cards",void 0),(0,r.Cg)([d.observable],Tr.prototype,"countries",void 0),(0,r.Cg)([d.observable],Tr.prototype,"menuActions",void 0),(0,r.Cg)([d.observable],Tr.prototype,"menuDefinition",void 0),(0,r.Cg)([d.observable],Tr.prototype,"dropDownMenuItems",void 0),(0,r.Cg)([d.observable],Tr.prototype,"provider",void 0),Tr=(0,r.Cg)([(0,d.customElement)({name:"preview-app",template:Er,styles:Lr})],Tr);const Rr={type:"VerticalLayout",elements:[{type:"Group",label:"Group 1",scope:"#/properties/group1",options:{childElements:[{type:"VerticalLayout",elements:[{type:"Control",scope:"#/properties/group1/properties/NAME",label:"Name"}]}]}},{type:"Group",label:"Group 2",scope:"#/properties/group2",options:{childElements:[{type:"LayoutVertical2Columns",elements:[{type:"Control",scope:"#/properties/group2/properties/QUANTITY",label:"Quantity"},{type:"Control",scope:"#/properties/group2/properties/PRICE",label:"Price"},{type:"Control",scope:"#/properties/group2/properties/COUNTERPARTY_ID",options:{data:[{name:"Genesis Global",value:"GENESIS"},{name:"Acme Global",value:"ACME"}],valueField:"value",labelField:"name"},label:"Counterparty"},{type:"Control",scope:"#/properties/group2/properties/INSTRUMENT_ID",options:{data:[{name:"Bond",value:"BOND"},{name:"Equity",value:"EQUITY"}],valueField:"value",labelField:"name"},label:"Instrument"},{type:"Control",scope:"#/properties/group2/properties/SIDE",label:"Side"},{type:"Control",scope:"#/properties/group2/properties/TRADE_DATE",label:"Trade Date"},{type:"Control",scope:"#/properties/group2/properties/ACTIVE",label:"Active"}]}]}}]},_r={type:"object",properties:{group1:{type:"object",properties:{NAME:{type:"string"}}},group2:{type:"object",properties:{QUANTITY:{type:"number"},PRICE:{type:"number"},COUNTERPARTY_ID:{type:"string"},INSTRUMENT_ID:{type:"string"},SIDE:{type:"string",enum:["BUY","SELL"]},TRADE_DATE:{type:"number",format:"date",description:"org.joda.time.DateTime"},ACTIVE:{type:"boolean"}},required:["QUANTITY","PRICE"]}}},Dr={type:"VerticalLayout",elements:[{type:"Control",scope:"#/properties/users",options:{childUiSchema:{type:"HorizontalLayout",elements:[{type:"Control",scope:"#/properties/firstname",label:"First Name"},{type:"Control",scope:"#/properties/lastname",label:"Last Name"},{type:"Control",scope:"#/properties/email",label:"Email"}]}}}]},Nr={type:"object",properties:{users:{type:"array",items:{type:"object",title:"Users",properties:{firstname:{type:"string"},lastname:{type:"string"},email:{type:"string",format:"email"}},required:["firstname"]}}}},Pr=d.css`
|
|
3432
3433
|
:host {
|
|
3433
3434
|
background: var(--fill-color);
|
|
3434
3435
|
color: var(--neutral-foreground-rest);
|
|
@@ -3459,7 +3460,7 @@
|
|
|
3459
3460
|
rapid-design-system-provider {
|
|
3460
3461
|
display: inline;
|
|
3461
3462
|
}
|
|
3462
|
-
`,
|
|
3463
|
+
`,zr=d.html`
|
|
3463
3464
|
${e=>{return t=e.prefix,d.html`
|
|
3464
3465
|
<template>
|
|
3465
3466
|
<${t}-design-system-provider ${(0,d.ref)("provider")}>
|
|
@@ -3483,7 +3484,7 @@
|
|
|
3483
3484
|
</${t}-design-system-provider>
|
|
3484
3485
|
</template>
|
|
3485
3486
|
`;var t}}
|
|
3486
|
-
`;let
|
|
3487
|
+
`;let Or=class extends d.FASTElement{constructor(){super(...arguments),this.jsonSchema=_r,this.uischema=Rr,this.jsonSchemaArray=Nr,this.uiSchemaArray=Dr,this.prefix="rapid",this.editedEntity={group1:{NAME:"Test Name"},group2:{COUNTERPARTY_ID:"GENESIS",INSTRUMENT_ID:"BOND"}},this.editedEntityArray={users:[{firstname:"Max",lastname:"Mustermann",age:25,email:"max@mustermann.com"},{firstname:"John",lastname:"Doe",age:35,email:"john@doe.com"}]}}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Ho.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(Ho.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{p.bodyFont.withDefault(Wo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{sr(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix}};(0,r.Cg)([d.observable],Or.prototype,"jsonSchema",void 0),(0,r.Cg)([d.observable],Or.prototype,"uischema",void 0),(0,r.Cg)([d.observable],Or.prototype,"jsonSchemaArray",void 0),(0,r.Cg)([d.observable],Or.prototype,"uiSchemaArray",void 0),(0,r.Cg)([d.attr],Or.prototype,"prefix",void 0),(0,r.Cg)([d.observable],Or.prototype,"provider",void 0),(0,r.Cg)([d.observable],Or.prototype,"editedEntity",void 0),(0,r.Cg)([d.observable],Or.prototype,"editedEntityArray",void 0),Or=(0,r.Cg)([(0,d.customElement)({name:"preview-form",template:zr,styles:Pr})],Or);var Fr=o(55365),jr=o(39604);const Ur=[{athlete:"Michael Phelps",age:23,country:"United States",year:2008,date:"24/08/2008",sport:"Swimming",gold:8,silver:0,bronze:0,total:8,isActionDisabled:!0,BUY_SELL:"BUY"},{athlete:"Michael Phelps",age:19,country:"United States",year:2004,date:"29/08/2004",sport:"Swimming",gold:6,silver:0,bronze:2,total:8,BUY_SELL:"SELL"},{athlete:"Michael Phelps",age:27,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:4,silver:2,bronze:0,total:6,BUY_SELL:"BUY"},{athlete:"Natalie Coughlin",age:25,country:"United States",year:2008,date:"24/08/2008",sport:"Swimming",gold:1,silver:2,bronze:3,total:6,isActionDisabled:!0,BUY_SELL:"SELL"},{athlete:"Aleksey Nemov",age:24,country:"Russia",year:2e3,date:"01/10/2000",sport:"Gymnastics",gold:2,silver:1,bronze:3,total:6,BUY_SELL:"BUY"},{athlete:"Alicia Coutts",age:24,country:"Australia",year:2012,date:"12/08/2012",sport:"Swimming",gold:1,silver:3,bronze:1,total:5,isActionDisabled:!0,BUY_SELL:"SELL"},{athlete:"Missy Franklin",age:17,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:4,silver:0,bronze:1,total:5,BUY_SELL:"BUY"},{athlete:"Ryan Lochte",age:27,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:2,silver:2,bronze:1,total:5,BUY_SELL:"SELL"},{athlete:"Allison Schmitt",age:22,country:"United States",year:2012,date:"12/08/2012",sport:"Swimming",gold:3,silver:1,bronze:1,total:5,BUY_SELL:"BUY"},{athlete:"Natalie Coughlin",age:21,country:"United States",year:2004,date:"29/08/2004",sport:"Swimming",gold:2,silver:2,bronze:1,total:5,BUY_SELL:"SELL"},{athlete:"Ian Thorpe",age:17,country:"Australia",year:2e3,date:"01/10/2000",sport:"Swimming",gold:3,silver:2,bronze:0,total:5,BUY_SELL:"BUY"},{athlete:"Dara Torres",age:33,country:"United States",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:0,bronze:3,total:5,BUY_SELL:"SELL"},{athlete:"Cindy Klassen",age:26,country:"Canada",year:2006,date:"26/02/2006",sport:"Speed Skating",gold:1,silver:2,bronze:2,total:5,BUY_SELL:"BUY"},{athlete:"Nastia Liukin",age:18,country:"United States",year:2008,date:"24/08/2008",sport:"Gymnastics",gold:1,silver:3,bronze:1,total:5,BUY_SELL:"SELL"},{athlete:"Marit Bjørgen",age:29,country:"Norway",year:2010,date:"28/02/2010",sport:"Cross Country Skiing",gold:3,silver:1,bronze:1,total:5,BUY_SELL:"BUY"},{athlete:"Sun Yang",age:20,country:"China",year:2012,date:"12/08/2012",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Kirsty Coventry",age:24,country:"Zimbabwe",year:2008,date:"24/08/2008",sport:"Swimming",gold:1,silver:3,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Libby Lenton-Trickett",age:23,country:"Australia",year:2008,date:"24/08/2008",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Ryan Lochte",age:24,country:"United States",year:2008,date:"24/08/2008",sport:"Swimming",gold:2,silver:0,bronze:2,total:4,BUY_SELL:"BUY"},{athlete:"Inge de Bruijn",age:30,country:"Netherlands",year:2004,date:"29/08/2004",sport:"Swimming",gold:1,silver:1,bronze:2,total:4,BUY_SELL:"SELL"},{athlete:"Petria Thomas",age:28,country:"Australia",year:2004,date:"29/08/2004",sport:"Swimming",gold:3,silver:1,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Ian Thorpe",age:21,country:"Australia",year:2004,date:"29/08/2004",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Inge de Bruijn",age:27,country:"Netherlands",year:2e3,date:"01/10/2000",sport:"Swimming",gold:3,silver:1,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Gary Hall Jr.",age:25,country:"United States",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:1,bronze:1,total:4,BUY_SELL:"SELL"},{athlete:"Michael Klim",age:23,country:"Australia",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:2,bronze:0,total:4,BUY_SELL:"BUY"},{athlete:"Susie O'Neill",age:27,country:"Australia",year:2e3,date:"01/10/2000",sport:"Swimming",gold:1,silver:3,bronze:0,total:4,BUY_SELL:"SELL"},{athlete:"Jenny Thompson",age:27,country:"United States",year:2e3,date:"01/10/2000",sport:"Swimming",gold:3,silver:0,bronze:1,total:4,BUY_SELL:"BUY"},{athlete:"Pieter van den Hoogenband",age:22,country:"Netherlands",year:2e3,date:"01/10/2000",sport:"Swimming",gold:2,silver:0,bronze:2,total:4,BUY_SELL:"SELL"},{athlete:"An Hyeon-Su",age:20,country:"South Korea",year:2006,date:"26/02/2006",sport:"Short-Track Speed Skating",gold:3,silver:0,bronze:1,total:4,BUY_SELL:"BUY"},{athlete:"Aliya Mustafina",age:17,country:"Russia",year:2012,date:"12/08/2012",sport:"Gymnastics",gold:1,silver:1,bronze:2,total:4,BUY_SELL:"SELL"},{athlete:"Shawn Johnson",age:16,country:"United States",year:2008,date:"24/08/2008",sport:"Gymnastics",gold:1,silver:3,bronze:0,total:4,BUY_SELL:"BUY"}],Br=d.css`
|
|
3487
3488
|
:host {
|
|
3488
3489
|
background: var(--fill-color);
|
|
3489
3490
|
color: var(--neutral-foreground-rest);
|
|
@@ -3498,7 +3499,7 @@
|
|
|
3498
3499
|
.grid-height {
|
|
3499
3500
|
height: 100%;
|
|
3500
3501
|
}
|
|
3501
|
-
`,
|
|
3502
|
+
`,Hr=d.html`
|
|
3502
3503
|
${e=>{return t=e.prefix,d.html`
|
|
3503
3504
|
<template>
|
|
3504
3505
|
<${t}-design-system-provider ${(0,d.ref)("provider")}>
|
|
@@ -3527,7 +3528,7 @@
|
|
|
3527
3528
|
</${t}-design-system-provider>
|
|
3528
3529
|
</template>
|
|
3529
3530
|
`;var t}}
|
|
3530
|
-
`;let
|
|
3531
|
+
`;let Yr=class extends d.FASTElement{constructor(){super(...arguments),this.prefix="rapid",this.rowData=[...Ur],this.columnDefs=[{headerName:"#",colId:"rowNum",valueGetter:"node.id",width:80,pinned:"left"},{headerName:"Athlete",field:"athlete",width:150,pinned:"left"},{headerName:"Age",field:"age",width:90,pinned:"left"},{headerName:"Country",field:"country",width:150},{headerName:"Year",field:"year",width:90},{field:"BUY_SELL",headerName:"B/S",width:100,cellRenderer:Fr.IX.statusPill,cellRendererParams:e=>({text:e.value,backgroundColor:"BUY"===e.value||"LONG"===e.value?"green":"red"})},{headerName:"Date",field:"date",width:110,filter:"agDateColumnFilter",filterParams:{buttons:["apply","reset"],browserDatePicker:!0,comparator:(e,t)=>{if(null==t)return-1;const o=t.split("/"),r=new Date(Number(o[2]),Number(o[1])-1,Number(o[0]));return e.getTime()===r.getTime()?0:r<e?-1:r>e?1:0}}},{headerName:"Sport",field:"sport",width:150,editable:!0},{headerName:"Gold",field:"gold",width:100},{headerName:"Silver",field:"silver",width:100},{headerName:"Bronze",field:"bronze",width:100},{headerName:"Total",field:"total",width:100,pinned:"right"}],this.gridOptions={defaultColDef:{resizable:!0,filter:!0},debug:!1,columnDefs:this.columnDefs,rowData:this.rowData},this.myCustomCheckboxRenderer=e=>2012===e.value?`<div><span style="color: var(--warning-color); font-weight: bold;">${e.value}</span></div>`:e.value,this.multipleCustomFoundationColumnConfigs=[{headerName:"Country",field:"country",cellRenderer:Fr.IX.boolean},{headerName:"Year",field:"year",cellRenderer:this.myCustomCheckboxRenderer}],this.multipleActions=[{name:"View",callback:e=>console.log("VIEWW!!!",e)},{name:"Delete",callback:e=>console.log("DELETE!!!",e)},{name:"Edit",callback:e=>console.log("EDIT!!!",e)},{name:"Wait",callback:e=>console.log("WHAT???",e)}],this.multipleActionsMenuSlottedConfig=(0,jr.Al)(this.multipleActions,{headerName:"Multiple Actions",width:140},"⋮",!0,"stealth"),this.singleActionSlottedConfig={headerName:"Single Action",width:200,cellRenderer:Fr.IX.action,cellRendererParams:{actionClick:e=>console.log("CLICKED ON SINGLE ACTION!!!!",e),actionName:"Single Action",appearance:"accent",isDisabled:e=>!!e.isActionDisabled,dataTestId:"singleActionTestId#",uniqueFieldName:"UNIQUE_ID"}}}setGridOptions(){this.grid.gridOptions=this.gridOptions}connectedCallback(){super.connectedCallback(),document.body.addEventListener(Ho.STYLES_CHANGED,e=>{this.handleStyleChanges(e)}),document.body.addEventListener(Ho.DS_CHANGED,e=>{this.handleDSChanges(e)}),d.DOM.queueUpdate(()=>{this.setGridOptions(),p.bodyFont.withDefault(Wo)})}handleStyleChanges(e){const t=e.detail;t&&d.DOM.queueUpdate(()=>{sr(t,this.provider)})}handleDSChanges(e){this.prefix=e.detail.prefix,d.DOM.queueUpdate(()=>{this.setGridOptions()})}};(0,r.Cg)([d.observable],Yr.prototype,"grid",void 0),(0,r.Cg)([d.attr],Yr.prototype,"prefix",void 0),(0,r.Cg)([d.observable],Yr.prototype,"provider",void 0),(0,r.Cg)([d.observable],Yr.prototype,"rowData",void 0),(0,r.Cg)([d.observable],Yr.prototype,"columnDefs",void 0),(0,r.Cg)([d.observable],Yr.prototype,"gridOptions",void 0),Yr=(0,r.Cg)([(0,d.customElement)({name:"preview-grid",template:Hr,styles:Br})],Yr);const Gr=d.html`
|
|
3531
3532
|
<template>
|
|
3532
3533
|
<rapid-tabs>
|
|
3533
3534
|
<rapid-tab slot="tab">Components</rapid-tab>
|
|
@@ -3560,5 +3561,5 @@
|
|
|
3560
3561
|
</rapid-tab-panel>
|
|
3561
3562
|
</rapid-tabs>
|
|
3562
3563
|
</template>
|
|
3563
|
-
`;let
|
|
3564
|
-
//# sourceMappingURL=65.
|
|
3564
|
+
`;let Vr=class extends d.FASTElement{};Vr=(0,r.Cg)([(0,d.customElement)({name:"design-system-preview",template:Gr,styles:Mr})],Vr),(0,Yo.provideDesignSystem)().register(Yo.baseComponents,Go.rapidGridComponents,Bo)}}]);
|
|
3565
|
+
//# sourceMappingURL=65.7bcc07df70f2d8b27fa413b681d275cc.js.map
|