@genesislcap/design-system-configurator 15.75.0 → 15.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{109.109.304cb4c7b85cb8baeaa2.js → 109.109.a4939967ee05d4074da3.js} +22 -56
- package/dist/109.f9eed5fb8279bfed15f27af3c33b4d97.js.map +1 -0
- package/dist/{966.966.69a3b4ebaf86fe48e7e0.js → 249.249.7a0eb6aca841acedbe6e.js} +578 -462
- package/dist/249.89c72ec851a5758f95ff3a8580759dfc.js.map +1 -0
- package/dist/762.098cd6d5fd92073ed8546f1a963dcee7.js.map +1 -0
- package/dist/762.762.35100608409b1ad4c6f9.js +11 -0
- package/dist/837.58641b79ee0d969441ebcb4b969c237a.js.map +1 -0
- package/dist/{837.837.623cffcbd1ed2682b2e9.js → 837.837.02b7bcdd3864f8f6c7b0.js} +1 -19
- package/dist/{designSystemConfigurator.72c92f52ec8d892784981bce5f3e3789.js.map → designSystemConfigurator.df34fb2477e448234f825b6824c21a46.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.fd28bf454bf9a113973d.js → main.0b81ca22c8189648340a.js} +2 -2
- package/dist/{main.645cb6657aaefb5c217c5d8f753c023d.js.map → main.dc150afd194cd0e237dc79c67f0d9960.js.map} +1 -1
- package/dist/remoteEntry.js +2 -2
- package/package.json +11 -11
- package/dist/109.1450c61cf63649d0a94343c00ff5d796.js.map +0 -1
- package/dist/762.57e38da8fc6d8c63e28dd1d8b7f74278.js.map +0 -1
- package/dist/762.762.f30f855615b9202dacbc.js +0 -11
- package/dist/837.bd8b531ecedde7e743c2d7d53d7f6a70.js.map +0 -1
- package/dist/966.caebc32b863e86d1b6e93a1113bd5f1a.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[966],{8420(e,t,i){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),o={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}};return i.default.locale(o,null,!0),o}(i(94343))},58915(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,n=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},r=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var i,o=a.meridiem;if(o){for(var n=1;n<=24;n+=1)if(e.indexOf(o(n,0,t))>-1){i=n>12;break}}else i=e===(t?"pm":"PM");return i},h={A:[s,function(e){this.afternoon=u(e,!1)}],a:[s,function(e){this.afternoon=u(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[o,l("day")],Do:[s,function(e){var t=a.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[n,l("week")],ww:[o,l("week")],M:[n,l("month")],MM:[o,l("month")],MMM:[s,function(e){var t=c("months"),i=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[o,function(e){this.year=r(e)}],YYYY:[/\d{4}/,l("year")],Z:d,ZZ:d};function p(i){var o,n;o=i,n=a&&a.formats;for(var s=(i=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,o){var s=o&&o.toUpperCase();return i||n[o]||e[o]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),r=s.length,l=0;l<r;l+=1){var d=s[l],c=h[d],u=c&&c[0],p=c&&c[1];s[l]=p?{regex:u,parser:p}:d.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,o=0;i<r;i+=1){var n=s[i];if("string"==typeof n)o+=n.length;else{var a=n.regex,l=n.parser,d=e.slice(o),c=a.exec(d)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(r=e.parseTwoDigitYear);var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date,o=e.utc,s=e.args;this.$u=o;var r=s[1];if("string"==typeof r){var l=!0===s[2],d=!0===s[3],c=l||d,u=s[2];d&&(u=s[2]),a=this.$locale(),!l&&u&&(a=i.Ls[u]),this.$d=function(e,t,i,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var n=p(t)(e),s=n.year,a=n.month,r=n.day,l=n.hours,d=n.minutes,c=n.seconds,u=n.milliseconds,h=n.zone,m=n.week,g=new Date,v=r||(s||a?1:g.getDate()),f=s||g.getFullYear(),b=0;s&&!a||(b=a>0?a-1:g.getMonth());var y,w=l||0,C=d||0,x=c||0,$=u||0;return h?new Date(Date.UTC(f,b,v,w,C,x,$+60*h.offset*1e3)):i?new Date(Date.UTC(f,b,v,w,C,x,$)):(y=new Date(f,b,v,w,C,x,$),m&&(y=o(y).week(m).toDate()),y)}catch(e){return new Date("")}}(t,r,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),c&&t!=this.format(r)&&(this.$d=new Date("")),a={}}else if(r instanceof Array)for(var h=r.length,m=1;m<=h;m+=1){s[1]=r[m-1];var g=i.apply(this,s);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}m===h&&(this.$d=new Date(""))}else n.call(this,e)}}}()},33839(e){e.exports=function(){"use strict";return function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}()},7554(e){e.exports=function(){"use strict";return function(e,t,i){var o=t.prototype,n=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,o,s){var a=e.name?e:e.$locale(),r=n(a[t]),l=n(a[i]),d=r||l.map(function(e){return e.slice(0,o)});if(!s)return d;var c=a.weekStart;return d.map(function(e,t){return d[(t+(c||0))%7]})},a=function(){return i.Ls[i.locale()]},r=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return r(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return l.bind(this)()},i.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return r(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(a(),"months")},i.monthsShort=function(){return s(a(),"monthsShort","months",3)},i.weekdays=function(e){return s(a(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(a(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(a(),"weekdaysMin","weekdays",2,e)}}}()},49916(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,i,o){var n=i.prototype,s=n.format;o.en.formats=e,n.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,o=function(t,i){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,o,n){var s=n&&n.toUpperCase();return o||i[n]||e[n]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(t,void 0===i?{}:i);return s.call(this,o)}}}()},57565(e){e.exports=a,a.default=a,a.stable=c,a.stableStringify=c;var t="[...]",i="[Circular]",o=[],n=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,i,a){var r;void 0===a&&(a=s()),l(e,"",0,[],void 0,0,a);try{r=0===n.length?JSON.stringify(e,t,i):JSON.stringify(e,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function r(e,t,i,s){var a=Object.getOwnPropertyDescriptor(s,i);void 0!==a.get?a.configurable?(Object.defineProperty(s,i,{value:e}),o.push([s,i,t,a])):n.push([t,i,e]):(s[i]=e,o.push([s,i,t]))}function l(e,o,n,s,a,d,c){var u;if(d+=1,"object"==typeof e&&null!==e){for(u=0;u<s.length;u++)if(s[u]===e)return void r(i,e,o,a);if(void 0!==c.depthLimit&&d>c.depthLimit)return void r(t,e,o,a);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void r(t,e,o,a);if(s.push(e),Array.isArray(e))for(u=0;u<e.length;u++)l(e[u],u,u,s,e,d,c);else{var h=Object.keys(e);for(u=0;u<h.length;u++){var p=h[u];l(e[p],p,u,s,e,d,c)}}s.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function c(e,t,i,a){void 0===a&&(a=s());var r,l=u(e,"",0,[],void 0,0,a)||e;try{r=0===n.length?JSON.stringify(l,t,i):JSON.stringify(l,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function u(e,n,s,a,l,c,h){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;p<a.length;p++)if(a[p]===e)return void r(i,e,n,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&c>h.depthLimit)return void r(t,e,n,l);if(void 0!==h.edgesLimit&&s+1>h.edgesLimit)return void r(t,e,n,l);if(a.push(e),Array.isArray(e))for(p=0;p<e.length;p++)u(e[p],p,p,a,e,c,h);else{var m={},g=Object.keys(e).sort(d);for(p=0;p<g.length;p++){var v=g[p];u(e[v],v,p,a,e,c,h),m[v]=e[v]}if(void 0===l)return m;o.push([l,n,e]),l[n]=m}a.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,i){if(n.length>0)for(var o=0;o<n.length;o++){var s=n[o];if(s[1]===t&&s[0]===i){i=s[2],n.splice(o,1);break}}return e.call(this,t,i)}}},93678(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles)return function(e){const i=[],o=[],n=new Map;if(n.set(Date,e=>new Date(e)),n.set(Map,(e,t)=>new Map(a(Array.from(e),t))),n.set(Set,(e,t)=>new Set(a(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)n.set(t[0],t[1]);let s=null;return e.proto?l:r;function a(e,a){const r=Object.keys(e),l=new Array(r.length);for(let d=0;d<r.length;d++){const c=r[d],u=e[c];if("object"!=typeof u||null===u)l[c]=u;else if(u.constructor!==Object&&(s=n.get(u.constructor)))l[c]=s(u,a);else if(ArrayBuffer.isView(u))l[c]=t(u);else{const e=i.indexOf(u);l[c]=-1!==e?o[e]:a(u)}}return l}function r(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,r);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,r);const l={};i.push(e),o.push(l);for(const a in e){if(!1===Object.hasOwnProperty.call(e,a))continue;const d=e[a];if("object"!=typeof d||null===d)l[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))l[a]=s(d,r);else if(ArrayBuffer.isView(d))l[a]=t(d);else{const e=i.indexOf(d);l[a]=-1!==e?o[e]:r(d)}}return i.pop(),o.pop(),l}function l(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,l);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,l);const r={};i.push(e),o.push(r);for(const a in e){const d=e[a];if("object"!=typeof d||null===d)r[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))r[a]=s(d,l);else if(ArrayBuffer.isView(d))r[a]=t(d);else{const e=i.indexOf(d);r[a]=-1!==e?o[e]:l(d)}}return i.pop(),o.pop(),r}}(e);const i=new Map;if(i.set(Date,e=>new Date(e)),i.set(Map,(e,t)=>new Map(n(Array.from(e),t))),i.set(Set,(e,t)=>new Set(n(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)i.set(t[0],t[1]);let o=null;return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a}:function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){if(!1===Object.hasOwnProperty.call(s,n))continue;const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a};function n(e,n){const s=Object.keys(e),a=new Array(s.length);for(let r=0;r<s.length;r++){const l=s[r],d=e[l];"object"!=typeof d||null===d?a[l]=d:d.constructor!==Object&&(o=i.get(d.constructor))?a[l]=o(d,n):ArrayBuffer.isView(d)?a[l]=t(d):a[l]=n(d)}return a}}},70002(e,t,i){"use strict";i.d(t,{SG:()=>s,TA:()=>a,kG:()=>n});var o=i(6884);function n(e){const t=null==e?NaN:Number(e);return Number.isFinite(t)?0===t?1/0:t:o.OD.MAX_VIEW_1000}function s(e){return!1===e.moreRows?"end":e.rowsHeld>=n(e.maxView)?e.movingView?"more":"view-full":e.emptyReply?"stalled":"more"}function a(e){const t=n(e.maxView),i=null!=(o=e.maxView)&&Number.isFinite(Number(o))?`${t}`:`${t}, the server default`;var o;const s=e.totalRows;if("stalled"===e.status)return`${e.resourceName} stopped at ${e.rowsHeld} rows: the server answered MORE_ROWS with an empty page while still reporting more rows, with room left in the view (MAX_VIEW ${i}). This is not the MAX_VIEW cap; check the data server log for "Problem building client message".`;if(!e.emptyReply&&void 0!==s&&s<=e.rowsHeld)return;const a=void 0!==s&&s>e.rowsHeld,r=a?` of ${s}`:"",l=e.emptyReply||a?" and the server holds more rows past it":", so any rows past it are not loaded";return`${e.resourceName} stopped at ${e.rowsHeld}${r} rows: the DATASERVER view is full at MAX_VIEW (${i})${l}. Raise ${e.attribute} past the row count to reach the rest.`}},40370(e,t,i){"use strict";i.d(t,{C:()=>r});var o=i(55823),n=i(33681),s=i(17465),a=i(39087);const r=e=>{class t extends e{constructor(){super(),this.hasOwnProperty("onDatasourceStatusChanged")||(this.onDatasourceStatusChanged=e=>{var t;const i=void 0!==this.data;this.resourceName||i||s.v.warn("Target classes must have a resourceName or data property to use the DatasourceEventHandler mixin.");const o=e.detail;if(o.name===this.resourceName){const e=null!==(t=this.datasourceStatus)&&void 0!==t?t:{isInitialized:!1,hasMetadata:!1};(e.isInitialized!==o.isInitialized||o.metadataRequired&&e.hasMetadata!==o.hasMetadata)&&(this.datasourceStatus=o)}})}datasourceStatusChanged(e,t){s.v.debug("Target classes should override the datasourceStatusChanged method of the DatasourceEventHandler mixin to respond to changes in the target datasource.")}connectedCallback(){super.connectedCallback(),document.addEventListener(a.w,this.onDatasourceStatusChanged,{passive:!0,capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(a.w,this.onDatasourceStatusChanged,{capture:!0})}}return(0,o.Cg)([n.observable],t.prototype,"datasourceStatus",void 0),t}},96730(e,t,i){"use strict";function o(e,t=";"){return e?e.split(t).map(e=>e.trim()).sort((e,t)=>e.localeCompare(t)).join(t):e}i.d(t,{Q:()=>o})},31274(e,t,i){"use strict";i.d(t,{u:()=>n});var o=i(60416);const n=(e,t,i)=>{(0,o.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-dialog`),a=i?(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})(i):(0,o.jE)("dialog-container",t);a.appendChild(s),s.notification=e,s.show()}},60416(e,t,i){"use strict";i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(66506),n=i(52945),s=i(68424);const a=(0,o.createLogger)("foundation-notifications");let r=null;const l=new Map,d=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},c=e=>{var t,i;a.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.logLevel)||o.LogLevels.debug)})},u=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(l.has(e))i=l.get(e);else{const t=(0,n.fI)(document).find(t=>t.id===e);t&&(i=t,l.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:o}=(0,s.DW)(document.body,"rapid");if(t)t.appendChild(i),r=t;else if(r)r.appendChild(i);else{const e=document.createElement(`${o}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),r=e}}return i},h=e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return p()},p=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},78966(e,t,i){"use strict";i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AffixMixin:()=>Cl,AiCriteriaSearch:()=>$e,AiIndicator:()=>De,Anchor:()=>Le,AnchoredRegion:()=>Pe,Avatar:()=>Ye,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Lf,Badge:()=>Qe,Banner:()=>lt,BaseDatasource:()=>vi,BaseFileComponent:()=>Ps,Breadcrumb:()=>ht,BreadcrumbItem:()=>bt,Button:()=>St,COMBO_INPUT_MIN_LENGTH:()=>Iu,CRON_LENGTH:()=>Oc,CSSVarsTokenMapper:()=>Zm,Calendar:()=>It,Card:()=>Mt,CategorizedMultiselect:()=>Wt,Checkbox:()=>Jt,Combobox:()=>Si,ConnectionIndicator:()=>Ri,CronBuilderEvents:()=>Ac,DATETIME_OPERATORS:()=>ee,DATE_OPERATORS:()=>Z,DATE_PICKER_VALUE_FORMAT:()=>bo,DEFUALT_FILTER_BAR_COLUMNS:()=>Ea,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Nf,DataGrid:()=>Fi,DataGridCell:()=>zi,DataGridDatasource:()=>eg,DataGridRow:()=>ji,DateOrDay:()=>wc,DatePicker:()=>Eo,DefaultRouter:()=>sf,DesignTokensObservable:()=>Xo,Dialog:()=>Ln,DialogElement:()=>An,Disclosure:()=>_n,Divider:()=>Vn,DropdownMenu:()=>Qn,EnvironmentIndicator:()=>hs,ErrorBanner:()=>fs,ErrorBoundary:()=>Rs,ErrorBoundaryEvent:()=>ys,ErrorDialog:()=>_s,ExpressionBuilderConfig:()=>s,ExpressionBuilderCore:()=>bv,FaPrefixFromStyle:()=>Tr,FileReader:()=>Gs,FileUpload:()=>na,Filter:()=>fa,FilterBar:()=>Oa,FilterEvents:()=>va,FlexLayout:()=>Na,FlexMediaQueriesEnum:()=>ka,Flipper:()=>Ha,Flyout:()=>Ya,FoundationDesignSystemProvider:()=>xn,FoundationExpressionBuilder:()=>ov,FoundationRouteCollection:()=>yf,FoundationRouteNav:()=>gf,FoundationRouter:()=>$f,FoundationRouterConfiguration:()=>wf,FoundationRuleExpressionBuilder:()=>Nv,FoundationValueExpressionBuilder:()=>zv,GenerateNavigationPathEventType:()=>xf,GridLayout:()=>or,GridLayoutItem:()=>lr,GridMediaQueriesEnum:()=>Xa,HorizontalScroll:()=>hr,INPUT_MIN_LENGTH:()=>Du,Icon:()=>Ir,Listbox:()=>Nr,ListboxOption:()=>zr,MAX_DAYS:()=>Ec,MAX_HOURS:()=>kc,MAX_MINS_SEC:()=>Dc,MAX_MINUTE_RECURRENCE:()=>Rc,MAX_MONTHS:()=>Sc,MAX_WEEK_DAYS:()=>Tc,MAX_WEEK_NUMBER:()=>Ic,Menu:()=>Yr,MenuItem:()=>Qr,Modal:()=>al,Multiselect:()=>gl,MultiselectDatasource:()=>cl,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>Cf,NotificationListener:()=>Vv,NumberField:()=>Gl,OPERATOR_DISPLAY_LABEL:()=>te,Optgroup:()=>Xl,OptionsDatasource:()=>yi,Pill:()=>Hd,Popper:()=>Bd,Position:()=>zt,Progress:()=>yd,ProgressRing:()=>qd,Radio:()=>ec,RadioGroup:()=>ac,RecurrenceType:()=>bc,Router:()=>nf,RuleExpression:()=>yv,SCROLL_TIMEOUT:()=>ku,SECTION_NAVIGATOR_EVENTS:()=>Wu,SNACKBAR_CLOSE_TIMEOUT:()=>zh,SNACKBAR_EVENTS_NAMES:()=>Uh,SNACKBAR_TYPES:()=>Ph,SNACKBAR_TYPE_DEFAULT:()=>Hh,STRING_OPERATORS:()=>J,Scheduler:()=>pc,SchedulerCronBuilder:()=>hu,SchedulerTimezone:()=>yu,SearchBar:()=>Au,SearchBarCombobox:()=>Pu,SectionNavigator:()=>Xu,SegmentedControl:()=>ih,SegmentedItem:()=>lh,Select:()=>mh,Skeleton:()=>wh,Slider:()=>kh,SliderLabel:()=>Nh,Snackbar:()=>Yh,StackingIcons:()=>Xh,StatusPill:()=>tp,Stepper:()=>Df,StepperTab:()=>lp,StepperTabPanel:()=>pp,Switch:()=>yp,SystemHealthOverlay:()=>Td,Tab:()=>Ip,TabPanel:()=>Mp,Tabs:()=>Bp,TextArea:()=>qp,TextField:()=>im,Toast:()=>um,Toolbar:()=>gm,Tooltip:()=>Cm,TreeItem:()=>Tm,TreeView:()=>Lm,UrlInput:()=>Bm,VerificationCodeInput:()=>Xm,WeekType:()=>yc,accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,accentPaletteValue:()=>un,actionsMenuBaseStyles:()=>$,alertFlashDurationProperty:()=>Sp,alertFlashPhaseProperty:()=>$p,applyCustomTokens:()=>on,baseComponents:()=>Qm,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>pn,black:()=>Do,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>Mf,categorizedMultiselectStyles:()=>Bt,categorizedMultiselectTemplate:()=>Gt,clientOperators:()=>Cv,closeIcon:()=>da,configureDesignSystem:()=>cn,configureEnvironmentIndicator:()=>cs,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>gn,createDesignSystemProxy:()=>$d,createFormData:()=>Js,crossIcon:()=>Su,daysOfWeek:()=>Cc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>Ee,defaultAnchorConfig:()=>Fe,defaultAnchoredRegionConfig:()=>Ue,defaultAvatarConfig:()=>qe,defaultBadgeConfig:()=>et,defaultBreadcrumbConfig:()=>mt,defaultBreadcrumbItemConfig:()=>wt,defaultButtonConfig:()=>Ot,defaultCalendarConfig:()=>At,defaultCardConfig:()=>Ht,defaultCategorizedMultiselectConfig:()=>Yt,defaultCheckboxConfig:()=>Zt,defaultComboboxConfig:()=>Oi,defaultConfig:()=>gc,defaultCronBuilderConfig:()=>mu,defaultDataGridCellConfig:()=>Bi,defaultDataGridConfig:()=>_i,defaultDataGridRowConfig:()=>Wi,defaultDatePickerConfig:()=>So,defaultDialogConfig:()=>Rn,defaultDisclosureConfig:()=>Pn,defaultDividerConfig:()=>jn,defaultFileUploadConfig:()=>aa,defaultFillColor:()=>Ro,defaultFlexLayoutConfig:()=>La,defaultFlipperConfig:()=>za,defaultFlyoutConfig:()=>qa,defaultGridLayoutConfig:()=>tr,defaultGridLayoutItemConfig:()=>rr,defaultHorizontalScrollConfig:()=>mr,defaultIconConfig:()=>Or,defaultListboxConfig:()=>Mr,defaultListboxOptionConfig:()=>Br,defaultMenuConfig:()=>qr,defaultMenuItemConfig:()=>el,defaultModalConfig:()=>sl,defaultMultiselectConfig:()=>ml,defaultNavItemPredicate:()=>vf,defaultNeutralForegroundContrast:()=>Go,defaultNumberFieldConfig:()=>Yl,defaultPillConfig:()=>_d,defaultPlacementIndexPadding:()=>ff,defaultProgressConfig:()=>Cd,defaultProgressRingConfig:()=>Xd,defaultRadioConfig:()=>ic,defaultRadioGroupConfig:()=>lc,defaultSearchBarComboboxConfig:()=>Uu,defaultSearchBarConfig:()=>Nu,defaultSectionNavigatorConfig:()=>Qu,defaultSegmentedControlConfig:()=>nh,defaultSegmentedItemConfig:()=>ch,defaultSelectConfig:()=>vh,defaultSkeletonConfig:()=>xh,defaultSliderConfig:()=>Ih,defaultSliderLabelConfig:()=>Mh,defaultStepperConfig:()=>Rf,defaultStepperTabConfig:()=>cp,defaultStepperTabPanelConfig:()=>gp,defaultSwitchConfig:()=>Cp,defaultSystemHealthOverlayConfig:()=>Rd,defaultTabConfig:()=>Ap,defaultTabPanelConfig:()=>Hp,defaultTabsConfig:()=>Gp,defaultTextAreaConfig:()=>Xp,defaultTextFieldConfig:()=>nm,defaultTimezoneConfig:()=>Cu,defaultToastConfig:()=>cm,defaultToolbarConfig:()=>fm,defaultTooltipConfig:()=>$m,defaultTreeItemConfig:()=>Dm,defaultTreeViewConfig:()=>Fm,defaultUrlInputConfig:()=>Um,defaultVerificationCodeInputConfig:()=>Wm,defineFactory:()=>jv,density:()=>r.density,designToken:()=>Zo,designTokensMap:()=>ln,designUnit:()=>r.designUnit,designUnitValue:()=>vn,direction:()=>r.direction,directionValue:()=>mn,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>Zs,dropdownMenuBaseStyles:()=>Wn,environmentIndicatorStyles:()=>ts,errorDialogTemplate:()=>Fs,extractMenuItems:()=>Kn,faSizeValueDefault:()=>kr,faSizeValues:()=>Dr,fileReaderStyles:()=>zs,fileReaderTemplate:()=>Vs,fillColor:()=>r.fillColor,filterBarTemplate:()=>$a,findParentRouter:()=>df,findRouter:()=>lf,findTopLevelRouter:()=>cf,flyoutAnimationTime:()=>Ba,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,formatTimeForCountDown:()=>ep,formatToPlaceholder:()=>vo,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>A,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>I,foundationAiCriteriaSearch:()=>Oe,foundationAiCriteriaSearchShadowOptions:()=>Se,foundationAiCriteriaSearchStyles:()=>_,foundationAiCriteriaSearchTemplate:()=>B,foundationAiIndicator:()=>Ie,foundationAiIndicatorStyles:()=>Te,foundationAiIndicatorTemplate:()=>ke,foundationAnchor:()=>Me,foundationAnchorShadowOptions:()=>Ne,foundationAnchorStyles:()=>Re,foundationAnchorTemplate:()=>Ae,foundationAnchoredRegion:()=>Be,foundationAnchoredRegionShadowOptions:()=>ze,foundationAnchoredRegionStyles:()=>He,foundationAnchoredRegionTemplate:()=>_e,foundationAvatar:()=>Ke,foundationAvatarShadowOptions:()=>We,foundationAvatarStyles:()=>Ve,foundationAvatarTemplate:()=>Ge,foundationBadge:()=>tt,foundationBadgeShadowOptions:()=>Ze,foundationBadgeStyles:()=>Xe,foundationBadgeTemplate:()=>Je,foundationBanner:()=>dt,foundationBannerShadowOptions:()=>rt,foundationBannerStyles:()=>nt,foundationBannerTemplate:()=>at,foundationBreadcrumb:()=>gt,foundationBreadcrumbItem:()=>Ct,foundationBreadcrumbItemShadowOptions:()=>yt,foundationBreadcrumbItemStyles:()=>vt,foundationBreadcrumbItemTemplate:()=>ft,foundationBreadcrumbShadowOptions:()=>pt,foundationBreadcrumbStyles:()=>ct,foundationBreadcrumbTemplate:()=>ut,foundationButton:()=>Tt,foundationButtonShadowOptions:()=>Et,foundationButtonStyles:()=>xt,foundationButtonTemplate:()=>$t,foundationCalendar:()=>Lt,foundationCalendarShadowOptions:()=>Rt,foundationCalendarStyles:()=>kt,foundationCalendarTemplate:()=>Dt,foundationCard:()=>Pt,foundationCardShadowOptions:()=>_t,foundationCardStyles:()=>Nt,foundationCardTemplate:()=>Ft,foundationCategorizedMultiselect:()=>qt,foundationCategorizedMultiselectShadowOptions:()=>jt,foundationCheckbox:()=>ei,foundationCheckboxShadowOptions:()=>Qt,foundationCheckboxStyles:()=>Kt,foundationCheckboxTemplate:()=>Xt,foundationCombobox:()=>Ti,foundationComboboxShadowOptions:()=>Ei,foundationComboboxStyles:()=>wi,foundationComboboxTemplate:()=>Ci,foundationConnectionIndicator:()=>Ai,foundationConnectionIndicatorStyles:()=>Di,foundationConnectionIndicatorTemplate:()=>Ii,foundationDataGrid:()=>Hi,foundationDataGridCell:()=>Vi,foundationDataGridCellShadowOptions:()=>Ui,foundationDataGridCellStyles:()=>Pi,foundationDataGridCellTemplate:()=>a.dataGridCellTemplate,foundationDataGridRow:()=>qi,foundationDataGridRowShadowOptions:()=>Yi,foundationDataGridRowStyles:()=>Gi,foundationDataGridRowTemplate:()=>a.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Mi,foundationDataGridStyles:()=>Li,foundationDataGridTemplate:()=>Ni,foundationDatePicker:()=>Oo,foundationDatePickerShadowOptions:()=>$o,foundationDatePickerStyles:()=>lo,foundationDatePickerTemplate:()=>ho,foundationDesignSystemProvider:()=>$n,foundationDialog:()=>Nn,foundationDialogShadowOptions:()=>In,foundationDialogStyles:()=>En,foundationDialogTemplate:()=>Dn,foundationDisclosure:()=>zn,foundationDisclosureShadowOptions:()=>Hn,foundationDisclosureStyles:()=>Fn,foundationDisclosureTemplate:()=>Mn,foundationDivider:()=>Yn,foundationDividerShadowOptions:()=>Gn,foundationDividerStyles:()=>Un,foundationDividerTemplate:()=>Bn,foundationDropdownMenu:()=>Zn,foundationDropdownMenuStyles:()=>qn,foundationDropdownMenuTemplate:()=>Jn,foundationEnvironmentIndicator:()=>ps,foundationEnvironmentIndicatorTemplate:()=>is,foundationErrorBanner:()=>bs,foundationErrorBannerShadowOptions:()=>vs,foundationErrorBannerTemplate:()=>gs,foundationErrorBoundary:()=>As,foundationErrorBoundaryShadowOptions:()=>Is,foundationErrorBoundaryTemplate:()=>Ds,foundationErrorDialog:()=>Hs,foundationErrorDialogShadowOptions:()=>Ms,foundationErrorDialogStyles:()=>Ls,foundationFileReader:()=>js,foundationFileReaderStyles:()=>Us,foundationFileUpload:()=>ra,foundationFileUploadShadowOptions:()=>sa,foundationFileUploadStyles:()=>qs,foundationFileUploadTemplate:()=>Xs,foundationFilter:()=>ba,foundationFilterBar:()=>Ta,foundationFilterBarStyles:()=>wa,foundationFilterBarTemplate:()=>Sa,foundationFilterStyles:()=>la,foundationFilterTemplate:()=>ga,foundationFlexLayout:()=>Fa,foundationFlexLayoutShadowOptions:()=>Aa,foundationFlexLayoutStyles:()=>Ia,foundationFlexLayoutTemplate:()=>Ra,foundationFlipper:()=>Ua,foundationFlipperShadowOptions:()=>Pa,foundationFlipperStyles:()=>Ma,foundationFlipperTemplate:()=>_a,foundationFlyout:()=>Ka,foundationFlyoutShadowOptions:()=>Wa,foundationFlyoutStyles:()=>Va,foundationFlyoutTemplate:()=>ja,foundationGridLayout:()=>nr,foundationGridLayoutItem:()=>dr,foundationGridLayoutItemShadowOptions:()=>ar,foundationGridLayoutItemTemplate:()=>sr,foundationGridLayoutShadowOptions:()=>er,foundationGridLayoutStyles:()=>Qa,foundationGridLayoutTemplate:()=>Za,foundationHorizontalScroll:()=>gr,foundationHorizontalScrollShadowOptions:()=>pr,foundationHorizontalScrollStyles:()=>cr,foundationHorizontalScrollTemplate:()=>ur,foundationIcon:()=>Rr,foundationIconShadowOptions:()=>Er,foundationIconStyles:()=>xr,foundationIconTemplate:()=>Sr,foundationListbox:()=>_r,foundationListboxOption:()=>Vr,foundationListboxOptionShadowOptions:()=>Ur,foundationListboxOptionStyles:()=>Hr,foundationListboxOptionTemplate:()=>Pr,foundationListboxShadowOptions:()=>Fr,foundationListboxStyles:()=>Ar,foundationListboxTemplate:()=>Lr,foundationMenu:()=>Kr,foundationMenuItem:()=>tl,foundationMenuItemShadowOptions:()=>Zr,foundationMenuItemStyles:()=>Xr,foundationMenuItemTemplate:()=>Jr,foundationMenuShadowOptions:()=>Wr,foundationMenuStyles:()=>Gr,foundationMenuTemplate:()=>jr,foundationModal:()=>rl,foundationModalShadowOptions:()=>nl,foundationModalStyles:()=>il,foundationModalTemplate:()=>ol,foundationMultiselect:()=>vl,foundationMultiselectShadowOptions:()=>pl,foundationNotificationListener:()=>Gv,foundationNotificationListenerShadowOptions:()=>Bv,foundationNotificationListenerTemplate:()=>Uv,foundationNumberField:()=>Wl,foundationNumberFieldShadowOptions:()=>jl,foundationNumberFieldStyles:()=>$l,foundationNumberFieldTemplate:()=>Sl,foundationOptgroup:()=>Jl,foundationOptgroupStyles:()=>ql,foundationOptgroupTemplate:()=>Kl,foundationPill:()=>Pd,foundationPillShadowOptions:()=>Md,foundationPillTemplate:()=>Fd,foundationPopper:()=>jd,foundationProgress:()=>xd,foundationProgressRing:()=>Jd,foundationProgressRingShadowOptions:()=>Kd,foundationProgressRingStyles:()=>Yd,foundationProgressRingTemplate:()=>Wd,foundationProgressShadowOptions:()=>wd,foundationProgressStyles:()=>fd,foundationProgressTemplate:()=>bd,foundationRadio:()=>oc,foundationRadioGroup:()=>dc,foundationRadioGroupShadowOptions:()=>rc,foundationRadioGroupStyles:()=>nc,foundationRadioGroupTemplate:()=>sc,foundationRadioShadowOptions:()=>tc,foundationRadioStyles:()=>Qd,foundationRadioTemplate:()=>Zd,foundationScheduler:()=>vc,foundationSchedulerCronBuilder:()=>gu,foundationSchedulerCronBuilderShadowOptions:()=>pu,foundationSchedulerCronBuilderTemplate:()=>uu,foundationSchedulerShadowOptions:()=>mc,foundationSchedulerTemplate:()=>hc,foundationSchedulerTimezone:()=>xu,foundationSchedulerTimezoneShadowOptions:()=>wu,foundationSchedulerTimezoneTemplate:()=>bu,foundationSearchBar:()=>Fu,foundationSearchBarCombobox:()=>Bu,foundationSearchBarComboboxShadowOptions:()=>zu,foundationSearchBarComboboxStyles:()=>Mu,foundationSearchBarComboboxTemplate:()=>_u,foundationSearchBarShadowOptions:()=>Lu,foundationSearchBarStyles:()=>$u,foundationSearchBarTemplate:()=>Tu,foundationSectionNavigator:()=>Zu,foundationSectionNavigatorShadowOptions:()=>Ju,foundationSectionNavigatorStyles:()=>Vu,foundationSectionNavigatorTemplate:()=>Gu,foundationSegmentedControl:()=>sh,foundationSegmentedControlShadowOptions:()=>oh,foundationSegmentedControlStyles:()=>eh,foundationSegmentedControlTemplate:()=>th,foundationSegmentedItem:()=>uh,foundationSegmentedItemShadowOptions:()=>dh,foundationSegmentedItemStyles:()=>ah,foundationSegmentedItemTemplate:()=>rh,foundationSelect:()=>fh,foundationSelectShadowOptions:()=>gh,foundationSelectStyles:()=>hh,foundationSelectTemplate:()=>ph,foundationSkeleton:()=>$h,foundationSkeletonShadowOptions:()=>Ch,foundationSkeletonStyles:()=>bh,foundationSkeletonTemplate:()=>yh,foundationSlider:()=>Rh,foundationSliderLabel:()=>_h,foundationSliderLabelShadowOptions:()=>Fh,foundationSliderLabelStyles:()=>Ah,foundationSliderLabelTemplate:()=>Lh,foundationSliderShadowOptions:()=>Dh,foundationSliderStyles:()=>Sh,foundationSliderTemplate:()=>Th,foundationSnackbar:()=>Wh,foundationSnackbarShadowOptions:()=>jh,foundationSnackbarStyles:()=>Bh,foundationSnackbarTemplate:()=>Gh,foundationStackingIcons:()=>Jh,foundationStackingIconsStyles:()=>qh,foundationStackingIconsTemplate:()=>Kh,foundationStatusPill:()=>ip,foundationStatusPillTemplate:()=>Zh,foundationStepper:()=>Af,foundationStepperShadowOptions:()=>If,foundationStepperStyles:()=>kf,foundationStepperTab:()=>up,foundationStepperTabPanel:()=>vp,foundationStepperTabPanelShadowOptions:()=>mp,foundationStepperTabPanelTemplate:()=>hp,foundationStepperTabShadowOptions:()=>dp,foundationStepperTabStyles:()=>op,foundationStepperTabTemplate:()=>rp,foundationStepperTemplate:()=>Tf,foundationSwitch:()=>xp,foundationSwitchShadowOptions:()=>wp,foundationSwitchStyles:()=>fp,foundationSwitchTemplate:()=>bp,foundationSystemHealthOverlay:()=>Ad,foundationSystemHealthOverlayShadowOptions:()=>Id,foundationSystemHealthOverlayStyles:()=>Dd,foundationSystemHealthOverlayTemplate:()=>kd,foundationTab:()=>Lp,foundationTabPanel:()=>Pp,foundationTabPanelShadowOptions:()=>_p,foundationTabPanelStyles:()=>Np,foundationTabPanelTemplate:()=>Fp,foundationTabShadowOptions:()=>Rp,foundationTabStyles:()=>kp,foundationTabTemplate:()=>Dp,foundationTabs:()=>jp,foundationTabsShadowOptions:()=>Vp,foundationTabsStyles:()=>zp,foundationTabsTemplate:()=>Up,foundationTextArea:()=>Jp,foundationTextAreaShadowOptions:()=>Kp,foundationTextAreaStyles:()=>Yp,foundationTextAreaTemplate:()=>Wp,foundationTextField:()=>sm,foundationTextFieldShadowOptions:()=>om,foundationTextFieldStyles:()=>em,foundationTextFieldTemplate:()=>tm,foundationToast:()=>hm,foundationToastShadowOptions:()=>dm,foundationToastStyles:()=>am,foundationToastTemplate:()=>lm,foundationToolbar:()=>bm,foundationToolbarShadowOptions:()=>vm,foundationToolbarStyles:()=>pm,foundationToolbarTemplate:()=>mm,foundationTooltip:()=>Sm,foundationTooltipShadowOptions:()=>xm,foundationTooltipStyles:()=>ym,foundationTooltipTemplate:()=>wm,foundationTreeItem:()=>Im,foundationTreeItemShadowOptions:()=>km,foundationTreeItemStyles:()=>Em,foundationTreeItemTemplate:()=>Om,foundationTreeView:()=>Mm,foundationTreeViewShadowOptions:()=>Nm,foundationTreeViewStyles:()=>Rm,foundationTreeViewTemplate:()=>Am,foundationUrlInput:()=>Vm,foundationUrlInputShadowOptions:()=>zm,foundationUrlInputStyles:()=>_m,foundationUrlInputTemplate:()=>Pm,foundationVerificationCodeInput:()=>Jm,foundationVerificationCodeInputShadowOptions:()=>Ym,foundationVerificationCodeInputStyles:()=>Gm,foundationVerificationCodeInputTemplate:()=>jm,fromBinaryExpression:()=>Rv,fromMethodExpression:()=>Av,fuiAccentPalette:()=>zo,fuiAccentSwatch:()=>Po,fuiCardFillColor:()=>Vo,fuiCardForegroundColor:()=>Yo,fuiDefaultCardFillColor:()=>Lo,fuiDefaultCardPalette:()=>No,fuiFillColor:()=>Bo,fuiNeutralPalette:()=>_o,fuiNeutralSwatch:()=>Mo,getBannerTemplate:()=>st,getBrowserLocale:()=>mo,getCriteriaBuilder:()=>Ru,getDefaultConfig:()=>sn,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>kn,getDisplayFormatForLang:()=>go,getDropdownMenuTemplate:()=>Xn,getErrorDialogTemplate:()=>Ns,getExports:()=>an,getFontawesomeIconsCss:()=>Cr,getNavItems:()=>bf,getPrefixedCategorizedMultiselect:()=>Vt,getPrefixedCronBuilder:()=>cu,getPrefixedDatePicker:()=>uo,getPrefixedErrorBanner:()=>ms,getPrefixedFileReader:()=>Bs,getPrefixedFileUpload:()=>Ks,getPrefixedFilterTemplate:()=>ma,getPrefixedFlyout:()=>Ga,getPrefixedIcon:()=>$r,getPrefixedMultiselect:()=>ul,getPrefixedScheduler:()=>uc,getPrefixedSchedulerTimezone:()=>fu,getPrefixedSearchBar:()=>Ou,getPrefixedSnackbar:()=>Vh,getPrefixedStepper:()=>Of,getPrefixedStepperTab:()=>ap,getPrefixedToast:()=>rm,getPrefixedUrlInput:()=>Hm,getTypeRampValue:()=>rn,groupsToCriteria:()=>X,hasDateValue:()=>fo,inputControls:()=>Vc,installAlertFlashClock:()=>Tp,isAbsoluteUrl:()=>rf,jsonConverter:()=>Ud,mapType:()=>Ca,maxheight:()=>ll,media:()=>je,menuTemplate:()=>k,mixinFoundationFontFamily:()=>bn,months:()=>$c,multiselectStyles:()=>dl,multiselectTemplate:()=>hl,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>jo,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralPaletteValue:()=>hn,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,optionsMaxheight:()=>Ut,paletteFromHex:()=>tn,parseDatePickerValue:()=>yo,pathJoin:()=>uf,pillStyles:()=>Ld,plusIcon:()=>Eu,provideDesignSystem:()=>Sd,provideTokens:()=>Qo,rebuildOperator:()=>Iv,registerFoundationDesignSystem:()=>_f,removeChildRouteParameter:()=>pf,removeLastPathSegment:()=>hf,resolveDayjsLocale:()=>po,routerLogger:()=>Qv,routerProperty:()=>of,ruleExpressionToGroup:()=>Lv,ruleToRuleExpression:()=>kv,ruleToRuleMethodExpression:()=>Tv,schedulerCronBuilderStyles:()=>Gc,schedulerStyles:()=>cc,schedulerTimezoneStyles:()=>vu,selectCustomToken:()=>dn,sharedFieldStyles:()=>xl,singleOptionTemplate:()=>D,statusPillStyles:()=>Qh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>en,tagFor:()=>Yv,toIntlNumberFormat:()=>Hl,transformOperatorNameToServerName:()=>Ov,transformServerNameToOperatorName:()=>Dv,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight,uploadFiles:()=>Qs,validateClauses:()=>ce,validateGroups:()=>ue,weekNumber:()=>xc,white:()=>ko});var o={};i.r(o),i.d(o,{accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,bodyFont:()=>r.bodyFont,controlCornerRadius:()=>r.controlCornerRadius,defaultNeutralForegroundContrast:()=>Go,density:()=>r.density,designUnit:()=>r.designUnit,direction:()=>r.direction,disabledOpacity:()=>r.disabledOpacity,fillColor:()=>r.fillColor,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,fuiCardFillColor:()=>Vo,fuiCardForegroundColor:()=>Yo,fuiFillColor:()=>Bo,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>jo,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,strokeWidth:()=>r.strokeWidth,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight});var n={};i.r(n),i.d(n,{accentPaletteValue:()=>un,baseLayerLuminanceValue:()=>pn,controlCornerRadiusValue:()=>gn,designUnitValue:()=>vn,directionValue:()=>mn,neutralPaletteValue:()=>hn});var s={};i.r(s),i.d(s,{BASE_LOGICAL_COMBINATORS:()=>tg,BASE_OPERATORS:()=>rg,LOGICAL_COMBINATORS:()=>ig,NULL_COMBINATOR:()=>og});var a=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
1
|
+
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[249],{8420(e,t,i){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),o={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}};return i.default.locale(o,null,!0),o}(i(94343))},58915(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,n=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},r=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var i,o=a.meridiem;if(o){for(var n=1;n<=24;n+=1)if(e.indexOf(o(n,0,t))>-1){i=n>12;break}}else i=e===(t?"pm":"PM");return i},h={A:[s,function(e){this.afternoon=u(e,!1)}],a:[s,function(e){this.afternoon=u(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[o,l("day")],Do:[s,function(e){var t=a.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[n,l("week")],ww:[o,l("week")],M:[n,l("month")],MM:[o,l("month")],MMM:[s,function(e){var t=c("months"),i=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[o,function(e){this.year=r(e)}],YYYY:[/\d{4}/,l("year")],Z:d,ZZ:d};function p(i){var o,n;o=i,n=a&&a.formats;for(var s=(i=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,o){var s=o&&o.toUpperCase();return i||n[o]||e[o]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),r=s.length,l=0;l<r;l+=1){var d=s[l],c=h[d],u=c&&c[0],p=c&&c[1];s[l]=p?{regex:u,parser:p}:d.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,o=0;i<r;i+=1){var n=s[i];if("string"==typeof n)o+=n.length;else{var a=n.regex,l=n.parser,d=e.slice(o),c=a.exec(d)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(r=e.parseTwoDigitYear);var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date,o=e.utc,s=e.args;this.$u=o;var r=s[1];if("string"==typeof r){var l=!0===s[2],d=!0===s[3],c=l||d,u=s[2];d&&(u=s[2]),a=this.$locale(),!l&&u&&(a=i.Ls[u]),this.$d=function(e,t,i,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var n=p(t)(e),s=n.year,a=n.month,r=n.day,l=n.hours,d=n.minutes,c=n.seconds,u=n.milliseconds,h=n.zone,m=n.week,g=new Date,v=r||(s||a?1:g.getDate()),f=s||g.getFullYear(),b=0;s&&!a||(b=a>0?a-1:g.getMonth());var y,w=l||0,C=d||0,x=c||0,$=u||0;return h?new Date(Date.UTC(f,b,v,w,C,x,$+60*h.offset*1e3)):i?new Date(Date.UTC(f,b,v,w,C,x,$)):(y=new Date(f,b,v,w,C,x,$),m&&(y=o(y).week(m).toDate()),y)}catch(e){return new Date("")}}(t,r,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),c&&t!=this.format(r)&&(this.$d=new Date("")),a={}}else if(r instanceof Array)for(var h=r.length,m=1;m<=h;m+=1){s[1]=r[m-1];var g=i.apply(this,s);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}m===h&&(this.$d=new Date(""))}else n.call(this,e)}}}()},33839(e){e.exports=function(){"use strict";return function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}()},7554(e){e.exports=function(){"use strict";return function(e,t,i){var o=t.prototype,n=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,o,s){var a=e.name?e:e.$locale(),r=n(a[t]),l=n(a[i]),d=r||l.map(function(e){return e.slice(0,o)});if(!s)return d;var c=a.weekStart;return d.map(function(e,t){return d[(t+(c||0))%7]})},a=function(){return i.Ls[i.locale()]},r=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return r(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return l.bind(this)()},i.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return r(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(a(),"months")},i.monthsShort=function(){return s(a(),"monthsShort","months",3)},i.weekdays=function(e){return s(a(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(a(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(a(),"weekdaysMin","weekdays",2,e)}}}()},49916(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,i,o){var n=i.prototype,s=n.format;o.en.formats=e,n.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,o=function(t,i){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,o,n){var s=n&&n.toUpperCase();return o||i[n]||e[n]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(t,void 0===i?{}:i);return s.call(this,o)}}}()},57565(e){e.exports=a,a.default=a,a.stable=c,a.stableStringify=c;var t="[...]",i="[Circular]",o=[],n=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,i,a){var r;void 0===a&&(a=s()),l(e,"",0,[],void 0,0,a);try{r=0===n.length?JSON.stringify(e,t,i):JSON.stringify(e,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function r(e,t,i,s){var a=Object.getOwnPropertyDescriptor(s,i);void 0!==a.get?a.configurable?(Object.defineProperty(s,i,{value:e}),o.push([s,i,t,a])):n.push([t,i,e]):(s[i]=e,o.push([s,i,t]))}function l(e,o,n,s,a,d,c){var u;if(d+=1,"object"==typeof e&&null!==e){for(u=0;u<s.length;u++)if(s[u]===e)return void r(i,e,o,a);if(void 0!==c.depthLimit&&d>c.depthLimit)return void r(t,e,o,a);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void r(t,e,o,a);if(s.push(e),Array.isArray(e))for(u=0;u<e.length;u++)l(e[u],u,u,s,e,d,c);else{var h=Object.keys(e);for(u=0;u<h.length;u++){var p=h[u];l(e[p],p,u,s,e,d,c)}}s.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function c(e,t,i,a){void 0===a&&(a=s());var r,l=u(e,"",0,[],void 0,0,a)||e;try{r=0===n.length?JSON.stringify(l,t,i):JSON.stringify(l,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function u(e,n,s,a,l,c,h){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;p<a.length;p++)if(a[p]===e)return void r(i,e,n,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&c>h.depthLimit)return void r(t,e,n,l);if(void 0!==h.edgesLimit&&s+1>h.edgesLimit)return void r(t,e,n,l);if(a.push(e),Array.isArray(e))for(p=0;p<e.length;p++)u(e[p],p,p,a,e,c,h);else{var m={},g=Object.keys(e).sort(d);for(p=0;p<g.length;p++){var v=g[p];u(e[v],v,p,a,e,c,h),m[v]=e[v]}if(void 0===l)return m;o.push([l,n,e]),l[n]=m}a.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,i){if(n.length>0)for(var o=0;o<n.length;o++){var s=n[o];if(s[1]===t&&s[0]===i){i=s[2],n.splice(o,1);break}}return e.call(this,t,i)}}},93678(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles)return function(e){const i=[],o=[],n=new Map;if(n.set(Date,e=>new Date(e)),n.set(Map,(e,t)=>new Map(a(Array.from(e),t))),n.set(Set,(e,t)=>new Set(a(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)n.set(t[0],t[1]);let s=null;return e.proto?l:r;function a(e,a){const r=Object.keys(e),l=new Array(r.length);for(let d=0;d<r.length;d++){const c=r[d],u=e[c];if("object"!=typeof u||null===u)l[c]=u;else if(u.constructor!==Object&&(s=n.get(u.constructor)))l[c]=s(u,a);else if(ArrayBuffer.isView(u))l[c]=t(u);else{const e=i.indexOf(u);l[c]=-1!==e?o[e]:a(u)}}return l}function r(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,r);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,r);const l={};i.push(e),o.push(l);for(const a in e){if(!1===Object.hasOwnProperty.call(e,a))continue;const d=e[a];if("object"!=typeof d||null===d)l[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))l[a]=s(d,r);else if(ArrayBuffer.isView(d))l[a]=t(d);else{const e=i.indexOf(d);l[a]=-1!==e?o[e]:r(d)}}return i.pop(),o.pop(),l}function l(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,l);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,l);const r={};i.push(e),o.push(r);for(const a in e){const d=e[a];if("object"!=typeof d||null===d)r[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))r[a]=s(d,l);else if(ArrayBuffer.isView(d))r[a]=t(d);else{const e=i.indexOf(d);r[a]=-1!==e?o[e]:l(d)}}return i.pop(),o.pop(),r}}(e);const i=new Map;if(i.set(Date,e=>new Date(e)),i.set(Map,(e,t)=>new Map(n(Array.from(e),t))),i.set(Set,(e,t)=>new Set(n(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)i.set(t[0],t[1]);let o=null;return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a}:function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){if(!1===Object.hasOwnProperty.call(s,n))continue;const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a};function n(e,n){const s=Object.keys(e),a=new Array(s.length);for(let r=0;r<s.length;r++){const l=s[r],d=e[l];"object"!=typeof d||null===d?a[l]=d:d.constructor!==Object&&(o=i.get(d.constructor))?a[l]=o(d,n):ArrayBuffer.isView(d)?a[l]=t(d):a[l]=n(d)}return a}}},70002(e,t,i){"use strict";i.d(t,{SG:()=>s,TA:()=>a,kG:()=>n});var o=i(6884);function n(e){const t=null==e?NaN:Number(e);return Number.isFinite(t)?0===t?1/0:t:o.OD.MAX_VIEW_1000}function s(e){return!1===e.moreRows?"end":e.rowsHeld>=n(e.maxView)?e.movingView?"more":"view-full":e.emptyReply?"stalled":"more"}function a(e){const t=n(e.maxView),i=null!=(o=e.maxView)&&Number.isFinite(Number(o))?`${t}`:`${t}, the server default`;var o;const s=e.totalRows;if("stalled"===e.status)return`${e.resourceName} stopped at ${e.rowsHeld} rows: the server answered MORE_ROWS with an empty page while still reporting more rows, with room left in the view (MAX_VIEW ${i}). This is not the MAX_VIEW cap; check the data server log for "Problem building client message".`;if(!e.emptyReply&&void 0!==s&&s<=e.rowsHeld)return;const a=void 0!==s&&s>e.rowsHeld,r=a?` of ${s}`:"",l=e.emptyReply||a?" and the server holds more rows past it":", so any rows past it are not loaded";return`${e.resourceName} stopped at ${e.rowsHeld}${r} rows: the DATASERVER view is full at MAX_VIEW (${i})${l}. Raise ${e.attribute} past the row count to reach the rest.`}},40370(e,t,i){"use strict";i.d(t,{C:()=>r});var o=i(55823),n=i(33681),s=i(17465),a=i(39087);const r=e=>{class t extends e{constructor(){super(),this.hasOwnProperty("onDatasourceStatusChanged")||(this.onDatasourceStatusChanged=e=>{var t;const i=void 0!==this.data;this.resourceName||i||s.v.warn("Target classes must have a resourceName or data property to use the DatasourceEventHandler mixin.");const o=e.detail;if(o.name===this.resourceName){const e=null!==(t=this.datasourceStatus)&&void 0!==t?t:{isInitialized:!1,hasMetadata:!1};(e.isInitialized!==o.isInitialized||o.metadataRequired&&e.hasMetadata!==o.hasMetadata)&&(this.datasourceStatus=o)}})}datasourceStatusChanged(e,t){s.v.debug("Target classes should override the datasourceStatusChanged method of the DatasourceEventHandler mixin to respond to changes in the target datasource.")}connectedCallback(){super.connectedCallback(),document.addEventListener(a.w,this.onDatasourceStatusChanged,{passive:!0,capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(a.w,this.onDatasourceStatusChanged,{capture:!0})}}return(0,o.Cg)([n.observable],t.prototype,"datasourceStatus",void 0),t}},96730(e,t,i){"use strict";function o(e,t=";"){return e?e.split(t).map(e=>e.trim()).sort((e,t)=>e.localeCompare(t)).join(t):e}i.d(t,{Q:()=>o})},31274(e,t,i){"use strict";i.d(t,{u:()=>n});var o=i(60416);const n=(e,t,i)=>{(0,o.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-dialog`),a=i?(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})(i):(0,o.jE)("dialog-container",t);a.appendChild(s),s.notification=e,s.show()}},60416(e,t,i){"use strict";i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(66506),n=i(52945),s=i(68424);const a=(0,o.createLogger)("foundation-notifications");let r=null;const l=new Map,d=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},c=e=>{var t,i;a.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.logLevel)||o.LogLevels.debug)})},u=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(l.has(e))i=l.get(e);else{const t=(0,n.fI)(document).find(t=>t.id===e);t&&(i=t,l.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:o}=(0,s.DW)(document.body,"rapid");if(t)t.appendChild(i),r=t;else if(r)r.appendChild(i);else{const e=document.createElement(`${o}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),r=e}}return i},h=e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return p()},p=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},78249(e,t,i){"use strict";i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>_,AffixMixin:()=>Tl,AiCriteriaSearch:()=>De,AiIndicator:()=>Fe,Anchor:()=>He,AnchoredRegion:()=>je,Avatar:()=>Qe,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Pf,Badge:()=>nt,Banner:()=>mt,BaseDatasource:()=>xi,BaseFileComponent:()=>js,Breadcrumb:()=>bt,BreadcrumbItem:()=>St,Button:()=>It,COMBO_INPUT_MIN_LENGTH:()=>Mu,CRON_LENGTH:()=>Ac,CSSVarsTokenMapper:()=>ng,Calendar:()=>Mt,Card:()=>Bt,CategorizedMultiselect:()=>Zt,Checkbox:()=>oi,Combobox:()=>Ii,ConnectionIndicator:()=>_i,CronBuilderEvents:()=>Pc,DATETIME_OPERATORS:()=>ae,DATE_OPERATORS:()=>se,DATE_PICKER_VALUE_FORMAT:()=>So,DEFUALT_FILTER_BAR_COLUMNS:()=>Ra,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Hf,DataGrid:()=>Ui,DataGridCell:()=>Yi,DataGridDatasource:()=>sg,DataGridRow:()=>Ji,DateOrDay:()=>Oc,DatePicker:()=>Ro,DefaultRouter:()=>cf,DesignTokensObservable:()=>on,Dialog:()=>Hn,DialogElement:()=>Pn,Disclosure:()=>Vn,Divider:()=>Kn,DropdownMenu:()=>ns,EnvironmentIndicator:()=>bs,ErrorBanner:()=>$s,ErrorBoundary:()=>_s,ErrorBoundaryEvent:()=>Es,ErrorDialog:()=>Vs,ExpressionBuilderConfig:()=>s,ExpressionBuilderCore:()=>$v,FaPrefixFromStyle:()=>Lr,FileReader:()=>Xs,FileUpload:()=>ca,Filter:()=>$a,FilterBar:()=>Aa,FilterEvents:()=>xa,FlexLayout:()=>za,FlexMediaQueriesEnum:()=>Na,Flipper:()=>Ga,Flyout:()=>Qa,FoundationDesignSystemProvider:()=>kn,FoundationExpressionBuilder:()=>lv,FoundationRouteCollection:()=>Sf,FoundationRouteNav:()=>wf,FoundationRouter:()=>kf,FoundationRouterConfiguration:()=>Ef,FoundationRuleExpressionBuilder:()=>Hv,FoundationValueExpressionBuilder:()=>jv,GenerateNavigationPathEventType:()=>Tf,GridLayout:()=>dr,GridLayoutItem:()=>mr,GridMediaQueriesEnum:()=>ir,HorizontalScroll:()=>br,INPUT_MIN_LENGTH:()=>Fu,Icon:()=>Mr,Listbox:()=>zr,ListboxOption:()=>Yr,MAX_DAYS:()=>Rc,MAX_HOURS:()=>Nc,MAX_MINS_SEC:()=>Fc,MAX_MINUTE_RECURRENCE:()=>_c,MAX_MONTHS:()=>Ic,MAX_WEEK_DAYS:()=>Lc,MAX_WEEK_NUMBER:()=>Mc,Menu:()=>Qr,MenuItem:()=>nl,Modal:()=>hl,Multiselect:()=>Cl,MultiselectDatasource:()=>vl,NUMERIC_OPERATORS:()=>ne,NavigateToEventType:()=>Of,NotificationListener:()=>qv,NumberField:()=>Xl,OPERATOR_DISPLAY_LABEL:()=>re,Optgroup:()=>id,OptionsDatasource:()=>Ei,Pill:()=>Gd,Popper:()=>qd,Position:()=>Yt,Progress:()=>Ed,ProgressRing:()=>ec,Radio:()=>ac,RadioGroup:()=>hc,RecurrenceType:()=>Sc,Router:()=>df,RuleExpression:()=>Sv,SCROLL_TIMEOUT:()=>Nu,SECTION_NAVIGATOR_EVENTS:()=>Zu,SNACKBAR_CLOSE_TIMEOUT:()=>jh,SNACKBAR_EVENTS_NAMES:()=>Yh,SNACKBAR_TYPES:()=>Gh,SNACKBAR_TYPE_DEFAULT:()=>Vh,STRING_OPERATORS:()=>oe,Scheduler:()=>yc,SchedulerCronBuilder:()=>bu,SchedulerTimezone:()=>Eu,SearchBar:()=>Pu,SearchBarCombobox:()=>ju,SectionNavigator:()=>ih,SegmentedControl:()=>lh,SegmentedItem:()=>mh,Select:()=>wh,Skeleton:()=>Oh,Slider:()=>Lh,SliderLabel:()=>Hh,Snackbar:()=>Jh,StackingIcons:()=>tp,StatusPill:()=>ap,Stepper:()=>Nf,StepperTab:()=>pp,StepperTabPanel:()=>bp,Switch:()=>Sp,SystemHealthOverlay:()=>Ld,Tab:()=>Fp,TabPanel:()=>Up,Tabs:()=>Wp,TextArea:()=>Zp,TextField:()=>rm,Toast:()=>vm,Toolbar:()=>wm,Tooltip:()=>Om,TreeItem:()=>Am,TreeView:()=>Pm,UrlInput:()=>Wm,VerificationCodeInput:()=>tg,WeekType:()=>Ec,accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,accentPaletteValue:()=>fn,actionsMenuBaseStyles:()=>O,agMenuStyles:()=>E,alertFlashDurationProperty:()=>Dp,alertFlashPhaseProperty:()=>kp,applyCustomTokens:()=>dn,baseComponents:()=>og,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>yn,black:()=>Fo,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>Uf,categorizedMultiselectStyles:()=>qt,categorizedMultiselectTemplate:()=>Xt,clientOperators:()=>Ov,closeIcon:()=>ga,configureDesignSystem:()=>vn,configureEnvironmentIndicator:()=>vs,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>Cn,createDesignSystemProxy:()=>Dd,createFormData:()=>oa,crossIcon:()=>Iu,daysOfWeek:()=>Tc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>Re,defaultAnchorConfig:()=>Ue,defaultAnchoredRegionConfig:()=>We,defaultAvatarConfig:()=>et,defaultBadgeConfig:()=>at,defaultBreadcrumbConfig:()=>wt,defaultBreadcrumbItemConfig:()=>Ot,defaultButtonConfig:()=>At,defaultCalendarConfig:()=>Pt,defaultCardConfig:()=>Gt,defaultCategorizedMultiselectConfig:()=>Qt,defaultCheckboxConfig:()=>si,defaultComboboxConfig:()=>Ai,defaultConfig:()=>Cc,defaultCronBuilderConfig:()=>wu,defaultDataGridCellConfig:()=>qi,defaultDataGridConfig:()=>Vi,defaultDataGridRowConfig:()=>Zi,defaultDatePickerConfig:()=>Io,defaultDialogConfig:()=>_n,defaultDisclosureConfig:()=>jn,defaultDividerConfig:()=>Jn,defaultFileUploadConfig:()=>ha,defaultFillColor:()=>_o,defaultFlexLayoutConfig:()=>Ha,defaultFlipperConfig:()=>Ya,defaultFlyoutConfig:()=>er,defaultGridLayoutConfig:()=>rr,defaultGridLayoutItemConfig:()=>pr,defaultHorizontalScrollConfig:()=>wr,defaultIconConfig:()=>Ar,defaultListboxConfig:()=>Br,defaultListboxOptionConfig:()=>qr,defaultMenuConfig:()=>el,defaultMenuItemConfig:()=>al,defaultModalConfig:()=>ul,defaultMultiselectConfig:()=>wl,defaultNavItemPredicate:()=>Cf,defaultNeutralForegroundContrast:()=>Xo,defaultNumberFieldConfig:()=>Ql,defaultPillConfig:()=>Vd,defaultPlacementIndexPadding:()=>xf,defaultProgressConfig:()=>Td,defaultProgressRingConfig:()=>ic,defaultRadioConfig:()=>lc,defaultRadioGroupConfig:()=>mc,defaultSearchBarComboboxConfig:()=>Wu,defaultSearchBarConfig:()=>zu,defaultSectionNavigatorConfig:()=>nh,defaultSegmentedControlConfig:()=>ch,defaultSegmentedItemConfig:()=>vh,defaultSelectConfig:()=>xh,defaultSkeletonConfig:()=>kh,defaultSliderConfig:()=>Fh,defaultSliderLabelConfig:()=>Uh,defaultStepperConfig:()=>Mf,defaultStepperTabConfig:()=>gp,defaultStepperTabPanelConfig:()=>wp,defaultSwitchConfig:()=>Op,defaultSystemHealthOverlayConfig:()=>_d,defaultTabConfig:()=>_p,defaultTabPanelConfig:()=>Vp,defaultTabsConfig:()=>Kp,defaultTextAreaConfig:()=>tm,defaultTextFieldConfig:()=>dm,defaultTimezoneConfig:()=>Tu,defaultToastConfig:()=>gm,defaultToolbarConfig:()=>xm,defaultTooltipConfig:()=>km,defaultTreeItemConfig:()=>Nm,defaultTreeViewConfig:()=>zm,defaultUrlInputConfig:()=>Ym,defaultVerificationCodeInputConfig:()=>Qm,defineFactory:()=>Xv,density:()=>r.density,designToken:()=>an,designTokensMap:()=>mn,designUnit:()=>r.designUnit,designUnitValue:()=>xn,direction:()=>r.direction,directionValue:()=>wn,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>sa,dropdownMenuBaseStyles:()=>Zn,environmentIndicatorStyles:()=>rs,errorDialogTemplate:()=>Us,extractMenuItems:()=>ts,faSizeValueDefault:()=>Nr,faSizeValues:()=>Fr,fileReaderStyles:()=>Ys,fileReaderTemplate:()=>Ks,fillColor:()=>r.fillColor,filterBarTemplate:()=>Da,findParentRouter:()=>mf,findRouter:()=>pf,findTopLevelRouter:()=>gf,flyoutAnimationTime:()=>qa,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,formatTimeForCountDown:()=>sp,formatToPlaceholder:()=>xo,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>P,foundationActionsMenuStyles:()=>T,foundationActionsMenuTemplate:()=>M,foundationAiCriteriaSearch:()=>Ae,foundationAiCriteriaSearchShadowOptions:()=>Ie,foundationAiCriteriaSearchStyles:()=>V,foundationAiCriteriaSearchTemplate:()=>q,foundationAiIndicator:()=>Me,foundationAiIndicatorStyles:()=>Le,foundationAiIndicatorTemplate:()=>Ne,foundationAnchor:()=>Be,foundationAnchorShadowOptions:()=>ze,foundationAnchorStyles:()=>_e,foundationAnchorTemplate:()=>Pe,foundationAnchoredRegion:()=>qe,foundationAnchoredRegionShadowOptions:()=>Ye,foundationAnchoredRegionStyles:()=>Ge,foundationAnchoredRegionTemplate:()=>Ve,foundationAvatar:()=>tt,foundationAvatarShadowOptions:()=>Ze,foundationAvatarStyles:()=>Ke,foundationAvatarTemplate:()=>Xe,foundationBadge:()=>rt,foundationBadgeShadowOptions:()=>st,foundationBadgeStyles:()=>it,foundationBadgeTemplate:()=>ot,foundationBanner:()=>gt,foundationBannerShadowOptions:()=>pt,foundationBannerStyles:()=>ct,foundationBannerTemplate:()=>ht,foundationBreadcrumb:()=>Ct,foundationBreadcrumbItem:()=>Tt,foundationBreadcrumbItemShadowOptions:()=>Et,foundationBreadcrumbItemStyles:()=>xt,foundationBreadcrumbItemTemplate:()=>$t,foundationBreadcrumbShadowOptions:()=>yt,foundationBreadcrumbStyles:()=>vt,foundationBreadcrumbTemplate:()=>ft,foundationButton:()=>Lt,foundationButtonShadowOptions:()=>Rt,foundationButtonStyles:()=>kt,foundationButtonTemplate:()=>Dt,foundationCalendar:()=>Ht,foundationCalendarShadowOptions:()=>_t,foundationCalendarStyles:()=>Nt,foundationCalendarTemplate:()=>Ft,foundationCard:()=>jt,foundationCardShadowOptions:()=>Vt,foundationCardStyles:()=>zt,foundationCardTemplate:()=>Ut,foundationCategorizedMultiselect:()=>ei,foundationCategorizedMultiselectShadowOptions:()=>Jt,foundationCheckbox:()=>ai,foundationCheckboxShadowOptions:()=>ni,foundationCheckboxStyles:()=>ti,foundationCheckboxTemplate:()=>ii,foundationCombobox:()=>Li,foundationComboboxShadowOptions:()=>Ri,foundationComboboxStyles:()=>Oi,foundationComboboxTemplate:()=>Ti,foundationConnectionIndicator:()=>Pi,foundationConnectionIndicatorStyles:()=>Fi,foundationConnectionIndicatorTemplate:()=>Mi,foundationDataGrid:()=>Gi,foundationDataGridCell:()=>Ki,foundationDataGridCellShadowOptions:()=>Wi,foundationDataGridCellStyles:()=>ji,foundationDataGridCellTemplate:()=>a.dataGridCellTemplate,foundationDataGridRow:()=>eo,foundationDataGridRowShadowOptions:()=>Qi,foundationDataGridRowStyles:()=>Xi,foundationDataGridRowTemplate:()=>a.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Bi,foundationDataGridStyles:()=>Hi,foundationDataGridTemplate:()=>zi,foundationDatePicker:()=>Ao,foundationDatePickerShadowOptions:()=>Do,foundationDatePickerStyles:()=>go,foundationDatePickerTemplate:()=>bo,foundationDesignSystemProvider:()=>Dn,foundationDialog:()=>zn,foundationDialogShadowOptions:()=>Mn,foundationDialogStyles:()=>Rn,foundationDialogTemplate:()=>Fn,foundationDisclosure:()=>Yn,foundationDisclosureShadowOptions:()=>Gn,foundationDisclosureStyles:()=>Un,foundationDisclosureTemplate:()=>Bn,foundationDivider:()=>Qn,foundationDividerShadowOptions:()=>Xn,foundationDividerStyles:()=>Wn,foundationDividerTemplate:()=>qn,foundationDropdownMenu:()=>ss,foundationDropdownMenuStyles:()=>es,foundationDropdownMenuTemplate:()=>os,foundationEnvironmentIndicator:()=>ys,foundationEnvironmentIndicatorTemplate:()=>ls,foundationErrorBanner:()=>Ss,foundationErrorBannerShadowOptions:()=>xs,foundationErrorBannerTemplate:()=>Cs,foundationErrorBoundary:()=>Ps,foundationErrorBoundaryShadowOptions:()=>Ms,foundationErrorBoundaryTemplate:()=>Fs,foundationErrorDialog:()=>Gs,foundationErrorDialogShadowOptions:()=>Bs,foundationErrorDialogStyles:()=>Hs,foundationFileReader:()=>Js,foundationFileReaderStyles:()=>Ws,foundationFileUpload:()=>pa,foundationFileUploadShadowOptions:()=>ua,foundationFileUploadStyles:()=>ea,foundationFileUploadTemplate:()=>ia,foundationFilter:()=>Sa,foundationFilterBar:()=>La,foundationFilterBarStyles:()=>Oa,foundationFilterBarTemplate:()=>Ia,foundationFilterStyles:()=>ma,foundationFilterTemplate:()=>Ca,foundationFlexLayout:()=>Ua,foundationFlexLayoutShadowOptions:()=>Pa,foundationFlexLayoutStyles:()=>Ma,foundationFlexLayoutTemplate:()=>_a,foundationFlipper:()=>Wa,foundationFlipperShadowOptions:()=>ja,foundationFlipperStyles:()=>Ba,foundationFlipperTemplate:()=>Va,foundationFlyout:()=>tr,foundationFlyoutShadowOptions:()=>Za,foundationFlyoutStyles:()=>Ka,foundationFlyoutTemplate:()=>Ja,foundationGridLayout:()=>cr,foundationGridLayoutItem:()=>gr,foundationGridLayoutItemShadowOptions:()=>hr,foundationGridLayoutItemTemplate:()=>ur,foundationGridLayoutShadowOptions:()=>ar,foundationGridLayoutStyles:()=>nr,foundationGridLayoutTemplate:()=>sr,foundationHorizontalScroll:()=>Cr,foundationHorizontalScrollShadowOptions:()=>yr,foundationHorizontalScrollStyles:()=>vr,foundationHorizontalScrollTemplate:()=>fr,foundationIcon:()=>_r,foundationIconShadowOptions:()=>Rr,foundationIconStyles:()=>kr,foundationIconTemplate:()=>Ir,foundationListbox:()=>Vr,foundationListboxOption:()=>Kr,foundationListboxOptionShadowOptions:()=>Wr,foundationListboxOptionStyles:()=>Gr,foundationListboxOptionTemplate:()=>jr,foundationListboxShadowOptions:()=>Ur,foundationListboxStyles:()=>Pr,foundationListboxTemplate:()=>Hr,foundationMenu:()=>tl,foundationMenuItem:()=>rl,foundationMenuItemShadowOptions:()=>sl,foundationMenuItemStyles:()=>il,foundationMenuItemTemplate:()=>ol,foundationMenuShadowOptions:()=>Zr,foundationMenuStyles:()=>Xr,foundationMenuTemplate:()=>Jr,foundationModal:()=>pl,foundationModalShadowOptions:()=>cl,foundationModalStyles:()=>ll,foundationModalTemplate:()=>dl,foundationMultiselect:()=>xl,foundationMultiselectShadowOptions:()=>yl,foundationNotificationListener:()=>Kv,foundationNotificationListenerShadowOptions:()=>Wv,foundationNotificationListenerTemplate:()=>Yv,foundationNumberField:()=>Zl,foundationNumberFieldShadowOptions:()=>Jl,foundationNumberFieldStyles:()=>Dl,foundationNumberFieldTemplate:()=>Il,foundationOptgroup:()=>od,foundationOptgroupStyles:()=>ed,foundationOptgroupTemplate:()=>td,foundationPill:()=>jd,foundationPillShadowOptions:()=>Bd,foundationPillTemplate:()=>Ud,foundationPopper:()=>Jd,foundationProgress:()=>kd,foundationProgressRing:()=>oc,foundationProgressRingShadowOptions:()=>tc,foundationProgressRingStyles:()=>Qd,foundationProgressRingTemplate:()=>Zd,foundationProgressShadowOptions:()=>Od,foundationProgressStyles:()=>$d,foundationProgressTemplate:()=>Sd,foundationRadio:()=>dc,foundationRadioGroup:()=>gc,foundationRadioGroupShadowOptions:()=>pc,foundationRadioGroupStyles:()=>cc,foundationRadioGroupTemplate:()=>uc,foundationRadioShadowOptions:()=>rc,foundationRadioStyles:()=>nc,foundationRadioTemplate:()=>sc,foundationScheduler:()=>xc,foundationSchedulerCronBuilder:()=>Cu,foundationSchedulerCronBuilderShadowOptions:()=>yu,foundationSchedulerCronBuilderTemplate:()=>fu,foundationSchedulerShadowOptions:()=>wc,foundationSchedulerTemplate:()=>bc,foundationSchedulerTimezone:()=>ku,foundationSchedulerTimezoneShadowOptions:()=>Ou,foundationSchedulerTimezoneTemplate:()=>Su,foundationSearchBar:()=>Uu,foundationSearchBarCombobox:()=>qu,foundationSearchBarComboboxShadowOptions:()=>Yu,foundationSearchBarComboboxStyles:()=>Bu,foundationSearchBarComboboxTemplate:()=>Vu,foundationSearchBarShadowOptions:()=>Hu,foundationSearchBarStyles:()=>Du,foundationSearchBarTemplate:()=>Lu,foundationSectionNavigator:()=>sh,foundationSectionNavigatorShadowOptions:()=>oh,foundationSectionNavigatorStyles:()=>Ku,foundationSectionNavigatorTemplate:()=>Xu,foundationSegmentedControl:()=>uh,foundationSegmentedControlShadowOptions:()=>dh,foundationSegmentedControlStyles:()=>ah,foundationSegmentedControlTemplate:()=>rh,foundationSegmentedItem:()=>fh,foundationSegmentedItemShadowOptions:()=>gh,foundationSegmentedItemStyles:()=>hh,foundationSegmentedItemTemplate:()=>ph,foundationSelect:()=>$h,foundationSelectShadowOptions:()=>Ch,foundationSelectStyles:()=>bh,foundationSelectTemplate:()=>yh,foundationSkeleton:()=>Dh,foundationSkeletonShadowOptions:()=>Th,foundationSkeletonStyles:()=>Sh,foundationSkeletonTemplate:()=>Eh,foundationSlider:()=>Mh,foundationSliderLabel:()=>Bh,foundationSliderLabelShadowOptions:()=>zh,foundationSliderLabelStyles:()=>_h,foundationSliderLabelTemplate:()=>Ph,foundationSliderShadowOptions:()=>Nh,foundationSliderStyles:()=>Ih,foundationSliderTemplate:()=>Ah,foundationSnackbar:()=>Qh,foundationSnackbarShadowOptions:()=>Xh,foundationSnackbarStyles:()=>Wh,foundationSnackbarTemplate:()=>Kh,foundationStackingIcons:()=>ip,foundationStackingIconsStyles:()=>Zh,foundationStackingIconsTemplate:()=>ep,foundationStatusPill:()=>rp,foundationStatusPillTemplate:()=>np,foundationStepper:()=>_f,foundationStepperShadowOptions:()=>Ff,foundationStepperStyles:()=>Lf,foundationStepperTab:()=>vp,foundationStepperTabPanel:()=>Cp,foundationStepperTabPanelShadowOptions:()=>yp,foundationStepperTabPanelTemplate:()=>fp,foundationStepperTabShadowOptions:()=>mp,foundationStepperTabStyles:()=>lp,foundationStepperTabTemplate:()=>hp,foundationStepperTemplate:()=>Af,foundationSwitch:()=>Tp,foundationSwitchShadowOptions:()=>Ep,foundationSwitchStyles:()=>xp,foundationSwitchTemplate:()=>$p,foundationSystemHealthOverlay:()=>Pd,foundationSystemHealthOverlayShadowOptions:()=>Md,foundationSystemHealthOverlayStyles:()=>Fd,foundationSystemHealthOverlayTemplate:()=>Nd,foundationTab:()=>Pp,foundationTabPanel:()=>Gp,foundationTabPanelShadowOptions:()=>Bp,foundationTabPanelStyles:()=>Hp,foundationTabPanelTemplate:()=>zp,foundationTabShadowOptions:()=>Mp,foundationTabStyles:()=>Lp,foundationTabTemplate:()=>Np,foundationTabs:()=>Xp,foundationTabsShadowOptions:()=>qp,foundationTabsStyles:()=>jp,foundationTabsTemplate:()=>Yp,foundationTextArea:()=>im,foundationTextAreaShadowOptions:()=>em,foundationTextAreaStyles:()=>Jp,foundationTextAreaTemplate:()=>Qp,foundationTextField:()=>cm,foundationTextFieldShadowOptions:()=>lm,foundationTextFieldStyles:()=>sm,foundationTextFieldTemplate:()=>am,foundationToast:()=>fm,foundationToastShadowOptions:()=>mm,foundationToastStyles:()=>um,foundationToastTemplate:()=>pm,foundationToolbar:()=>$m,foundationToolbarShadowOptions:()=>Cm,foundationToolbarStyles:()=>bm,foundationToolbarTemplate:()=>ym,foundationTooltip:()=>Dm,foundationTooltipShadowOptions:()=>Tm,foundationTooltipStyles:()=>Sm,foundationTooltipTemplate:()=>Em,foundationTreeItem:()=>Fm,foundationTreeItemShadowOptions:()=>Lm,foundationTreeItemStyles:()=>Im,foundationTreeItemTemplate:()=>Rm,foundationTreeView:()=>Um,foundationTreeViewShadowOptions:()=>Hm,foundationTreeViewStyles:()=>Mm,foundationTreeViewTemplate:()=>_m,foundationUrlInput:()=>qm,foundationUrlInputShadowOptions:()=>jm,foundationUrlInputStyles:()=>Bm,foundationUrlInputTemplate:()=>Gm,foundationVerificationCodeInput:()=>ig,foundationVerificationCodeInputShadowOptions:()=>Jm,foundationVerificationCodeInputStyles:()=>Km,foundationVerificationCodeInputTemplate:()=>Xm,fromBinaryExpression:()=>Mv,fromMethodExpression:()=>_v,fuiAccentPalette:()=>Yo,fuiAccentSwatch:()=>jo,fuiCardFillColor:()=>Ko,fuiCardForegroundColor:()=>Qo,fuiDefaultCardFillColor:()=>Ho,fuiDefaultCardPalette:()=>zo,fuiFillColor:()=>qo,fuiNeutralPalette:()=>Vo,fuiNeutralSwatch:()=>Bo,getBannerTemplate:()=>ut,getBrowserLocale:()=>wo,getCriteriaBuilder:()=>_u,getDefaultConfig:()=>un,getDesignSystemPrefix:()=>I,getDialogTemplate:()=>Nn,getDisplayFormatForLang:()=>Co,getDropdownMenuTemplate:()=>is,getErrorDialogTemplate:()=>zs,getExports:()=>hn,getFontawesomeIconsCss:()=>Tr,getNavItems:()=>$f,getPrefixedCategorizedMultiselect:()=>Kt,getPrefixedCronBuilder:()=>vu,getPrefixedDatePicker:()=>fo,getPrefixedErrorBanner:()=>ws,getPrefixedFileReader:()=>qs,getPrefixedFileUpload:()=>ta,getPrefixedFilterTemplate:()=>wa,getPrefixedFlyout:()=>Xa,getPrefixedIcon:()=>Dr,getPrefixedMultiselect:()=>fl,getPrefixedScheduler:()=>fc,getPrefixedSchedulerTimezone:()=>$u,getPrefixedSearchBar:()=>Au,getPrefixedSnackbar:()=>qh,getPrefixedStepper:()=>Rf,getPrefixedStepperTab:()=>up,getPrefixedToast:()=>hm,getPrefixedUrlInput:()=>Vm,getTypeRampValue:()=>pn,groupsToCriteria:()=>ie,hasDateValue:()=>$o,inputControls:()=>Kc,installAlertFlashClock:()=>Ap,isAbsoluteUrl:()=>hf,jsonConverter:()=>Wd,mapType:()=>Ta,maxheight:()=>ml,media:()=>Je,menuTemplate:()=>N,mixinFoundationFontFamily:()=>Sn,months:()=>Dc,multiselectStyles:()=>gl,multiselectTemplate:()=>bl,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>Jo,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralPaletteValue:()=>bn,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,optionsMaxheight:()=>Wt,paletteFromHex:()=>ln,parseDatePickerValue:()=>Eo,pathJoin:()=>vf,pillStyles:()=>Hd,plusIcon:()=>Ru,provideDesignSystem:()=>Id,provideTokens:()=>sn,rebuildOperator:()=>Fv,registerFoundationDesignSystem:()=>Bf,removeChildRouteParameter:()=>bf,removeLastPathSegment:()=>ff,resolveDayjsLocale:()=>yo,routerLogger:()=>nf,routerProperty:()=>lf,ruleExpressionToGroup:()=>Pv,ruleToRuleExpression:()=>Lv,ruleToRuleMethodExpression:()=>Av,schedulerCronBuilderStyles:()=>Xc,schedulerStyles:()=>vc,schedulerTimezoneStyles:()=>xu,selectCustomToken:()=>gn,sharedFieldStyles:()=>kl,singleOptionTemplate:()=>F,statusPillStyles:()=>op,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>rn,tagFor:()=>Jv,toIntlNumberFormat:()=>Gl,transformOperatorNameToServerName:()=>Rv,transformServerNameToOperatorName:()=>Nv,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight,uploadFiles:()=>na,validateClauses:()=>ve,validateGroups:()=>fe,weekNumber:()=>kc,white:()=>No});var o={};i.r(o),i.d(o,{accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,bodyFont:()=>r.bodyFont,controlCornerRadius:()=>r.controlCornerRadius,defaultNeutralForegroundContrast:()=>Xo,density:()=>r.density,designUnit:()=>r.designUnit,direction:()=>r.direction,disabledOpacity:()=>r.disabledOpacity,fillColor:()=>r.fillColor,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,fuiCardFillColor:()=>Ko,fuiCardForegroundColor:()=>Qo,fuiFillColor:()=>qo,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>Jo,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,strokeWidth:()=>r.strokeWidth,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight});var n={};i.r(n),i.d(n,{accentPaletteValue:()=>fn,baseLayerLuminanceValue:()=>yn,controlCornerRadiusValue:()=>Cn,designUnitValue:()=>xn,directionValue:()=>wn,neutralPaletteValue:()=>bn});var s={};i.r(s),i.d(s,{BASE_LOGICAL_COMBINATORS:()=>ag,BASE_OPERATORS:()=>hg,LOGICAL_COMBINATORS:()=>rg,NULL_COMBINATOR:()=>lg});var a=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
2
2
|
${(0,r.accordionStyles)(e,t)}
|
|
3
3
|
`,c=(e,t)=>(0,a.accordionTemplate)(e,t);class u extends a.Accordion{}const h={delegatesFocus:!0,mode:"open"},p={},m=u.compose(Object.assign({baseName:"accordion",template:c,styles:d,shadowOptions:h},p)),g=(e,t)=>l.css`
|
|
4
4
|
${(0,r.accordionItemStyles)(e,t)}
|
|
@@ -14,7 +14,52 @@
|
|
|
14
14
|
stroke: var(--accent-foreground-rest);
|
|
15
15
|
fill: none;
|
|
16
16
|
}
|
|
17
|
-
`,v=(e,t)=>(0,a.accordionItemTemplate)(e,t);class f extends r.AccordionItem{}const b={delegatesFocus:!0,mode:"open"},y={collapsedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="collapsed-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M9 5.44446V12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>',expandedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="expanded-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="minus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>'},w=f.compose(Object.assign({baseName:"accordion-item",template:v,styles:g,shadowOptions:b},y));var C=i(55823),x=i(31679);const
|
|
17
|
+
`,v=(e,t)=>(0,a.accordionItemTemplate)(e,t);class f extends r.AccordionItem{}const b={delegatesFocus:!0,mode:"open"},y={collapsedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="collapsed-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M9 5.44446V12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>',expandedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="expanded-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="minus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>'},w=f.compose(Object.assign({baseName:"accordion-item",template:v,styles:g,shadowOptions:b},y));var C=i(55823),x=i(54120),$=i(31679);class S{constructor(e,t,i){this.anchor=e,this.onReposition=t,this.onAnchorDetached=i,this.check=()=>{if(!this.anchor.isConnected)return this.stop(),void this.onAnchorDetached();const{top:e,right:t,bottom:i}=this.anchor.getBoundingClientRect(),o=`${e},${t},${i},${this.view.innerWidth},${this.view.innerHeight}`;(void 0===this.lastPosition||o===this.lastPosition||(this.onReposition(),this.view))&&(this.lastPosition=o,this.frame=this.view.requestAnimationFrame(this.check))}}start(){this.stop(),this.view=this.anchor.ownerDocument.defaultView,this.view&&this.check()}stop(){var e;void 0!==this.frame&&(null===(e=this.view)||void 0===e||e.cancelAnimationFrame(this.frame)),this.frame=void 0,this.lastPosition=void 0,this.view=void 0}}const E=(e,t)=>l.css`
|
|
18
|
+
${e} {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
padding: var(--ag-spacing, 4px) 0;
|
|
21
|
+
background-color: var(--ag-menu-background-color, var(--fill-color));
|
|
22
|
+
border: var(
|
|
23
|
+
--ag-menu-border,
|
|
24
|
+
calc(var(--stroke-width, 1) * 1px) solid var(--neutral-stroke-rest, transparent)
|
|
25
|
+
);
|
|
26
|
+
border-radius: var(--ag-border-radius, calc(var(--control-corner-radius, 2) * 1px));
|
|
27
|
+
box-shadow: var(--ag-menu-shadow, var(--ag-popup-shadow, 0 2px 8px rgb(0 0 0 / 30%)));
|
|
28
|
+
color: var(--ag-menu-text-color, var(--neutral-foreground-rest));
|
|
29
|
+
font-family: var(--ag-font-family, var(--body-font));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
${t} {
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
height: calc(var(--ag-icon-size, 16px) + (var(--ag-spacing, 4px) + 2px) * 2);
|
|
35
|
+
margin: 0;
|
|
36
|
+
background: transparent;
|
|
37
|
+
border: none;
|
|
38
|
+
border-radius: 0;
|
|
39
|
+
color: inherit;
|
|
40
|
+
font-family: inherit;
|
|
41
|
+
font-size: var(--ag-font-size, var(--type-ramp-base-font-size));
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
${t}:hover, ${t}:focus {
|
|
46
|
+
background: var(--ag-row-hover-color, var(--neutral-fill-stealth-hover));
|
|
47
|
+
border: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
${t}[disabled] {
|
|
51
|
+
background: transparent;
|
|
52
|
+
cursor: default;
|
|
53
|
+
opacity: 50%;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* AG's trailing shortcut and popup-pointer cells add 2 more spacings on the right. */
|
|
57
|
+
${t}::part(content) {
|
|
58
|
+
margin-inline: 0;
|
|
59
|
+
padding-inline: calc(var(--ag-spacing, 4px) * 2) calc(var(--ag-spacing, 4px) * 4);
|
|
60
|
+
line-height: var(--ag-icon-size, 16px);
|
|
61
|
+
}
|
|
62
|
+
`,O=(e,t)=>l.css`
|
|
18
63
|
:host {
|
|
19
64
|
--actions-opener-height-multiplier: 0.7px;
|
|
20
65
|
--actions-opener-bg-color: 249 254 255;
|
|
@@ -36,11 +81,9 @@
|
|
|
36
81
|
margin: 0;
|
|
37
82
|
}
|
|
38
83
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
z-index: 100;
|
|
43
|
-
}
|
|
84
|
+
/* The vertical menu follows AG Grid's menu, so it matches the grid it usually sits in.
|
|
85
|
+
Its box-sizing lets updateMenuPosition cap max-height at the viewport, border included. */
|
|
86
|
+
${E(".actions-vertical .actions-menu",".actions-vertical .menu-item")}
|
|
44
87
|
|
|
45
88
|
.actions-menu:not(.hidden):hover {
|
|
46
89
|
display: inline-flex;
|
|
@@ -63,6 +106,31 @@
|
|
|
63
106
|
);
|
|
64
107
|
}
|
|
65
108
|
|
|
109
|
+
:host([icon-name]) .actions-container {
|
|
110
|
+
justify-content: center;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* The icon-only opener mirrors grid-pro's icon renderer: a bare icon with a hover chip. */
|
|
114
|
+
.actions-opener.icon-only {
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
height: auto;
|
|
118
|
+
padding: 5px;
|
|
119
|
+
border-radius: 5px;
|
|
120
|
+
line-height: 1;
|
|
121
|
+
color: inherit;
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.actions-opener.icon-only:hover,
|
|
126
|
+
.actions-opener.icon-only.opened {
|
|
127
|
+
background-color: var(--neutral-stroke-hover);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.actions-opener.icon-only:focus-visible {
|
|
131
|
+
outline: calc(var(--focus-stroke-width) * 1px) solid var(--accent-fill-rest);
|
|
132
|
+
}
|
|
133
|
+
|
|
66
134
|
svg {
|
|
67
135
|
width: 100%;
|
|
68
136
|
height: 100%;
|
|
@@ -95,10 +163,19 @@
|
|
|
95
163
|
min-height: 0;
|
|
96
164
|
}
|
|
97
165
|
|
|
166
|
+
/* The open menu is a flex column, so a flex-basis would override the AG row height. */
|
|
98
167
|
.actions-vertical .menu-item {
|
|
99
|
-
flex:
|
|
168
|
+
flex: none;
|
|
169
|
+
max-height: none;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.actions-vertical .menu-item::part(start) {
|
|
173
|
+
padding-left: calc(var(--ag-spacing, 4px) * 2);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.actions-vertical .menu-item [slot='start'] {
|
|
100
177
|
justify-content: center;
|
|
101
|
-
|
|
178
|
+
width: var(--ag-icon-size, 16px);
|
|
102
179
|
}
|
|
103
180
|
|
|
104
181
|
.actions-vertical .visible,
|
|
@@ -106,9 +183,24 @@
|
|
|
106
183
|
display: flex;
|
|
107
184
|
flex-direction: column;
|
|
108
185
|
}
|
|
109
|
-
`,
|
|
110
|
-
${
|
|
111
|
-
`,
|
|
186
|
+
`,T=(e,t)=>l.css`
|
|
187
|
+
${O(e,t)}
|
|
188
|
+
`,k=(e,t)=>!e.composedPath().includes(t),D=(e,t)=>e.composedPath().includes(t),I=e=>e.tagName.toLowerCase().split("-")[0];const R=e=>{const t=new Map;return i=>(t.has(i)||t.set(i,e(i)),t.get(i))},A=R(e=>l.html`
|
|
189
|
+
<div
|
|
190
|
+
${(0,l.ref)("actionsOpener")}
|
|
191
|
+
class="actions-opener icon-only${e=>e.open?" opened":""}"
|
|
192
|
+
part="icon-opener"
|
|
193
|
+
role="button"
|
|
194
|
+
tabindex="0"
|
|
195
|
+
aria-label="${e=>e.name}"
|
|
196
|
+
aria-haspopup="menu"
|
|
197
|
+
aria-expanded="${e=>String(e.open)}"
|
|
198
|
+
@click=${e=>e.toggleActionsMenuVisibility()}
|
|
199
|
+
@keydown=${(e,t)=>e.onIconOpenerKeydown(t.event)}
|
|
200
|
+
>
|
|
201
|
+
<${e}-icon name="${e=>e.iconName}" size="lg"></${e}-icon>
|
|
202
|
+
</div>
|
|
203
|
+
`),L=R(e=>l.html`
|
|
112
204
|
<${e}-button
|
|
113
205
|
${(0,l.ref)("actionsOpener")}
|
|
114
206
|
id="actiosnMenuTrigger"
|
|
@@ -121,48 +213,72 @@
|
|
|
121
213
|
${e.name}
|
|
122
214
|
`}
|
|
123
215
|
</${e}-button>
|
|
124
|
-
|
|
216
|
+
`),N=R(e=>l.html`
|
|
217
|
+
${t=>t.iconName?A(e):L(e)}
|
|
218
|
+
<${e}-menu
|
|
219
|
+
${(0,l.ref)("actionsMenu")}
|
|
220
|
+
popover="${e=>e.isVertical?"auto":"manual"}"
|
|
221
|
+
class="actions-menu ${e=>e.classNames}"
|
|
222
|
+
part="actions-menu"
|
|
223
|
+
@toggle=${(e,t)=>e.onPopoverToggle(t.event)}
|
|
224
|
+
>
|
|
125
225
|
${(0,l.repeat)(e=>e.allActions,l.html`
|
|
126
|
-
${(0,l.when)((e,t)=>
|
|
226
|
+
${(0,l.when)((e,t)=>t.parent.isActionDisabled(e),l.html`
|
|
127
227
|
<${e}-menu-item
|
|
128
228
|
class="menu-item"
|
|
129
229
|
tabindex="${(e,t)=>t.index}"
|
|
130
230
|
disabled
|
|
131
231
|
style=${(e,t)=>t.parent.hideDisabled?"display:none":""}
|
|
132
232
|
>
|
|
233
|
+
${(0,l.when)(e=>e.icon,l.html`
|
|
234
|
+
<${e}-icon
|
|
235
|
+
name=${e=>e.icon.name}
|
|
236
|
+
size=${e=>e.icon.size}
|
|
237
|
+
variant=${e=>e.icon.variant}
|
|
238
|
+
slot="start"
|
|
239
|
+
></${e}-icon>
|
|
240
|
+
`)}
|
|
133
241
|
${(e,t)=>t.parent.getLabel(e.name)}
|
|
134
242
|
</${e}-menu-item>
|
|
135
243
|
`)}
|
|
136
|
-
${(0,l.when)((e,t)=>!
|
|
244
|
+
${(0,l.when)((e,t)=>!t.parent.isActionDisabled(e),l.html`
|
|
137
245
|
<${e}-menu-item
|
|
138
246
|
class="menu-item"
|
|
139
247
|
tabindex="${(e,t)=>t.index}"
|
|
140
248
|
@click=${(e,t)=>t.parent.onActionMenuItemClick(e.callback)}
|
|
141
249
|
style="${e=>e.color?`color: ${e.color};`:""}"
|
|
142
250
|
>
|
|
251
|
+
${(0,l.when)(e=>e.icon,l.html`
|
|
252
|
+
<${e}-icon
|
|
253
|
+
name=${e=>e.icon.name}
|
|
254
|
+
size=${e=>e.icon.size}
|
|
255
|
+
variant=${e=>e.icon.variant}
|
|
256
|
+
slot="start"
|
|
257
|
+
></${e}-icon>
|
|
258
|
+
`)}
|
|
143
259
|
${(e,t)=>t.parent.getLabel(e.name)}
|
|
144
260
|
</${e}-menu-item>
|
|
145
261
|
`)}
|
|
146
262
|
`,{positioning:!0})}
|
|
147
263
|
</${e}-menu>
|
|
148
|
-
|
|
264
|
+
`),F=R(e=>l.html`
|
|
149
265
|
<${e}-button
|
|
150
266
|
appearance="${e=>e.buttonAppearance}"
|
|
151
267
|
part="actions-opener"
|
|
152
268
|
class="actions-opener"
|
|
153
269
|
@click=${e=>null==e?void 0:e.singleOption.callback(e.rowData)}
|
|
154
|
-
?disabled=${e=>
|
|
270
|
+
?disabled=${e=>e.isActionDisabled(e.singleOption)}
|
|
155
271
|
>
|
|
156
272
|
${e=>e.getLabel(null==e?void 0:e.singleOption.name)}
|
|
157
273
|
</${e}-button>
|
|
158
|
-
|
|
274
|
+
`),M=l.html`
|
|
159
275
|
<div
|
|
160
276
|
class="actions-container${e=>e.isVertical?" actions-vertical":""}"
|
|
161
277
|
part="actions-container"
|
|
162
278
|
>
|
|
163
|
-
${e=>e.getTemplate(
|
|
279
|
+
${e=>e.getTemplate(I(e))}
|
|
164
280
|
</div>
|
|
165
|
-
`;class
|
|
281
|
+
`;class _ extends a.FoundationElement{constructor(){super(...arguments),this.isVertical=!1,this.addDefaultActions=!0,this.autoCloseOnAction=!0,this.name="Actions",this.open=!1,this.hideDisabled=!1,this.hideMenuSingleOption=!1,this.focusMenuOnOpen=!1}disconnectedCallback(){var e;this.stopTrackingPosition(),(null===(e=this.actionsMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.actionsMenu.hidePopover(),super.disconnectedCallback()}updateMenuPosition(){const e=this.actionsOpener.getBoundingClientRect(),t=this.actionsMenu;if(t.style.position="fixed",t.style.left="auto",!this.isVertical)return t.style.top=`${e.top}px`,void(t.style.right=window.innerWidth-e.right+"px");const{innerHeight:i,innerWidth:o}=window;t.style.maxHeight=`${i}px`;const{width:n,height:s}=t.getBoundingClientRect(),a=s<=i-e.bottom,r=s<=e.top,l=a||!r?e.bottom:e.top-s;t.style.top=`${(0,x.AB)(0,Math.max(i-s,0),l)}px`,t.style.right=`${(0,x.AB)(0,Math.max(o-n,0),o-e.right)}px`}startTrackingPosition(){this.positionTracker=new S(this.actionsOpener,()=>this.updateMenuPosition(),()=>this.open=!1),this.positionTracker.start()}stopTrackingPosition(){var e;null===(e=this.positionTracker)||void 0===e||e.stop(),this.positionTracker=void 0}definitionChanged(e,t){var i;t&&("function"==typeof t.actions?(this.actionsResolver=t.actions,this.actions=[]):(this.actionsResolver=void 0,this.actions=null!==(i=t.actions)&&void 0!==i?i:[]),delete this.definition.actions,t.buttonText&&(this.name=t.buttonText,delete this.definition.customButtonText),t.isVertical&&(this.isVertical=t.isVertical,delete this.definition.isVertical),t.iconName&&(this.iconName=t.iconName,delete this.definition.iconName),void 0!==t.addDefaultActions&&(this.addDefaultActions=t.addDefaultActions,delete this.definition.addDefaultActions),void 0!==t.hideDisabled&&(this.hideDisabled=t.hideDisabled,delete this.definition.hideDisabled),t.buttonAppearance&&(this.buttonAppearance=t.buttonAppearance,delete this.definition.buttonAppearance),t.hideMenuSingleOption&&(this.hideMenuSingleOption=t.hideMenuSingleOption,delete this.definition.hideMenuSingleOption),this.open&&(this.isVertical&&!this.hasVisibleActions?this.open=!1:l.DOM.queueUpdate(()=>this.open&&this.updateMenuPosition())))}openChanged(){var e,t,i,o;if(this.classNames=(0,$.x)(["visible",this.open],["hidden",!this.open]),this.open)this.updateMenuPosition(),this.actionsMenu.showPopover(),this.startTrackingPosition(),l.DOM.queueUpdate(()=>{this.open&&(this.updateMenuPosition(),this.focusMenuOnOpen&&this.actionsMenu.focus(),this.focusMenuOnOpen=!1)});else{this.focusMenuOnOpen=!1,this.stopTrackingPosition();const n=null===(e=this.actionsMenu)||void 0===e?void 0:e.contains(null===(t=this.shadowRoot)||void 0===t?void 0:t.activeElement);(null===(i=this.actionsMenu)||void 0===i?void 0:i.matches(":popover-open"))&&this.actionsMenu.hidePopover(),n&&(null===(o=this.actionsOpener)||void 0===o||o.focus())}}toggleActionsMenuVisibility(){this.open=!this.open}onPopoverToggle(e){const t=e.newState;t&&(this.open="open"===t)}onIconOpenerKeydown(e){return"Enter"!==e.key&&" "!==e.key||(this.focusMenuOnOpen=!this.open,this.toggleActionsMenuVisibility(),!1)}onActionMenuItemClick(e){this.autoCloseOnAction&&(this.open=!1),e(this.rowData)}isActionDisabled(e){var t;return!!(null===(t=e.isDisabled)||void 0===t?void 0:t.call(e,this.rowData))}get resolvedActions(){var e;return null!==(e=this.actionsResolver?this.actionsResolver(this.rowData):this.actions)&&void 0!==e?e:[]}get hasVisibleActions(){const e=this.resolvedActions;return this.hideDisabled?e.some(e=>!this.isActionDisabled(e)):e.length>0}get allActions(){const e=[{name:"✖",callback:()=>this.open=!1}];return this.addDefaultActions?[...this.resolvedActions,...e]:this.resolvedActions}get rowData(){if(!this.definition)return;const{node:e,data:t}=this.definition;return(null==e?void 0:e.data)||t}getLabel(e){return"function"==typeof e?e(this.rowData):e}getTemplate(e){if(this.isVertical&&!this.hasVisibleActions)return;const t=this.resolvedActions.filter(e=>!this.isActionDisabled(e));return this.hideMenuSingleOption?(this.singleOption=null,0!==t.length?1===t.length?(this.singleOption=t[0],F(e)):N(e):void 0):N(e)}}(0,C.Cg)([l.observable],_.prototype,"actions",void 0),(0,C.Cg)([l.observable],_.prototype,"actionsResolver",void 0),(0,C.Cg)([(0,l.attr)({attribute:"is-vertical",mode:"boolean"})],_.prototype,"isVertical",void 0),(0,C.Cg)([(0,l.attr)({attribute:"add-default-actions",mode:"boolean"})],_.prototype,"addDefaultActions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close-on-action",mode:"boolean"})],_.prototype,"autoCloseOnAction",void 0),(0,C.Cg)([l.observable],_.prototype,"classNames",void 0),(0,C.Cg)([l.observable],_.prototype,"definition",void 0),(0,C.Cg)([l.attr],_.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],_.prototype,"iconName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],_.prototype,"open",void 0),(0,C.Cg)([l.attr],_.prototype,"buttonAppearance",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-disabled",mode:"boolean"})],_.prototype,"hideDisabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-menu-single-option",mode:"boolean"})],_.prototype,"hideMenuSingleOption",void 0),(0,C.Cg)([l.observable],_.prototype,"singleOption",void 0);const P=_.compose({baseName:"actions-menu",styles:T,template:M});function H(){return"undefined"!=typeof window&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)}class z{getStatus(){return(0,C.sH)(this,void 0,void 0,function*(){return{provider:"none",model:""}})}interpretCriteria(e,t){return(0,C.sH)(this,void 0,void 0,function*(){return null})}}class U{constructor(){this.noopProvider=new z}get(e){return e===U.DEFAULT_NAME?this.noopProvider:void 0}default(){return this.noopProvider}defaultName(){return U.DEFAULT_NAME}names(){return[U.DEFAULT_NAME]}getStatus(e){return(0,C.sH)(this,void 0,void 0,function*(){var t,i,o;return void 0!==e&&e!==U.DEFAULT_NAME?null:null!==(o=yield null===(i=(t=this.noopProvider).getStatus)||void 0===i?void 0:i.call(t))&&void 0!==o?o:null})}listStatuses(){return(0,C.sH)(this,void 0,void 0,function*(){var e,t,i;const o=null!==(i=yield null===(t=(e=this.noopProvider).getStatus)||void 0===t?void 0:t.call(e))&&void 0!==i?i:null;return[{name:U.DEFAULT_NAME,isDefault:!0,status:o}]})}}U.DEFAULT_NAME="default";const B=a.DI.createInterface(e=>e.singleton(U));const V=l.css`
|
|
166
282
|
:host {
|
|
167
283
|
display: block;
|
|
168
284
|
width: 800px;
|
|
@@ -260,9 +376,9 @@
|
|
|
260
376
|
background: var(--neutral-fill-hover);
|
|
261
377
|
color: var(--neutral-foreground-rest);
|
|
262
378
|
}
|
|
263
|
-
`;var
|
|
264
|
-
${e=>{return t=
|
|
265
|
-
${(0,l.when)(()=>
|
|
379
|
+
`;var G=i(77679);let j=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(j="true"===GENX_ENABLE_AI)}catch(vd){}const Y=()=>j||(0,G.m4)("ai");var W=i(40729);const q=l.html`
|
|
380
|
+
${e=>{return t=I(e),l.html`
|
|
381
|
+
${(0,l.when)(()=>Y(),l.html`
|
|
266
382
|
<div class="ai-criteria-search">
|
|
267
383
|
<div class="ai-criteria-search-row">
|
|
268
384
|
${(0,l.when)(e=>!e.showingChips,l.html`
|
|
@@ -271,7 +387,7 @@
|
|
|
271
387
|
class="criteria-input"
|
|
272
388
|
placeholder="${e=>e.placeholder}"
|
|
273
389
|
?disabled=${e=>e.disabled||e.isInterpreting}
|
|
274
|
-
:value=${(0,
|
|
390
|
+
:value=${(0,W.O)(e=>e.inputValue,"string","input")}
|
|
275
391
|
@blur=${e=>e.handleBlur()}
|
|
276
392
|
rows="1"
|
|
277
393
|
></${t}-text-area>
|
|
@@ -334,7 +450,7 @@
|
|
|
334
450
|
</div>
|
|
335
451
|
`)}
|
|
336
452
|
`;var t}}
|
|
337
|
-
`;var V=i(95553),G=i(58749),j=i(14609),Y=i(86636);const W={contains:V.n.containsIgnoreCase,equals:V.n.EQ,startsWith:V.n.startsWith,endsWith:V.n.endsWith,greaterThan:V.n.GT,lessThan:V.n.LT,greaterThanOrEqual:V.n.GE,lessThanOrEqual:V.n.LE,notEqual:V.n.NE,dateIsToday:V.n.dateIsToday,dateIsAfter:V.n.dateIsGreaterEqual,dateIsGreaterEqual:V.n.dateIsGreaterEqual,dateIsBefore:V.n.dateIsLessEqual,dateIsLessEqual:V.n.dateIsLessEqual,dateIsEqual:V.n.dateIsEqual,dateTimeIsAfter:V.n.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:V.n.dateTimeIsGreaterEqual,dateTimeIsBefore:V.n.dateTimeIsLessEqual,dateTimeIsLessEqual:V.n.dateTimeIsLessEqual};function q(e){var t;const i=W[e.operator];if(!i)throw new Error(`Unknown criteria operator '${e.operator}'`);return(new G.K).withField(e.field).withValue(null!==(t=e.value)&&void 0!==t?t:null).withSerialiser(i).withGroup("default").build()}function K(e,t){return 1===e.length?e[0]:e.reduce((e,i,o)=>0===o?[i]:[...e,t,i],[])}function X(e){var t;const i=new j.b;let o=!1;for(const n of e){if(!(null===(t=n.clauses)||void 0===t?void 0:t.length))continue;const e=n.clauses.map(q),s="or"===n.logic?Y.r.Or():Y.r.And(),a=K(e,s),r=e.length>1?{join:s}:{};n.negated?i.And([Y.r.Not(),a]):i.And(1===e.length?e[0]:e,r),o=!0}return o?i.build():""}const J=["contains","equals","startsWith","notEqual"],Q=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],Z=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],ee=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],te={contains:"contains",equals:"=",startsWith:"starts with",endsWith:"ends with",notEqual:"≠",greaterThan:">",lessThan:"<",greaterThanOrEqual:"≥",lessThanOrEqual:"≤",dateIsToday:"is today",dateIsAfter:"after",dateIsBefore:"before",dateIsEqual:"=",dateIsGreaterEqual:"≥",dateIsLessEqual:"≤",dateTimeIsAfter:"after",dateTimeIsBefore:"before",dateTimeIsGreaterEqual:"≥",dateTimeIsLessEqual:"≤"},ie=new Set(["DATE","LOCALDATE"]),oe=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),ne=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function se(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function ae(e){const t=se(e);return ie.has(t)?Z:oe.has(t)?ee:ne.has(t)?Q:J}function re(e){return ne.has(se(e))}function le(e){return null!=e&&("number"==typeof e?!Number.isNaN(e)&&e>0:"string"==typeof e&&(/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e)))}function de(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function ce(e,t){const i=[],o=[],n=new Map;if(Array.isArray(t)&&t.length>0){"string"==typeof t[0]?t.forEach(e=>n.set(e,void 0)):t.forEach(e=>n.set(e.NAME,e))}for(const t of e){const{field:e,operator:s,value:a}=t;if(!e||"string"!=typeof e){o.push({field:String(e),message:"Field name is required"});continue}const r=n.get(e),l=r&&"TYPE"in r?r.TYPE:"STRING";ae(l).includes(s)?!Z.includes(s)&&!ee.includes(s)||"dateIsToday"===s||le(a)?re(l)&&Q.includes(s)&&!de(a)?o.push({field:e,operator:s,value:a,message:"Invalid numeric value"}):n.size>0&&!n.has(e)?o.push({field:e,operator:s,value:a,message:`Unknown field '${e}'`}):i.push(t):o.push({field:e,operator:s,value:a,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):o.push({field:e,operator:s,value:a,message:`Operator '${s}' is not allowed for field type ${l}`})}return{valid:i,invalid:o}}function ue(e,t){var i;const o=[],n=[];for(const s of e){if(!(null==s?void 0:s.clauses)||!Array.isArray(s.clauses)){n.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:a}=ce(s.clauses,t);n.push(...a),e.length>0&&o.push({logic:null!==(i=s.logic)&&void 0!==i?i:"and",negated:s.negated,clauses:e})}return{valid:o,invalid:n}}var he=i(60416);var pe,me,ge,ve=i(31274);!function(e){e.NOTIFICATION_EVENT="notification-event"}(pe||(pe={})),function(e){e.Top="top",e.Bottom="bottom"}(me||(me={})),function(e){e.Left="left",e.Right="right"}(ge||(ge={}));const fe="12px";var be=i(52945);const ye=(e,t,i)=>{var o,n,s,a,r,l,d,c,u,h,p,m,g,v,f,b,y,w,C;(0,he.u_)(e);const x=t.split("-")[0],$=(null===(n=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.toast)||void 0===n?void 0:n.position)||"top-right",S=null!==(s=null!=i?i:(e=>(0,be.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==s?s:(0,he.jE)("notify-container",t);S&&"notify-container"!==S.tagName.toLowerCase()&&function(e,t){var i,o;switch(t.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.toast)||void 0===o?void 0:o.position){case"top-left":t.style.top="var(--nav-height, 0)",t.style.left="0";break;case"bottom-left":t.style.bottom="0",t.style.left="0";break;case"bottom-right":t.style.bottom="0",t.style.right="0";break;default:t.style.top="var(--nav-height, 0)",t.style.right="0"}}(e,S);const E=document.createElement(`${x}-toast`),O=document.createElement("div");O.setAttribute("slot","top"),O.textContent=e.title;const T=document.createElement("div");T.setAttribute("slot","content"),T.textContent=(null==e?void 0:e.body)||"";const k=document.createElement("div");let D;k.setAttribute("slot","date"),k.textContent=(null===(a=null==e?void 0:e.createdAt)||void 0===a?void 0:a.toLocaleTimeString())||"",(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.toast)||void 0===l?void 0:l.buttons)&&(null===(u=null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.toast)||void 0===c?void 0:c.buttons)||void 0===u?void 0:u.length)&&(D=document.createElement("div"),D.setAttribute("slot","bottom"),e.config.toast.buttons.forEach(t=>{const i=document.createElement(`${x}-button`);i.textContent=t.placeholder||"example placeholder",i.addEventListener("click",()=>{const{details:o}=e.config.toast;if(t.action)return t.action({details:o,buttonElement:i,toastElement:E})}),t.appearance&&i.setAttribute("appearance",t.appearance),D.appendChild(i)})),E.setAttribute("notify",(null===(p=null===(h=null==e?void 0:e.config)||void 0===h?void 0:h.toast)||void 0===p?void 0:p.type)||""),e.iconName&&E.setAttribute("notification-icon",e.iconName),(null===(g=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===g?void 0:g.autoClose)&&E.setAttribute("auto-close",`${null===(f=null===(v=null==e?void 0:e.config)||void 0===v?void 0:v.toast)||void 0===f?void 0:f.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&E.setAttribute("close-timeout",`${null===(C=null===(w=null==e?void 0:e.config)||void 0===w?void 0:w.toast)||void 0===C?void 0:C.closeTimeout}`),E.appendChild(O),E.appendChild(T),E.appendChild(k),D&&E.appendChild(D),S.prepend(E)},we={alert:e=>{(0,he.u_)(e),alert((0,he.uP)(e))},toast:ye,dialog:ve.u,snackbar:(e,t)=>{var i,o,n,s,a,r;(0,he.u_)(e);const l=t.split("-")[0],d=document.createElement(`${l}-snackbar`),c=null!==(n=null===(o=null===(i=e.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.verticalEdge)&&void 0!==n?n:me.Bottom,u=null!==(r=null===(a=null===(s=e.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.horizontalEdge)&&void 0!==r?r:ge.Left,h=(0,he.jE)(`snack-container-${c}-${u}`,t);h&&((e,t,i)=>{e.style.position="fixed",e.style.top=t===me.Top?fe:"",e.style.bottom=t===me.Bottom?fe:"",e.style.left=i===ge.Left?fe:"",e.style.right=i===ge.Right?fe:""})(h,c,u),h.appendChild(d),d.notification=e},banner:(e,t,i)=>{var o;(0,he.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-banner`),a=(0,he.cL)(i);(null===(o=null==a?void 0:a.children)||void 0===o?void 0:o.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.notification=e}},Ce=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{we[o]&&we[o](e,t,i)})};function xe(e,t,i){(null==t?void 0:t.trim())&&Ce({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class $e extends a.FoundationElement{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null}get speechAvailable(){return L()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,i)=>{var o,n;return{groupIndex:t,clauseIndex:i,fieldLabel:this.getFieldLabel(e.field),operatorLabel:null!==(o=te[e.operator])&&void 0!==o?o:e.operator,valueLabel:"dateIsToday"===e.operator?"":String(null!==(n=e.value)&&void 0!==n?n:"")}}))}getFieldLabel(e){var t,i;if(!Array.isArray(this.fieldMetadata)||0===this.fieldMetadata.length)return e;if("string"==typeof this.fieldMetadata[0])return e;const o=this.fieldMetadata.find(t=>t.NAME===e);return null!==(i=null!==(t=null==o?void 0:o.UI_LABEL)&&void 0!==t?t:null==o?void 0:o.NAME)&&void 0!==i?i:e}toggleCriteriaView(){this.showingChips?(this.inputValue="",this.showingChips=!1):this.showingChips=!0}removeChip(e,t){var i;const o=this.activeGroups.map(e=>Object.assign(Object.assign({},e),{clauses:[...e.clauses]}));null===(i=o[e])||void 0===i||i.clauses.splice(t,1);const n=o.filter(e=>e.clauses.length>0);if(this.activeGroups=n,0===n.length)this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null);else{const e=X(n);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}clearChips(){this.activeGroups=[],this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null)}handleSubmit(){return(0,C.sH)(this,void 0,void 0,function*(){var e,t,i;const o=null===(e=this.inputValue)||void 0===e?void 0:e.trim();if(!o||this.isInterpreting)return;const n=null===(t=this.providerRegistry)||void 0===t?void 0:t.default();if(null==n?void 0:n.interpretCriteria){this.isInterpreting=!0;try{const e=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],t=yield n.interpretCriteria(o,{fields:e});if(!(null===(i=null==t?void 0:t.groups)||void 0===i?void 0:i.some(e=>{var t;return null===(t=e.clauses)||void 0===t?void 0:t.length})))return xe("AI criteria search","AI could not interpret the criteria",T(this)),void(this.isInterpreting=!1);const{valid:a,invalid:r}=ue(t.groups,this.fieldMetadata);if(r.length>0&&(xe("Criteria validation error",0===(s=r).length?"":1===s.length?s[0].message:s.map(e=>e.message).join("; "),T(this)),this.$emit("validation-errors",r)),a.length>0){const e=[...this.activeGroups,...a],t=X(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue="",this.showingChips=!0,this.$emit("criteria-changed",t)}}catch(e){xe("AI criteria search",e instanceof Error?e.message:"Interpretation failed",T(this))}finally{this.isInterpreting=!1}var s}else xe("AI criteria search","AI provider not configured",T(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0)}clear(){this.inputValue="",this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit("criteria-changed",null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,void(this.isRecording=!1);this.inputValue="",this.showingChips=!1,this.stopRecording=function(e,t){if(!L())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let o="";return i.onresult=t=>{let i="",n="";for(let e=t.resultIndex;e<t.results.length;e+=1){const o=t.results[e][0].transcript;t.results[e].isFinal?n+=o:i+=o}n?(o+=n,e(o,!0)):i&&e(o+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}(0,C.Cg)([M],$e.prototype,"providerRegistry",void 0),(0,C.Cg)([l.attr],$e.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],$e.prototype,"disabled",void 0),(0,C.Cg)([l.observable],$e.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],$e.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],$e.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],$e.prototype,"activeGroups",void 0),(0,C.Cg)([l.observable],$e.prototype,"showingChips",void 0),(0,C.Cg)([l.observable],$e.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],$e.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],$e.prototype,"speechAvailable",null),(0,C.Cg)([l.volatile],$e.prototype,"criteriaChips",null);const Se=void 0,Ee={},Oe=$e.compose(Object.assign({baseName:"ai-criteria-search",template:B,styles:_,shadowOptions:Se},Ee)),Te=(e,t)=>l.css`
|
|
453
|
+
`;var K=i(95553),X=i(58749),J=i(14609),Q=i(86636);const Z={contains:K.n.containsIgnoreCase,equals:K.n.EQ,startsWith:K.n.startsWith,endsWith:K.n.endsWith,greaterThan:K.n.GT,lessThan:K.n.LT,greaterThanOrEqual:K.n.GE,lessThanOrEqual:K.n.LE,notEqual:K.n.NE,dateIsToday:K.n.dateIsToday,dateIsAfter:K.n.dateIsGreaterEqual,dateIsGreaterEqual:K.n.dateIsGreaterEqual,dateIsBefore:K.n.dateIsLessEqual,dateIsLessEqual:K.n.dateIsLessEqual,dateIsEqual:K.n.dateIsEqual,dateTimeIsAfter:K.n.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:K.n.dateTimeIsGreaterEqual,dateTimeIsBefore:K.n.dateTimeIsLessEqual,dateTimeIsLessEqual:K.n.dateTimeIsLessEqual};function ee(e){var t;const i=Z[e.operator];if(!i)throw new Error(`Unknown criteria operator '${e.operator}'`);return(new X.K).withField(e.field).withValue(null!==(t=e.value)&&void 0!==t?t:null).withSerialiser(i).withGroup("default").build()}function te(e,t){return 1===e.length?e[0]:e.reduce((e,i,o)=>0===o?[i]:[...e,t,i],[])}function ie(e){var t;const i=new J.b;let o=!1;for(const n of e){if(!(null===(t=n.clauses)||void 0===t?void 0:t.length))continue;const e=n.clauses.map(ee),s="or"===n.logic?Q.r.Or():Q.r.And(),a=te(e,s),r=e.length>1?{join:s}:{};n.negated?i.And([Q.r.Not(),a]):i.And(1===e.length?e[0]:e,r),o=!0}return o?i.build():""}const oe=["contains","equals","startsWith","notEqual"],ne=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],se=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],ae=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],re={contains:"contains",equals:"=",startsWith:"starts with",endsWith:"ends with",notEqual:"≠",greaterThan:">",lessThan:"<",greaterThanOrEqual:"≥",lessThanOrEqual:"≤",dateIsToday:"is today",dateIsAfter:"after",dateIsBefore:"before",dateIsEqual:"=",dateIsGreaterEqual:"≥",dateIsLessEqual:"≤",dateTimeIsAfter:"after",dateTimeIsBefore:"before",dateTimeIsGreaterEqual:"≥",dateTimeIsLessEqual:"≤"},le=new Set(["DATE","LOCALDATE"]),de=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),ce=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function ue(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function he(e){const t=ue(e);return le.has(t)?se:de.has(t)?ae:ce.has(t)?ne:oe}function pe(e){return ce.has(ue(e))}function me(e){return null!=e&&("number"==typeof e?!Number.isNaN(e)&&e>0:"string"==typeof e&&(/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e)))}function ge(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function ve(e,t){const i=[],o=[],n=new Map;if(Array.isArray(t)&&t.length>0){"string"==typeof t[0]?t.forEach(e=>n.set(e,void 0)):t.forEach(e=>n.set(e.NAME,e))}for(const t of e){const{field:e,operator:s,value:a}=t;if(!e||"string"!=typeof e){o.push({field:String(e),message:"Field name is required"});continue}const r=n.get(e),l=r&&"TYPE"in r?r.TYPE:"STRING";he(l).includes(s)?!se.includes(s)&&!ae.includes(s)||"dateIsToday"===s||me(a)?pe(l)&&ne.includes(s)&&!ge(a)?o.push({field:e,operator:s,value:a,message:"Invalid numeric value"}):n.size>0&&!n.has(e)?o.push({field:e,operator:s,value:a,message:`Unknown field '${e}'`}):i.push(t):o.push({field:e,operator:s,value:a,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):o.push({field:e,operator:s,value:a,message:`Operator '${s}' is not allowed for field type ${l}`})}return{valid:i,invalid:o}}function fe(e,t){var i;const o=[],n=[];for(const s of e){if(!(null==s?void 0:s.clauses)||!Array.isArray(s.clauses)){n.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:a}=ve(s.clauses,t);n.push(...a),e.length>0&&o.push({logic:null!==(i=s.logic)&&void 0!==i?i:"and",negated:s.negated,clauses:e})}return{valid:o,invalid:n}}var be=i(60416);var ye,we,Ce,xe=i(31274);!function(e){e.NOTIFICATION_EVENT="notification-event"}(ye||(ye={})),function(e){e.Top="top",e.Bottom="bottom"}(we||(we={})),function(e){e.Left="left",e.Right="right"}(Ce||(Ce={}));const $e="12px";var Se=i(52945);const Ee=(e,t,i)=>{var o,n,s,a,r,l,d,c,u,h,p,m,g,v,f,b,y,w,C;(0,be.u_)(e);const x=t.split("-")[0],$=(null===(n=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.toast)||void 0===n?void 0:n.position)||"top-right",S=null!==(s=null!=i?i:(e=>(0,Se.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==s?s:(0,be.jE)("notify-container",t);S&&"notify-container"!==S.tagName.toLowerCase()&&function(e,t){var i,o;switch(t.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.toast)||void 0===o?void 0:o.position){case"top-left":t.style.top="var(--nav-height, 0)",t.style.left="0";break;case"bottom-left":t.style.bottom="0",t.style.left="0";break;case"bottom-right":t.style.bottom="0",t.style.right="0";break;default:t.style.top="var(--nav-height, 0)",t.style.right="0"}}(e,S);const E=document.createElement(`${x}-toast`),O=document.createElement("div");O.setAttribute("slot","top"),O.textContent=e.title;const T=document.createElement("div");T.setAttribute("slot","content"),T.textContent=(null==e?void 0:e.body)||"";const k=document.createElement("div");let D;k.setAttribute("slot","date"),k.textContent=(null===(a=null==e?void 0:e.createdAt)||void 0===a?void 0:a.toLocaleTimeString())||"",(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.toast)||void 0===l?void 0:l.buttons)&&(null===(u=null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.toast)||void 0===c?void 0:c.buttons)||void 0===u?void 0:u.length)&&(D=document.createElement("div"),D.setAttribute("slot","bottom"),e.config.toast.buttons.forEach(t=>{const i=document.createElement(`${x}-button`);i.textContent=t.placeholder||"example placeholder",i.addEventListener("click",()=>{const{details:o}=e.config.toast;if(t.action)return t.action({details:o,buttonElement:i,toastElement:E})}),t.appearance&&i.setAttribute("appearance",t.appearance),D.appendChild(i)})),E.setAttribute("notify",(null===(p=null===(h=null==e?void 0:e.config)||void 0===h?void 0:h.toast)||void 0===p?void 0:p.type)||""),e.iconName&&E.setAttribute("notification-icon",e.iconName),(null===(g=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===g?void 0:g.autoClose)&&E.setAttribute("auto-close",`${null===(f=null===(v=null==e?void 0:e.config)||void 0===v?void 0:v.toast)||void 0===f?void 0:f.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&E.setAttribute("close-timeout",`${null===(C=null===(w=null==e?void 0:e.config)||void 0===w?void 0:w.toast)||void 0===C?void 0:C.closeTimeout}`),E.appendChild(O),E.appendChild(T),E.appendChild(k),D&&E.appendChild(D),S.prepend(E)},Oe={alert:e=>{(0,be.u_)(e),alert((0,be.uP)(e))},toast:Ee,dialog:xe.u,snackbar:(e,t)=>{var i,o,n,s,a,r;(0,be.u_)(e);const l=t.split("-")[0],d=document.createElement(`${l}-snackbar`),c=null!==(n=null===(o=null===(i=e.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.verticalEdge)&&void 0!==n?n:we.Bottom,u=null!==(r=null===(a=null===(s=e.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.horizontalEdge)&&void 0!==r?r:Ce.Left,h=(0,be.jE)(`snack-container-${c}-${u}`,t);h&&((e,t,i)=>{e.style.position="fixed",e.style.top=t===we.Top?$e:"",e.style.bottom=t===we.Bottom?$e:"",e.style.left=i===Ce.Left?$e:"",e.style.right=i===Ce.Right?$e:""})(h,c,u),h.appendChild(d),d.notification=e},banner:(e,t,i)=>{var o;(0,be.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-banner`),a=(0,be.cL)(i);(null===(o=null==a?void 0:a.children)||void 0===o?void 0:o.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.notification=e}},Te=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{Oe[o]&&Oe[o](e,t,i)})};function ke(e,t,i){(null==t?void 0:t.trim())&&Te({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class De extends a.FoundationElement{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null}get speechAvailable(){return H()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,i)=>{var o,n;return{groupIndex:t,clauseIndex:i,fieldLabel:this.getFieldLabel(e.field),operatorLabel:null!==(o=re[e.operator])&&void 0!==o?o:e.operator,valueLabel:"dateIsToday"===e.operator?"":String(null!==(n=e.value)&&void 0!==n?n:"")}}))}getFieldLabel(e){var t,i;if(!Array.isArray(this.fieldMetadata)||0===this.fieldMetadata.length)return e;if("string"==typeof this.fieldMetadata[0])return e;const o=this.fieldMetadata.find(t=>t.NAME===e);return null!==(i=null!==(t=null==o?void 0:o.UI_LABEL)&&void 0!==t?t:null==o?void 0:o.NAME)&&void 0!==i?i:e}toggleCriteriaView(){this.showingChips?(this.inputValue="",this.showingChips=!1):this.showingChips=!0}removeChip(e,t){var i;const o=this.activeGroups.map(e=>Object.assign(Object.assign({},e),{clauses:[...e.clauses]}));null===(i=o[e])||void 0===i||i.clauses.splice(t,1);const n=o.filter(e=>e.clauses.length>0);if(this.activeGroups=n,0===n.length)this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null);else{const e=ie(n);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}clearChips(){this.activeGroups=[],this.showingChips=!1,this.lastValidCriteria=null,this.$emit("criteria-changed",null)}handleSubmit(){return(0,C.sH)(this,void 0,void 0,function*(){var e,t,i;const o=null===(e=this.inputValue)||void 0===e?void 0:e.trim();if(!o||this.isInterpreting)return;const n=null===(t=this.providerRegistry)||void 0===t?void 0:t.default();if(null==n?void 0:n.interpretCriteria){this.isInterpreting=!0;try{const e=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],t=yield n.interpretCriteria(o,{fields:e});if(!(null===(i=null==t?void 0:t.groups)||void 0===i?void 0:i.some(e=>{var t;return null===(t=e.clauses)||void 0===t?void 0:t.length})))return ke("AI criteria search","AI could not interpret the criteria",I(this)),void(this.isInterpreting=!1);const{valid:a,invalid:r}=fe(t.groups,this.fieldMetadata);if(r.length>0&&(ke("Criteria validation error",0===(s=r).length?"":1===s.length?s[0].message:s.map(e=>e.message).join("; "),I(this)),this.$emit("validation-errors",r)),a.length>0){const e=[...this.activeGroups,...a],t=ie(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue="",this.showingChips=!0,this.$emit("criteria-changed",t)}}catch(e){ke("AI criteria search",e instanceof Error?e.message:"Interpretation failed",I(this))}finally{this.isInterpreting=!1}var s}else ke("AI criteria search","AI provider not configured",I(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0)}clear(){this.inputValue="",this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit("criteria-changed",null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,void(this.isRecording=!1);this.inputValue="",this.showingChips=!1,this.stopRecording=function(e,t){if(!H())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let o="";return i.onresult=t=>{let i="",n="";for(let e=t.resultIndex;e<t.results.length;e+=1){const o=t.results[e][0].transcript;t.results[e].isFinal?n+=o:i+=o}n?(o+=n,e(o,!0)):i&&e(o+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}(0,C.Cg)([B],De.prototype,"providerRegistry",void 0),(0,C.Cg)([l.attr],De.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],De.prototype,"disabled",void 0),(0,C.Cg)([l.observable],De.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],De.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],De.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],De.prototype,"activeGroups",void 0),(0,C.Cg)([l.observable],De.prototype,"showingChips",void 0),(0,C.Cg)([l.observable],De.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],De.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],De.prototype,"speechAvailable",null),(0,C.Cg)([l.volatile],De.prototype,"criteriaChips",null);const Ie=void 0,Re={},Ae=De.compose(Object.assign({baseName:"ai-criteria-search",template:q,styles:V,shadowOptions:Ie},Re)),Le=(e,t)=>l.css`
|
|
338
454
|
:host {
|
|
339
455
|
display: flex;
|
|
340
456
|
justify-content: center;
|
|
@@ -464,12 +580,12 @@
|
|
|
464
580
|
margin-top: calc(var(--design-unit) * 3px);
|
|
465
581
|
width: 100%;
|
|
466
582
|
}
|
|
467
|
-
`,
|
|
468
|
-
${e=>{return t=
|
|
469
|
-
${(0,l.when)(()=>
|
|
583
|
+
`,Ne=l.html`
|
|
584
|
+
${e=>{return t=I(e),l.html`
|
|
585
|
+
${(0,l.when)(()=>Y(),l.html`
|
|
470
586
|
<div class="ai-indicator-container" part="ai-indicator-container">
|
|
471
587
|
<div
|
|
472
|
-
class=${e=>(0
|
|
588
|
+
class=${e=>(0,$.x)("ai-indicator-badge",["green","available"===e.state||"server"===e.state],["amber","downloading"===e.state||"downloadable"===e.state],["red","unavailable"===e.state||"none"===e.state],["pulsing","downloading"===e.state||e.isInstalling])}
|
|
473
589
|
data-test-id="ai-indicator-badge"
|
|
474
590
|
part="ai-indicator-badge"
|
|
475
591
|
role="button"
|
|
@@ -521,19 +637,19 @@
|
|
|
521
637
|
</div>
|
|
522
638
|
`)}
|
|
523
639
|
`;var t}}
|
|
524
|
-
`;class
|
|
640
|
+
`;class Fe extends a.FoundationElement{constructor(){super(...arguments),this.status=null,this.open=!1,this.state="none",this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get aiProvider(){var e;return null===(e=this.providerRegistry)||void 0===e?void 0:e.default()}get chromeStatusLabel(){var e,t;if("chrome"!==(null===(e=this.status)||void 0===e?void 0:e.provider))return null;const i=null===(t=this.status)||void 0===t?void 0:t.chromeAvailability;return"available"===i?"Installed":"downloading"===i||this.isInstalling?"Downloading…":"downloadable"===i?"Downloadable":"unavailable"===i?"Unavailable":null}get canInstall(){var e,t,i;return!!(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)&&"chrome"===(null===(t=this.status)||void 0===t?void 0:t.provider)&&"downloadable"===(null===(i=this.status)||void 0===i?void 0:i.chromeAvailability)&&!this.isInstalling}get isDownloading(){var e;return"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener("mousedown",this.clickOutside)}openChanged(){this.open?(document.addEventListener("mousedown",this.clickOutside),this.refreshStatus()):document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){k(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(!(null===(e=this.aiProvider)||void 0===e?void 0:e.getStatus))return this.status=null,void(this.state="none");try{const e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),"available"===this.state&&(this.isInstalling=!1)}catch(e){this.status=null,this.state="none",this.isInstalling=!1}})}deriveState(e){if(!e||"none"===e.provider)return"none";if("chrome"===e.provider){const t=e.chromeAvailability;return"available"===t?"available":"downloading"===t?"downloading":"downloadable"===t?"downloadable":"unavailable"}return"server"}maybeStartPolling(){var e;"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.canInstall&&(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch(e){this.isInstalling=!1}finally{yield this.refreshStatus()}}})}}(0,C.Cg)([B],Fe.prototype,"providerRegistry",void 0),(0,C.Cg)([l.observable],Fe.prototype,"status",void 0),(0,C.Cg)([l.observable],Fe.prototype,"open",void 0),(0,C.Cg)([l.observable],Fe.prototype,"state",void 0),(0,C.Cg)([l.observable],Fe.prototype,"isInstalling",void 0),(0,C.Cg)([l.volatile],Fe.prototype,"chromeStatusLabel",null),(0,C.Cg)([l.volatile],Fe.prototype,"canInstall",null),(0,C.Cg)([l.volatile],Fe.prototype,"isDownloading",null);const Me=Fe.compose({baseName:"ai-indicator",template:Ne,styles:Le}),_e=(e,t)=>l.css`
|
|
525
641
|
${(0,r.anchorStyles)(e,t)}
|
|
526
|
-
`,
|
|
642
|
+
`,Pe=(e,t)=>(0,a.anchorTemplate)(e,t);class He extends r.Anchor{}const ze={delegatesFocus:!0,mode:"open"},Ue={},Be=He.compose(Object.assign({baseName:"anchor",template:Pe,styles:_e,shadowOptions:ze},Ue)),Ve=(e,t)=>(0,a.anchoredRegionTemplate)(e,t),Ge=(e,t)=>l.css`
|
|
527
643
|
${(0,r.anchoredRegionStyles)(e,t)}
|
|
528
|
-
`;class
|
|
644
|
+
`;class je extends r.AnchoredRegion{}const Ye={delegatesFocus:!0,mode:"open"},We={},qe=je.compose(Object.assign({baseName:"anchored-region",template:Ve,styles:Ge,shadowOptions:Ye},We)),Ke=(e,t)=>l.css`
|
|
529
645
|
${(0,r.avatarStyles)(e,t)}
|
|
530
|
-
`,
|
|
646
|
+
`,Xe=(e,t)=>(0,a.avatarTemplate)(e,t),Je=l.html`
|
|
531
647
|
${(0,l.when)(e=>e.imgSrc,l.html`
|
|
532
648
|
<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />
|
|
533
649
|
`)}
|
|
534
|
-
`;class
|
|
650
|
+
`;class Qe extends r.Avatar{}const Ze={delegatesFocus:!0,mode:"open"},et={media:Je},tt=Qe.compose(Object.assign({baseName:"avatar",template:Xe,styles:Ke,shadowOptions:Ze},et)),it=(e,t)=>l.css`
|
|
535
651
|
${(0,r.badgeStyles)(e,t)}
|
|
536
|
-
`,
|
|
652
|
+
`,ot=(e,t)=>(0,a.badgeTemplate)(e,t);class nt extends r.Badge{}const st=void 0,at={},rt=nt.compose(Object.assign({baseName:"badge",template:ot,styles:it,shadowOptions:st},at));var lt=i(66506);const dt=(0,lt.createLogger)("foundation-ui"),ct=l.css`
|
|
537
653
|
@keyframes delete-animate {
|
|
538
654
|
from {
|
|
539
655
|
height: 100px;
|
|
@@ -605,7 +721,7 @@
|
|
|
605
721
|
flex: 1;
|
|
606
722
|
overflow: hidden;
|
|
607
723
|
}
|
|
608
|
-
`,
|
|
724
|
+
`,ut=e=>l.html`
|
|
609
725
|
<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${(0,l.ref)("banner")}>
|
|
610
726
|
<div part="content" class="content">
|
|
611
727
|
<slot name="content">
|
|
@@ -634,23 +750,23 @@
|
|
|
634
750
|
</slot>
|
|
635
751
|
</div>
|
|
636
752
|
</div>
|
|
637
|
-
`,
|
|
638
|
-
${e=>
|
|
639
|
-
`,
|
|
753
|
+
`,ht=l.html`
|
|
754
|
+
${e=>ut(I(e))}
|
|
755
|
+
`,pt={mode:"open",delegatesFocus:!0};class mt extends a.FoundationElement{constructor(){super(...arguments),this.dismissAnimation=""}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation="banner-delete",new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return(0,C.sH)(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){dt.error(e)}})}}(0,C.Cg)([l.observable],mt.prototype,"dismissAnimation",void 0),(0,C.Cg)([l.observable],mt.prototype,"notification",void 0);const gt=mt.compose({baseName:"banner",styles:ct,template:ht,shadowOptions:pt}),vt=(e,t)=>l.css`
|
|
640
756
|
${(0,r.breadcrumbStyles)(e,t)}
|
|
641
|
-
`,
|
|
757
|
+
`,ft=(e,t)=>(0,a.breadcrumbTemplate)(e,t);class bt extends r.Breadcrumb{}const yt=void 0,wt={},Ct=bt.compose(Object.assign({baseName:"breadcrumb",template:ft,styles:vt,shadowOptions:yt},wt)),xt=(e,t)=>l.css`
|
|
642
758
|
${(0,r.breadcrumbItemStyles)(e,t)}
|
|
643
|
-
|
|
759
|
+
`,$t=(e,t)=>(0,a.breadcrumbItemTemplate)(e,t);class St extends r.BreadcrumbItem{}const Et=void 0,Ot={separator:"/"},Tt=St.compose(Object.assign({baseName:"breadcrumb-item",template:$t,styles:xt,shadowOptions:Et},Ot)),kt=(e,t)=>l.css`
|
|
644
760
|
${(0,r.buttonStyles)(e,t)}
|
|
645
|
-
|
|
761
|
+
`,Dt=(e,t)=>(0,a.buttonTemplate)(e,t);class It extends r.Button{}const Rt={delegatesFocus:!0,mode:"open"},At={},Lt=It.compose(Object.assign({baseName:"button",template:Dt,styles:kt,shadowOptions:Rt},At)),Nt=()=>l.css`
|
|
646
762
|
${r.CalendarStyles}
|
|
647
|
-
`,
|
|
763
|
+
`,Ft=(e,t)=>(0,a.calendarTemplate)(e,t);class Mt extends r.Calendar{}const _t={delegatesFocus:!0,mode:"open"},Pt={},Ht=Mt.compose(Object.assign({baseName:"calendar",template:Ft,styles:Nt,shadowOptions:_t},Pt)),zt=(e,t)=>l.css`
|
|
648
764
|
${(0,r.cardStyles)(e,t)}
|
|
649
765
|
:host {
|
|
650
766
|
background-color: var(--fui-card-fill-color);
|
|
651
767
|
color: var(--fui-card-foreground-color);
|
|
652
768
|
}
|
|
653
|
-
`,
|
|
769
|
+
`,Ut=(e,t)=>(0,a.cardTemplate)(e,t);class Bt extends r.Card{}const Vt=void 0,Gt={},jt=Bt.compose(Object.assign({baseName:"card",template:Ut,styles:zt,shadowOptions:Vt},Gt));var Yt;!function(e){e.BELOW="below",e.ABOVE="above"}(Yt||(Yt={}));const Wt=450,qt=l.css`
|
|
654
770
|
.root {
|
|
655
771
|
position: relative;
|
|
656
772
|
width: 100%;
|
|
@@ -836,15 +952,15 @@
|
|
|
836
952
|
|
|
837
953
|
.visible {
|
|
838
954
|
visibility: visible;
|
|
839
|
-
max-height: ${
|
|
955
|
+
max-height: ${Wt.toString()}px;
|
|
840
956
|
}
|
|
841
|
-
`,
|
|
957
|
+
`,Kt=(e="foundation")=>l.html`
|
|
842
958
|
<div class="root" part="root">
|
|
843
959
|
<div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}>
|
|
844
960
|
<label
|
|
845
961
|
part="label"
|
|
846
962
|
for="control"
|
|
847
|
-
class=${e=>{var t;return(0
|
|
963
|
+
class=${e=>{var t;return(0,$.x)("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}
|
|
848
964
|
>
|
|
849
965
|
<slot
|
|
850
966
|
${(0,l.slotted)({property:"defaultSlottedNodes",filter:a.whitespaceFilter})}
|
|
@@ -861,7 +977,7 @@
|
|
|
861
977
|
<${e}-text-field
|
|
862
978
|
id="filter-search"
|
|
863
979
|
part="filter-search"
|
|
864
|
-
value=${(0,
|
|
980
|
+
value=${(0,W.O)(e=>e.filterSearchValue,"string","input")}
|
|
865
981
|
placeholder="${e=>e.getPlaceholder}"
|
|
866
982
|
@input=${(e,t)=>e.setFilter()}
|
|
867
983
|
@change=${(e,t)=>e.changeHandler(t.event)}
|
|
@@ -907,11 +1023,11 @@
|
|
|
907
1023
|
</div>
|
|
908
1024
|
</div>
|
|
909
1025
|
</div>
|
|
910
|
-
`,
|
|
911
|
-
${
|
|
912
|
-
`,
|
|
1026
|
+
`,Xt=l.html`
|
|
1027
|
+
${Kt()}
|
|
1028
|
+
`,Jt=void 0,Qt={};class Zt extends a.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=Yt.BELOW}openChanged(e,t){var i,o;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(o=this.optionsElement)||void 0===o||o.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Yt.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){const t=(null!=e?e:this.options).reduce((e,t)=>{const i=t.type||"Other";return e[i]?e[i].options.push(t):e[i]={type:i,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const i=t.getBoundingClientRect(),o=this.getBoundingClientRect(),n=i.top+i.height/2;e=o.top<n?Yt.BELOW:Yt.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<t.height&&o>n?Yt.ABOVE:Yt.BELOW}}e===Yt.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===Yt.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return e.value}getItemLabel(e){let t;return e?(t=e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}setFilter(){const e=this.options.filter(e=>{var t;const i=e.description,o=null!==(t=e.label)&&void 0!==t?t:e.value;return(null==i?void 0:i.toLowerCase().includes(this.filterSearchValue.toLowerCase()))||o.toLowerCase().includes(this.filterSearchValue.toLowerCase())?e:void 0});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){k(e,this)&&(this.open=!1)}}(0,C.Cg)([l.attr],Zt.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Zt.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zt.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zt.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Zt.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Zt.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Zt.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Zt.prototype,"open",void 0),(0,C.Cg)([l.observable],Zt.prototype,"options",void 0),(0,C.Cg)([l.observable],Zt.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Zt.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Zt.prototype,"position",void 0),(0,C.Cg)([l.volatile],Zt.prototype,"getPlaceholder",null);const ei=Zt.compose(Object.assign({baseName:"categorized-multiselect",template:Xt,styles:qt,shadowOptions:Jt},Qt)),ti=(e,t)=>l.css`
|
|
913
1029
|
${(0,r.checkboxStyles)(e,t)}
|
|
914
|
-
`,Xt=(e,t)=>(0,a.checkboxTemplate)(e,t);class Jt extends r.Checkbox{}const Qt=void 0,Zt={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '},ei=Jt.compose(Object.assign({baseName:"checkbox",template:Xt,styles:Kt,shadowOptions:Qt},Zt));var ti=i(62051),ii=i.n(ti),oi=i(39087),ni=i(87917),si=i(40370),ai=i(6884),ri=i(96730),li=i(34193),di=i(21281),ci=i(70002),ui=i(41119),hi=i(57963),pi=i(49964),mi=i(12066),gi=i(97156);class vi extends((0,si.C)(a.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=ai.OD.MAX_ROWS_250,this.maxView=ai.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.withTimestampFormatting=!0,this.appliedDatasourceConfig={},this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.pendingMoreRows=0,this.viewRowCount=0,this.nextRequestOffset=0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new gi.t(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==(0,ri.Q)(t,";");this.refetchIfInitializedAndChanged(i)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){const i=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(i)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&this.fetchGenesisData(null)}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{const i=e[t];void 0!==i&&i!==this.appliedDatasourceConfig[t]&&(this.appliedDatasourceConfig[t]=i,this[t]=i)})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}get effectiveRowId(){var e;return this.rowId?this.rowId:(null===(e=this.datasource)||void 0===e?void 0:e.resourceType)===oi.v.REQUEST_SERVER?ai.OD.REQUEST_SERVER_ROW_ID:ai.OD.DATASERVER_ROW_ID}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return(0,C.sH)(this,arguments,void 0,function*(e=!0){var t,i;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0,this.moreRowsAvailable=!1,this.pendingMoreRows=0,this.serverMoreRows=void 0,this.viewRowCount=0,this.pagingStopped=void 0,this.nextRequestOffset=0,this.fetchGeneration+=1;const o=this.fetchGeneration,n=()=>o!==this.fetchGeneration;if(this.data)return void this.syncComponentData(this.data);const s=e||!this.datasource.initialized;s||this.clearData(),this.sourceRef=void 0;const a=yield this.datasource.init(this.datasourceOptions(),s);if(!n())if(a){if(this.isSnapshot){const e=yield this.datasource.snapshot();if(n())return;const t=this.filterSnapshotResult(e);return this.updateRequestPagingState(e,null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0,this.initialRequestOffset()),void this.syncComponentData(t)}ot.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(n())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF;const t=e.ROW?(0,li.d)(e):void 0;this.updateStreamPagingState(e,t);const i=e.MESSAGE_TYPE;i&&i===di.Go.LOGOFF_ACK?this.dataSubWasLoggedOff=!0:(this.dataSubWasLoggedOff=!1,t?this.handleStreamUpdate(t):this.handleStreamUpdate(e))})}else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})})}initDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){yield this.datasource.init(this.datasourceOptions(),!0)})}canRequestMoreRows(){if(!this.isConnected||!this.datasource||!this.moreRowsAvailable)return!1;switch(this.datasource.resourceType){case oi.v.REQUEST_SERVER:return!0;case oi.v.DATASERVER:return!!this.sourceRef&&!this.dataSubWasLoggedOff;default:return!1}}requestMoreRows(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.canRequestMoreRows())try{if(this.datasource.resourceType===oi.v.DATASERVER)return this.pendingMoreRows+=1,void(yield this.connect.getMoreRows(this.sourceRef));const t=this.fetchGeneration,i=this.nextRequestOffset;this.moreRowsAvailable=!1;const o=yield this.datasource.snapshot({DETAILS:Object.assign(Object.assign({},null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS),{OFFSET:i})});if(t!==this.fetchGeneration)return;const n=Array.isArray(null==o?void 0:o.REPLY)?o.REPLY:[];this.updateRequestPagingState(o,n.length,i),n.length>0&&this.handleStreamInserts(n)}catch(e){throw this.moreRowsAvailable=!0,this.pendingMoreRows=Math.max(0,this.pendingMoreRows-1),this.handleError({message:`Failed to request more rows for ${this.resourceName}`,loggerType:"error",loggerArgs:[e]}),e}})}filterSnapshotResult(e){if(e)return Array.isArray(e)?e:e.REPLY?e.REPLY:e.ROW?(0,li.d)(e).inserts:void 0}updateStreamPagingState(e,t){var i,o,n,s,a;const r="boolean"==typeof(null==e?void 0:e.MORE_ROWS);if(this.datasource.resourceType!==oi.v.DATASERVER)return void(r&&(this.moreRowsAvailable=e.MORE_ROWS));this.viewRowCount=Math.max(0,this.viewRowCount+(null!==(o=null===(i=null==t?void 0:t.inserts)||void 0===i?void 0:i.length)&&void 0!==o?o:0)-(null!==(s=null===(n=null==t?void 0:t.deletes)||void 0===n?void 0:n.length)&&void 0!==s?s:0));let l=!1;if(r&&(l=this.pendingMoreRows>0,this.pendingMoreRows=Math.max(0,this.pendingMoreRows-1),this.serverMoreRows=e.MORE_ROWS),void 0===this.serverMoreRows)return;const d=l&&!0===e.MORE_ROWS&&!(null===(a=e.ROW)||void 0===a?void 0:a.length),c=(0,ci.SG)({moreRows:this.serverMoreRows,emptyReply:d,rowsHeld:this.viewRowCount,maxView:this.maxView});if("more"===c&&"view-full"===this.pagingStopped)this.pagingStopped=void 0;else if(("view-full"===c||"stalled"===c)&&!this.pagingStopped){this.pagingStopped=c;const e=(0,ci.TA)({status:c,resourceName:this.resourceName,rowsHeld:this.viewRowCount,maxView:this.maxView,emptyReply:d,attribute:"maxView"});e&&ot.warn(e)}this.moreRowsAvailable="more"===c&&!this.pagingStopped}updateRequestPagingState(e,t,i){if(Array.isArray(e)||!e)return void(this.moreRowsAvailable=!1);const o=e,n=o.NEXT_OFFSET,s="number"==typeof n&&n>i,a=Number(this.maxRows)||0,r=t>0&&a>0&&t>=a;this.moreRowsAvailable="boolean"==typeof o.MORE_ROWS?o.MORE_ROWS:-1!==n&&(s||r),this.nextRequestOffset=s?n:i+t}initialRequestOffset(){var e,t;return Number(null===(t=null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.OFFSET)||0}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,i;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh)return null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)}),void this.syncComponentData(Array.from(this.rowsSyncedWithStream.values()));this.handleStreamInserts(e.REPLY);const o=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(o)}applyDataserverData(e){var t,i,o,n;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)});const i=Array.from(this.rowsSyncedWithStream.values());return void this.syncComponentData(i)}(null===(i=e.inserts)||void 0===i?void 0:i.length)>0&&this.handleStreamInserts(e.inserts),(null===(o=e.deletes)||void 0===o?void 0:o.length)>0&&this.handleStreamDeletes(e.deletes),(null===(n=e.updates)||void 0===n?void 0:n.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;const t=(null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[];return(0,ri.Q)(t.join(" && "),";")}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){const{message:t,loggerType:i,loggerArgs:o=[]}=e;t&&ot[i](t,...o)}getFieldMetadata(e){var t;return null===(t=this.datasource.fieldMetadata)||void 0===t?void 0:t.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===ui.w.DATE||t===ui.w.DATETIME?(0,mi.Ey)(e,t===ui.w.DATETIME):e}}function fi(e,t){var i;const o=new j.b;o.withExpression((new G.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(V.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var bi;(0,C.Cg)([hi.dm],vi.prototype,"connect",void 0),(0,C.Cg)([pi.yW],vi.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vi.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],vi.prototype,"criteria",void 0),(0,C.Cg)([l.observable],vi.prototype,"data",void 0),(0,C.Cg)([l.attr],vi.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vi.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],vi.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],vi.prototype,"maxView",void 0),(0,C.Cg)([l.attr],vi.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],vi.prototype,"request",void 0),(0,C.Cg)([l.attr],vi.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vi.prototype,"reverse",void 0),(0,C.Cg)([l.attr],vi.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],vi.prototype,"withTimestampFormatting",void 0);let yi=bi=class extends vi{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=bi.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.open)&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{const e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,o=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!o&&this.allowCustomOptions&&this.select instanceof r.Combobox?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",o)}}initialSelectedValueChanged(e,t){t!==e&&(t?this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()):this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t,i;if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${T(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:bi.defaultPageSize,this.select.addEventListener("open-change",this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;l.DOM.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||ot.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener("open-change",this.selectOpenChangeHandler),this.select.removeEventListener("change",this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{const e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==oi.v.DATASERVER}catch(e){ot.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e,t,i,o,n,s,a;this.isConnected&&(null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null!==(n=null!==(i=null===(t=this.select)||void 0===t?void 0:t.scrollableListbox)&&void 0!==i?i:null===(o=this.select)||void 0===o?void 0:o.listbox)&&void 0!==n?n:null===(a=null===(s=this.select)||void 0===s?void 0:s.shadowRoot)||void 0===a?void 0:a.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):ot.warn("Unable to locate listbox element, infinite scroll will not be available."))}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-bi.scrollLoadThresholdPx}loadNextPage(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;const e=this.datasource.resourceType===oi.v.REQUEST_SERVER;try{yield this.requestMoreRows()}catch(e){return void(this.loadingMoreRows=!1)}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.listboxElement;e&&0!==e.clientHeight&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof r.Combobox&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return(0,C.sH)(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?function(e,t){const i=new j.b;i.withExpression((new G.K).withField(e.valueField).withValue(t).withSerialiser(V.n.equals).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${i.build()}`:e.criteria=i.build()}(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof bi||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}rowToOption(e){var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{const i=document.createElement(this.optionElement);i.textContent=t||e,i.value=e,this.select.appendChild(i),this.resizeObserver.observe(i)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));const e=0===this.renderedOptionsCount;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async&&e){this.resetCombobox();const e=this.getInitialLabel();l.DOM.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof r.Combobox&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async)&&(this.resetCombobox(),l.DOM.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof r.Combobox?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof r.Combobox&&this.select.resetCombobox()}handleStreamInserts(e){var t,i;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const o=new Set((null!==(t=this.options)&&void 0!==t?t:[]).map(e=>String(e.value))),n=e.filter(e=>!o.has(String(e[this.valueField])));if(!n.length)return ot.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),void(this.moreRowsAvailable=!1);const s=n.map(e=>this.rowToOption(e));this.options=[...null!==(i=this.options)&&void 0!==i?i:[],...s],this.renderListboxOptions(s),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};yi.defaultPageSize=20,yi.scrollLoadThresholdPx=32,(0,C.Cg)([ni.ME],yi.prototype,"resources",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],yi.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],yi.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],yi.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],yi.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],yi.prototype,"allowCustomOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"infinite-scroll"})],yi.prototype,"infiniteScroll",void 0),(0,C.Cg)([(0,l.attr)({attribute:"page-size",converter:l.nullableNumberConverter})],yi.prototype,"pageSize",void 0),(0,C.Cg)([l.observable],yi.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],yi.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],yi.prototype,"initialSelectedValue",void 0),yi=bi=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],yi);const wi=(e,t)=>l.css`
|
|
1030
|
+
`,ii=(e,t)=>(0,a.checkboxTemplate)(e,t);class oi extends r.Checkbox{}const ni=void 0,si={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '},ai=oi.compose(Object.assign({baseName:"checkbox",template:ii,styles:ti,shadowOptions:ni},si));var ri=i(62051),li=i.n(ri),di=i(39087),ci=i(87917),ui=i(40370),hi=i(6884),pi=i(96730),mi=i(34193),gi=i(21281),vi=i(70002),fi=i(41119),bi=i(57963),yi=i(49964),wi=i(12066),Ci=i(97156);class xi extends((0,ui.C)(a.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=hi.OD.MAX_ROWS_250,this.maxView=hi.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.withTimestampFormatting=!0,this.appliedDatasourceConfig={},this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.pendingMoreRows=0,this.viewRowCount=0,this.nextRequestOffset=0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new Ci.t(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==(0,pi.Q)(t,";");this.refetchIfInitializedAndChanged(i)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){const i=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(i)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&this.fetchGenesisData(null)}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{const i=e[t];void 0!==i&&i!==this.appliedDatasourceConfig[t]&&(this.appliedDatasourceConfig[t]=i,this[t]=i)})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}get effectiveRowId(){var e;return this.rowId?this.rowId:(null===(e=this.datasource)||void 0===e?void 0:e.resourceType)===di.v.REQUEST_SERVER?hi.OD.REQUEST_SERVER_ROW_ID:hi.OD.DATASERVER_ROW_ID}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return(0,C.sH)(this,arguments,void 0,function*(e=!0){var t,i;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0,this.moreRowsAvailable=!1,this.pendingMoreRows=0,this.serverMoreRows=void 0,this.viewRowCount=0,this.pagingStopped=void 0,this.nextRequestOffset=0,this.fetchGeneration+=1;const o=this.fetchGeneration,n=()=>o!==this.fetchGeneration;if(this.data)return void this.syncComponentData(this.data);const s=e||!this.datasource.initialized;s||this.clearData(),this.sourceRef=void 0;const a=yield this.datasource.init(this.datasourceOptions(),s);if(!n())if(a){if(this.isSnapshot){const e=yield this.datasource.snapshot();if(n())return;const t=this.filterSnapshotResult(e);return this.updateRequestPagingState(e,null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0,this.initialRequestOffset()),void this.syncComponentData(t)}dt.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(n())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF;const t=e.ROW?(0,mi.d)(e):void 0;this.updateStreamPagingState(e,t);const i=e.MESSAGE_TYPE;i&&i===gi.Go.LOGOFF_ACK?this.dataSubWasLoggedOff=!0:(this.dataSubWasLoggedOff=!1,t?this.handleStreamUpdate(t):this.handleStreamUpdate(e))})}else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})})}initDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){yield this.datasource.init(this.datasourceOptions(),!0)})}canRequestMoreRows(){if(!this.isConnected||!this.datasource||!this.moreRowsAvailable)return!1;switch(this.datasource.resourceType){case di.v.REQUEST_SERVER:return!0;case di.v.DATASERVER:return!!this.sourceRef&&!this.dataSubWasLoggedOff;default:return!1}}requestMoreRows(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.canRequestMoreRows())try{if(this.datasource.resourceType===di.v.DATASERVER)return this.pendingMoreRows+=1,void(yield this.connect.getMoreRows(this.sourceRef));const t=this.fetchGeneration,i=this.nextRequestOffset;this.moreRowsAvailable=!1;const o=yield this.datasource.snapshot({DETAILS:Object.assign(Object.assign({},null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS),{OFFSET:i})});if(t!==this.fetchGeneration)return;const n=Array.isArray(null==o?void 0:o.REPLY)?o.REPLY:[];this.updateRequestPagingState(o,n.length,i),n.length>0&&this.handleStreamInserts(n)}catch(e){throw this.moreRowsAvailable=!0,this.pendingMoreRows=Math.max(0,this.pendingMoreRows-1),this.handleError({message:`Failed to request more rows for ${this.resourceName}`,loggerType:"error",loggerArgs:[e]}),e}})}filterSnapshotResult(e){if(e)return Array.isArray(e)?e:e.REPLY?e.REPLY:e.ROW?(0,mi.d)(e).inserts:void 0}updateStreamPagingState(e,t){var i,o,n,s,a;const r="boolean"==typeof(null==e?void 0:e.MORE_ROWS);if(this.datasource.resourceType!==di.v.DATASERVER)return void(r&&(this.moreRowsAvailable=e.MORE_ROWS));this.viewRowCount=Math.max(0,this.viewRowCount+(null!==(o=null===(i=null==t?void 0:t.inserts)||void 0===i?void 0:i.length)&&void 0!==o?o:0)-(null!==(s=null===(n=null==t?void 0:t.deletes)||void 0===n?void 0:n.length)&&void 0!==s?s:0));let l=!1;if(r&&(l=this.pendingMoreRows>0,this.pendingMoreRows=Math.max(0,this.pendingMoreRows-1),this.serverMoreRows=e.MORE_ROWS),void 0===this.serverMoreRows)return;const d=l&&!0===e.MORE_ROWS&&!(null===(a=e.ROW)||void 0===a?void 0:a.length),c=(0,vi.SG)({moreRows:this.serverMoreRows,emptyReply:d,rowsHeld:this.viewRowCount,maxView:this.maxView});if("more"===c&&"view-full"===this.pagingStopped)this.pagingStopped=void 0;else if(("view-full"===c||"stalled"===c)&&!this.pagingStopped){this.pagingStopped=c;const e=(0,vi.TA)({status:c,resourceName:this.resourceName,rowsHeld:this.viewRowCount,maxView:this.maxView,emptyReply:d,attribute:"maxView"});e&&dt.warn(e)}this.moreRowsAvailable="more"===c&&!this.pagingStopped}updateRequestPagingState(e,t,i){if(Array.isArray(e)||!e)return void(this.moreRowsAvailable=!1);const o=e,n=o.NEXT_OFFSET,s="number"==typeof n&&n>i,a=Number(this.maxRows)||0,r=t>0&&a>0&&t>=a;this.moreRowsAvailable="boolean"==typeof o.MORE_ROWS?o.MORE_ROWS:-1!==n&&(s||r),this.nextRequestOffset=s?n:i+t}initialRequestOffset(){var e,t;return Number(null===(t=null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.OFFSET)||0}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,i;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh)return null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)}),void this.syncComponentData(Array.from(this.rowsSyncedWithStream.values()));this.handleStreamInserts(e.REPLY);const o=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(o)}applyDataserverData(e){var t,i,o,n;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)});const i=Array.from(this.rowsSyncedWithStream.values());return void this.syncComponentData(i)}(null===(i=e.inserts)||void 0===i?void 0:i.length)>0&&this.handleStreamInserts(e.inserts),(null===(o=e.deletes)||void 0===o?void 0:o.length)>0&&this.handleStreamDeletes(e.deletes),(null===(n=e.updates)||void 0===n?void 0:n.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;const t=(null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[];return(0,pi.Q)(t.join(" && "),";")}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){const{message:t,loggerType:i,loggerArgs:o=[]}=e;t&&dt[i](t,...o)}getFieldMetadata(e){var t;return null===(t=this.datasource.fieldMetadata)||void 0===t?void 0:t.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===fi.w.DATE||t===fi.w.DATETIME?(0,wi.Ey)(e,t===fi.w.DATETIME):e}}function $i(e,t){var i;const o=new J.b;o.withExpression((new X.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(K.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var Si;(0,C.Cg)([bi.dm],xi.prototype,"connect",void 0),(0,C.Cg)([yi.yW],xi.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],xi.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],xi.prototype,"criteria",void 0),(0,C.Cg)([l.observable],xi.prototype,"data",void 0),(0,C.Cg)([l.attr],xi.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],xi.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],xi.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],xi.prototype,"maxView",void 0),(0,C.Cg)([l.attr],xi.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],xi.prototype,"request",void 0),(0,C.Cg)([l.attr],xi.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],xi.prototype,"reverse",void 0),(0,C.Cg)([l.attr],xi.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],xi.prototype,"withTimestampFormatting",void 0);let Ei=Si=class extends xi{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=Si.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.open)&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{const e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,o=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!o&&this.allowCustomOptions&&this.select instanceof r.Combobox?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",o)}}initialSelectedValueChanged(e,t){t!==e&&(t?this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()):this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t,i;if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${I(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:Si.defaultPageSize,this.select.addEventListener("open-change",this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;l.DOM.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||dt.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener("open-change",this.selectOpenChangeHandler),this.select.removeEventListener("change",this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{const e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==di.v.DATASERVER}catch(e){dt.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e,t,i,o,n,s,a;this.isConnected&&(null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null!==(n=null!==(i=null===(t=this.select)||void 0===t?void 0:t.scrollableListbox)&&void 0!==i?i:null===(o=this.select)||void 0===o?void 0:o.listbox)&&void 0!==n?n:null===(a=null===(s=this.select)||void 0===s?void 0:s.shadowRoot)||void 0===a?void 0:a.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):dt.warn("Unable to locate listbox element, infinite scroll will not be available."))}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-Si.scrollLoadThresholdPx}loadNextPage(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;const e=this.datasource.resourceType===di.v.REQUEST_SERVER;try{yield this.requestMoreRows()}catch(e){return void(this.loadingMoreRows=!1)}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.listboxElement;e&&0!==e.clientHeight&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof r.Combobox&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return(0,C.sH)(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?function(e,t){const i=new J.b;i.withExpression((new X.K).withField(e.valueField).withValue(t).withSerialiser(K.n.equals).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${i.build()}`:e.criteria=i.build()}(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof Si||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}rowToOption(e){var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{const i=document.createElement(this.optionElement);i.textContent=t||e,i.value=e,this.select.appendChild(i),this.resizeObserver.observe(i)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));const e=0===this.renderedOptionsCount;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async&&e){this.resetCombobox();const e=this.getInitialLabel();l.DOM.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof r.Combobox&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async)&&(this.resetCombobox(),l.DOM.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof r.Combobox?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof r.Combobox&&this.select.resetCombobox()}handleStreamInserts(e){var t,i;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const o=new Set((null!==(t=this.options)&&void 0!==t?t:[]).map(e=>String(e.value))),n=e.filter(e=>!o.has(String(e[this.valueField])));if(!n.length)return dt.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),void(this.moreRowsAvailable=!1);const s=n.map(e=>this.rowToOption(e));this.options=[...null!==(i=this.options)&&void 0!==i?i:[],...s],this.renderListboxOptions(s),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){dt.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){dt.debug("handleStreamUpdates - Method not implemented.")}};Ei.defaultPageSize=20,Ei.scrollLoadThresholdPx=32,(0,C.Cg)([ci.ME],Ei.prototype,"resources",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],Ei.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],Ei.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],Ei.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],Ei.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],Ei.prototype,"allowCustomOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"infinite-scroll"})],Ei.prototype,"infiniteScroll",void 0),(0,C.Cg)([(0,l.attr)({attribute:"page-size",converter:l.nullableNumberConverter})],Ei.prototype,"pageSize",void 0),(0,C.Cg)([l.observable],Ei.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],Ei.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],Ei.prototype,"initialSelectedValue",void 0),Ei=Si=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],Ei);const Oi=(e,t)=>l.css`
|
|
915
1031
|
.combo-box-indicator {
|
|
916
1032
|
transition-property: transform;
|
|
917
1033
|
transition-duration: 0.2s;
|
|
@@ -923,7 +1039,7 @@
|
|
|
923
1039
|
}
|
|
924
1040
|
|
|
925
1041
|
${(0,r.comboboxStyles)(e,t)}
|
|
926
|
-
`,
|
|
1042
|
+
`,Ti=(e,t)=>l.html`
|
|
927
1043
|
<template
|
|
928
1044
|
aria-activedescendant="${e=>e.activeDescendant}"
|
|
929
1045
|
class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}"
|
|
@@ -977,7 +1093,7 @@
|
|
|
977
1093
|
></slot>
|
|
978
1094
|
</div>
|
|
979
1095
|
</template>
|
|
980
|
-
`;var
|
|
1096
|
+
`;var ki,Di;class Ii extends r.Combobox{constructor(){super(...arguments),ki.set(this,void 0),Di.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode="startsWith",this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:"auto",block:"nearest"},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:"auto",block:"center"},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}debounceChanged(e,t){this.debouncedInputHandler=li()(this.asyncSetFilter,t)}get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}openChanged(){super.openChanged(),this.$emit("open-change",{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return l.Observable.track(this,"value"),this._ourValue}set value(e){var t,i,o;if(void 0===e)return;const n=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const n=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),s=this.options?this.options.findIndex(n):-1,a=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(i=this.options[s])||void 0===i?void 0:i.text;this.selectedIndex=r&&r!==a?s:this.selectedIndex,e&&""!==e.trim()&&-1===s&&(e=(null===(o=this.firstSelectedOption)||void 0===o?void 0:o.text)||e)}n!==e&&(this._ourValue=e,super.valueChanged(n,e),l.Observable.notify(this,"value"))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){var e;if(this.async)return;const t=null===(e=this.slottedDatasource)||void 0===e?void 0:e.assignedNodes().find(e=>e instanceof Ei);(null==t?void 0:t.infiniteScroll)&&(this.async=!0)}get options(){return this.async?(l.Observable.track(this,"options"),this._options):super.options}set options(e){super.options=e}filterOptions(){if(this.async)return this.filteredOptions=[...this._options],void this._options.forEach(e=>e.hidden=!1);this.autocomplete&&this.autocomplete!==a.ComboboxAutocomplete.none||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(k(e,this))this.open=!1;else{if(D(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!D(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if((0,C.GG)(this,Di,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;if(this.scrollWhenSelectionChanges){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollWhenSelectionChangesOptions)}break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const i=super.keydownHandler(e);return"Enter"!==t?i:void 0}keyupHandler(e){var t;const i=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(i){case"Enter":return!(0,C.gn)(this,Di,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===a.ComboboxAutocomplete.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return(0,C.gn)(this,ki,"f")||(0,C.GG)(this,ki,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,C.gn)(this,ki,"f")}selectItemByValue(e){var t,i,o;this.selectedIndex=null!==(i=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.text===e))&&void 0!==i?i:-1,null===(o=this.options)||void 0===o||o.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?(this.selectedIndex=this.options.map(e=>e.text).indexOf(this.control.value),this.debouncedInputHandler()):super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof Ei);if(t.length>0){const i=t[0];null==e||""===e?i.criteria=i.baseCriteria||"":$i(i,e),l.DOM.queueUpdate(()=>{this.control.value=e})}else dt.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===a.ComboboxAutocomplete.both&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}ki=new WeakMap,Di=new WeakMap,(0,C.Cg)([l.observable],Ii.prototype,"activeDescendant",null),(0,C.Cg)([l.observable],Ii.prototype,"slottedDatasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ii.prototype,"async",void 0),(0,C.Cg)([l.attr],Ii.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"case-sensitive"})],Ii.prototype,"caseSensitive",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"ignore-input-click"})],Ii.prototype,"ignoreInputClick",void 0),(0,C.Cg)([(0,l.attr)({attribute:"filter-mode"})],Ii.prototype,"filterMode",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],Ii.prototype,"scrollToSelectedWhenOpening",void 0),(0,C.Cg)([l.observable],Ii.prototype,"scrollToSelectedWhenOpeningOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-when-selection-changes"})],Ii.prototype,"scrollWhenSelectionChanges",void 0),(0,C.Cg)([l.observable],Ii.prototype,"scrollWhenSelectionChangesOptions",void 0);const Ri={delegatesFocus:!0,mode:"open"},Ai={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},Li=Ii.compose(Object.assign({baseName:"combobox",template:Ti,styles:Oi,shadowOptions:Ri},Ai));var Ni=i(98316);const Fi=(e,t)=>l.css`
|
|
981
1097
|
:host {
|
|
982
1098
|
--light-size: 12px;
|
|
983
1099
|
--height: calc(var(--design-unit) * 2px + var(--light-size));
|
|
@@ -1025,18 +1141,18 @@
|
|
|
1025
1141
|
text-overflow: ellipsis;
|
|
1026
1142
|
white-space: nowrap;
|
|
1027
1143
|
}
|
|
1028
|
-
`,
|
|
1029
|
-
<div class=${e=>(0
|
|
1144
|
+
`,Mi=l.html`
|
|
1145
|
+
<div class=${e=>(0,$.x)(["light",!0],[e.colour,!0])}></div>
|
|
1030
1146
|
${(0,l.when)(e=>e.showLabel,l.html`
|
|
1031
1147
|
<div class="label">${e=>e.label}</div>
|
|
1032
1148
|
`)}
|
|
1033
|
-
`;class
|
|
1149
|
+
`;class _i extends a.FoundationElement{constructor(){super(...arguments),this.showLabel=!1,this.label="disconnected",this.colour="red"}connectedCallback(){super.connectedCallback(),this.subscription=this.connect.isConnectedSubject.subscribe(e=>{this.label=this.getLabel(e),this.colour=e?"green":"red"})}disconnectedCallback(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}getLabel(e){if(!e)return"disconnected";return`${this.session.getSessionStorageItem("hostUrl")} ✔`}}(0,C.Cg)([bi.dm],_i.prototype,"connect",void 0),(0,C.Cg)([Ni.N],_i.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-label"})],_i.prototype,"showLabel",void 0),(0,C.Cg)([l.observable],_i.prototype,"label",void 0),(0,C.Cg)([l.observable],_i.prototype,"colour",void 0);const Pi=_i.compose({baseName:"connection-indicator",template:Mi,styles:Fi}),Hi=(e,t)=>l.css`
|
|
1034
1150
|
${(0,r.dataGridStyles)(e,t)}
|
|
1035
|
-
`,
|
|
1151
|
+
`,zi=(e,t)=>(0,a.dataGridTemplate)(e,t);class Ui extends r.DataGrid{}const Bi=void 0,Vi={},Gi=Ui.compose(Object.assign({baseName:"data-grid",template:zi,styles:Hi,shadowOptions:Bi},Vi)),ji=(e,t)=>l.css`
|
|
1036
1152
|
${(0,r.dataGridCellStyles)(e,t)}
|
|
1037
|
-
`;class
|
|
1153
|
+
`;class Yi extends r.DataGridCell{}const Wi=void 0,qi={},Ki=Yi.compose(Object.assign({baseName:"data-grid-cell",template:a.dataGridCellTemplate,styles:ji,shadowOptions:Wi},qi)),Xi=(e,t)=>l.css`
|
|
1038
1154
|
${(0,r.dataGridRowStyles)(e,t)}
|
|
1039
|
-
`;class
|
|
1155
|
+
`;class Ji extends r.DataGridRow{}const Qi=void 0,Zi={},eo=Ji.compose(Object.assign({baseName:"data-grid-row",template:a.dataGridRowTemplate,styles:Xi,shadowOptions:Qi},Zi));var to=i(94343),io=i.n(to),oo=i(58915),no=i.n(oo),so=i(7554),ao=i.n(so),ro=i(49916),lo=i.n(ro),co=i(33839),uo=i.n(co);class ho{constructor(e,t="default"){e=null!=e?e:new Date,this.Date=e,this.date=e.getDate(),this.day=e.toLocaleString(t,{weekday:"long"}),this.dayNumber=e.getDay()+1,this.dayShort=e.toLocaleString(t,{weekday:"short"}),this.year=e.getFullYear(),this.yearShort=Number(e.toLocaleString(t,{year:"2-digit"})),this.month=e.toLocaleString(t,{month:"long"}),this.monthShort=e.toLocaleString(t,{month:"short"}),this.monthNumber=e.getMonth()+1,this.timestamp=e.getTime()}}io().extend(uo());class po{constructor(e=null,t="default"){const i=new ho(e,t);this.lang=t,this.name=i.month,this.number=i.monthNumber,this.year=i.year,this.numberOfDays=[31,28,31,30,31,30,31,31,30,31,30,31][this.number-1],2===this.number&&(this.numberOfDays+=io()(i.date).isLeapYear()?1:0)}getDay(e){return new ho(new Date(this.year,this.number-1,e),this.lang)}}io().extend(uo());class mo{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new ho(null,i),this.year=null!=e?e:this.today.year,this.month=new po(new Date(this.year,(t||this.today.monthNumber)-1),i),this.lang=i,this.weekDays.forEach((e,t)=>{const i=this.month.getDay(t);this.weekDays[i.dayNumber-1]=i.day})}getMonth(e){return new po(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new po(new Date(this.year-1,11),this.lang):new po(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new po(new Date(this.year+1,0),this.lang):new po(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new po(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new po(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new po(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new po(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new po(new Date(this.year,this.month.number-1-1),this.lang)}}const go=l.css`
|
|
1040
1156
|
:host {
|
|
1041
1157
|
position: relative;
|
|
1042
1158
|
}
|
|
@@ -1192,7 +1308,7 @@
|
|
|
1192
1308
|
.date-toggle[readonly] .label {
|
|
1193
1309
|
cursor: pointer;
|
|
1194
1310
|
}
|
|
1195
|
-
`,
|
|
1311
|
+
`,vo=[1,7],fo=e=>l.html`
|
|
1196
1312
|
<${e}-text-field
|
|
1197
1313
|
data-test-id="date-picker"
|
|
1198
1314
|
readonly
|
|
@@ -1217,20 +1333,20 @@
|
|
|
1217
1333
|
</${e}-button>
|
|
1218
1334
|
</div>
|
|
1219
1335
|
</div>
|
|
1220
|
-
<div class="week-days ${e=>(0
|
|
1336
|
+
<div class="week-days ${e=>(0,$.x)(["hide-weekends",e.hideWeekends])}">
|
|
1221
1337
|
${(0,l.repeat)(e=>{var t;return null===(t=e.calendar)||void 0===t?void 0:t.weekDays},l.html`
|
|
1222
|
-
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===
|
|
1338
|
+
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===vo.indexOf(t.index+1),l.html`
|
|
1223
1339
|
<span
|
|
1224
|
-
class="${(e,t)=>(0
|
|
1340
|
+
class="${(e,t)=>(0,$.x)(["disabled",-1!==t.parent.disabledDaysOfWeek.indexOf(t.index+1)])}"
|
|
1225
1341
|
>
|
|
1226
1342
|
${(e,t)=>e.substring(0,t.parent.substringNumber)}
|
|
1227
1343
|
</span>
|
|
1228
1344
|
`)}
|
|
1229
1345
|
`,{positioning:!0})}
|
|
1230
1346
|
</div>
|
|
1231
|
-
<div class="month-days ${e=>(0
|
|
1347
|
+
<div class="month-days ${e=>(0,$.x)(["hide-weekends",e.hideWeekends])}">
|
|
1232
1348
|
${(0,l.repeat)(e=>e.monthList,l.html`
|
|
1233
|
-
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===
|
|
1349
|
+
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===vo.indexOf(e.dayNumber),l.html`
|
|
1234
1350
|
<button
|
|
1235
1351
|
?disabled="${(e,t)=>-1!==t.parent.disabledDaysOfWeek.indexOf(e.dayNumber)}"
|
|
1236
1352
|
class="month-day
|
|
@@ -1245,44 +1361,44 @@
|
|
|
1245
1361
|
</div>
|
|
1246
1362
|
<slot name="bottom"></slot>
|
|
1247
1363
|
</div>
|
|
1248
|
-
`,
|
|
1249
|
-
${e=>
|
|
1250
|
-
`;i(8420);function po(e){const t=((null==e?void 0:e.trim())||"en").toLowerCase().replace(/_/g,"-");return"en-us"===t||"en"===t?"en":"en-gb"===t?"en-gb":t}function mo(){return"undefined"!=typeof navigator&&navigator.language?navigator.language:"en"}function go(e="en"){const t=po(e),i=Xi()().locale(t),o=i.locale();return(n=t)!==(s=o)&&s!==n.split("-")[0]?Xi()().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var n,s}function vo(e){return e.replace(/YYYY/g,"yyyy").replace(/YY(?!Y)/g,"yy").replace(/DD/g,"dd").replace(/D(?!D)/g,"d").replace(/MM/g,"mm").replace(/M(?!M)/g,"m")}function fo(e){return null!=e&&""!==String(e).trim()}Xi().extend(Qi()),Xi().extend(eo()),Xi().extend(io());const bo="MM-DD-YYYY";function yo(e,t){const i=String(e).trim(),o=Xi()(i,t,!0);if(o.isValid())return o;const n=Xi()(i,bo,!0);return n.isValid()?n:null}var wo=i(28745);const Co=[1,2,3,4,5,6,7],xo=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=Co.filter(t=>-1===e.indexOf(t));let s=n.find(e=>e>t.dayNumber);s||(s=Math.min(...n));const a=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return n.length?new so(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,a),i):(wo.v.warn("Date picker disabled days - all days of week have been disabled"),t)},$o=void 0,So={};class Eo extends a.FoundationElement{constructor(){super(...arguments),this.format=bo,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=bo,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&fo(this.value)&&(this.formatDate=Xi()(this.currentDate.Date).format(t))}langChanged(){this.applyEffectiveLangChange()}useLocaleFormatChanged(e,t){this.calendar&&(t&&!e?this.cacheUserFormat(this.format):!t&&e&&this.restoreUserFormat(),this.applyEffectiveLangChange())}inlineCalendarChanged(){this.inlineCalendar?(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)):this.visible&&(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)),this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){this.suppressValueChanged||this.calendar&&(fo(t)?this.applyValue(t):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate())}disconnectedCallback(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),Xi().extend(Qi()),Xi().extend(io()),Xi().extend(eo()),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||fo(e)?fo(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return fo(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||fo(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||vo(this.format)}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?mo():this.lang}applyLocaleFormat(){this.format=go(this.effectiveLang)}cacheUserFormat(e){const t=null==e?void 0:e.trim();t&&(this.cachedFormat=t)}restoreUserFormat(){this.format=this.cachedFormat}applyEffectiveLangChange(){var e,t;if(!this.calendar)return;this.useLocaleFormat&&this.applyLocaleFormat();const i=this.calendar.year,o=this.calendar.month.number,n=null!==(t=null===(e=this.currentDate)||void 0===e?void 0:e.Date)&&void 0!==t?t:Xi()().toDate();this.currentDate=new so(n,this.effectiveLang),this.calendar=new ro(i,o,this.effectiveLang),fo(this.value)&&(this.formatDate=Xi()(this.currentDate.Date).format(this.format)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}syncValueAttribute(e){this.suppressValueChanged=!0,this.value=e,this.suppressValueChanged=!1}initializeEmpty(){const e=Xi()();this.currentDate=new so(e.toDate(),this.effectiveLang),this.calendar=new ro(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate="",this.syncValueAttribute(""),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}initializeWithDefaultDate(){this.resetToDefaultDate(!0)}resetToDefaultDate(e=!1){var t;let i=new so(Xi()().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=xo(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new ro(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=Xi()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Xi()(this.currentDate.Date).format(bo)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=yo(e,this.format);t?(this.currentDate=new so(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new ro(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=Xi()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Xi()(this.currentDate.Date).format(bo)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=Xi()();this.currentDate=new so(t.toDate(),this.effectiveLang),this.calendar&&(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()),this.formatDate="",this.syncValueAttribute(""),e&&this.$emit("value-changed",void 0)}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}visibleChanged(e,t){this.inlineCalendar||(t?(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)):(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)))}handleKeydownOutside(e){!this.inlineCalendar&&this.visible&&"Escape"===e.key&&(e.preventDefault(),this.closeCalendar())}handleClickOutside(e){!this.inlineCalendar&&this.visible&&E(e,this)&&this.closeCalendar()}closeCalendar(){this.visible&&(this.visible=!1,this.toggleVisibility())}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=(0,x.x)(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return!(this.allowEmpty&&!fo(this.value))&&Xi()(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){Xi()(e.Date).isSame(this.currentDate.Date,"day")&&fo(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=Xi()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Xi()(e.Date).format(bo)),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,o=this.calendar.month.numberOfDays+i,n=Array.from({length:o});for(let e=i;e<o;e+=1)n[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const o=i-(e+1);n[e]=t.getDay(t.numberOfDays-o)}return n}}(0,C.Cg)([l.attr],Eo.prototype,"format",void 0),(0,C.Cg)([l.attr],Eo.prototype,"lang",void 0),(0,C.Cg)([(0,l.attr)({attribute:"use-locale-format",mode:"boolean"})],Eo.prototype,"useLocaleFormat",void 0),(0,C.Cg)([l.attr],Eo.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],Eo.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],Eo.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],Eo.prototype,"position",void 0),(0,C.Cg)([l.attr],Eo.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-empty",mode:"boolean"})],Eo.prototype,"allowEmpty",void 0),(0,C.Cg)([l.attr],Eo.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Eo.prototype,"value",void 0),(0,C.Cg)([l.observable],Eo.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],Eo.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],Eo.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],Eo.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],Eo.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],Eo.prototype,"monthList",void 0),(0,C.Cg)([l.observable],Eo.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],Eo.prototype,"calendar",void 0);const Oo=Eo.compose(Object.assign({baseName:"date-picker",styles:lo,template:ho,shadowOptions:$o},So));var To=i(83912);const ko=r.SwatchRGB.create(1,1,1),Do=r.SwatchRGB.create(0,0,0),Io=(0,To.parseColorHexRGB)("#585858"),Ro=r.SwatchRGB.create(Io.r,Io.g,Io.b),Ao=(0,To.parseColorHexRGB)("#ffffff"),Lo=r.SwatchRGB.create(Ao.r,Ao.g,Ao.b),No=r.PaletteRGB.from(Lo),Fo=(0,To.parseColorHexRGB)("#eeeeee"),Mo=r.SwatchRGB.create(Fo.r,Fo.g,Fo.b),_o=r.PaletteRGB.from(Mo),Ho=(0,To.parseColorHexRGB)("#08c3a5"),Po=r.SwatchRGB.create(Ho.r,Ho.g,Ho.b),zo=r.PaletteRGB.from(Po),{create:Uo}=a.DesignToken,Bo=Uo("fui-fill-color").withDefault(Ro),Vo=Uo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(Lo),Go=14;function jo(e,t){return e.colorContrast(t,Go)}const Yo=Uo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>jo(Uo("fui-card-palette").withDefault(No).getValueFor(e),Vo.getValueFor(e))),Wo=(e,t)=>{const i=structuredClone(e);return!t||"object"!=typeof t||Array.isArray(t)?void 0!==t?t:i:(Object.keys(t).forEach(e=>{const o=t[e],n=i[e];if(null==o)return;const s=e=>e instanceof Date;!o||"object"!=typeof o||Array.isArray(o)||s(o)||!n||"object"!=typeof n||Array.isArray(n)||s(n)?i[e]=o:i[e]=Wo(n,o)}),i)};var qo=i(80273);const Ko={design_tokens:{color:{accent:{$value:"#0EAFE2",$type:"color"},neutral:{$value:"#7C909B",$type:"color"}},fontFamily:{bodyFont:{$value:'Roboto, "Segoe UI", Arial, Helvetica, sans-serif',$type:"fontFamily"}},typography:{baseFontSize:{$value:"14px",$type:"dimension"},baseLineHeight:{$value:"20px",$type:"dimension"}},mode:{luminance:{$value:.23,$type:"number"}},style:{density:{$value:0,$type:"number"},baseHeightMultiplier:{$value:10,$type:"number"},borderRadius:{$value:4,$type:"number"},strokeWidth:{$value:1,$type:"number"}},space:{designUnit:{$value:4,$type:"number"}}}};class Xo{constructor(){this.value=null}}(0,C.Cg)([l.observable],Xo.prototype,"value",void 0);const Jo=new Xo,Qo=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const n=`${i}Value`;t[n]&&o(e[i],t[n])})};function Zo(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const en={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,To.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},tn=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,To.parseColorHexRGB)(e))),on=(e,t,i="")=>{Object.entries(t).forEach(([t,o])=>{const n=i?`${i}-${t}`:t;o&&"object"==typeof o&&("$value"in o?e.style.setProperty(`--${n}`,String(o.$value)):on(e,o,n))})},nn=["baseClass","baseName","shadowOptions","styles","template"],sn=(e,t=nn)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),an=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:sn(t)}},rn=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},ln=()=>Jo,dn=(...e)=>{const t=Jo.value;if(!(null==t?void 0:t.customTokens)||0===e.length)return null;return function e(t,i){const[o,...n]=t;if(0===n.length){const e=i[o];return e&&e.$value?e:null}const s=i[o];return s?e(n,s):null}(e,t.customTokens)},cn=(e,t)=>{const i=Wo(Ko,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,tn(o.color.accent.$value)),r.neutralPalette.setValueFor(e,tn(o.color.neutral.$value)),r.bodyFont.setValueFor(e,o.fontFamily.bodyFont.$value),r.baseLayerLuminance.setValueFor(e,o.mode.luminance.$value),r.density.setValueFor(e,o.style.density.$value),r.baseHeightMultiplier.setValueFor(e,o.style.baseHeightMultiplier.$value),r.controlCornerRadius.setValueFor(e,o.style.borderRadius.$value),r.strokeWidth.setValueFor(e,o.style.strokeWidth.$value),r.designUnit.setValueFor(e,o.space.designUnit.$value),r.typeRampBaseFontSize.setValueFor(e,o.typography.baseFontSize.$value),r.typeRampBaseLineHeight.setValueFor(e,o.typography.baseLineHeight.$value);const n=r.typeRampBaseFontSize.getValueFor(e),s=r.typeRampBaseLineHeight.getValueFor(e);r.typeRampMinus1FontSize.setValueFor(e,rn(n,qo.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,rn(s,qo.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,rn(n,qo.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,rn(s,qo.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,rn(n,qo.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,rn(s,qo.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,rn(n,qo.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,rn(s,qo.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,rn(n,qo.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,rn(s,qo.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,rn(n,qo.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,rn(s,qo.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,rn(n,qo.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,rn(s,qo.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,rn(n,qo.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,rn(s,qo.Du.plusSix)),i.customTokens&&on(e,i.customTokens),Jo.value=structuredClone(i)},un=tn("#08c3a5"),hn=tn("#eeeeee"),pn=r.StandardLuminance.DarkMode;const mn=i(85109).O.ltr,gn=4,vn=4;var fn=i(85090);const bn=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,yn=l.css`
|
|
1364
|
+
`,bo=l.html`
|
|
1365
|
+
${e=>fo(I(e))}
|
|
1366
|
+
`;i(8420);function yo(e){const t=((null==e?void 0:e.trim())||"en").toLowerCase().replace(/_/g,"-");return"en-us"===t||"en"===t?"en":"en-gb"===t?"en-gb":t}function wo(){return"undefined"!=typeof navigator&&navigator.language?navigator.language:"en"}function Co(e="en"){const t=yo(e),i=io()().locale(t),o=i.locale();return(n=t)!==(s=o)&&s!==n.split("-")[0]?io()().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var n,s}function xo(e){return e.replace(/YYYY/g,"yyyy").replace(/YY(?!Y)/g,"yy").replace(/DD/g,"dd").replace(/D(?!D)/g,"d").replace(/MM/g,"mm").replace(/M(?!M)/g,"m")}function $o(e){return null!=e&&""!==String(e).trim()}io().extend(no()),io().extend(ao()),io().extend(lo());const So="MM-DD-YYYY";function Eo(e,t){const i=String(e).trim(),o=io()(i,t,!0);if(o.isValid())return o;const n=io()(i,So,!0);return n.isValid()?n:null}var Oo=i(28745);const To=[1,2,3,4,5,6,7],ko=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=To.filter(t=>-1===e.indexOf(t));let s=n.find(e=>e>t.dayNumber);s||(s=Math.min(...n));const a=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return n.length?new ho(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,a),i):(Oo.v.warn("Date picker disabled days - all days of week have been disabled"),t)},Do=void 0,Io={};class Ro extends a.FoundationElement{constructor(){super(...arguments),this.format=So,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=So,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&$o(this.value)&&(this.formatDate=io()(this.currentDate.Date).format(t))}langChanged(){this.applyEffectiveLangChange()}useLocaleFormatChanged(e,t){this.calendar&&(t&&!e?this.cacheUserFormat(this.format):!t&&e&&this.restoreUserFormat(),this.applyEffectiveLangChange())}inlineCalendarChanged(){this.inlineCalendar?(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)):this.visible&&(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)),this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){this.suppressValueChanged||this.calendar&&($o(t)?this.applyValue(t):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate())}disconnectedCallback(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),io().extend(no()),io().extend(lo()),io().extend(ao()),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||$o(e)?$o(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return $o(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||$o(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||xo(this.format)}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?wo():this.lang}applyLocaleFormat(){this.format=Co(this.effectiveLang)}cacheUserFormat(e){const t=null==e?void 0:e.trim();t&&(this.cachedFormat=t)}restoreUserFormat(){this.format=this.cachedFormat}applyEffectiveLangChange(){var e,t;if(!this.calendar)return;this.useLocaleFormat&&this.applyLocaleFormat();const i=this.calendar.year,o=this.calendar.month.number,n=null!==(t=null===(e=this.currentDate)||void 0===e?void 0:e.Date)&&void 0!==t?t:io()().toDate();this.currentDate=new ho(n,this.effectiveLang),this.calendar=new mo(i,o,this.effectiveLang),$o(this.value)&&(this.formatDate=io()(this.currentDate.Date).format(this.format)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}syncValueAttribute(e){this.suppressValueChanged=!0,this.value=e,this.suppressValueChanged=!1}initializeEmpty(){const e=io()();this.currentDate=new ho(e.toDate(),this.effectiveLang),this.calendar=new mo(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate="",this.syncValueAttribute(""),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}initializeWithDefaultDate(){this.resetToDefaultDate(!0)}resetToDefaultDate(e=!1){var t;let i=new ho(io()().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=ko(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new mo(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=io()(this.currentDate.Date).format(this.format),this.syncValueAttribute(io()(this.currentDate.Date).format(So)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=Eo(e,this.format);t?(this.currentDate=new ho(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new mo(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=io()(this.currentDate.Date).format(this.format),this.syncValueAttribute(io()(this.currentDate.Date).format(So)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=io()();this.currentDate=new ho(t.toDate(),this.effectiveLang),this.calendar&&(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()),this.formatDate="",this.syncValueAttribute(""),e&&this.$emit("value-changed",void 0)}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}visibleChanged(e,t){this.inlineCalendar||(t?(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)):(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)))}handleKeydownOutside(e){!this.inlineCalendar&&this.visible&&"Escape"===e.key&&(e.preventDefault(),this.closeCalendar())}handleClickOutside(e){!this.inlineCalendar&&this.visible&&k(e,this)&&this.closeCalendar()}closeCalendar(){this.visible&&(this.visible=!1,this.toggleVisibility())}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=(0,$.x)(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return!(this.allowEmpty&&!$o(this.value))&&io()(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){io()(e.Date).isSame(this.currentDate.Date,"day")&&$o(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=io()(this.currentDate.Date).format(this.format),this.syncValueAttribute(io()(e.Date).format(So)),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,o=this.calendar.month.numberOfDays+i,n=Array.from({length:o});for(let e=i;e<o;e+=1)n[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const o=i-(e+1);n[e]=t.getDay(t.numberOfDays-o)}return n}}(0,C.Cg)([l.attr],Ro.prototype,"format",void 0),(0,C.Cg)([l.attr],Ro.prototype,"lang",void 0),(0,C.Cg)([(0,l.attr)({attribute:"use-locale-format",mode:"boolean"})],Ro.prototype,"useLocaleFormat",void 0),(0,C.Cg)([l.attr],Ro.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],Ro.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],Ro.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],Ro.prototype,"position",void 0),(0,C.Cg)([l.attr],Ro.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-empty",mode:"boolean"})],Ro.prototype,"allowEmpty",void 0),(0,C.Cg)([l.attr],Ro.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Ro.prototype,"value",void 0),(0,C.Cg)([l.observable],Ro.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],Ro.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],Ro.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],Ro.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],Ro.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],Ro.prototype,"monthList",void 0),(0,C.Cg)([l.observable],Ro.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],Ro.prototype,"calendar",void 0);const Ao=Ro.compose(Object.assign({baseName:"date-picker",styles:go,template:bo,shadowOptions:Do},Io));var Lo=i(83912);const No=r.SwatchRGB.create(1,1,1),Fo=r.SwatchRGB.create(0,0,0),Mo=(0,Lo.parseColorHexRGB)("#585858"),_o=r.SwatchRGB.create(Mo.r,Mo.g,Mo.b),Po=(0,Lo.parseColorHexRGB)("#ffffff"),Ho=r.SwatchRGB.create(Po.r,Po.g,Po.b),zo=r.PaletteRGB.from(Ho),Uo=(0,Lo.parseColorHexRGB)("#eeeeee"),Bo=r.SwatchRGB.create(Uo.r,Uo.g,Uo.b),Vo=r.PaletteRGB.from(Bo),Go=(0,Lo.parseColorHexRGB)("#08c3a5"),jo=r.SwatchRGB.create(Go.r,Go.g,Go.b),Yo=r.PaletteRGB.from(jo),{create:Wo}=a.DesignToken,qo=Wo("fui-fill-color").withDefault(_o),Ko=Wo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(Ho),Xo=14;function Jo(e,t){return e.colorContrast(t,Xo)}const Qo=Wo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>Jo(Wo("fui-card-palette").withDefault(zo).getValueFor(e),Ko.getValueFor(e))),Zo=(e,t)=>{const i=structuredClone(e);return!t||"object"!=typeof t||Array.isArray(t)?void 0!==t?t:i:(Object.keys(t).forEach(e=>{const o=t[e],n=i[e];if(null==o)return;const s=e=>e instanceof Date;!o||"object"!=typeof o||Array.isArray(o)||s(o)||!n||"object"!=typeof n||Array.isArray(n)||s(n)?i[e]=o:i[e]=Zo(n,o)}),i)};var en=i(80273);const tn={design_tokens:{color:{accent:{$value:"#0EAFE2",$type:"color"},neutral:{$value:"#7C909B",$type:"color"}},fontFamily:{bodyFont:{$value:'Roboto, "Segoe UI", Arial, Helvetica, sans-serif',$type:"fontFamily"}},typography:{baseFontSize:{$value:"14px",$type:"dimension"},baseLineHeight:{$value:"20px",$type:"dimension"}},mode:{luminance:{$value:.23,$type:"number"}},style:{density:{$value:0,$type:"number"},baseHeightMultiplier:{$value:10,$type:"number"},borderRadius:{$value:4,$type:"number"},strokeWidth:{$value:1,$type:"number"}},space:{designUnit:{$value:4,$type:"number"}}}};class on{constructor(){this.value=null}}(0,C.Cg)([l.observable],on.prototype,"value",void 0);const nn=new on,sn=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const n=`${i}Value`;t[n]&&o(e[i],t[n])})};function an(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const rn={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,Lo.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},ln=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,Lo.parseColorHexRGB)(e))),dn=(e,t,i="")=>{Object.entries(t).forEach(([t,o])=>{const n=i?`${i}-${t}`:t;o&&"object"==typeof o&&("$value"in o?e.style.setProperty(`--${n}`,String(o.$value)):dn(e,o,n))})},cn=["baseClass","baseName","shadowOptions","styles","template"],un=(e,t=cn)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),hn=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:un(t)}},pn=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},mn=()=>nn,gn=(...e)=>{const t=nn.value;if(!(null==t?void 0:t.customTokens)||0===e.length)return null;return function e(t,i){const[o,...n]=t;if(0===n.length){const e=i[o];return e&&e.$value?e:null}const s=i[o];return s?e(n,s):null}(e,t.customTokens)},vn=(e,t)=>{const i=Zo(tn,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,ln(o.color.accent.$value)),r.neutralPalette.setValueFor(e,ln(o.color.neutral.$value)),r.bodyFont.setValueFor(e,o.fontFamily.bodyFont.$value),r.baseLayerLuminance.setValueFor(e,o.mode.luminance.$value),r.density.setValueFor(e,o.style.density.$value),r.baseHeightMultiplier.setValueFor(e,o.style.baseHeightMultiplier.$value),r.controlCornerRadius.setValueFor(e,o.style.borderRadius.$value),r.strokeWidth.setValueFor(e,o.style.strokeWidth.$value),r.designUnit.setValueFor(e,o.space.designUnit.$value),r.typeRampBaseFontSize.setValueFor(e,o.typography.baseFontSize.$value),r.typeRampBaseLineHeight.setValueFor(e,o.typography.baseLineHeight.$value);const n=r.typeRampBaseFontSize.getValueFor(e),s=r.typeRampBaseLineHeight.getValueFor(e);r.typeRampMinus1FontSize.setValueFor(e,pn(n,en.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,pn(s,en.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,pn(n,en.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,pn(s,en.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,pn(n,en.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,pn(s,en.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,pn(n,en.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,pn(s,en.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,pn(n,en.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,pn(s,en.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,pn(n,en.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,pn(s,en.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,pn(n,en.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,pn(s,en.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,pn(n,en.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,pn(s,en.Du.plusSix)),i.customTokens&&dn(e,i.customTokens),nn.value=structuredClone(i)},fn=ln("#08c3a5"),bn=ln("#eeeeee"),yn=r.StandardLuminance.DarkMode;const wn=i(85109).O.ltr,Cn=4,xn=4;var $n=i(85090);const Sn=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,En=l.css`
|
|
1251
1367
|
${(0,a.display)("flex")}
|
|
1252
1368
|
:host {
|
|
1253
1369
|
flex: 1;
|
|
1254
1370
|
}
|
|
1255
|
-
`,
|
|
1371
|
+
`,On=l.css`
|
|
1256
1372
|
:host {
|
|
1257
|
-
background-color: ${
|
|
1373
|
+
background-color: ${qo};
|
|
1258
1374
|
}
|
|
1259
1375
|
`.withBehaviors((0,a.forcedColorsStylesheetBehavior)(l.css`
|
|
1260
1376
|
:host {
|
|
1261
|
-
background-color: ${
|
|
1262
|
-
box-shadow: 0 0 0 1px ${
|
|
1263
|
-
color: ${
|
|
1377
|
+
background-color: ${$n.A.ButtonFace};
|
|
1378
|
+
box-shadow: 0 0 0 1px ${$n.A.CanvasText};
|
|
1379
|
+
color: ${$n.A.ButtonText};
|
|
1264
1380
|
}
|
|
1265
|
-
`)),
|
|
1381
|
+
`)),Tn=(e,t)=>l.css`
|
|
1266
1382
|
${e.name} ${"h"+t} {
|
|
1267
1383
|
margin: 0;
|
|
1268
1384
|
}
|
|
1269
|
-
`;class
|
|
1385
|
+
`;class kn extends r.DesignSystemProvider{constructor(){super(),sn(o,n,this)}}(0,C.Cg)([(0,l.attr)({attribute:"card-fill-color",converter:rn}),an(Ko)],kn.prototype,"cardFillColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"card-foreground-color",converter:rn}),an(Qo)],kn.prototype,"cardForegroundColor",void 0);const Dn=kn.compose({baseName:"design-system-provider",template:l.html`
|
|
1270
1386
|
<slot></slot>
|
|
1271
1387
|
`,styles:e=>{const t=(e=>l.css`
|
|
1272
|
-
${
|
|
1273
|
-
${
|
|
1274
|
-
${
|
|
1275
|
-
${
|
|
1276
|
-
${
|
|
1277
|
-
${
|
|
1388
|
+
${Tn(e,"1")}
|
|
1389
|
+
${Tn(e,"2")}
|
|
1390
|
+
${Tn(e,"3")}
|
|
1391
|
+
${Tn(e,"4")}
|
|
1392
|
+
${Tn(e,"5")}
|
|
1393
|
+
${Tn(e,"6")}
|
|
1278
1394
|
`)(e);return t.addStylesTo(document),l.css`
|
|
1279
|
-
${
|
|
1280
|
-
${
|
|
1395
|
+
${En}
|
|
1396
|
+
${On}
|
|
1281
1397
|
${t}
|
|
1282
1398
|
:host * {
|
|
1283
|
-
${
|
|
1399
|
+
${Sn()}
|
|
1284
1400
|
}
|
|
1285
|
-
`}});var
|
|
1401
|
+
`}});var In=i(40543);const Rn=l.css`
|
|
1286
1402
|
:host {
|
|
1287
1403
|
--dialog-close-icon-display: flex;
|
|
1288
1404
|
--dialog-min-width: 358px;
|
|
@@ -1557,7 +1673,7 @@
|
|
|
1557
1673
|
dialog[style*='position: fixed'] {
|
|
1558
1674
|
margin: 0;
|
|
1559
1675
|
}
|
|
1560
|
-
`;var
|
|
1676
|
+
`;var An=i(70997);const Ln=l.html`
|
|
1561
1677
|
<slot>
|
|
1562
1678
|
${(0,l.when)(e=>e.notification,l.html`
|
|
1563
1679
|
<div class="details">
|
|
@@ -1565,7 +1681,7 @@
|
|
|
1565
1681
|
</div>
|
|
1566
1682
|
`)}
|
|
1567
1683
|
</slot>
|
|
1568
|
-
`,
|
|
1684
|
+
`,Nn=e=>l.html`
|
|
1569
1685
|
<dialog ${(0,l.ref)("mainElement")} part="dialog" type=${e=>e.type}>
|
|
1570
1686
|
<div class="content-wrapper" part="content">
|
|
1571
1687
|
<div part="top" class="top" ${(0,l.ref)("topElement")}>
|
|
@@ -1585,9 +1701,9 @@
|
|
|
1585
1701
|
`)}
|
|
1586
1702
|
</div>
|
|
1587
1703
|
</div>
|
|
1588
|
-
${(0,
|
|
1589
|
-
<div class="content-container" part="content-container">${
|
|
1590
|
-
`,
|
|
1704
|
+
${(0,An.q)(e=>e.resizable,l.html`
|
|
1705
|
+
<div class="content-container" part="content-container">${Ln}</div>
|
|
1706
|
+
`,Ln)}
|
|
1591
1707
|
<div part="bottom" class="bottom">
|
|
1592
1708
|
<slot name="bottom">
|
|
1593
1709
|
${(0,l.when)(e=>e.notification,l.html`
|
|
@@ -1617,13 +1733,13 @@
|
|
|
1617
1733
|
<div class="resize-handle resize-handle-sw" data-direction="sw"></div>
|
|
1618
1734
|
`)}
|
|
1619
1735
|
</dialog>
|
|
1620
|
-
`,
|
|
1621
|
-
${e=>
|
|
1622
|
-
`,In={mode:"open",delegatesFocus:!0},Rn={};class An extends a.FoundationElement{constructor(){super(...arguments),this.type="default",this.position="center",this.showCloseIcon=!0,this.resizable=!1,this.draggable=!1,this.minWidth=300,this.minHeight=200,this.isResizing=!1,this.currentResizeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.startLeft=0,this.startTop=0,this.resizeOffsetX=0,this.resizeOffsetY=0,this.originalWidth="",this.originalHeight="",this.originalPosition="",this.originalLeft="",this.originalTop="",this.originalMargin="",this.isMaximized=!1,this.hasBeenResized=!1,this.isDragging=!1,this.dragOffsetX=0,this.dragOffsetY=0,this.dragDialogWidth=0,this.dragDialogHeight=0,this.onMouseDownBound=null,this.onMouseMoveBound=null,this.onMouseUpBound=null}notificationChanged(){this.notification&&(this.showCloseIcon=!1)}draggableChanged(e,t){t?this.attachDragMouseDown():(this.detachDragMouseDown(),this.removeDraggableEventListeners())}connectedCallback(){super.connectedCallback(),window.HTMLDialogElement||Sn.A.registerDialog(this.mainElement),this.mainElement.addEventListener("close",()=>{this.resetDraggableStyle(),this.onCloseCallback&&this.onCloseCallback(),this.$emit("close")}),this.hasAttribute("open")&&this.shadowRoot.querySelector("dialog").setAttribute("open",""),this.setupResizeHandlers(),this.attachDragMouseDown()}disconnectedCallback(){super.disconnectedCallback(),this.removeResizeHandlers(),this.detachDragMouseDown(),this.removeDraggableEventListeners()}setupResizeHandlers(){if(!this.resizable)return;const e=window.innerWidth,t=window.innerHeight;let i=this.minWidth,o=this.minHeight;void 0!==this.initialWidth&&(i=Math.max(this.minWidth,Math.min(this.initialWidth,e))),void 0!==this.initialHeight&&(o=Math.max(this.minHeight,Math.min(this.initialHeight,t))),this.originalWidth=this.mainElement.style.width||`${i}px`,this.originalHeight=this.mainElement.style.height||`${o}px`,this.originalPosition=this.mainElement.style.position||"",this.originalLeft=this.mainElement.style.left||"",this.originalTop=this.mainElement.style.top||"",this.originalMargin=this.mainElement.style.margin||"",this.mainElement.style.height=`${o}px`,this.mainElement.style.minHeight=`${this.minHeight}px`,this.mainElement.style.width=`${i}px`,this.mainElement.style.minWidth=`${this.minWidth}px`,this.originalWidth=this.mainElement.style.width,this.originalHeight=this.mainElement.style.height;this.shadowRoot.querySelectorAll(".resize-handle").forEach(e=>{e.addEventListener("mousedown",this.handleResizeStart.bind(this)),e.addEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}removeResizeHandlers(){var e;document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this));const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".resize-handle");null==t||t.forEach(e=>{e.removeEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}handleEdgeDoubleClick(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation();const t=e.target.dataset.direction;if(!["n","s","e","w"].includes(t))return;const i=this.mainElement.getBoundingClientRect(),o=window.innerWidth,n=window.innerHeight;switch(this.mainElement.style.position="fixed",this.mainElement.style.margin="0",t){case"n":this.mainElement.style.height=`${i.bottom}px`,this.mainElement.style.top="0px";break;case"s":this.mainElement.style.height=n-i.top+"px";break;case"e":this.mainElement.style.width=o-i.left+"px";break;case"w":this.mainElement.style.width=`${i.right}px`,this.mainElement.style.left="0px"}this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}handleResizeStart(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation(),this.isResizing=!0;const t=e.target;this.currentResizeHandle=t.dataset.direction,this.startX=e.clientX,this.startY=e.clientY;const i=this.mainElement.getBoundingClientRect();switch(this.startWidth=i.width,this.startHeight=i.height,this.startLeft=i.left,this.startTop=i.top,this.resizeOffsetX=0,this.resizeOffsetY=0,this.currentResizeHandle){case"n":this.resizeOffsetY=e.clientY-i.top;break;case"s":this.resizeOffsetY=e.clientY-i.bottom;break;case"e":this.resizeOffsetX=e.clientX-i.right;break;case"w":this.resizeOffsetX=e.clientX-i.left;break;case"ne":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.top;break;case"nw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.top;break;case"se":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.bottom;break;case"sw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.bottom}this.mainElement.style.position="fixed",this.mainElement.style.left=`${i.left}px`,this.mainElement.style.top=`${i.top}px`,this.mainElement.style.margin="0",document.addEventListener("mousemove",this.handleResizeMove.bind(this)),document.addEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.add("resizing")}handleResizeMove(e){if(!this.isResizing||!this.currentResizeHandle)return;e.preventDefault();const t=e.clientX-this.startX-this.resizeOffsetX,i=e.clientY-this.startY-this.resizeOffsetY;let o=this.startWidth,n=this.startHeight,s=this.startLeft,a=this.startTop,r=!1;switch(this.currentResizeHandle){case"se":o=this.startWidth+t,n=this.startHeight+i;break;case"sw":o=this.startWidth-t,n=this.startHeight+i,s=this.startLeft+t,r=!0;break;case"ne":o=this.startWidth+t,n=this.startHeight-i,a=this.startTop+i,r=!0;break;case"nw":o=this.startWidth-t,n=this.startHeight-i,s=this.startLeft+t,a=this.startTop+i,r=!0;break;case"e":o=this.startWidth+t;break;case"w":o=this.startWidth-t,s=this.startLeft+t,r=!0;break;case"s":n=this.startHeight+i;break;case"n":n=this.startHeight-i,a=this.startTop+i,r=!0}const l=window.innerWidth,d=window.innerHeight;if(this.resizable){if(o<this.minWidth){const e=this.minWidth-o;o=this.minWidth,this.currentResizeHandle.includes("w")&&(s-=e)}if(n<this.minHeight){const e=this.minHeight-n;n=this.minHeight,this.currentResizeHandle.includes("n")&&(a-=e)}if(this.currentResizeHandle.includes("e")){const e=l-this.startLeft;o>e&&(o=e)}if(this.currentResizeHandle.includes("s")){const e=d-this.startTop;n>e&&(n=e)}if(this.currentResizeHandle.includes("w")){s<0&&(o+=s,s=0);const e=l-s;o>e&&(o=e)}if(this.currentResizeHandle.includes("n")){a<0&&(n+=a,a=0);const e=d-a;n>e&&(n=e)}}this.mainElement.style.width=`${o}px`,this.mainElement.style.height=`${n}px`,r&&(this.mainElement.style.left=`${s}px`,this.mainElement.style.top=`${a}px`)}handleResizeEnd(e){if(!this.isResizing)return;e.preventDefault(),this.isResizing=!1,this.currentResizeHandle=null,this.resizeOffsetX=0,this.resizeOffsetY=0,document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.remove("resizing");const t=this.mainElement.style.width,i=this.mainElement.style.height;t===this.originalWidth&&i===this.originalHeight||(this.hasBeenResized=!0),this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}get open(){return this.mainElement.hasAttribute("open")}get resizeIconName(){return this.hasBeenResized||this.isMaximized?"compress":"expand"}close(){this.mainElement.close()}dismiss(){var e,t,i,o;(null===(o=null===(i=null===(t=null===(e=this.notification)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.mainElement.close(),this.remove()}catch(e){ot.error(e)}}maximize(){this.resizable&&this.mainElement&&(this.mainElement.style.position="fixed",this.mainElement.style.left="0px",this.mainElement.style.top="0px",this.mainElement.style.margin="0",this.mainElement.style.width="100vw",this.mainElement.style.height="100vh",this.isMaximized=!0,this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight}))}resetSize(){this.resizable&&this.mainElement&&(this.hasBeenResized||this.isMaximized?(this.mainElement.style.width=this.originalWidth,this.mainElement.style.height=this.originalHeight,this.mainElement.style.position=this.originalPosition,this.mainElement.style.left=this.originalLeft,this.mainElement.style.top=this.originalTop,this.mainElement.style.margin=this.originalMargin,this.isMaximized=!1,this.hasBeenResized=!1,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})):this.maximize())}attachDragMouseDown(){this.draggable&&this.mainElement&&(this.onMouseDownBound||(this.onMouseDownBound=this.onMouseDown.bind(this)),this.mainElement.removeEventListener("mousedown",this.onMouseDownBound),this.mainElement.addEventListener("mousedown",this.onMouseDownBound))}detachDragMouseDown(){this.onMouseDownBound&&this.mainElement&&(this.mainElement.removeEventListener("mousedown",this.onMouseDownBound),this.onMouseDownBound=null)}isEventTargetInDraggableTarget(e){var t;return(null===(t=this.topElement)||void 0===t?void 0:t.contains(e.target))||this.isInsideTopSlot(e.target)}isInsideTopSlot(e){if(!this.topElementSlot)return!1;return this.topElementSlot.assignedNodes().some(t=>t===e||t.contains(e))}onMouseDown(e){if(!this.topElement||!this.isEventTargetInDraggableTarget(e)||this.isDragging)return;this.isDragging=!0;const t=this.mainElement.getBoundingClientRect();this.dragOffsetX=e.clientX-t.left,this.dragOffsetY=e.clientY-t.top,this.dragDialogWidth=t.width,this.dragDialogHeight=t.height,this.onMouseMoveBound=this.onMouseMove.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),document.addEventListener("mousemove",this.onMouseMoveBound),document.addEventListener("mouseup",this.onMouseUpBound)}onMouseMove(e){if(!this.isDragging||!this.mainElement)return;const t=window.innerWidth,i=window.innerHeight;let o=e.clientX-this.dragOffsetX,n=e.clientY-this.dragOffsetY;o=Math.max(0,Math.min(t-this.dragDialogWidth,o)),n=Math.max(0,Math.min(i-this.dragDialogHeight,n)),requestAnimationFrame(()=>{Object.assign(this.mainElement.style,{position:"absolute",left:`${o}px`,top:`${n}px`,margin:"0"})})}onMouseUp(){this.isDragging=!1,this.removeDraggableEventListeners()}removeDraggableEventListeners(){this.onMouseMoveBound&&(document.removeEventListener("mousemove",this.onMouseMoveBound),this.onMouseMoveBound=null),this.onMouseUpBound&&(document.removeEventListener("mouseup",this.onMouseUpBound),this.onMouseUpBound=null)}resetDraggableStyle(){this.draggable&&this.mainElement instanceof HTMLElement&&Object.assign(this.mainElement.style,{position:"",left:"",top:"",margin:""})}}(0,C.Cg)([l.observable],An.prototype,"notification",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],An.prototype,"type",void 0),(0,C.Cg)([l.attr],An.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-close-icon"})],An.prototype,"showCloseIcon",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"resizable"})],An.prototype,"resizable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],An.prototype,"draggable",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-width"})],An.prototype,"minWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-height"})],An.prototype,"minHeight",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-width"})],An.prototype,"initialWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-height"})],An.prototype,"initialHeight",void 0),(0,C.Cg)([l.observable],An.prototype,"onShowCallback",void 0),(0,C.Cg)([l.observable],An.prototype,"onCloseCallback",void 0),(0,C.Cg)([l.observable],An.prototype,"isMaximized",void 0),(0,C.Cg)([l.observable],An.prototype,"hasBeenResized",void 0),(0,C.Cg)([l.volatile],An.prototype,"open",null),(0,C.Cg)([l.volatile],An.prototype,"resizeIconName",null);class Ln extends An{show(){this.onShowCallback&&this.onShowCallback(),this.mainElement.show()}}const Nn=Ln.compose(Object.assign({baseName:"dialog",styles:En,template:Dn,shadowOptions:In},Rn)),Fn=(e,t)=>l.css`
|
|
1736
|
+
`,Fn=l.html`
|
|
1737
|
+
${e=>Nn(I(e))}
|
|
1738
|
+
`,Mn={mode:"open",delegatesFocus:!0},_n={};class Pn extends a.FoundationElement{constructor(){super(...arguments),this.type="default",this.position="center",this.showCloseIcon=!0,this.resizable=!1,this.draggable=!1,this.minWidth=300,this.minHeight=200,this.isResizing=!1,this.currentResizeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.startLeft=0,this.startTop=0,this.resizeOffsetX=0,this.resizeOffsetY=0,this.originalWidth="",this.originalHeight="",this.originalPosition="",this.originalLeft="",this.originalTop="",this.originalMargin="",this.isMaximized=!1,this.hasBeenResized=!1,this.isDragging=!1,this.dragOffsetX=0,this.dragOffsetY=0,this.dragDialogWidth=0,this.dragDialogHeight=0,this.onMouseDownBound=null,this.onMouseMoveBound=null,this.onMouseUpBound=null}notificationChanged(){this.notification&&(this.showCloseIcon=!1)}draggableChanged(e,t){t?this.attachDragMouseDown():(this.detachDragMouseDown(),this.removeDraggableEventListeners())}connectedCallback(){super.connectedCallback(),window.HTMLDialogElement||In.A.registerDialog(this.mainElement),this.mainElement.addEventListener("close",()=>{this.resetDraggableStyle(),this.onCloseCallback&&this.onCloseCallback(),this.$emit("close")}),this.hasAttribute("open")&&this.shadowRoot.querySelector("dialog").setAttribute("open",""),this.setupResizeHandlers(),this.attachDragMouseDown()}disconnectedCallback(){super.disconnectedCallback(),this.removeResizeHandlers(),this.detachDragMouseDown(),this.removeDraggableEventListeners()}setupResizeHandlers(){if(!this.resizable)return;const e=window.innerWidth,t=window.innerHeight;let i=this.minWidth,o=this.minHeight;void 0!==this.initialWidth&&(i=Math.max(this.minWidth,Math.min(this.initialWidth,e))),void 0!==this.initialHeight&&(o=Math.max(this.minHeight,Math.min(this.initialHeight,t))),this.originalWidth=this.mainElement.style.width||`${i}px`,this.originalHeight=this.mainElement.style.height||`${o}px`,this.originalPosition=this.mainElement.style.position||"",this.originalLeft=this.mainElement.style.left||"",this.originalTop=this.mainElement.style.top||"",this.originalMargin=this.mainElement.style.margin||"",this.mainElement.style.height=`${o}px`,this.mainElement.style.minHeight=`${this.minHeight}px`,this.mainElement.style.width=`${i}px`,this.mainElement.style.minWidth=`${this.minWidth}px`,this.originalWidth=this.mainElement.style.width,this.originalHeight=this.mainElement.style.height;this.shadowRoot.querySelectorAll(".resize-handle").forEach(e=>{e.addEventListener("mousedown",this.handleResizeStart.bind(this)),e.addEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}removeResizeHandlers(){var e;document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this));const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".resize-handle");null==t||t.forEach(e=>{e.removeEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}handleEdgeDoubleClick(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation();const t=e.target.dataset.direction;if(!["n","s","e","w"].includes(t))return;const i=this.mainElement.getBoundingClientRect(),o=window.innerWidth,n=window.innerHeight;switch(this.mainElement.style.position="fixed",this.mainElement.style.margin="0",t){case"n":this.mainElement.style.height=`${i.bottom}px`,this.mainElement.style.top="0px";break;case"s":this.mainElement.style.height=n-i.top+"px";break;case"e":this.mainElement.style.width=o-i.left+"px";break;case"w":this.mainElement.style.width=`${i.right}px`,this.mainElement.style.left="0px"}this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}handleResizeStart(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation(),this.isResizing=!0;const t=e.target;this.currentResizeHandle=t.dataset.direction,this.startX=e.clientX,this.startY=e.clientY;const i=this.mainElement.getBoundingClientRect();switch(this.startWidth=i.width,this.startHeight=i.height,this.startLeft=i.left,this.startTop=i.top,this.resizeOffsetX=0,this.resizeOffsetY=0,this.currentResizeHandle){case"n":this.resizeOffsetY=e.clientY-i.top;break;case"s":this.resizeOffsetY=e.clientY-i.bottom;break;case"e":this.resizeOffsetX=e.clientX-i.right;break;case"w":this.resizeOffsetX=e.clientX-i.left;break;case"ne":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.top;break;case"nw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.top;break;case"se":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.bottom;break;case"sw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.bottom}this.mainElement.style.position="fixed",this.mainElement.style.left=`${i.left}px`,this.mainElement.style.top=`${i.top}px`,this.mainElement.style.margin="0",document.addEventListener("mousemove",this.handleResizeMove.bind(this)),document.addEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.add("resizing")}handleResizeMove(e){if(!this.isResizing||!this.currentResizeHandle)return;e.preventDefault();const t=e.clientX-this.startX-this.resizeOffsetX,i=e.clientY-this.startY-this.resizeOffsetY;let o=this.startWidth,n=this.startHeight,s=this.startLeft,a=this.startTop,r=!1;switch(this.currentResizeHandle){case"se":o=this.startWidth+t,n=this.startHeight+i;break;case"sw":o=this.startWidth-t,n=this.startHeight+i,s=this.startLeft+t,r=!0;break;case"ne":o=this.startWidth+t,n=this.startHeight-i,a=this.startTop+i,r=!0;break;case"nw":o=this.startWidth-t,n=this.startHeight-i,s=this.startLeft+t,a=this.startTop+i,r=!0;break;case"e":o=this.startWidth+t;break;case"w":o=this.startWidth-t,s=this.startLeft+t,r=!0;break;case"s":n=this.startHeight+i;break;case"n":n=this.startHeight-i,a=this.startTop+i,r=!0}const l=window.innerWidth,d=window.innerHeight;if(this.resizable){if(o<this.minWidth){const e=this.minWidth-o;o=this.minWidth,this.currentResizeHandle.includes("w")&&(s-=e)}if(n<this.minHeight){const e=this.minHeight-n;n=this.minHeight,this.currentResizeHandle.includes("n")&&(a-=e)}if(this.currentResizeHandle.includes("e")){const e=l-this.startLeft;o>e&&(o=e)}if(this.currentResizeHandle.includes("s")){const e=d-this.startTop;n>e&&(n=e)}if(this.currentResizeHandle.includes("w")){s<0&&(o+=s,s=0);const e=l-s;o>e&&(o=e)}if(this.currentResizeHandle.includes("n")){a<0&&(n+=a,a=0);const e=d-a;n>e&&(n=e)}}this.mainElement.style.width=`${o}px`,this.mainElement.style.height=`${n}px`,r&&(this.mainElement.style.left=`${s}px`,this.mainElement.style.top=`${a}px`)}handleResizeEnd(e){if(!this.isResizing)return;e.preventDefault(),this.isResizing=!1,this.currentResizeHandle=null,this.resizeOffsetX=0,this.resizeOffsetY=0,document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.remove("resizing");const t=this.mainElement.style.width,i=this.mainElement.style.height;t===this.originalWidth&&i===this.originalHeight||(this.hasBeenResized=!0),this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}get open(){return this.mainElement.hasAttribute("open")}get resizeIconName(){return this.hasBeenResized||this.isMaximized?"compress":"expand"}close(){this.mainElement.close()}dismiss(){var e,t,i,o;(null===(o=null===(i=null===(t=null===(e=this.notification)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.mainElement.close(),this.remove()}catch(e){dt.error(e)}}maximize(){this.resizable&&this.mainElement&&(this.mainElement.style.position="fixed",this.mainElement.style.left="0px",this.mainElement.style.top="0px",this.mainElement.style.margin="0",this.mainElement.style.width="100vw",this.mainElement.style.height="100vh",this.isMaximized=!0,this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight}))}resetSize(){this.resizable&&this.mainElement&&(this.hasBeenResized||this.isMaximized?(this.mainElement.style.width=this.originalWidth,this.mainElement.style.height=this.originalHeight,this.mainElement.style.position=this.originalPosition,this.mainElement.style.left=this.originalLeft,this.mainElement.style.top=this.originalTop,this.mainElement.style.margin=this.originalMargin,this.isMaximized=!1,this.hasBeenResized=!1,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})):this.maximize())}attachDragMouseDown(){this.draggable&&this.mainElement&&(this.onMouseDownBound||(this.onMouseDownBound=this.onMouseDown.bind(this)),this.mainElement.removeEventListener("mousedown",this.onMouseDownBound),this.mainElement.addEventListener("mousedown",this.onMouseDownBound))}detachDragMouseDown(){this.onMouseDownBound&&this.mainElement&&(this.mainElement.removeEventListener("mousedown",this.onMouseDownBound),this.onMouseDownBound=null)}isEventTargetInDraggableTarget(e){var t;return(null===(t=this.topElement)||void 0===t?void 0:t.contains(e.target))||this.isInsideTopSlot(e.target)}isInsideTopSlot(e){if(!this.topElementSlot)return!1;return this.topElementSlot.assignedNodes().some(t=>t===e||t.contains(e))}onMouseDown(e){if(!this.topElement||!this.isEventTargetInDraggableTarget(e)||this.isDragging)return;this.isDragging=!0;const t=this.mainElement.getBoundingClientRect();this.dragOffsetX=e.clientX-t.left,this.dragOffsetY=e.clientY-t.top,this.dragDialogWidth=t.width,this.dragDialogHeight=t.height,this.onMouseMoveBound=this.onMouseMove.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),document.addEventListener("mousemove",this.onMouseMoveBound),document.addEventListener("mouseup",this.onMouseUpBound)}onMouseMove(e){if(!this.isDragging||!this.mainElement)return;const t=window.innerWidth,i=window.innerHeight;let o=e.clientX-this.dragOffsetX,n=e.clientY-this.dragOffsetY;o=Math.max(0,Math.min(t-this.dragDialogWidth,o)),n=Math.max(0,Math.min(i-this.dragDialogHeight,n)),requestAnimationFrame(()=>{Object.assign(this.mainElement.style,{position:"absolute",left:`${o}px`,top:`${n}px`,margin:"0"})})}onMouseUp(){this.isDragging=!1,this.removeDraggableEventListeners()}removeDraggableEventListeners(){this.onMouseMoveBound&&(document.removeEventListener("mousemove",this.onMouseMoveBound),this.onMouseMoveBound=null),this.onMouseUpBound&&(document.removeEventListener("mouseup",this.onMouseUpBound),this.onMouseUpBound=null)}resetDraggableStyle(){this.draggable&&this.mainElement instanceof HTMLElement&&Object.assign(this.mainElement.style,{position:"",left:"",top:"",margin:""})}}(0,C.Cg)([l.observable],Pn.prototype,"notification",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],Pn.prototype,"type",void 0),(0,C.Cg)([l.attr],Pn.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-close-icon"})],Pn.prototype,"showCloseIcon",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"resizable"})],Pn.prototype,"resizable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pn.prototype,"draggable",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-width"})],Pn.prototype,"minWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-height"})],Pn.prototype,"minHeight",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-width"})],Pn.prototype,"initialWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-height"})],Pn.prototype,"initialHeight",void 0),(0,C.Cg)([l.observable],Pn.prototype,"onShowCallback",void 0),(0,C.Cg)([l.observable],Pn.prototype,"onCloseCallback",void 0),(0,C.Cg)([l.observable],Pn.prototype,"isMaximized",void 0),(0,C.Cg)([l.observable],Pn.prototype,"hasBeenResized",void 0),(0,C.Cg)([l.volatile],Pn.prototype,"open",null),(0,C.Cg)([l.volatile],Pn.prototype,"resizeIconName",null);class Hn extends Pn{show(){this.onShowCallback&&this.onShowCallback(),this.mainElement.show()}}const zn=Hn.compose(Object.assign({baseName:"dialog",styles:Rn,template:Fn,shadowOptions:Mn},_n)),Un=(e,t)=>l.css`
|
|
1623
1739
|
${(0,r.disclosureStyles)(e,t)}
|
|
1624
|
-
`,
|
|
1740
|
+
`,Bn=(e,t)=>(0,a.disclosureTemplate)(e,t);class Vn extends a.Disclosure{}const Gn=void 0,jn={},Yn=Vn.compose(Object.assign({baseName:"disclosure",template:Bn,styles:Un,shadowOptions:Gn},jn)),Wn=(e,t)=>l.css`
|
|
1625
1741
|
${(0,r.dividerStyles)(e,t)}
|
|
1626
|
-
`,
|
|
1742
|
+
`,qn=(e,t)=>(0,a.dividerTemplate)(e,t);class Kn extends a.Divider{}const Xn=void 0,Jn={},Qn=Kn.compose(Object.assign({baseName:"divider",template:qn,styles:Wn,shadowOptions:Xn},Jn)),Zn=(e,t,i)=>l.css`
|
|
1627
1743
|
:host {
|
|
1628
1744
|
--dropdown-opener-height-multiplier: 0.7px;
|
|
1629
1745
|
--menu-item-height-multiplier: 0.7px;
|
|
@@ -1686,9 +1802,9 @@
|
|
|
1686
1802
|
var(--menu-item-height-multiplier)
|
|
1687
1803
|
);
|
|
1688
1804
|
}
|
|
1689
|
-
`,
|
|
1690
|
-
${
|
|
1691
|
-
`,
|
|
1805
|
+
`,es=(e,t)=>l.css`
|
|
1806
|
+
${Zn("foundation",e,t)}
|
|
1807
|
+
`,ts=(e,t)=>l.html`
|
|
1692
1808
|
${(0,l.repeat)(()=>e,l.html`
|
|
1693
1809
|
${(0,l.when)(e=>e.isDisabled&&e.isDisabled(),l.html`
|
|
1694
1810
|
<${t}-menu-item class="menu-item" disabled>${e=>e.name}</${t}-menu-item>
|
|
@@ -1709,12 +1825,12 @@
|
|
|
1709
1825
|
`)}
|
|
1710
1826
|
${e=>e.name}
|
|
1711
1827
|
${(0,l.when)(e=>e.submenu,l.html`
|
|
1712
|
-
<${t}-menu>${e=>
|
|
1828
|
+
<${t}-menu>${e=>ts(e.submenu,t)}</${t}-menu>
|
|
1713
1829
|
`)}
|
|
1714
1830
|
</${t}-menu-item>
|
|
1715
1831
|
`)}
|
|
1716
1832
|
`)}
|
|
1717
|
-
`,
|
|
1833
|
+
`,is=e=>l.html`
|
|
1718
1834
|
<div class="actions-container" part="actions-container">
|
|
1719
1835
|
<${e}-button
|
|
1720
1836
|
id="actiosnMenuTrigger"
|
|
@@ -1731,12 +1847,12 @@
|
|
|
1731
1847
|
class="actions-menu ${e=>e.classNames}"
|
|
1732
1848
|
part="actions-menu"
|
|
1733
1849
|
>
|
|
1734
|
-
${t=>
|
|
1850
|
+
${t=>ts(t.allItems,e)}
|
|
1735
1851
|
</${e}-menu>
|
|
1736
1852
|
</div>
|
|
1737
|
-
`,
|
|
1738
|
-
${e=>
|
|
1739
|
-
`;class
|
|
1853
|
+
`,os=l.html`
|
|
1854
|
+
${e=>is(I(e))}
|
|
1855
|
+
`;class ns extends a.FoundationElement{constructor(){super(...arguments),this.autoClose=!0,this.disabled=!1,this.name="Dropdown Menu",this.open=!1,this.clickOutside=e=>this.handleClickOutside(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("onMenuClick",this.onDropdownMenuItemClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){k(e,this)&&(this.open=!1)}openChanged(){this.classNames=(0,$.x)(["hidden",!this.open]),this.open?document.addEventListener("mousedown",this.clickOutside):document.removeEventListener("mousedown",this.clickOutside)}toggleDropdownMenuVisibility(){this.open=!this.open}onDropdownMenuItemClick(){this.autoClose&&(this.open=!1)}get allItems(){return this.items}}(0,C.Cg)([l.observable],ns.prototype,"items",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],ns.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],ns.prototype,"disabled",void 0),(0,C.Cg)([l.observable],ns.prototype,"classNames",void 0),(0,C.Cg)([l.attr],ns.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],ns.prototype,"open",void 0),(0,C.Cg)([l.attr],ns.prototype,"buttonAppearance",void 0);const ss=ns.compose({baseName:"dropdown-menu",styles:es,template:os});var as=i(84686);const rs=l.css`
|
|
1740
1856
|
.environment-indicator {
|
|
1741
1857
|
font-size: 12px;
|
|
1742
1858
|
display: inline-flex;
|
|
@@ -1763,8 +1879,8 @@
|
|
|
1763
1879
|
.environment-indicator.lg .icon {
|
|
1764
1880
|
font-size: calc(var(--design-unit) * 3.5px);
|
|
1765
1881
|
}
|
|
1766
|
-
`,
|
|
1767
|
-
${e=>{return t=
|
|
1882
|
+
`,ls=l.html`
|
|
1883
|
+
${e=>{return t=I(e),l.html`
|
|
1768
1884
|
${(0,l.when)(e=>e.config,l.html`
|
|
1769
1885
|
<div
|
|
1770
1886
|
data-test-id="environment-indicator"
|
|
@@ -1788,7 +1904,7 @@
|
|
|
1788
1904
|
</div>
|
|
1789
1905
|
`)}
|
|
1790
1906
|
`;var t}}
|
|
1791
|
-
`;var
|
|
1907
|
+
`;var ds=i(17190);const cs="default",us={level:cs,showIcon:!1,iconSize:"sm",backgroundColor:"#2222ff",textColor:"#ffffff",label:"DEFAULT"},hs=[us,{level:"dev",showIcon:!1,icon:"code",backgroundColor:"#ff6b35",label:"DEV"},{level:"prod",showIcon:!1,icon:"check-circle",backgroundColor:"#28a745",label:"PROD"}],ps=(0,ds.r)(),ms=a.DI.createInterface(e=>e.instance(ps),e=>e.instance(ps)),gs=a.DI.createInterface("EnvironmentIndicatorConfig");function vs(){return(0,C.sH)(this,arguments,void 0,function*(e={configs:[]}){const{configs:t,currentLevel:i}=e,o={currentLevel:i,configs:t&&t.length>0?t:[us]};a.DI.getOrCreateDOMContainer().register(a.Registration.instance(ms,ps),a.Registration.instance(gs,o)),ps.publish(o)})}const fs=(0,lt.createLogger)("EnvironmentIndicator");class bs extends a.FoundationElement{constructor(){super(...arguments),this.size="sm",this.textColor="#ffffff",this.icon="check-circle",this.iconSize="sm",this.useDefaultConfig=!1,this.config=us,this.envConfigs=hs}envConfigsChanged(){this.config=this.getEnvConfigByLevel()}diConfigChanged(){this.config=this.getEnvConfigByLevel()}subscribeToDiConfig(){const e=a.DI.getOrCreateDOMContainer().get(ms);e&&"function"==typeof e.subscribe?this.unsubscribeConfig=e.subscribe(e=>{this.diConfig=e}):fs.error("Observer not found or invalid in DI container")}connectedCallback(){super.connectedCallback(),this.diConfig=function(){try{const e=a.DI.getOrCreateDOMContainer().get(gs);if(e)return e}catch(e){return}}(),this.subscribeToDiConfig(),this.config=this.getEnvConfigByLevel()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeConfig&&(this.unsubscribeConfig(),this.unsubscribeConfig=void 0)}getAttributesConfig(){const e={};return["label","size","showIcon","icon","iconSize","backgroundColor","textColor"].filter(e=>!!this[e]).forEach(t=>{e[t]=this[t]}),e||{}}getCurrentEnvironmentLevel(){if(this.level)return this.level;if(this.diConfig)try{const{currentLevel:e}=this.diConfig;if(e)return e}catch(e){fs.error(e)}return as.H6!==cs?as.H6:this.useDefaultConfig?cs:void 0}getEnvConfigByLevel(){const e=this.getAttributesConfig(),t=this.getCurrentEnvironmentLevel();if(!t)return this.useDefaultConfig?us:void 0;if(this.label)return Object.assign(Object.assign(Object.assign({},us),{level:t}),e);if(this.diConfig){const{configs:i}=this.diConfig;if(i&&i.length>0){const o=i.find(({level:e})=>e===t);if(o)return Object.assign(Object.assign({},o),e)}}const i=this.envConfigs.find(({level:e})=>e===t);return i?Object.assign(Object.assign({},i),e):void 0}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i);["level","label","show-icon","icon-size","size","background-color","text-color","icon"].includes(e)&&t!==i&&(this.config=this.getEnvConfigByLevel())}setEnvConfigs(e){this.envConfigs=e}}(0,C.Cg)([l.attr],bs.prototype,"level",void 0),(0,C.Cg)([l.attr],bs.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-icon"})],bs.prototype,"showIcon",void 0),(0,C.Cg)([l.attr],bs.prototype,"size",void 0),(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],bs.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],bs.prototype,"textColor",void 0),(0,C.Cg)([l.attr],bs.prototype,"icon",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],bs.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"use-default-config"})],bs.prototype,"useDefaultConfig",void 0),(0,C.Cg)([l.observable],bs.prototype,"config",void 0),(0,C.Cg)([l.observable],bs.prototype,"envConfigs",void 0),(0,C.Cg)([l.observable],bs.prototype,"diConfig",void 0);const ys=bs.compose({baseName:"environment-indicator",template:ls,styles:rs}),ws=e=>l.html`
|
|
1792
1908
|
<${e}-banner ${(0,l.ref)("banner")}>
|
|
1793
1909
|
<div slot="content">
|
|
1794
1910
|
<div>
|
|
@@ -1809,13 +1925,13 @@
|
|
|
1809
1925
|
</${e}-button>
|
|
1810
1926
|
`)}
|
|
1811
1927
|
</${e}-banner>
|
|
1812
|
-
`,
|
|
1813
|
-
${e=>
|
|
1814
|
-
`,
|
|
1928
|
+
`,Cs=l.html`
|
|
1929
|
+
${e=>ws(I(e))}
|
|
1930
|
+
`,xs={mode:"open",delegatesFocus:!0};class $s extends a.FoundationElement{connectedCallback(){super.connectedCallback(),dt.deprecated("ErrorBanner","Use `${prefix}-banner` instead.")}dismiss(){return(0,C.sH)(this,void 0,void 0,function*(){try{yield this.banner.dismiss(),this.remove()}catch(e){dt.error(e)}})}}(0,C.Cg)([l.observable],$s.prototype,"error",void 0),(0,C.Cg)([l.observable],$s.prototype,"notification",void 0);const Ss=$s.compose({baseName:"error-banner",template:Cs,shadowOptions:xs});var Es;!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(Es||(Es={}));const Os=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.errorDetails)&&void 0!==i?i:"Something went wrong"}`},Ts=e=>{var t;return(null==e?void 0:e.logLevel)||(null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.logLevel)||lt.LogLevels.error},ks=(e,t)=>{const i=t.split("-")[0];let o=document.querySelector(`#${e}`);if(!o){o=document.createElement("div"),o.setAttribute("id",e);const t=document.createElement(`${i}-design-system-provider`);t.appendChild(o),document.body.appendChild(t)}return o},Ds=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},Is=(0,lt.createLogger)("foundation-error"),Rs={alert:e=>{alert(Os(e))},notification:(e,t)=>{var i,o,n,s,a,r,l,d,c,u,h,p,m;const g=t.split("-")[0],v=ks("notify-container",t);if(v)switch(v.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.notification)||void 0===o?void 0:o.position){case"top-left":v.style.top="0",v.style.left="0";break;case"bottom-left":v.style.bottom="0",v.style.left="0";break;case"bottom-right":v.style.bottom="0",v.style.right="0";break;default:v.style.top="0",v.style.right="0"}const f=document.createElement(`${g}-toast`),b=document.createElement("div");b.setAttribute("slot","top"),b.textContent=null!==(n=e.title)&&void 0!==n?n:"Error";const y=document.createElement("div");y.setAttribute("slot","content"),y.textContent=(null==e?void 0:e.errorDetails)||"";const w=document.createElement("div");w.setAttribute("slot","date"),w.textContent=(new Date).toLocaleTimeString(),f.setAttribute("notify",(null===(a=null===(s=null==e?void 0:e.config)||void 0===s?void 0:s.notification)||void 0===a?void 0:a.type)||""),(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.notification)||void 0===l?void 0:l.autoClose)&&f.setAttribute("auto-close",`${null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.notification)||void 0===c?void 0:c.autoClose}`),(null===(h=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.notification)||void 0===h?void 0:h.closeTimeout)&&f.setAttribute("close-timeout",`${null===(m=null===(p=null==e?void 0:e.config)||void 0===p?void 0:p.notification)||void 0===m?void 0:m.closeTimeout}`),f.appendChild(b),f.appendChild(y),f.appendChild(w),v.appendChild(f)},dialog:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-error-dialog`);ks("dialog-container",t).appendChild(o),o.error=e,o.show()},snackbar:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`);ks("snack-container",t).appendChild(o),o.error=e},banner:(e,t,i)=>{var o;const n=t.split("-")[0],s=document.createElement(`${n}-error-banner`),a=(e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("error-banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return Ds()})(i);(null===(o=null==a?void 0:a.children)||void 0===o?void 0:o.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.error=e}},As=(e,t,i)=>{Is.log({message:Os(e),level:Ts(e)});Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{Rs[o]&&Rs[o](e,t,i)})};class Ls{withTitle(e){return this.title=e,this}withErrorDetails(e){return this.errorDetails=e,this}withLogLevel(e){return this.logLevel=e,this}withAlert(e){return this.alert=e,this}withNotification(e){return this.notification=e,this}withBanner(e){return this.banner=e,this}withSnackbar(e){return this.snackbar=e,this}withDialog(e){return this.dialog=e,this}build(){if(!this.title)throw new Error("Title is required");if(!this.errorDetails)throw new Error("Missing required param 'errorDetails'");let e={title:this.title,errorDetails:this.errorDetails},t={};return null!=this.logLevel&&(e=Object.assign({logLevel:this.logLevel},e)),this.alert&&(t=Object.assign({alert:this.alert},t),e=Object.assign({config:t},e)),this.notification&&(t=Object.assign({notification:this.notification},t),e=Object.assign({config:t},e)),this.banner&&(t=Object.assign({banner:this.banner},t),e=Object.assign({config:t},e)),this.snackbar&&(t=Object.assign({snackbar:this.snackbar},t),e=Object.assign({config:t},e)),this.dialog&&(t=Object.assign({dialog:this.dialog},t),e=Object.assign({config:t},e)),e}}class Ns{withPosition(e){return this.position=e,this}withAutoClose(e){return this.autoClose=e,this}withCloseTimeout(e){return this.closeTimeout=e,this}withType(e){return this.type=e,this}build(){let e={};return this.position&&(e=Object.assign({position:this.position},e)),this.autoClose&&(e=Object.assign({autoClose:this.autoClose},e)),this.closeTimeout&&(e=Object.assign({closeTimeout:this.closeTimeout},e)),this.type&&(e=Object.assign({type:this.type},e)),e}}const Fs=l.html`
|
|
1815
1931
|
<template ${(0,l.ref)("errorBoundary")}>
|
|
1816
1932
|
<slot></slot>
|
|
1817
1933
|
</template>
|
|
1818
|
-
`,
|
|
1934
|
+
`,Ms={mode:"open",delegatesFocus:!0};class _s extends a.FoundationElement{constructor(){super(...arguments),this.logger=(0,lt.createLogger)("error-boundary"),this.closeTimeout=0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;if(e.connectedCallback.call(this),this.addEventListener(Es.ERROR_BOUNDARY_EVENT,e=>{e.stopImmediatePropagation(),As(e.detail,this.tagName,this.errorBoundary)}),this.resourceName){if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))return void dt.debug(`Genesis Datasource init failed for ${this.resourceName}`);this.dataSub=null===(t=this.datasource.stream)||void 0===t?void 0:t.subscribe(e=>{if(!e.ROW)return;const t=null==e?void 0:e.ROW[0];if(e.SEQUENCE_ID>1){const e=t.HEADER,i=null==t?void 0:t.BODY,o=t.NOTIFY_SEVERITY;As((new Ls).withTitle(e).withErrorDetails(i).withNotification((new Ns).withType(o).withAutoClose(!!this.closeTimeout).withCloseTimeout(this.closeTimeout).build()).build(),this.tagName,this.errorBoundary)}})}})}disconnectedCallback(){var e,t;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.datasource)||void 0===t||t.destroy(),delete this.datasource}}(0,C.Cg)([l.observable],_s.prototype,"errorBoundary",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],_s.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],_s.prototype,"closeTimeout",void 0),(0,C.Cg)([yi.yW],_s.prototype,"datasource",void 0);const Ps=_s.compose({baseName:"error-boundary",template:Fs,shadowOptions:Ms}),Hs=l.css`
|
|
1819
1935
|
:host {
|
|
1820
1936
|
--design-unit: 3;
|
|
1821
1937
|
--dialog-max-width: 358px;
|
|
@@ -1834,7 +1950,7 @@
|
|
|
1834
1950
|
overflow: hidden;
|
|
1835
1951
|
min-height: var(--error-details-min-height);
|
|
1836
1952
|
}
|
|
1837
|
-
`,
|
|
1953
|
+
`,zs=e=>l.html`
|
|
1838
1954
|
<${e}-dialog show-close-icon="false" ${(0,l.ref)("dialog")}>
|
|
1839
1955
|
<h2 slot="top" class="title">${e=>{var t;return null===(t=e.error)||void 0===t?void 0:t.title}}</h2>
|
|
1840
1956
|
<div class="details">${e=>{var t,i;return(null===(t=e.error)||void 0===t?void 0:t.errorDetails)||(null===(i=e.notification)||void 0===i?void 0:i.body)||"Place holder for error message"}}</div>
|
|
@@ -1851,9 +1967,9 @@
|
|
|
1851
1967
|
</${e}-button>
|
|
1852
1968
|
`)}
|
|
1853
1969
|
</${e}-dialog>
|
|
1854
|
-
`,
|
|
1855
|
-
${e=>
|
|
1856
|
-
`,
|
|
1970
|
+
`,Us=l.html`
|
|
1971
|
+
${e=>zs(I(e))}
|
|
1972
|
+
`,Bs={mode:"open",delegatesFocus:!0};class Vs extends a.FoundationElement{connectedCallback(){super.connectedCallback(),dt.deprecated("ErrorDialog","Use `${prefix}-dialog` instead.")}show(){this.dialog.show()}dismiss(){var e,t,i,o,n,s,a,r;(null===(o=null===(i=null===(t=null===(e=this.error)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.error.config.dialog.dismissingAction.action(),(null===(r=null===(a=null===(s=null===(n=this.notification)||void 0===n?void 0:n.config)||void 0===s?void 0:s.dialog)||void 0===a?void 0:a.dismissingAction)||void 0===r?void 0:r.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.dialog.close(),this.remove()}catch(e){dt.error(e)}}}(0,C.Cg)([l.observable],Vs.prototype,"error",void 0),(0,C.Cg)([l.observable],Vs.prototype,"notification",void 0);const Gs=Vs.compose({baseName:"error-dialog",template:Us,styles:Hs,shadowOptions:Bs});class js extends a.FoundationElement{constructor(){super(...arguments),this.selectedFile=null,this.accept="",this.fileSizeLimitBytes=10485760,this.fileName="",this.isProcessing=!1}handleClick(){this.fileInput.value=null,this.fileInput.click()}onInputChange(e){var t;const i=null==e?void 0:e.target,o=Array.from(null!==(t=null==i?void 0:i.files)&&void 0!==t?t:[]),n=o.find(e=>e.size>this.fileSizeLimitBytes);if(n){const e=`File "${n.name}" exceeds size limit of ${this.fileSizeLimitBytes} bytes`;return this.showError("File Size Error",e),void this.$emit("error",new Error(e))}this.onFileSelected(o)}clearSelection(){this.fileName="",this.selectedFile=null,this.isProcessing=!1,this.fileInput&&(this.fileInput.value=""),this.onFileCleared(),this.$emit("clear")}getSelectedFile(){return this.selectedFile}showError(e,t){Te({title:e,body:t,config:{toast:{type:"warning",autoClose:!0,closeTimeout:5e3}}},this.tagName)}}(0,C.Cg)([l.attr],js.prototype,"label",void 0),(0,C.Cg)([l.attr],js.prototype,"accept",void 0),(0,C.Cg)([(0,l.attr)({attribute:"file-size-limit-bytes"})],js.prototype,"fileSizeLimitBytes",void 0),(0,C.Cg)([l.observable],js.prototype,"fileName",void 0),(0,C.Cg)([l.observable],js.prototype,"isProcessing",void 0);const Ys=(e,t,i)=>l.css`
|
|
1857
1973
|
/* Host */
|
|
1858
1974
|
:host {
|
|
1859
1975
|
display: flex;
|
|
@@ -1900,9 +2016,9 @@
|
|
|
1900
2016
|
justify-content: center;
|
|
1901
2017
|
z-index: 2;
|
|
1902
2018
|
}
|
|
1903
|
-
`,
|
|
1904
|
-
${
|
|
1905
|
-
`,
|
|
2019
|
+
`,Ws=(e,t)=>l.css`
|
|
2020
|
+
${Ys("foundation",e,t)}
|
|
2021
|
+
`,qs=e=>l.html`
|
|
1906
2022
|
<template>
|
|
1907
2023
|
<div class="file-reader">
|
|
1908
2024
|
${(0,l.when)(e=>e.isProcessing,l.html`
|
|
@@ -1938,9 +2054,9 @@
|
|
|
1938
2054
|
`)}
|
|
1939
2055
|
</div>
|
|
1940
2056
|
</template>
|
|
1941
|
-
`,
|
|
1942
|
-
${e=>
|
|
1943
|
-
`;class
|
|
2057
|
+
`,Ks=l.html`
|
|
2058
|
+
${e=>qs(I(e))}
|
|
2059
|
+
`;class Xs extends js{constructor(){super(),this.processingTimeout=null,this.autoProcess=!1,this.processingDelayMs=1e3,this.fileContent=null,this.accept=".json,application/json"}onFileSelected(e){var t,i;const o=e[0];if(o&&this.accept.includes("json")&&!(null===(i=null===(t=null==o?void 0:o.name)||void 0===t?void 0:t.toLowerCase())||void 0===i?void 0:i.endsWith(".json"))){const e="Selected file is not a JSON file";return this.showError("File Type Error",e),void this.$emit("error",new Error(e))}this.selectedFile=o,this.fileName=o.name,this.autoProcess&&this.handleFileProcessing()}onFileCleared(){this.fileContent=null,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}handleFileProcessing(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.getSelectedFile()){this.processingTimeout&&clearTimeout(this.processingTimeout),this.isProcessing=!0;try{const t=yield this.getSelectedFile().text();let i;try{i=JSON.parse(t)}catch(e){return this.showError("Invalid JSON Format","The selected file contains invalid JSON"),void this.$emit("error",e)}this.fileContent=i,this.$emit("file-read",{fileName:this.fileName,content:this.fileContent,file:this.getSelectedFile()}),null===(e=this.onFileRead)||void 0===e||e.call(this,this.fileContent)}catch(e){this.showError("File Processing Error","An error occurred while processing the file"),this.$emit("error",e)}finally{this.processingTimeout=window.setTimeout(()=>{this.isProcessing=!1,this.processingTimeout=null},this.processingDelayMs)}}else this.showError("No File Selected","Please select a file to process")})}getFileContent(){return this.fileContent}disconnectedCallback(){super.disconnectedCallback(),this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}}(0,C.Cg)([(0,l.attr)({attribute:"auto-process",mode:"boolean"})],Xs.prototype,"autoProcess",void 0),(0,C.Cg)([(0,l.attr)({attribute:"processing-delay-ms"})],Xs.prototype,"processingDelayMs",void 0),(0,C.Cg)([l.observable],Xs.prototype,"fileContent",void 0),(0,C.Cg)([l.observable],Xs.prototype,"onFileRead",void 0);const Js=Xs.compose({baseName:"file-reader",styles:Ws,template:Ks});var Qs=i(17465),Zs=i(32748);const ea=l.css`
|
|
1944
2060
|
/* Host */
|
|
1945
2061
|
:host {
|
|
1946
2062
|
display: flex;
|
|
@@ -1988,7 +2104,7 @@
|
|
|
1988
2104
|
fast-data-grid-row {
|
|
1989
2105
|
align-items: center;
|
|
1990
2106
|
}
|
|
1991
|
-
`,
|
|
2107
|
+
`,ta=e=>l.html`
|
|
1992
2108
|
<template>
|
|
1993
2109
|
<div class="file-selection">
|
|
1994
2110
|
<input type="file" multiple ${(0,l.ref)("fileInput")}
|
|
@@ -2014,13 +2130,13 @@
|
|
|
2014
2130
|
</${e}-data-grid>
|
|
2015
2131
|
</div>
|
|
2016
2132
|
</template>
|
|
2017
|
-
`,
|
|
2018
|
-
${e=>
|
|
2019
|
-
`,
|
|
2133
|
+
`,ia=l.html`
|
|
2134
|
+
${e=>ta(I(e))}
|
|
2135
|
+
`,oa=e=>{const t=new FormData;return e.forEach(e=>{t.append(e.name,e)}),t},na=(e,t,i,o)=>{const n=new Headers;return n.append("SESSION_AUTH_TOKEN",i),o.post(e,{body:t,headers:n})},sa=(e,t,i,o="GET",n,s,a="rapid")=>{const r=new Headers;r.append("SESSION_AUTH_TOKEN",i),fetch(e,{method:o,body:s,headers:r,credentials:"include"}).then(e=>(0,C.sH)(void 0,void 0,void 0,function*(){var t;if(e.ok)return e.blob();{const i=yield e.json();n&&Te({title:null==i?void 0:i.MESSAGE_TYPE,body:null===(t=null==i?void 0:i.DETAILS)||void 0===t?void 0:t.ERROR,config:{toast:{autoClose:!0,closeTimeout:5e3,type:"warning"}}},a),dt.error(i||"An error occurred while downloading the file.")}})).then(e=>{if(e){const i=window.URL.createObjectURL(e),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),o.remove(),n&&Te({title:"Success",body:"File downloaded successfully",config:{toast:{autoClose:!0,closeTimeout:5e3,type:"success"}}},a),dt.info("File downloaded successfully")}}).catch(e=>{dt.error(e)})},aa=["image/png","image/bmp","image/gif","image/jpeg","image/jpg"],ra=["text/plain","text/csv"],la=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/pdf"],da=l.html`
|
|
2020
2136
|
${(0,l.when)(e=>e.rowData,l.html`
|
|
2021
|
-
${e=>"DATETIME"===e.columnDefinition.type?(0,
|
|
2137
|
+
${e=>"DATETIME"===e.columnDefinition.type?(0,wi.zT)(e.rowData[e.columnDefinition.columnDataKey]):e.rowData[e.columnDefinition.columnDataKey]}
|
|
2022
2138
|
`)}
|
|
2023
|
-
`;class
|
|
2139
|
+
`;class ca extends js{constructor(){super(...arguments),this.acceptedFormats=[],this.selectedFiles=[],this.uploadedFilesResourceName="ALL_FILE_ATTACHMENTS",this.uploadEventName="gwf/attachment-handler/upload",this.gridFields="",this.fileName="",this.uploadedFilesList=[],this.filesGridColumnDefinitions=[]}acceptChanged(){let e=[];this.accept.length>0&&this.accept.split(",").forEach(t=>{"image/*"===t?e=[...e,...aa]:"office/*"===t?e=[...e,...la]:"text/*"===t?e=[...e,...ra]:e.push(t)}),this.acceptedFormats=e}fieldNameChanged(){this.setupGrid()}entityIdChanged(){this.setupGrid()}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),(null===(t=this.filesGridColumnDefinitions)||void 0===t?void 0:t.length)||this.setColumnDefs()})}setupGrid(){void 0!==this.entityId&&void 0!==this.fieldName&&(this.gridCriteria=(new J.b).withExpression((new X.K).withField(this.fieldName).withValue(this.entityId).build()).build(),this.setRowData())}handleStreamRowOperation(e){let t;for(const i of e.ROW)if(i.DETAILS)switch(i.DETAILS.OPERATION){case"INSERT":this.uploadedFilesList.unshift(i);break;case"MODIFY":t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===i.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1,i);break;case"DELETE":t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===i.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1);break;default:Qs.v.error(`Unsupported operation type: ${i.DETAILS.OPERATION}`)}}setRowData(){return(0,C.sH)(this,void 0,void 0,function*(){yield this.connect.stream(this.uploadedFilesResourceName,e=>{var t;1===e.SEQUENCE_ID?this.uploadedFilesList=null!==(t=e.ROW)&&void 0!==t?t:[]:this.handleStreamRowOperation(e)},e=>{Qs.v.error(e)},{CRITERIA_MATCH:this.gridCriteria})})}setColumnDefs(){return(0,C.sH)(this,void 0,void 0,function*(){var e;const t=yield this.connect.getMetadata(this.uploadedFilesResourceName),i=[];this.gridFields.length>0?this.gridFields.split(" ").forEach(e=>{var o;const n=null===(o=t.FIELD)||void 0===o?void 0:o.find(t=>t.NAME===e);n?i.push(this.getColumnObject(n)):"DOWNLOAD"===e&&this.downloadEventName&&i.push(this.getDownloadColumn())}):(null===(e=t.FIELD)||void 0===e||e.forEach(e=>{i.push(this.getColumnObject(e))}),this.downloadEventName&&i.push(this.getDownloadColumn())),this.filesGridColumnDefinitions=i})}getDownloadColumn(){const e=this.tagName.toLowerCase().split("-")[0];return{columnDataKey:"FILE_NAME",title:"File",cellTemplate:l.html`
|
|
2024
2140
|
<template>
|
|
2025
2141
|
<div class="download-button-container">
|
|
2026
2142
|
<${e}-button
|
|
@@ -2031,7 +2147,7 @@
|
|
|
2031
2147
|
</${e}-button>
|
|
2032
2148
|
</div>
|
|
2033
2149
|
</template>
|
|
2034
|
-
`}}getColumnObject(e){return{columnDataKey:e.NAME,title:e.NAME.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),type:e.TYPE,cellTemplate:
|
|
2150
|
+
`}}getColumnObject(e){return{columnDataKey:e.NAME,title:e.NAME.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),type:e.TYPE,cellTemplate:da}}handleClick(){this.fileInput.value=null,this.fileInput.click()}onFileSelected(e){const t=Array.isArray(e)?e:[e];if(t.length>0&&this.acceptedFormats.length>0)for(const e of t)if(!(this.accept.split(",").includes(".msg")&&e.name&&e.name.endsWith("msg")||this.acceptedFormats.includes(e.type)))return void this.showError("File Type Error",`Not a valid file type. Accepted Formats are ${this.accept}`);this.selectedFiles=t,this.fileName=this.selectedFiles.map(e=>e.name.trim()).join(),this.$emit("file-selected",{files:this.selectedFiles})}onFileCleared(){this.fileName="",this.selectedFiles=[]}handleFileUpload(){return(0,C.sH)(this,void 0,void 0,function*(){try{const e=oa(this.selectedFiles);e.append(this.uploadKey,this.entityId);const t=yield na(this.uploadEventName,e,this.session.getItem("authToken","session"),this.http);if(t.ERROR)return Qs.v.error(t.ERROR),void this.$emit("errorOut",t.ERROR);Qs.v.info(t),this.$emit("success",t),this.clearSelection()}catch(e){this.$emit("errorOut",e),Qs.v.error(e)}})}handleFileDownload(e){const t=this.tagName.toLowerCase().split("-")[0];sa(this.downloadEventName(e),e.FILE_NAME,this.session.getItem("authToken","session"),"GET",!0,void 0,t)}}(0,C.Cg)([l.observable],ca.prototype,"gridCriteria",void 0),(0,C.Cg)([bi.dm],ca.prototype,"connect",void 0),(0,C.Cg)([Zs.l],ca.prototype,"http",void 0),(0,C.Cg)([Ni.N],ca.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({attribute:"uploaded-files-resource-name"})],ca.prototype,"uploadedFilesResourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-event-name"})],ca.prototype,"uploadEventName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"field-name"})],ca.prototype,"fieldName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"entity-id"})],ca.prototype,"entityId",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-key"})],ca.prototype,"uploadKey",void 0),(0,C.Cg)([(0,l.attr)({attribute:"grid-fields"})],ca.prototype,"gridFields",void 0),(0,C.Cg)([l.observable],ca.prototype,"fileName",void 0),(0,C.Cg)([l.observable],ca.prototype,"uploadedFilesList",void 0),(0,C.Cg)([l.observable],ca.prototype,"filesGridColumnDefinitions",void 0);const ua=void 0,ha={},pa=ca.compose(Object.assign({baseName:"file-upload",styles:ea,template:ia,shadowOptions:ua},ha)),ma=l.css`
|
|
2035
2151
|
.filter-wrapper {
|
|
2036
2152
|
border: 1px solid gray;
|
|
2037
2153
|
border-radius: calc(var(--design-unit) * 2px);
|
|
@@ -2077,52 +2193,52 @@
|
|
|
2077
2193
|
.flex-row foundation-select {
|
|
2078
2194
|
flex: 1;
|
|
2079
2195
|
}
|
|
2080
|
-
`,
|
|
2081
|
-
<div class="close-icon" @click=${e=>e.clear()}>${
|
|
2082
|
-
`;function
|
|
2196
|
+
`,ga=(e="start",t="#879ba6")=>`\n <svg class="svg-icon" slot="${e}" width="16px" height="16px">\n <g transform="matrix(1 0 0 1 -1865 -3576 )">\n <path d="M 15.8825 14.185499999999998 L 9.697000000000001 8 L 14.825000000000001 2.872 L 15.8825 1.814499999999999 C 16.0385 1.6584999999999992 16.0385 1.4049999999999994 15.8825 1.2489999999999988 L 14.751 0.11749999999999972 C 14.594999999999999 -0.03850000000000087 14.3415 -0.03850000000000087 14.1855 0.11749999999999972 L 8 6.303000000000001 L 1.8145 0.11699999999999999 C 1.6585 -0.03900000000000059 1.4050000000000002 -0.03900000000000059 1.2489999999999999 0.11699999999999999 L 0.11699999999999999 1.2485 C -0.039000000000000014 1.4044999999999996 -0.039000000000000014 1.6579999999999995 0.11699999999999999 1.814 L 6.303000000000001 8 L 0.11699999999999999 14.185499999999998 C -0.039000000000000014 14.3415 -0.039000000000000014 14.594999999999999 0.11699999999999999 14.751000000000001 L 1.2485 15.8825 C 1.4045 16.0385 1.658 16.0385 1.814 15.8825 L 8 9.697 L 13.128 14.825 L 14.1855 15.8825 C 14.3415 16.0385 14.594999999999999 16.0385 14.751 15.8825 L 15.8825 14.751000000000001 C 16.0385 14.594999999999999 16.0385 14.3415 15.8825 14.185499999999998 Z " fill-rule="nonzero" fill="${t}" stroke="none" transform="matrix(1 0 0 1 1865 3576 )" />\n </g>\n </svg>\n`,va=l.html`
|
|
2197
|
+
<div class="close-icon" @click=${e=>e.clear()}>${ga()}</div>
|
|
2198
|
+
`;function fa(e){var t,i,o;return null!==(o=null===(i=null===(t=null==e?void 0:e.event)||void 0===t?void 0:t.target)||void 0===i?void 0:i.value)&&void 0!==o?o:"all"}const ba=[{name:"All",value:"all",selected:!0},{name:"True",value:"true"},{name:"False",value:"false"},{name:"N/A",value:"null"}],ya=(e,t)=>{switch(e.type){case"number":return(e=>l.html`
|
|
2083
2199
|
<div class="flex-row">
|
|
2084
2200
|
<div>${e=>e.label}</div>
|
|
2085
|
-
${
|
|
2201
|
+
${va}
|
|
2086
2202
|
</div>
|
|
2087
2203
|
<div class="flex-row">
|
|
2088
2204
|
<${e}-text-field
|
|
2089
2205
|
${(0,l.ref)("numFilterFieldMin")}
|
|
2090
2206
|
type="number"
|
|
2091
|
-
:value=${(0,
|
|
2207
|
+
:value=${(0,W.O)(e=>e.numFilterMin)}
|
|
2092
2208
|
placeholder="min"
|
|
2093
2209
|
></${e}-text-field>
|
|
2094
2210
|
<${e}-text-field
|
|
2095
2211
|
${(0,l.ref)("numFilterFieldMax")}
|
|
2096
2212
|
type="number"
|
|
2097
|
-
:value=${(0,
|
|
2213
|
+
:value=${(0,W.O)(e=>e.numFilterMax)}
|
|
2098
2214
|
placeholder="max"
|
|
2099
2215
|
></${e}-text-field>
|
|
2100
2216
|
</div>
|
|
2101
2217
|
`)(t);case"date":return(e=>l.html`
|
|
2102
2218
|
<div class="flex-row">
|
|
2103
2219
|
<div>${e=>e.label}</div>
|
|
2104
|
-
${
|
|
2220
|
+
${va}
|
|
2105
2221
|
</div>
|
|
2106
2222
|
<div class="flex-row">
|
|
2107
2223
|
<${e}-text-field
|
|
2108
2224
|
${(0,l.ref)("dateFilterFieldMin")}
|
|
2109
2225
|
type="date"
|
|
2110
|
-
:value=${(0,
|
|
2226
|
+
:value=${(0,W.O)(e=>e.dateFilterMin)}
|
|
2111
2227
|
></${e}-text-field>
|
|
2112
2228
|
<${e}-text-field
|
|
2113
2229
|
${(0,l.ref)("dateFilterFieldMax")}
|
|
2114
2230
|
type="date"
|
|
2115
|
-
:value=${(0,
|
|
2231
|
+
:value=${(0,W.O)(e=>e.dateFilterMax)}
|
|
2116
2232
|
></${e}-text-field>
|
|
2117
2233
|
</div>
|
|
2118
2234
|
`)(t);case"boolean":return(e=>l.html`
|
|
2119
2235
|
<div class="flex-row">
|
|
2120
2236
|
<div>${e=>e.label}</div>
|
|
2121
|
-
${
|
|
2237
|
+
${va}
|
|
2122
2238
|
</div>
|
|
2123
2239
|
<div class="flex-row">
|
|
2124
|
-
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(
|
|
2125
|
-
${(0,l.repeat)(()=>
|
|
2240
|
+
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(fa(t))}}">
|
|
2241
|
+
${(0,l.repeat)(()=>ba,l.html`
|
|
2126
2242
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2127
2243
|
${e=>e.name}
|
|
2128
2244
|
</${e}-option>
|
|
@@ -2132,10 +2248,10 @@
|
|
|
2132
2248
|
`)(t);case"enum":return(e=>l.html`
|
|
2133
2249
|
<div class="flex-row">
|
|
2134
2250
|
<div>${e=>e.label}</div>
|
|
2135
|
-
${
|
|
2251
|
+
${va}
|
|
2136
2252
|
</div>
|
|
2137
2253
|
<div class="flex-row">
|
|
2138
|
-
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(
|
|
2254
|
+
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(fa(t))}}">
|
|
2139
2255
|
${(0,l.repeat)(e=>e.enumFilterOptions,l.html`
|
|
2140
2256
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2141
2257
|
${e=>e.name}
|
|
@@ -2146,20 +2262,20 @@
|
|
|
2146
2262
|
`)(t);default:return(e=>l.html`
|
|
2147
2263
|
<div class="flex-row">
|
|
2148
2264
|
<div>${e=>e.label}</div>
|
|
2149
|
-
${
|
|
2265
|
+
${va}
|
|
2150
2266
|
</div>
|
|
2151
2267
|
<div class="flex-row">
|
|
2152
2268
|
<${e}-text-field
|
|
2153
2269
|
${(0,l.ref)("textFilterField")}
|
|
2154
2270
|
type="text"
|
|
2155
|
-
:value=${(0,
|
|
2271
|
+
:value=${(0,W.O)(e=>e.textFilter)}
|
|
2156
2272
|
/>
|
|
2157
2273
|
</div>
|
|
2158
|
-
`)(t)}},
|
|
2159
|
-
<div class="filter-wrapper">${t=>
|
|
2160
|
-
`,
|
|
2161
|
-
${e=>
|
|
2162
|
-
`;var
|
|
2274
|
+
`)(t)}},wa=e=>l.html`
|
|
2275
|
+
<div class="filter-wrapper">${t=>ya(t,e)}</div>
|
|
2276
|
+
`,Ca=l.html`
|
|
2277
|
+
${e=>wa(I(e))}</div>
|
|
2278
|
+
`;var xa;!function(e){e.change="filter-changed",e.clear="filter-cleared"}(xa||(xa={}));class $a extends a.FoundationElement{constructor(){super(...arguments),this.type="text",this.textFilter="",this.enumFilterOptions=[{name:"All",value:"all",selected:!0}]}textFilterChanged(e,t){if(!(null==t?void 0:t.length))return void this.$emit(xa.clear,{fieldName:this.fieldName,target:this.target});const i=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(xa.change,{fieldName:this.fieldName,filter:i,target:this.target})}numFilterMinChanged(e,t){this.numFilterMin=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}numFilterMaxChanged(e,t){this.numFilterMax=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}handleNumericFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t))return void this.$emit(xa.clear,{fieldName:this.fieldName,target:this.target});const i=`${this.fieldName} >= ${e}`,o=`${this.fieldName} <= ${t}`,n=Number.isFinite(e)?Number.isFinite(t)?`(${i} && ${o})`:i:o;this.$emit(xa.change,{fieldName:this.fieldName,filter:n,target:this.target})}formatDate(e){if(Number.isFinite(e))return new Date(e).toISOString().slice(0,19).replace(/-/g,"").replace("T","-")}dateFilterMinChanged(e,t){this.dateMinMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}dateFilterMaxChanged(e,t){this.dateMaxMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}handleDateFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t))return void this.$emit(xa.clear,{fieldName:this.fieldName});const i=`Expr.dateTimeIsAfter(${this.fieldName}, '${this.formatDate(e)}')`,o=`Expr.dateTimeIsBefore(${this.fieldName}, '${this.formatDate(t)}')`,n=Number.isFinite(e)?Number.isFinite(t)?`(${i} && ${o})`:i:o;this.$emit(xa.change,{fieldName:this.fieldName,filter:n,target:this.target})}connectedCallback(){var e;if(super.connectedCallback(),null===(e=this.enumOptions)||void 0===e?void 0:e.length){const e=this.enumOptions.includes("|")?"|":",",t=this.enumOptions.split(e).map(e=>({name:e,value:e}));this.enumFilterOptions=[{name:"All",value:"all",selected:!0},...t]}}clear(){switch(this.type){case"number":this.numFilterFieldMin.value=void 0,this.numFilterFieldMax.value=void 0,this.numFilterMin=void 0,this.numFilterMax=void 0;break;case"date":this.dateFilterFieldMin.value="",this.dateFilterFieldMax.value="",this.dateMinMS=NaN,this.dateMaxMS=NaN;break;case"text":this.textFilterField.value=""}this.$emit(xa.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){e&&"all"!==e?this.$emit(xa.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target}):this.$emit(xa.clear,{fieldName:this.fieldName,target:this.target})}onEnumFilterSelection(e){e&&"all"!==e?this.$emit(xa.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target}):this.$emit(xa.clear,{fieldName:this.fieldName,target:this.target})}}(0,C.Cg)([l.attr],$a.prototype,"fieldName",void 0),(0,C.Cg)([l.attr],$a.prototype,"type",void 0),(0,C.Cg)([l.attr],$a.prototype,"label",void 0),(0,C.Cg)([l.attr],$a.prototype,"target",void 0),(0,C.Cg)([l.observable],$a.prototype,"textFilter",void 0),(0,C.Cg)([l.observable],$a.prototype,"numFilterMin",void 0),(0,C.Cg)([l.observable],$a.prototype,"numFilterMax",void 0),(0,C.Cg)([l.observable],$a.prototype,"dateFilterMin",void 0),(0,C.Cg)([l.observable],$a.prototype,"dateFilterMax",void 0),(0,C.Cg)([l.attr],$a.prototype,"enumOptions",void 0),(0,C.Cg)([l.observable],$a.prototype,"enumFilterOptions",void 0);const Sa=$a.compose({baseName:"filter",template:Ca,styles:ma});var Ea=i(64324);const Oa=(e,t)=>l.css`
|
|
2163
2279
|
.filter-bar {
|
|
2164
2280
|
background-color: #2c2f33;
|
|
2165
2281
|
padding: calc(var(--design-unit) * 2px);
|
|
@@ -2194,11 +2310,11 @@
|
|
|
2194
2310
|
.toggle-collapsed {
|
|
2195
2311
|
color: #48ed9c;
|
|
2196
2312
|
}
|
|
2197
|
-
`,
|
|
2313
|
+
`,Ta=e=>{switch(e){case"INT":case"DOUBLE":case"LONG":return"number";case"DATETIME":return"date";case"BOOLEAN":return"boolean";case"ENUM":return"enum";default:return"text"}},ka=l.html`
|
|
2198
2314
|
<p>Fetching metadata for ${e=>e.resource}...</p>
|
|
2199
|
-
|
|
2315
|
+
`,Da=e=>l.html`
|
|
2200
2316
|
<div
|
|
2201
|
-
class=${e=>(0
|
|
2317
|
+
class=${e=>(0,$.x)(["toggle",!0],["toggle-collapsed",e.collapsed])}
|
|
2202
2318
|
@click="${e=>e.toggle()}"
|
|
2203
2319
|
>
|
|
2204
2320
|
${(e=>l.html`
|
|
@@ -2210,23 +2326,23 @@
|
|
|
2210
2326
|
`)}
|
|
2211
2327
|
`)(e)}
|
|
2212
2328
|
</div>
|
|
2213
|
-
<div class=${e=>(0
|
|
2329
|
+
<div class=${e=>(0,$.x)(["filter-bar",!0],["collapsed",e.collapsed])}>
|
|
2214
2330
|
<div class="filter-grid" ${(0,l.ref)("filterGrid")}>
|
|
2215
2331
|
${(0,l.repeat)(e=>e.fields,l.html`
|
|
2216
2332
|
<${e}-filter
|
|
2217
2333
|
label="${e=>e.UI_LABEL}"
|
|
2218
2334
|
target="${(e,t)=>{var i;return null===(i=t.parent)||void 0===i?void 0:i.target}}"
|
|
2219
|
-
type="${e=>
|
|
2335
|
+
type="${e=>Ta(e.TYPE)}"
|
|
2220
2336
|
fieldName="${e=>e.NAME}"
|
|
2221
2337
|
enumOptions="${e=>e.VALID_VALUES}"
|
|
2222
2338
|
></${e}-filter>
|
|
2223
2339
|
`)}
|
|
2224
2340
|
</div>
|
|
2225
2341
|
</div>
|
|
2226
|
-
`,
|
|
2227
|
-
${e=>e.ready
|
|
2228
|
-
`,
|
|
2229
|
-
${t&&`@media only screen and ${
|
|
2342
|
+
`,Ia=l.html`
|
|
2343
|
+
${e=>e.ready?Da(I(e)):ka}
|
|
2344
|
+
`,Ra=5;class Aa extends a.FoundationElement{constructor(){super(...arguments),this.columns=Ra,this.ready=!1,this.collapsed=!0}connectedCallback(){super.connectedCallback(),this.init()}initLabels(){var e,t,i,o;let n=!1,s=[];(null===(e=null==this?void 0:this.labels)||void 0===e?void 0:e.length)&&(s=null===(t=this.labels.split(","))||void 0===t?void 0:t.map(e=>e.trim()),n=(null===(i=this.fields)||void 0===i?void 0:i.length)===(null==s?void 0:s.length));for(let e=0;e<((null===(o=this.fields)||void 0===o?void 0:o.length)||0);e+=1){const t=n?s[e]:this.camelCasePreserveWhitespace(this.fields[e].NAME.replace(/_/g," "));this.fields[e].UI_LABEL=t}}camelCasePreserveWhitespace(e){return e.split(" ").map(e=>(0,Ea.fL)(e)).join(" ")}resourceChanged(e,t){e!==t&&(null==e?void 0:e.length)&&this.init()}init(){this.ready=!1,this.connect.getMetadata(this.resource).then(e=>{var t,i;if(this.fields=e.FIELD,null===(t=this.only)||void 0===t?void 0:t.length){const e=this.only.split(",").map(e=>e.trim()),t=(t,i)=>e.indexOf(t.NAME)>e.indexOf(i.NAME)?1:-1;this.fields=null===(i=this.fields)||void 0===i?void 0:i.filter(t=>e.includes(t.NAME)).sort(t)}this.ready=!0}).then(()=>this.initLabels()).then(()=>window.requestAnimationFrame(()=>{this.adjustColumnStyles()})).catch(e=>dt.error(e))}adjustColumnStyles(){this.filterGrid&&(this.filterGrid.style["grid-template-columns"]=`repeat(${this.columns}, 1fr)`)}toggle(){this.ready&&(this.collapsed=!this.collapsed)}}(0,C.Cg)([l.attr],Aa.prototype,"resource",void 0),(0,C.Cg)([l.attr],Aa.prototype,"only",void 0),(0,C.Cg)([l.attr],Aa.prototype,"labels",void 0),(0,C.Cg)([l.attr],Aa.prototype,"target",void 0),(0,C.Cg)([l.attr],Aa.prototype,"columns",void 0),(0,C.Cg)([l.observable],Aa.prototype,"ready",void 0),(0,C.Cg)([l.observable],Aa.prototype,"fields",void 0),(0,C.Cg)([bi.dm],Aa.prototype,"connect",void 0),(0,C.Cg)([l.observable],Aa.prototype,"collapsed",void 0);const La=Aa.compose({baseName:"filter-bar",template:Ia,styles:Oa});var Na;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(Na||(Na={}));const Fa=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2345
|
+
${t&&`@media only screen and ${Na[e]} {`}
|
|
2230
2346
|
:host(.spacing${t}-1x) slot {
|
|
2231
2347
|
gap: calc(var(--design-unit) * 2px);
|
|
2232
2348
|
}
|
|
@@ -2343,7 +2459,7 @@
|
|
|
2343
2459
|
align-content: space-evenly;
|
|
2344
2460
|
}
|
|
2345
2461
|
${t&&"}"}
|
|
2346
|
-
`},
|
|
2462
|
+
`},Ma=l.css`
|
|
2347
2463
|
:host {
|
|
2348
2464
|
width: 100%;
|
|
2349
2465
|
height: 100%;
|
|
@@ -2355,17 +2471,17 @@
|
|
|
2355
2471
|
display: flex;
|
|
2356
2472
|
}
|
|
2357
2473
|
|
|
2358
|
-
${
|
|
2359
|
-
${
|
|
2360
|
-
${
|
|
2361
|
-
${
|
|
2362
|
-
`,
|
|
2474
|
+
${Fa()}
|
|
2475
|
+
${Fa("lg")}
|
|
2476
|
+
${Fa("md")}
|
|
2477
|
+
${Fa("sm")}
|
|
2478
|
+
`,_a=l.html`
|
|
2363
2479
|
<template>
|
|
2364
2480
|
<slot></slot>
|
|
2365
2481
|
</template>
|
|
2366
|
-
`,
|
|
2482
|
+
`,Pa=void 0,Ha={};class za extends a.FoundationElement{}const Ua=za.compose(Object.assign({baseName:"flex-layout",styles:Ma,template:_a,shadowOptions:Pa},Ha)),Ba=(e,t)=>l.css`
|
|
2367
2483
|
${(0,r.flipperStyles)(e,t)}
|
|
2368
|
-
`,
|
|
2484
|
+
`,Va=(e,t)=>(0,a.flipperTemplate)(e,t);class Ga extends r.Flipper{}const ja=void 0,Ya={next:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"\n />\n </svg>\n ',previous:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M11.273 15.977L3.29 8 11.273.023l.704.704L4.71 8l7.266 7.273-.704.704z"\n />\n </svg>\n '},Wa=Ga.compose(Object.assign({baseName:"flipper",template:Va,styles:Ba,shadowOptions:ja},Ya)),qa=225,Ka=l.css`
|
|
2369
2485
|
/* Host */
|
|
2370
2486
|
:host {
|
|
2371
2487
|
display: inline-block;
|
|
@@ -2391,8 +2507,8 @@
|
|
|
2391
2507
|
position: absolute;
|
|
2392
2508
|
/* stylelint-disable-next-line function-name-case */
|
|
2393
2509
|
transition:
|
|
2394
|
-
transform ${
|
|
2395
|
-
width ${
|
|
2510
|
+
transform ${qa.toString()}ms ease-in,
|
|
2511
|
+
width ${qa.toString()}ms ease-in-out;
|
|
2396
2512
|
width: var(--flyout-width, 20%);
|
|
2397
2513
|
z-index: 2001;
|
|
2398
2514
|
}
|
|
@@ -2451,7 +2567,7 @@
|
|
|
2451
2567
|
opacity: 50%;
|
|
2452
2568
|
position: absolute;
|
|
2453
2569
|
/* stylelint-disable-next-line function-name-case */
|
|
2454
|
-
transition: opacity ${
|
|
2570
|
+
transition: opacity ${qa.toString()}ms linear;
|
|
2455
2571
|
width: 100%;
|
|
2456
2572
|
z-index: 2000;
|
|
2457
2573
|
}
|
|
@@ -2459,7 +2575,7 @@
|
|
|
2459
2575
|
:host([visuallyhidden]) div.background {
|
|
2460
2576
|
opacity: 0%;
|
|
2461
2577
|
}
|
|
2462
|
-
`,
|
|
2578
|
+
`,Xa=e=>l.html`
|
|
2463
2579
|
<div ?closed=${e=>e.closed} ?visuallyhidden=${e=>e.visuallyhidden}>
|
|
2464
2580
|
<div class="container">
|
|
2465
2581
|
<div class="background" part="background" @click=${e=>e.closeFlyout()}></div>
|
|
@@ -2483,10 +2599,10 @@
|
|
|
2483
2599
|
</div>
|
|
2484
2600
|
</div>
|
|
2485
2601
|
</div>
|
|
2486
|
-
`,
|
|
2487
|
-
${e=>
|
|
2488
|
-
`;class
|
|
2489
|
-
${t&&`@media only screen and ${
|
|
2602
|
+
`,Ja=l.html`
|
|
2603
|
+
${e=>Xa(I(e))}
|
|
2604
|
+
`;class Qa extends a.FoundationElement{constructor(){super(...arguments),this.position="right",this.flyoutWidth="20%",this.displayHeader=!0,this.closed=!0,this.visuallyhidden=!0}flyoutWidthChanged(){this.isConnected&&null!=this.flyoutWidth&&this.style.setProperty("--flyout-width",this.flyoutWidth)}closedChanged(){this.closed||(setTimeout(()=>this.visuallyhidden=!1,1),this.focusExit())}connectedCallback(){super.connectedCallback(),null!=this.flyoutWidth&&this.style.setProperty("--flyout-width",this.flyoutWidth)}closeFlyout(){this.visuallyhidden=!0}closingFinished(){this.visuallyhidden&&(this.closed=!0,this.$emit("closed"))}focusExit(){this.exit.focus()}}(0,C.Cg)([l.attr],Qa.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({attribute:"flyout-width"})],Qa.prototype,"flyoutWidth",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Qa.prototype,"displayHeader",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Qa.prototype,"closed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Qa.prototype,"visuallyhidden",void 0);const Za=void 0,er={},tr=Qa.compose(Object.assign({baseName:"flyout",styles:Ka,template:Ja,shadowOptions:Za},er));var ir;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(ir||(ir={}));const or=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2605
|
+
${t&&`@media only screen and ${ir[e]} {`}
|
|
2490
2606
|
:host(.spacing${t}-1x) slot {
|
|
2491
2607
|
gap: calc(var(--design-unit) * 2px);
|
|
2492
2608
|
}
|
|
@@ -2571,32 +2687,32 @@
|
|
|
2571
2687
|
place-items: stretch;
|
|
2572
2688
|
}
|
|
2573
2689
|
${t&&"}"}
|
|
2574
|
-
`},
|
|
2690
|
+
`},nr=l.css`
|
|
2575
2691
|
slot {
|
|
2576
2692
|
width: 100%;
|
|
2577
2693
|
height: 100%;
|
|
2578
2694
|
display: grid;
|
|
2579
2695
|
}
|
|
2580
2696
|
|
|
2581
|
-
${
|
|
2582
|
-
${
|
|
2583
|
-
${
|
|
2584
|
-
${
|
|
2585
|
-
`,
|
|
2697
|
+
${or()}
|
|
2698
|
+
${or("lg")}
|
|
2699
|
+
${or("md")}
|
|
2700
|
+
${or("sm")}
|
|
2701
|
+
`,sr=l.html`
|
|
2586
2702
|
<template>
|
|
2587
2703
|
<slot></slot>
|
|
2588
2704
|
</template>
|
|
2589
|
-
`,
|
|
2705
|
+
`,ar=void 0,rr={};class lr{constructor(e,t,i,o="1fr",n="1fr"){this.listenerCache=new WeakMap,this.query=window.matchMedia(e);const s=t&&l.cssPartial`grid-template-columns: repeat(${t}, ${o});`,a=i&&l.cssPartial`grid-template-rows: repeat(${i}, ${n});`;this.styles=l.css`
|
|
2590
2706
|
slot {
|
|
2591
2707
|
${a||""}
|
|
2592
2708
|
${s||""}
|
|
2593
2709
|
}
|
|
2594
|
-
`}bind(e){let t=!1;const i=i=>{const{matches:o}=i;o&&!t?(e.$fastController.addStyles(this.styles),t=!0):!o&&t&&(this.styles&&e.$fastController.removeStyles(this.styles),t=!1)};i({matches:this.query.matches}),this.query.addEventListener("change",i),this.listenerCache.set(e,i)}unbind(e){const t=this.listenerCache.get(e);t&&(this.query.removeEventListener("change",t),this.listenerCache.delete(e)),this.styles&&e.$fastController.removeStyles(this.styles)}}class
|
|
2710
|
+
`}bind(e){let t=!1;const i=i=>{const{matches:o}=i;o&&!t?(e.$fastController.addStyles(this.styles),t=!0):!o&&t&&(this.styles&&e.$fastController.removeStyles(this.styles),t=!1)};i({matches:this.query.matches}),this.query.addEventListener("change",i),this.listenerCache.set(e,i)}unbind(e){const t=this.listenerCache.get(e);t&&(this.query.removeEventListener("change",t),this.listenerCache.delete(e)),this.styles&&e.$fastController.removeStyles(this.styles)}}class dr extends a.FoundationElement{constructor(){super(...arguments),this.behaviors=[]}connectedCallback(){super.connectedCallback(),this.behaviors=Object.keys(ir).map(e=>{if(this[`col-${e}-count`]||this[`row-${e}-count`])return new lr(ir[e],this[`col-${e}-count`],this[`row-${e}-count`],this[`col-${e}-width`],this[`row-${e}-height`])}).filter(e=>!!e);const e=this["row-count"]&&l.cssPartial`grid-template-rows: repeat(${this["row-count"]}, ${this["row-height"]||"1fr"});`,t=this["col-count"]&&l.cssPartial`grid-template-columns: repeat(${this["col-count"]}, ${this["col-width"]||"1fr"});`;this.baseStyles=l.css`
|
|
2595
2711
|
slot {
|
|
2596
2712
|
${e||""}
|
|
2597
2713
|
${t||""}
|
|
2598
2714
|
}
|
|
2599
|
-
`,this.$fastController.addStyles(this.baseStyles),this.$fastController.addBehaviors(this.behaviors)}disconnectedCallback(){super.disconnectedCallback(),this.$fastController.removeBehaviors(this.behaviors),this.baseStyles&&this.$fastController.removeStyles(this.baseStyles)}}(0,C.Cg)([l.attr],
|
|
2715
|
+
`,this.$fastController.addStyles(this.baseStyles),this.$fastController.addBehaviors(this.behaviors)}disconnectedCallback(){super.disconnectedCallback(),this.$fastController.removeBehaviors(this.behaviors),this.baseStyles&&this.$fastController.removeStyles(this.baseStyles)}}(0,C.Cg)([l.attr],dr.prototype,"col-count",void 0),(0,C.Cg)([l.attr],dr.prototype,"col-width",void 0),(0,C.Cg)([l.attr],dr.prototype,"col-lg-count",void 0),(0,C.Cg)([l.attr],dr.prototype,"col-lg-width",void 0),(0,C.Cg)([l.attr],dr.prototype,"col-md-count",void 0),(0,C.Cg)([l.attr],dr.prototype,"col-md-width",void 0),(0,C.Cg)([l.attr],dr.prototype,"col-sm-count",void 0),(0,C.Cg)([l.attr],dr.prototype,"col-sm-width",void 0),(0,C.Cg)([l.attr],dr.prototype,"row-count",void 0),(0,C.Cg)([l.attr],dr.prototype,"row-height",void 0),(0,C.Cg)([l.attr],dr.prototype,"row-lg-count",void 0),(0,C.Cg)([l.attr],dr.prototype,"row-lg-height",void 0),(0,C.Cg)([l.attr],dr.prototype,"row-md-count",void 0),(0,C.Cg)([l.attr],dr.prototype,"row-md-height",void 0),(0,C.Cg)([l.attr],dr.prototype,"row-sm-count",void 0),(0,C.Cg)([l.attr],dr.prototype,"row-sm-height",void 0);const cr=dr.compose(Object.assign({baseName:"grid-layout",styles:nr,template:sr,shadowOptions:ar},rr)),ur=l.html`
|
|
2600
2716
|
<template>
|
|
2601
2717
|
<style>
|
|
2602
2718
|
:host {
|
|
@@ -2622,9 +2738,9 @@
|
|
|
2622
2738
|
</style>
|
|
2623
2739
|
<slot></slot>
|
|
2624
2740
|
</template>
|
|
2625
|
-
`,
|
|
2741
|
+
`,hr=void 0,pr={};class mr extends a.FoundationElement{setGridItemProperties(e,t,i,o){if(t&&e&&i&&o){return`grid-row: ${0===t||0===o?"auto":`${t} / ${Number(t)+Number(o)}`}; grid-column: ${0===e||0===i?"auto":`${e} / ${Number(e)+Number(i)}`}`}}}(0,C.Cg)([(0,l.attr)({attribute:"col-number"})],mr.prototype,"colNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-sm-number"})],mr.prototype,"colSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-md-number"})],mr.prototype,"colMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-lg-number"})],mr.prototype,"colLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-number"})],mr.prototype,"rowNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-sm-number"})],mr.prototype,"rowSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-md-number"})],mr.prototype,"rowMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-lg-number"})],mr.prototype,"rowLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width"})],mr.prototype,"width",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-sm"})],mr.prototype,"widthSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-md"})],mr.prototype,"widthMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-lg"})],mr.prototype,"widthLg",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height"})],mr.prototype,"height",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-sm"})],mr.prototype,"heightSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-md"})],mr.prototype,"heightMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-lg"})],mr.prototype,"heightLg",void 0);const gr=mr.compose(Object.assign({baseName:"grid-layout-item",template:ur,shadowOptions:hr},pr)),vr=(e,t)=>l.css`
|
|
2626
2742
|
${(0,r.horizontalScrollStyles)(e,t)}
|
|
2627
|
-
`,
|
|
2743
|
+
`,fr=(e,t)=>(0,a.horizontalScrollTemplate)(e,t);class br extends r.HorizontalScroll{}const yr={delegatesFocus:!0,mode:"open"},wr={nextFlipper:l.html`
|
|
2628
2744
|
<foundation-flipper
|
|
2629
2745
|
@click="${e=>e.scrollToNext()}"
|
|
2630
2746
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
@@ -2635,8 +2751,8 @@
|
|
|
2635
2751
|
direction="previous"
|
|
2636
2752
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
2637
2753
|
></foundation-flipper>
|
|
2638
|
-
`},
|
|
2639
|
-
${
|
|
2754
|
+
`},Cr=br.compose(Object.assign({baseName:"horizontal-scroll",template:fr,styles:vr,shadowOptions:yr},wr));var xr=i(70623),$r=i(32808),Sr=i(10463),Er=i(19037),Or=i(22984);const Tr=()=>(xr.Yv.add(Or.X7I,Er.C91,Sr.Cvc),xr.tT.css()),kr=(e,t)=>l.css`
|
|
2755
|
+
${Tr()}
|
|
2640
2756
|
|
|
2641
2757
|
.fa-stack-1x {
|
|
2642
2758
|
font-size: 1em;
|
|
@@ -2729,12 +2845,12 @@
|
|
|
2729
2845
|
height: auto;
|
|
2730
2846
|
box-sizing: border-box;
|
|
2731
2847
|
}
|
|
2732
|
-
|
|
2848
|
+
`,Dr=e=>l.html`
|
|
2733
2849
|
<template>
|
|
2734
2850
|
<i
|
|
2735
2851
|
${(0,l.ref)("iElement")}
|
|
2736
2852
|
id="${e=>e.tooltipId}"
|
|
2737
|
-
class=${e=>`fa-${e.name} fa-${e.size} fa-${e.variant} ${(0
|
|
2853
|
+
class=${e=>`fa-${e.name} fa-${e.size} fa-${e.variant} ${(0,$.x)(["error-tooltip",!(!e.isError||!e.tooltip)],["tooltip-icon",!(e.isError||!e.tooltip)])}`}
|
|
2738
2854
|
part=${e=>`icon-${e.name}-${e.size}-${e.variant} i-icon`}
|
|
2739
2855
|
>
|
|
2740
2856
|
<slot></slot>
|
|
@@ -2754,9 +2870,9 @@
|
|
|
2754
2870
|
</${e}-tooltip>
|
|
2755
2871
|
`)}
|
|
2756
2872
|
</template>
|
|
2757
|
-
`,
|
|
2758
|
-
${e
|
|
2759
|
-
`,
|
|
2873
|
+
`,Ir=l.html`
|
|
2874
|
+
${e=>Dr(I(e))}
|
|
2875
|
+
`,Rr={mode:"open",delegatesFocus:!0},Ar={};var Lr;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(Lr||(Lr={}));const Nr="1x",Fr=["2xs","xs","sm","lg","xl","2xl",Nr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class Mr extends a.FoundationElement{constructor(){super(...arguments),this.isError=!1,this.tooltipShowTimer=null,this.size="sm",this.variant="solid",this.showTooltip=()=>{const e=this.tooltipElement;e&&null===this.tooltipShowTimer&&!e.matches(":popover-open")&&(this.tooltipShowTimer=window.setTimeout(()=>{this.tooltipShowTimer=null;const e=this.tooltipElement;(null==e?void 0:e.isConnected)&&(e.showPopover(),this.positionTooltip(e))},300))},this.hideTooltip=()=>{var e;null!==this.tooltipShowTimer&&(window.clearTimeout(this.tooltipShowTimer),this.tooltipShowTimer=null),(null===(e=this.tooltipElement)||void 0===e?void 0:e.matches(":popover-open"))&&this.tooltipElement.hidePopover()}}nameChanged(e,t){t&&this.loadIcon()}sizeChanged(e,t){t&&this.loadIcon()}variantChanged(e,t){t&&this.loadIcon()}connectedCallback(){var e,t,i,o;super.connectedCallback(),this.loadIcon(),null===(e=this.iElement)||void 0===e||e.addEventListener("mouseover",this.showTooltip,{passive:!0}),null===(t=this.iElement)||void 0===t||t.addEventListener("focusin",this.showTooltip,{passive:!0}),null===(i=this.iElement)||void 0===i||i.addEventListener("mouseout",this.hideTooltip,{passive:!0}),null===(o=this.iElement)||void 0===o||o.addEventListener("focusout",this.hideTooltip,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),this.iElement.replaceChildren(),this.iElement.removeEventListener("mouseover",this.showTooltip),this.iElement.removeEventListener("focusin",this.showTooltip),this.iElement.removeEventListener("mouseout",this.hideTooltip),this.iElement.removeEventListener("focusout",this.hideTooltip),this.hideTooltip()}positionTooltip(e){const t=this.iElement.getBoundingClientRect(),i=e.getBoundingClientRect(),o=Math.max(i.width,e.scrollWidth),n=Math.max(i.height,e.scrollHeight);let s=t.right;s+o>window.innerWidth-8&&(s=Math.max(8,t.left-o));const a=Math.max(8,window.innerHeight-n-8),r=Math.min(Math.max(t.top,8),a);e.style.top=`${r}px`,e.style.left=`${s}px`}getDefaultTooltipConfig(){this.name||(this.name="question-circle",this.size="1x",this.variant="regular")}loadIcon(){if(!this.iElement)return;this.tooltip&&(this.tooltipId||(this.tooltipId=this.uuid.createId()),this.getDefaultTooltipConfig());const e=(0,xr.wu)({prefix:Lr[this.variant],iconName:this.name}),t=(0,xr.Kk)(e);t&&t.node&&(this.iElement.innerHTML="",Array.from(t.node).map(e=>this.iElement.appendChild(e)))}}(0,C.Cg)([l.observable],Mr.prototype,"iElement",void 0),(0,C.Cg)([$r.k],Mr.prototype,"uuid",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tooltip-id"})],Mr.prototype,"tooltipId",void 0),(0,C.Cg)([l.attr],Mr.prototype,"tooltip",void 0),(0,C.Cg)([(0,l.attr)({attribute:"error",mode:"boolean"})],Mr.prototype,"isError",void 0),(0,C.Cg)([l.attr],Mr.prototype,"name",void 0),(0,C.Cg)([l.attr],Mr.prototype,"size",void 0),(0,C.Cg)([l.attr],Mr.prototype,"variant",void 0);const _r=Mr.compose(Object.assign({baseName:"icon",template:Ir,styles:kr,shadowOptions:Rr},Ar)),Pr=(e,t)=>l.css`
|
|
2760
2876
|
${(0,r.listboxStyles)(e,t)}
|
|
2761
2877
|
|
|
2762
2878
|
:host {
|
|
@@ -2767,11 +2883,11 @@
|
|
|
2767
2883
|
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);
|
|
2768
2884
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
2769
2885
|
}
|
|
2770
|
-
`,
|
|
2886
|
+
`,Hr=(e,t)=>(0,a.listboxTemplate)(e,t);class zr extends r.Listbox{}const Ur=void 0,Br={},Vr=zr.compose(Object.assign({baseName:"listbox",template:Hr,styles:Pr,shadowOptions:Ur},Br)),Gr=(e,t)=>l.css`
|
|
2771
2887
|
${(0,r.optionStyles)(e,t)}
|
|
2772
|
-
`,
|
|
2888
|
+
`,jr=(e,t)=>(0,a.listboxOptionTemplate)(e,t);class Yr extends r.ListboxOption{}const Wr=void 0,qr={},Kr=Yr.compose(Object.assign({baseName:"option",template:jr,styles:Gr,shadowOptions:Wr},qr)),Xr=(e,t)=>l.css`
|
|
2773
2889
|
${(0,r.menuStyles)(e,t)}
|
|
2774
|
-
`,
|
|
2890
|
+
`,Jr=(e,t)=>(0,a.menuTemplate)(e,t);class Qr extends r.Menu{}const Zr=void 0,el={},tl=Qr.compose(Object.assign({baseName:"menu",template:Jr,styles:Xr,shadowOptions:Zr},el)),il=(e,t)=>l.css`
|
|
2775
2891
|
${(0,r.menuItemStyles)(e,t)}
|
|
2776
2892
|
|
|
2777
2893
|
:host,
|
|
@@ -2786,11 +2902,11 @@
|
|
|
2786
2902
|
height: auto;
|
|
2787
2903
|
width: auto;
|
|
2788
2904
|
}
|
|
2789
|
-
`,
|
|
2790
|
-
${
|
|
2791
|
-
`,
|
|
2792
|
-
${
|
|
2793
|
-
`,
|
|
2905
|
+
`,ol=(e,t)=>(0,a.menuItemTemplate)(e,t);class nl extends r.MenuItem{connectedCallback(){super.connectedCallback(),this.addEventListener("click",()=>this.$emit("onMenuClick"))}}const sl=void 0,al={expandCollapseGlyph:'\n <svg\n class="expand-collapse-glyph"\n part="expand-collapse-glyph"\n viewBox="0 0 16 16"\n xmlns="http://www.w3.org/2000/svg">\n <path\n d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"\n />\n </svg>\n '},rl=nl.compose(Object.assign({baseName:"menu-item",template:ol,styles:il,shadowOptions:sl},al)),ll=l.css`
|
|
2906
|
+
${Rn}
|
|
2907
|
+
`,dl=l.html`
|
|
2908
|
+
${Fn}
|
|
2909
|
+
`,cl={mode:"open",delegatesFocus:!0},ul={};class hl extends Pn{show(){var e,t;null===(e=this.onShowCallback)||void 0===e||e.call(this),null===(t=this.mainElement)||void 0===t||t.showModal()}}const pl=hl.compose(Object.assign({baseName:"modal",template:dl,styles:ll,shadowOptions:cl},ul)),ml=230,gl=l.css`
|
|
2794
2910
|
:host {
|
|
2795
2911
|
--scrollbar-width: 12px;
|
|
2796
2912
|
--scrollbar-thumb-width: 8px;
|
|
@@ -2929,7 +3045,7 @@
|
|
|
2929
3045
|
|
|
2930
3046
|
.visible {
|
|
2931
3047
|
visibility: visible;
|
|
2932
|
-
max-height: var(--custom-max-height, ${
|
|
3048
|
+
max-height: var(--custom-max-height, ${ml.toString()}px);
|
|
2933
3049
|
overflow: hidden;
|
|
2934
3050
|
}
|
|
2935
3051
|
|
|
@@ -3026,11 +3142,11 @@
|
|
|
3026
3142
|
resize: none;
|
|
3027
3143
|
overflow: hidden;
|
|
3028
3144
|
}
|
|
3029
|
-
`;let
|
|
3145
|
+
`;let vl=class extends xi{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=""}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||dt.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')})}clearData(){this.select.options=[]}syncComponentData(e){var t;const i=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map(e=>{var t;return{value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=i}handleStreamInserts(e){dt.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){dt.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){dt.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],vl.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],vl.prototype,"labelField",void 0),vl=(0,C.Cg)([(0,l.customElement)({name:"multiselect-datasource"})],vl);const fl=(e="foundation")=>l.html`
|
|
3030
3146
|
<label
|
|
3031
3147
|
part="label"
|
|
3032
3148
|
for="display-field"
|
|
3033
|
-
class=${e=>{var t;return(0
|
|
3149
|
+
class=${e=>{var t;return(0,$.x)("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}
|
|
3034
3150
|
>
|
|
3035
3151
|
<slot
|
|
3036
3152
|
name="label"
|
|
@@ -3051,7 +3167,7 @@
|
|
|
3051
3167
|
@click=${e=>e.toggle()}
|
|
3052
3168
|
?disabled="${e=>e.disabled}"
|
|
3053
3169
|
${(0,l.ref)("filterSearchInput")}
|
|
3054
|
-
value=${(0,
|
|
3170
|
+
value=${(0,W.O)(e=>e.filterSearchValue,"string","input")}
|
|
3055
3171
|
placeholder="${e=>e.getDisplayValue}"
|
|
3056
3172
|
autocomplete="off"
|
|
3057
3173
|
@input=${(e,t)=>e.inputHandler()}
|
|
@@ -3062,7 +3178,7 @@
|
|
|
3062
3178
|
viewBox="0 0 12 7"
|
|
3063
3179
|
${(0,l.ref)("arrowIcon")}
|
|
3064
3180
|
id="arrow-icon"
|
|
3065
|
-
class="${e=>(0
|
|
3181
|
+
class="${e=>(0,$.x)(["disabled-svg",e.disabled])}"
|
|
3066
3182
|
xmlns="http://www.w3.org/2000/svg"
|
|
3067
3183
|
>
|
|
3068
3184
|
<path d="${"M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"}" />
|
|
@@ -3076,7 +3192,7 @@
|
|
|
3076
3192
|
<${e}-progress slot="indicator"></${e}-progress>
|
|
3077
3193
|
`)}
|
|
3078
3194
|
<section
|
|
3079
|
-
class=${e=>(0
|
|
3195
|
+
class=${e=>(0,$.x)("multiselect-dropdown",["resizable",e.resizable])}
|
|
3080
3196
|
${(0,l.ref)("multiselectDropdown")}
|
|
3081
3197
|
part="multiselect-dropdown"
|
|
3082
3198
|
>
|
|
@@ -3103,7 +3219,7 @@
|
|
|
3103
3219
|
>
|
|
3104
3220
|
<li
|
|
3105
3221
|
part="options-header-item"
|
|
3106
|
-
class=${e=>{var t;return(0
|
|
3222
|
+
class=${e=>{var t;return(0,$.x)("options-header-item",["options-header-item-hidden",!(null===(t=e.optionsHeaderSlottedNodes)||void 0===t?void 0:t.length)])}}
|
|
3107
3223
|
>
|
|
3108
3224
|
<slot
|
|
3109
3225
|
name="options-header"
|
|
@@ -3133,11 +3249,11 @@
|
|
|
3133
3249
|
</section>
|
|
3134
3250
|
</div>
|
|
3135
3251
|
<slot
|
|
3136
|
-
${(0,l.slotted)({property:"slottedDatasource",filter:e=>e instanceof
|
|
3252
|
+
${(0,l.slotted)({property:"slottedDatasource",filter:e=>e instanceof vl})}
|
|
3137
3253
|
></slot>
|
|
3138
|
-
`,
|
|
3139
|
-
${
|
|
3140
|
-
`,
|
|
3254
|
+
`,bl=l.html`
|
|
3255
|
+
${fl()}
|
|
3256
|
+
`,yl=void 0,wl={};class Cl extends a.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=Yt.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add("is-resizing"),document.addEventListener("mousemove",this.handleResizeMove),document.addEventListener("mouseup",this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();const t=e.clientX-this.startX,i=e.clientY-this.startY,o=Math.max(250,this.startWidth+t),n=Math.max(100,this.startHeight+i);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${o}px`,this.multiselectDropdown.style.maxHeight=`${n}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove("is-resizing"),this.multiselectDropdown.style.setProperty("--custom-max-height",this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty("max-height"))}}debounceChanged(e,t){this.debouncedInputHandler=li()(this.asyncSetFilter,t)}openChanged(e,t){var i,o,n,s;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.arrowIcon)||void 0===i||i.classList.add("flipped"),null===(o=this.multiselectDropdown)||void 0===o||o.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(n=this.arrowIcon)||void 0===n||n.classList.remove("flipped"),null===(s=this.multiselectDropdown)||void 0===s||s.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Yt.ABOVE&&(null===(e=this.multiselectDropdown)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd)}defaultItemRenderer(e,t){return l.html`
|
|
3141
3257
|
${"string"==typeof e?l.html`
|
|
3142
3258
|
<span part="option-label">${()=>t.getItemLabel(e)}</span>
|
|
3143
3259
|
`:l.html`
|
|
@@ -3149,7 +3265,7 @@
|
|
|
3149
3265
|
${()=>t.getItemLabel(e)}
|
|
3150
3266
|
</span>
|
|
3151
3267
|
`}
|
|
3152
|
-
`}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<
|
|
3268
|
+
`}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<ml&&o>n?Yt.ABOVE:Yt.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===Yt.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===Yt.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){const e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const n="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==n?void 0:n.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(n=t.value,Object.values(n).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var n;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?$i(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,dt.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){k(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}(0,C.Cg)([l.attr],Cl.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Cl.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Cl.prototype,"all",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Cl.prototype,"allSelected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Cl.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Cl.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Cl.prototype,"creatable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Cl.prototype,"async",void 0),(0,C.Cg)([l.attr],Cl.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Cl.prototype,"resizable",void 0),(0,C.Cg)([l.attr],Cl.prototype,"tabindex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"filter-by-contains"})],Cl.prototype,"filterByContains",void 0),(0,C.Cg)([l.observable],Cl.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Cl.prototype,"slottedDatasource",void 0),(0,C.Cg)([l.observable],Cl.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Cl.prototype,"loading",void 0),(0,C.Cg)([l.observable],Cl.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Cl.prototype,"open",void 0),(0,C.Cg)([l.observable],Cl.prototype,"options",void 0),(0,C.Cg)([l.observable],Cl.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Cl.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Cl.prototype,"scrollContainer",void 0),(0,C.Cg)([l.attr],Cl.prototype,"position",void 0),(0,C.Cg)([l.observable],Cl.prototype,"onAllSelectedCallback",void 0),(0,C.Cg)([l.observable],Cl.prototype,"itemRenderer",void 0),(0,C.Cg)([l.volatile],Cl.prototype,"getDisplayValue",null),(0,C.Cg)([l.volatile],Cl.prototype,"getPlaceholder",null),(0,C.Cg)([l.volatile],Cl.prototype,"isAllOptionsDisabled",null),(0,C.Cg)([l.volatile],Cl.prototype,"areAllOptionsSelected",null),(0,C.Cg)([l.volatile],Cl.prototype,"showCreatable",null),(0,C.Cg)([l.observable],Cl.prototype,"optionsHeaderSlottedNodes",void 0);const xl=Cl.compose(Object.assign({baseName:"multiselect",template:bl,styles:gl,shadowOptions:yl},wl)),$l={k:1e3,m:1e6,b:1e9},Sl=/^(.*?)([kmb])$/i;class El{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),i=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(i.map((e,t)=>[e,t]));this._group=new RegExp(`[${t.find(e=>"group"===e.type).value}]`,"g"),this._decimal=new RegExp(`[${t.find(e=>"decimal"===e.type).value}]`),this._separator=new RegExp(`[$${t.find(e=>"decimal"===e.type).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._index=e=>o.get(e)}parse(e){const t=e.trim().match(Sl),i=t?$l[t[2].toLowerCase()]:1;return(e=(t?t[1]:e).trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e*i:NaN}hasSeparator(e){return this._separator.test(e)}}var Ol=i(6526);function Tl(e){class t extends e{constructor(){super(...arguments),this.hideAffixFromScreenReader=!1}get controlAriaDescribedby(){var e;const t=null===(e=this.ariaDescribedby)||void 0===e?void 0:e.trim(),i=[];if(t&&i.push(...t.split(/\s+/).filter(Boolean)),!this.hideAffixFromScreenReader){const e=this.id||"control";this.prefix&&i.push(`${e}-prefix`),this.suffix&&i.push(`${e}-suffix`)}const o=new Set,n=[];for(const e of i)o.has(e)||(o.add(e),n.push(e));return n.join(" ")||void 0}}return(0,C.Cg)([l.attr],t.prototype,"prefix",void 0),(0,C.Cg)([l.attr],t.prototype,"suffix",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-affix-from-screen-reader",mode:"boolean"})],t.prototype,"hideAffixFromScreenReader",void 0),t}const kl=l.css`
|
|
3153
3269
|
.label-hidden {
|
|
3154
3270
|
margin: 0;
|
|
3155
3271
|
}
|
|
@@ -3209,7 +3325,7 @@
|
|
|
3209
3325
|
:host(.has-prefix.has-suffix) .control-field .control {
|
|
3210
3326
|
border-radius: 0;
|
|
3211
3327
|
}
|
|
3212
|
-
|
|
3328
|
+
`,Dl=(e,t)=>l.css`
|
|
3213
3329
|
${(0,r.numberFieldStyles)(e,t)}
|
|
3214
3330
|
::part(label) {
|
|
3215
3331
|
color: var(--neutral-foreground-rest);
|
|
@@ -3240,8 +3356,8 @@
|
|
|
3240
3356
|
margin-inline-end: unset;
|
|
3241
3357
|
}
|
|
3242
3358
|
|
|
3243
|
-
${
|
|
3244
|
-
`,
|
|
3359
|
+
${kl}
|
|
3360
|
+
`,Il=(e,t)=>l.html`
|
|
3245
3361
|
<template
|
|
3246
3362
|
class="${e=>[e.readOnly?"readonly":"",e.prefix?"has-prefix":"",e.suffix?"has-suffix":""].filter(Boolean).join(" ")}"
|
|
3247
3363
|
>
|
|
@@ -3334,7 +3450,7 @@
|
|
|
3334
3450
|
${(0,a.endSlotTemplate)(e,t)}
|
|
3335
3451
|
</div>
|
|
3336
3452
|
</template>
|
|
3337
|
-
`,El=9,Ol=new Map,Tl=e=>{var t,i;const o=Ol.get(e);if(o)return o;const n=new Intl.NumberFormat(e).formatToParts(12345.6),s=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)],a={decimalSeparator:(null===(t=n.find(e=>"decimal"===e.type))||void 0===t?void 0:t.value)||".",groupSeparator:(null===(i=n.find(e=>"group"===e.type))||void 0===i?void 0:i.value)||"",digits:new Set([..."0123456789",...s]),zeroDigits:new Set(["0",s[s.length-1]])};return Ol.set(e,a),a},kl=(e,t)=>{const{decimalSeparator:i,groupSeparator:o}=Tl(t);return{decimalSeparator:i,groupSeparator:o}},Dl=/[kmb]\s*$/i,Il=(e,t)=>{const{decimalSeparator:i,digits:o,zeroDigits:n}=Tl(t);let s=!0;return t=>{const a=e[t];return a===i?(s=!1,!0):"-"===a||"−"===a||!!o.has(a)&&((!s||!n.has(a))&&(s=!1,!0))}},Rl=(e,t,i,o)=>{const n=Math.min(Math.max(i,0),e.length),s=e.length-t.length;if(s>0&&s<=n&&e.slice(0,n-s)+e.slice(n)===t)return n-s;if(n===e.length&&Dl.test(e))return t.length;const a=Il(e,o);let r=0;for(let e=0;e<n;e+=1)a(e)&&(r+=1);const l=Il(t,o);if(0===r){for(let e=0;e<t.length;e+=1)if(l(e))return e;return n===e.length?t.length:0}let d=0;for(let e=0;e<t.length;e+=1)if(l(e)&&(d+=1,d===r))return e+1;return t.length},Al=(e,t)=>{const{groupSeparator:i,decimalSeparator:o}=Tl(t);let n=e.trim();return i&&(n=n.split(i).join("")),"."!==o&&(n=n.replace(o,".")),n},Ll=(e,t)=>{const{decimalSeparator:i}=Tl(t);let o=0;for(const t of e)t===i&&(o+=1);return o},Nl=(e,t)=>Ll(e,t)>1,Fl=(e,t,i,o)=>((e,t,i)=>{const o=Al(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&Ll(t,i)>0,Ml=(e,t,i)=>{const o=e.startsWith("-"),n=o?e.slice(1):e,s=n.indexOf("."),a=-1===s?n:n.slice(0,s);let r=-1===s?"":n.slice(s+1);const l=i.minimumFractionDigits,d=i.maximumFractionDigits;void 0!==d&&r.length>d&&(r=r.slice(0,d)),void 0!==l&&r.length<l&&(r=r.padEnd(l,"0"));const c=((e,t)=>{const i=e.startsWith("-"),o=i?e.slice(1):e,n=Tl(t).groupSeparator||",",s=[];let a=o;for(;a.length>3;)s.unshift(a.slice(-3)),a=a.slice(0,-3);s.unshift(a);const r=s.join(n);return i?`-${r}`:r})(o?`-${a}`:a,t),{decimalSeparator:u}=kl(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},_l=(e,t)=>{const{decimalSeparator:i}=kl(0,t);return"."===i?e:e.replace(/\./g,i)},Hl=(e,t,i)=>""===e?"":(e=>{const t=e.replace(/^-/,""),i=t.indexOf(".");return(-1===i?t:t.slice(0,i)).length>15})(e)&&/^-?\d+(\.\d*)?$/.test(e)?Ml(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),Pl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,s=n?e.length-o-1:0,a=t.minimumFractionDigits,r=t.maximumFractionDigits;if(s>=a&&s<=r)return e;let l=e;if(s<a){n||(l=e+".");l+="0".repeat(a-s)}if(s>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},zl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;if(Nl(n,t))return"";let a;if(i)a=((e,t)=>{const i=Al(String(e),t),o=i.replace(/^-/,"").replace(".","").length;return/^-?\d+(\.\d+)?$/.test(i)&&o>15?i:String(new yl(t).parse(String(e)))})(n,t);else{const{decimalSeparator:e}=kl(0,t);if("."!==e){a=n.replace(new RegExp(`\\${e}`,"g"),".");const t=a.indexOf(".");-1!==t&&(a=a.substring(0,t))}else a=n}a=String(a);if(!/^-?\d*\.?\d+$/.test(a))return"";if(void 0!==s){if(a.replace(".","").replace(/^0+/,"").length>s){const e=a.indexOf(".");if(-1!==e){const t=a.substring(0,e),i=t.length;if(i>=s)return a.substring(0,s);{const o=s-i;return`${t}.${a.substring(e+1).substring(0,o)}`}}return a.substring(0,s)}}return a},Ul=(e,t,i,o)=>{if(void 0!==i&&Ll(e,t)>0){const n=Al(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Fl(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=kl(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(`${n}(\\d*?)(0+)$`),a=e.match(s);if(a){const e=a[1],i=a[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,zl(e,t,!0,i),t)},Bl=(e,t,i=!0,o,n,s)=>{const a=zl(e,t,i,s);if(!a)return"";const r=a.replace(/^-/,"").replace(".","").length;if(/^-?\d+$/.test(a)&&r>15)try{return((e,t,i)=>{let o=BigInt(e);if(void 0!==i&&!Number.isNaN(i)){const e=BigInt(Math.trunc(i));o>e&&(o=e)}if(void 0!==t&&!Number.isNaN(t)){const e=BigInt(Math.trunc(t));o<e&&(o=e)}return o.toString()})(a,o,n)}catch(e){return a}let l=parseFloat(a);return isNaN(l)?l="":(l=Math.min(l,null!=n?n:l),l=Math.max(l,null!=o?o:l)),String(l)},Vl=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const s=Math.pow(10,-n);return parseFloat(s.toFixed(n))}};class Gl extends(Cl(r.NumberField)){constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Vl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))+1;if(a<=El){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=El?(e=o+e,t=0):(e="0"+e,t=1)}return 1===t?parseInt(i.substring(0,o))+1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)+t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=Bl(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Vl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))-1;if(a>=0){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=El.toString()+e,t=1)}return 1===t?parseInt(i.substring(0,o))-1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)-t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=Bl(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}writeControlValue(e){const t=this.control,i=t.value;if(i===e)return;const{selectionStart:o,selectionEnd:n}=t;if(t.value=e,null===o||t.getRootNode().activeElement!==t)return;const s=Rl(i,e,o,this.locale),a=null===n||n===o?s:Rl(i,e,n,this.locale);t.setSelectionRange(s,a)}restoreControlToCommittedValue(){if(!this.control)return;const e=this.value;this.writeControlValue(e?this.withFormatting?Hl(e,this.locale,this.options):_l(String(e),this.locale):""),this.isUserInput=!1}skipGroupSeparator(e){if(!this.withFormatting||e.ctrlKey||e.metaKey||e.altKey)return;const{value:t,selectionStart:i,selectionEnd:o}=this.control;if(null===i||i!==o)return;const{groupSeparator:n}=kl(0,this.locale);n&&(e.key===wl.R9&&t[i-1]===n?this.control.setSelectionRange(i-1,i-1):e.key===wl.De&&t[i]===n&&this.control.setSelectionRange(i+1,i+1))}handleKeyDown(e){return e.key===wl.Mm&&(this.isUserInput=!1),!this.control||e.key!==wl.R9&&e.key!==wl.De||this.skipGroupSeparator(e),super.handleKeyDown(e)}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(Nl(this.control.value,this.locale)||Fl(this.value,this.control.value,this.locale,this.maximumInputPrecision)?this.restoreControlToCommittedValue():(this.isUserInput=!0,this.withFormatting&&!new yl(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=this.value,t=Ul(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?Hl(t,this.locale,this.options):_l(t,this.locale);this.writeControlValue(Pl(e,this.options))}this.value=Pl(t,this.options),this.$emit("input")}else this.restoreControlToCommittedValue()}):this.withFormatting||this.hasSeparatorWithoutDecimals().test(this.control.value)||l.DOM.queueUpdate(()=>{var e;this.control&&this.writeControlValue(this.control.value.replace(/[^0-9\-+e.]/g,"")),this.value=(null===(e=this.control)||void 0===e?void 0:e.value)||"",this.$emit("input")})))}valueChanged(e,t){if(null!=t||!this.control)return null!=t&&t!==e?this.isUserInput?void 0:(this.value=Bl(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.isUserInput||this.control&&(this.control.value=this.withFormatting&&this.value?Hl(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=Bl(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?Pl(e,this.options):e),this.control.value=this.withFormatting&&this.value?Hl(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],Gl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Gl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Gl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Gl.prototype,"maximumInputPrecision",void 0);const jl={delegatesFocus:!0,mode:"open"},Yl={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},Wl=Gl.compose(Object.assign({baseName:"number-field",template:Sl,styles:$l,shadowOptions:jl},Yl)),ql=(e,t)=>l.css`
|
|
3453
|
+
`,Rl=9,Al=new Map,Ll=e=>{var t,i;const o=Al.get(e);if(o)return o;const n=new Intl.NumberFormat(e).formatToParts(12345.6),s=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)],a={decimalSeparator:(null===(t=n.find(e=>"decimal"===e.type))||void 0===t?void 0:t.value)||".",groupSeparator:(null===(i=n.find(e=>"group"===e.type))||void 0===i?void 0:i.value)||"",digits:new Set([..."0123456789",...s]),zeroDigits:new Set(["0",s[s.length-1]])};return Al.set(e,a),a},Nl=(e,t)=>{const{decimalSeparator:i,groupSeparator:o}=Ll(t);return{decimalSeparator:i,groupSeparator:o}},Fl=/[kmb]\s*$/i,Ml=(e,t)=>{const{decimalSeparator:i,digits:o,zeroDigits:n}=Ll(t);let s=!0;return t=>{const a=e[t];return a===i?(s=!1,!0):"-"===a||"−"===a||!!o.has(a)&&((!s||!n.has(a))&&(s=!1,!0))}},_l=(e,t,i,o)=>{const n=Math.min(Math.max(i,0),e.length),s=e.length-t.length;if(s>0&&s<=n&&e.slice(0,n-s)+e.slice(n)===t)return n-s;if(n===e.length&&Fl.test(e))return t.length;const a=Ml(e,o);let r=0;for(let e=0;e<n;e+=1)a(e)&&(r+=1);const l=Ml(t,o);if(0===r){for(let e=0;e<t.length;e+=1)if(l(e))return e;return n===e.length?t.length:0}let d=0;for(let e=0;e<t.length;e+=1)if(l(e)&&(d+=1,d===r))return e+1;return t.length},Pl=(e,t)=>{const{groupSeparator:i,decimalSeparator:o}=Ll(t);let n=e.trim();return i&&(n=n.split(i).join("")),"."!==o&&(n=n.replace(o,".")),n},Hl=(e,t)=>{const{decimalSeparator:i}=Ll(t);let o=0;for(const t of e)t===i&&(o+=1);return o},zl=(e,t)=>Hl(e,t)>1,Ul=(e,t,i,o)=>((e,t,i)=>{const o=Pl(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&Hl(t,i)>0,Bl=(e,t,i)=>{const o=e.startsWith("-"),n=o?e.slice(1):e,s=n.indexOf("."),a=-1===s?n:n.slice(0,s);let r=-1===s?"":n.slice(s+1);const l=i.minimumFractionDigits,d=i.maximumFractionDigits;void 0!==d&&r.length>d&&(r=r.slice(0,d)),void 0!==l&&r.length<l&&(r=r.padEnd(l,"0"));const c=((e,t)=>{const i=e.startsWith("-"),o=i?e.slice(1):e,n=Ll(t).groupSeparator||",",s=[];let a=o;for(;a.length>3;)s.unshift(a.slice(-3)),a=a.slice(0,-3);s.unshift(a);const r=s.join(n);return i?`-${r}`:r})(o?`-${a}`:a,t),{decimalSeparator:u}=Nl(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},Vl=(e,t)=>{const{decimalSeparator:i}=Nl(0,t);return"."===i?e:e.replace(/\./g,i)},Gl=(e,t,i)=>""===e?"":(e=>{const t=e.replace(/^-/,""),i=t.indexOf(".");return(-1===i?t:t.slice(0,i)).length>15})(e)&&/^-?\d+(\.\d*)?$/.test(e)?Bl(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),jl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,s=n?e.length-o-1:0,a=t.minimumFractionDigits,r=t.maximumFractionDigits;if(s>=a&&s<=r)return e;let l=e;if(s<a){n||(l=e+".");l+="0".repeat(a-s)}if(s>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},Yl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;if(zl(n,t))return"";let a;if(i)a=((e,t)=>{const i=Pl(String(e),t),o=i.replace(/^-/,"").replace(".","").length;return/^-?\d+(\.\d+)?$/.test(i)&&o>15?i:String(new El(t).parse(String(e)))})(n,t);else{const{decimalSeparator:e}=Nl(0,t);if("."!==e){a=n.replace(new RegExp(`\\${e}`,"g"),".");const t=a.indexOf(".");-1!==t&&(a=a.substring(0,t))}else a=n}a=String(a);if(!/^-?\d*\.?\d+$/.test(a))return"";if(void 0!==s){if(a.replace(".","").replace(/^0+/,"").length>s){const e=a.indexOf(".");if(-1!==e){const t=a.substring(0,e),i=t.length;if(i>=s)return a.substring(0,s);{const o=s-i;return`${t}.${a.substring(e+1).substring(0,o)}`}}return a.substring(0,s)}}return a},Wl=(e,t,i,o)=>{if(void 0!==i&&Hl(e,t)>0){const n=Pl(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Ul(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=Nl(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(`${n}(\\d*?)(0+)$`),a=e.match(s);if(a){const e=a[1],i=a[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,Yl(e,t,!0,i),t)},ql=(e,t,i=!0,o,n,s)=>{const a=Yl(e,t,i,s);if(!a)return"";const r=a.replace(/^-/,"").replace(".","").length;if(/^-?\d+$/.test(a)&&r>15)try{return((e,t,i)=>{let o=BigInt(e);if(void 0!==i&&!Number.isNaN(i)){const e=BigInt(Math.trunc(i));o>e&&(o=e)}if(void 0!==t&&!Number.isNaN(t)){const e=BigInt(Math.trunc(t));o<e&&(o=e)}return o.toString()})(a,o,n)}catch(e){return a}let l=parseFloat(a);return isNaN(l)?l="":(l=Math.min(l,null!=n?n:l),l=Math.max(l,null!=o?o:l)),String(l)},Kl=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const s=Math.pow(10,-n);return parseFloat(s.toFixed(n))}};class Xl extends(Tl(r.NumberField)){constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Kl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))+1;if(a<=Rl){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=Rl?(e=o+e,t=0):(e="0"+e,t=1)}return 1===t?parseInt(i.substring(0,o))+1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)+t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=ql(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Kl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))-1;if(a>=0){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=Rl.toString()+e,t=1)}return 1===t?parseInt(i.substring(0,o))-1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)-t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=ql(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}writeControlValue(e){const t=this.control,i=t.value;if(i===e)return;const{selectionStart:o,selectionEnd:n}=t;if(t.value=e,null===o||t.getRootNode().activeElement!==t)return;const s=_l(i,e,o,this.locale),a=null===n||n===o?s:_l(i,e,n,this.locale);t.setSelectionRange(s,a)}restoreControlToCommittedValue(){if(!this.control)return;const e=this.value;this.writeControlValue(e?this.withFormatting?Gl(e,this.locale,this.options):Vl(String(e),this.locale):""),this.isUserInput=!1}skipGroupSeparator(e){if(!this.withFormatting||e.ctrlKey||e.metaKey||e.altKey)return;const{value:t,selectionStart:i,selectionEnd:o}=this.control;if(null===i||i!==o)return;const{groupSeparator:n}=Nl(0,this.locale);n&&(e.key===Ol.R9&&t[i-1]===n?this.control.setSelectionRange(i-1,i-1):e.key===Ol.De&&t[i]===n&&this.control.setSelectionRange(i+1,i+1))}handleKeyDown(e){return e.key===Ol.Mm&&(this.isUserInput=!1),!this.control||e.key!==Ol.R9&&e.key!==Ol.De||this.skipGroupSeparator(e),super.handleKeyDown(e)}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(zl(this.control.value,this.locale)||Ul(this.value,this.control.value,this.locale,this.maximumInputPrecision)?this.restoreControlToCommittedValue():(this.isUserInput=!0,this.withFormatting&&!new El(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=this.value,t=Wl(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?Gl(t,this.locale,this.options):Vl(t,this.locale);this.writeControlValue(jl(e,this.options))}this.value=jl(t,this.options),this.$emit("input")}else this.restoreControlToCommittedValue()}):this.withFormatting||this.hasSeparatorWithoutDecimals().test(this.control.value)||l.DOM.queueUpdate(()=>{var e;this.control&&this.writeControlValue(this.control.value.replace(/[^0-9\-+e.]/g,"")),this.value=(null===(e=this.control)||void 0===e?void 0:e.value)||"",this.$emit("input")})))}valueChanged(e,t){if(null!=t||!this.control)return null!=t&&t!==e?this.isUserInput?void 0:(this.value=ql(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.isUserInput||this.control&&(this.control.value=this.withFormatting&&this.value?Gl(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=ql(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?jl(e,this.options):e),this.control.value=this.withFormatting&&this.value?Gl(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],Xl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Xl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Xl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Xl.prototype,"maximumInputPrecision",void 0);const Jl={delegatesFocus:!0,mode:"open"},Ql={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},Zl=Xl.compose(Object.assign({baseName:"number-field",template:Il,styles:Dl,shadowOptions:Jl},Ql)),ed=(e,t)=>l.css`
|
|
3338
3454
|
:host {
|
|
3339
3455
|
display: block;
|
|
3340
3456
|
}
|
|
@@ -3357,7 +3473,7 @@
|
|
|
3357
3473
|
::slotted(*) {
|
|
3358
3474
|
padding-left: 20px;
|
|
3359
3475
|
}
|
|
3360
|
-
`,
|
|
3476
|
+
`,td=(e,t)=>l.html`
|
|
3361
3477
|
<template role="option">
|
|
3362
3478
|
<div class="label" part="label" role="presentation">${e=>e.groupLabel}</div>
|
|
3363
3479
|
|
|
@@ -3365,19 +3481,19 @@
|
|
|
3365
3481
|
<slot></slot>
|
|
3366
3482
|
</div>
|
|
3367
3483
|
</template>
|
|
3368
|
-
`;class
|
|
3484
|
+
`;class id extends a.ListboxOption{connectedCallback(){super.connectedCallback(),this.disabled=!0}}(0,C.Cg)([(0,l.attr)({attribute:"label"})],id.prototype,"groupLabel",void 0);const od=id.compose({baseName:"optgroup",template:td,styles:ed});var nd=i(92277);var sd=i(72154),ad=i.n(sd),rd=i(57565),ld=i.n(rd),dd=i(13160),cd=i(24669),ud=i(5709),hd=i(45230);const pd={windowEvents:["online","offline","pageshow"],documentEvents:["visibilitychange"],genesisConnectEvents:["stream","commit"],ignoredGenesisResources:[],startDelay:5e3,checkInterval:1e4,checkTimeout:3e3,resourceChecks:e=>(0,C.sH)(void 0,void 0,void 0,function*(){const t=(0,bi.tn)(),i=yield t.getMoreColumns(e),o=Date.now(),n=i;return{isConnected:i.MESSAGE_TYPE===gi.Go.MORE_COLUMNS_ACK,lastUpdated:o,lastMessage:n}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:o}=t;(0,hd.Ol)().sendForStream(e,i,o)}},md=a.DI.createInterface(e=>e.instance(pd)),gd="system-health-changed";var vd;const fd=(0,lt.createLogger)("network-monitor",{level:lt.LogLevels.info}),bd=Date.now(),yd=(null===(vd=window.navigator)||void 0===vd?void 0:vd.userAgent)?ad().parse(window.navigator.userAgent):void 0,wd=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:ld()(e,void 0,2,t);class Cd{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>(0,C.sH)(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;fd.info("Run health checks, triggered by",wd(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const o=yield this.isOnlineCheck();o?fd.debug(`Network connected at ${i}`):fd.warn(`Network disconnected at ${i}`);const n=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),o),s=this.preFlightSocketChecks(n);if(s||fd.debug("Socket pre-flight checks failed"),!o||!s){fd.debug("Aborting remaining health checks");const e=[...this.resources].reduce((e,[t,i])=>{const n=e[i.resourceName];return n?(n.sourceRef=[...n.sourceRef,i.message.SOURCE_REF],e):Object.assign(Object.assign({},e),{[i.resourceName]:this.normaliseResourceHealth({name:i.resourceName,sourceRef:[i.message.SOURCE_REF],isConnected:i.isConnected,lastUpdated:i.lastUpdated},o)})},{});return this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:e,resourcesAllConnected:!1,socket:n}),void(this.isRunningChecks=!1)}let a=!0;const r=[];this.resources.forEach((e,t)=>{const{resourceName:o,message:n,functions:s}=e,{resourceChecks:l=this.config.resourceChecks,resourceDataLogon:d=this.config.resourceDataLogon}=s,{SOURCE_REF:c}=n;let u,h,p,m,g,v=!1;r.push((()=>(0,C.sH)(this,void 0,void 0,function*(){var n,s,r;try{fd.debug(`Running health check against ${o}`);const e=yield Promise.race([l(c,t),(s=this.config.checkTimeout,r=()=>({isConnected:!1,lastUpdated:this.getNowTimestamp(),timeout:!0}),new Promise(e=>{setTimeout(()=>{e(r())},s)}))]);v=e.isConnected,u=e.lastUpdated,h=e.lastMessage,m=e.timeout}catch(e){v=!1,u=this.getNowTimestamp(),p=e,h=null!==(n=null==e?void 0:e.receivedMessage)&&void 0!==n?n:e}return g=(null==h?void 0:h.MESSAGE_TYPE)===gi.Go.MSG_NACK||(0,gi.z2)(h,dd.v.NOT_FOUND),i=this.getFormattedTimestamp(null!=u?u:this.getNowTimestamp()),v?fd.debug(`${o} is healthy at ${i}`):fd.warn(`${o} is not healthy at ${i}`),h&&fd.debug(`${o} messaged at ${i}`,wd(h)),p&&fd.error(`${o} errored at ${i}`,wd(p)),m&&fd.warn(`${o} timed out at ${i}`),g&&(fd.error(`${o} issue, re-attempting data logon at ${i}`),d(e)),a&&(a=v),{name:o,sourceRef:[c],isConnected:v,lastUpdated:u,lastError:p}}))())});const l=(yield Promise.allSettled(r)).reduce((e,t)=>{if("fulfilled"===t.status){const i=e[t.value.name];return i?(i.sourceRef=[...i.sourceRef,...t.value.sourceRef],e):Object.assign(Object.assign({},e),{[t.value.name]:this.normaliseResourceHealth(t.value)})}return fd.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});fd.debug("Health checks complete"),this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:l,resourcesAllConnected:a,socket:n}),this.isRunningChecks=!1}),void 0!==this.config.logLevel&&(fd.level=this.config.logLevel)}create(){this.resources?fd.warn("NetworkMonitor already created. If this is intentional, please call NetworkMonitor.destroy first."):(this.addListeners(),this.resources=new Map,setTimeout(()=>{this.isReady=!0,this.synchroniseCheckInterval(),this.runAllChecks("NetworkMonitor.create()")},this.config.startDelay))}destroy(){this.removeListeners(),clearInterval(this.internalId),this.resources.clear(),this.resources=void 0,this.status=void 0,this.isReady=void 0}isOnlineCheck(){return Promise.resolve(navigator.onLine)}addResource(e,t){this.resources||this.create(),this.resources.set(e,t)}removeResource(e){this.resources.delete(e)}addListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.addEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.addEventListener(e,this.runAllChecks)),this.config.genesisConnectEvents.includes("stream")&&this.unsubscribableObservers.push(this.connectEvents.addStreamListener(({detail:e})=>{const{functions:t,message:i,resourceName:o,stream:n}=e;this.config.ignoredGenesisResources.includes(o)||this.addResource(n,{functions:t,message:i,resourceName:o})},({detail:e})=>{const{resourceName:t,stream:i}=e;this.config.ignoredGenesisResources.includes(t)||this.removeResource(i)},({detail:e})=>{var t;const{resourceName:i,stream:o,error:n}=e,s=null!==(t=n.receivedMessage)&&void 0!==t?t:n;let a="";(0,gi.z2)(s,dd.v.NOT_FOUND)?a="Please check the resource is running.":(0,gi.z2)(s,dd.v.FORBIDDEN)&&(a="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(o)),fd.error(`${i} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,a,n)})),this.config.genesisConnectEvents.includes("commit")&&this.unsubscribableObservers.push(this.connectEvents.addCommitListener(e=>{this.config.ignoredGenesisResources.includes(e.detail.eventName)||this.runAllChecks(e)})),this.unsubscribableObservers.push(this.connectEvents.addMetadataListener(({detail:e})=>{const{resourceName:t,error:i}=e;i&&fd.error(`${t} had an unrecoverable error at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,"Please check the resource is running.",i)}))}removeListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.removeEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.removeEventListener(e,this.runAllChecks)),this.unsubscribableObservers.forEach(e=>e()),this.unsubscribableObservers.length=0}reportSystemHealth(e){var t;const i=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseEventDetail(e);(this.status.isHealthy?fd.debug:fd.warn)("Emitting 'system-health-changed' event",wd(this.status)),null==i||i.dispatchEvent(new CustomEvent(gd,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(fd.debug("Network monitoring no longer required. Please check your network and reload your application."),this.destroy())}reportStabilityToGenesis(e){return(0,C.sH)(this,void 0,void 0,function*(){return fd.debug("User requested report stability to Genesis."),fd.info("Please attach this data to your Genesis Support request: \n",JSON.stringify(e,null,2)),!0})}normaliseResourceHealth(e,t=!0){var i;const o=!!t&&e.isConnected,n=null!==(i=e.lastUpdated)&&void 0!==i?i:this.getNowTimestamp();return Object.assign(Object.assign({},e),{isConnected:o,lastUpdated:n})}normaliseSerializedSocketStatus(e,t=!0){const i=!!t&&e.isConnected,o=!i;return Object.assign(Object.assign({},e),{isConnected:i,isDisconnected:o})}normaliseEventDetail(e){var t,i,o,n;const s=!!((null===(t=e.socket)||void 0===t?void 0:t.isConfigured)?e.isOnline&&(null===(i=e.socket)||void 0===i?void 0:i.isConnected)&&e.resourcesAllConnected:e.isOnline),a=null!==(o=e.lastUpdated)&&void 0!==o?o:this.getNowTimestamp(),r=null!==(n=e.nextUpdate)&&void 0!==n?n:this.getNextTimestamp(),l=e.isAuthenticated&&this.user?this.user.username:void 0,d=Object.assign(Object.assign({},e),{browserInformation:yd,username:l,isHealthy:s,lastUpdated:a,nextUpdate:r,firstUpdated:bd,runAllChecks:()=>{fd.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(d)});return d}preFlightSocketChecks(e){if(!e.isConfigured)return fd.debug("Socket not configured"),!1;if(e.isReconnecting)return fd.debug("Socket reconnecting"),!1;if(e.isConnecting)return fd.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return fd.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&fd.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return fd.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return(0,wi.zT)(e)}getNowTimestamp(){return Date.now()}getNextTimestamp(){return new Date(Date.now()+this.config.checkInterval).getTime()}synchroniseCheckInterval(){clearInterval(this.internalId),this.internalId=setInterval(()=>this.runAllChecks("check interval"),this.config.checkInterval)}}(0,C.Cg)([md],Cd.prototype,"config",void 0),(0,C.Cg)([ud.S5],Cd.prototype,"socketStatus",void 0),(0,C.Cg)([cd.a4],Cd.prototype,"connectEvents",void 0),(0,C.Cg)([nd.KJ],Cd.prototype,"user",void 0),(0,C.Cg)([l.observable],Cd.prototype,"status",void 0);const xd=a.DI.createInterface(e=>e.singleton(Cd));const $d=(e,t)=>l.css`
|
|
3369
3485
|
${(0,r.progressStyles)(e,t)}
|
|
3370
3486
|
:host {
|
|
3371
3487
|
height: calc(var(--design-unit) * 2px);
|
|
3372
3488
|
}
|
|
3373
|
-
`,
|
|
3489
|
+
`,Sd=(e,t)=>(0,a.progressTemplate)(e,t);class Ed extends r.Progress{}const Od=void 0,Td={indeterminateIndicator1:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>',indeterminateIndicator2:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>'},kd=Ed.compose(Object.assign({baseName:"progress",template:Sd,styles:$d,shadowOptions:Od},Td));function Dd(e){return new Proxy(e,{get:(e,t,...i)=>{if(["withPrefix","withShadowRootMode","withElementDisambiguation"].includes(t))throw new Error("Modification of the Design System is not allowed.");return Reflect.get(e,t,...i)}})}const Id=(e,t="foundation",i,s)=>{e&&sn(null!=i?i:o,null!=s?s:n,e);return Dd(a.DesignSystem.getOrCreate(e).withPrefix(t))},Rd="app",Ad="component";Id().register(kd({prefix:"next-update"}));class Ld extends a.FoundationElement{constructor(){super(...arguments),this.timeTillNextUpdate={totalMs:1e4,remainMs:1e4,remainPercent:100},this.mode=Rd,this.status={isOnline:!0,isHealthy:!0,browserInformation:{},socket:{},resources:{}},this.onSystemHealthChanged=e=>{this.status=e.detail,this.resourceList=Object.values(this.status.resources).sort((e,t)=>Number(t.isConnected)-Number(e.isConnected))},this.onOpen=(e=!1)=>{this.isOpen=!0,this.wasOpenedByUser=e,this.isDismissed=!1},this.onClose=()=>{this.isOpen=!1,this.wasOpenedByUser=!1,this.isDismissed=!1},this.onDismiss=()=>{this.isDismissed||this.status.isHealthy?this.onClose():this.isDismissed=!0},this.onUpdateStatus=()=>{this.status.runAllChecks()},this.onReportStatus=()=>{this.status.reportStabilityToGenesis()},this.onReloadWindow=()=>{location.reload()},this.onDocumentKeydown=e=>{if(!e.defaultPrevented)switch(e.key){case Ol.Is.ArrowUp:e.ctrlKey&&e.altKey&&!this.isOpen&&(this.onOpen(!0),e.preventDefault());break;case Ol.Is.ArrowDown:e.ctrlKey&&e.altKey&&this.isOpen&&(this.onClose(),e.preventDefault());break;case Ol.F9:this.isOpen&&(this.onDismiss(),e.preventDefault())}}}isOpenChanged(){this.updateTemplateClassNames()}isDismissedChanged(){this.updateTemplateClassNames()}modeChanged(){this.$fastController.isConnected&&this.mode===Ad&&dt.warn("SystemHealthOverlay has support for app overlays only right now.")}logLevelChanged(){fd.level=this.logLevel}statusChanged(e,t){this.updateClassNames(),this.$fastController.isConnected&&(!1!==(null==t?void 0:t.isHealthy)||this.isOpen||this.onOpen(),!0===(null==t?void 0:t.isHealthy)&&this.isOpen&&!this.wasOpenedByUser&&this.onClose(),this.startTimeTillNextUpdateCountdown())}updateClassNames(){this.isOnlineClassNames=(0,$.x)(["healthy",this.status.isOnline],["unhealthy",!this.status.isOnline]),this.isHealthyClassNames=(0,$.x)(["healthy",this.status.isHealthy],["unhealthy",!this.status.isHealthy]),this.isSocketHealthyClassNames=(0,$.x)(["healthy",this.isSocketHealthy],["unhealthy",!this.isSocketHealthy]),this.resourcesAllConnectedClassNames=(0,$.x)(["healthy",this.status.resourcesAllConnected],["unhealthy",!this.status.resourcesAllConnected],["hidden",!this.validResourceList]),this.updateTemplateClassNames()}updateTemplateClassNames(){this.templateClassNames=(0,$.x)(["open",this.isOpen],["dismissed",this.isDismissed]),this.containerClassNames=(0,$.x)(this.isHealthyClassNames,["open",this.isOpen],["dismissed",this.isDismissed])}startTimeTillNextUpdateCountdown(){const e=this.status.nextUpdate-Date.now();let t=e,i=100;clearInterval(this.timeTillNextUpdateInterval),this.timeTillNextUpdate={totalMs:e,remainMs:t,remainPercent:i},this.timeTillNextUpdateInterval=setInterval(()=>{t-=1e3,i=Math.floor(t/e*100),this.timeTillNextUpdate={totalMs:e,remainMs:t,remainPercent:i},t<0&&clearInterval(this.timeTillNextUpdateInterval)},1e3)}connectedCallback(){super.connectedCallback(),this.networkMonitor.create(),this.addEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.networkMonitor.destroy(),this.removeEventListeners()}get isSocketHealthy(){return this.status.isOnline&&(!this.status.socket.isConfigured||this.status.socket.isConfigured&&this.status.socket.isConnected)}get validResourceList(){var e;return(null===(e=this.resourceList)||void 0===e?void 0:e.length)>0}eventBridge(){var e;return null!==(e=this.config.eventEmitter)&&void 0!==e?e:document}addEventListeners(){this.eventBridge().addEventListener(gd,this.onSystemHealthChanged,!0),document.addEventListener("keydown",this.onDocumentKeydown)}removeEventListeners(){this.eventBridge().removeEventListener(gd,this.onSystemHealthChanged,!0),document.removeEventListener("keydown",this.onDocumentKeydown)}static getCheckmarkTemplate(e){return e?l.html`
|
|
3374
3490
|
<span class="checkmark">✔</span>
|
|
3375
3491
|
`:l.html`
|
|
3376
3492
|
<span class="checkmark">✘</span>
|
|
3377
|
-
`}}(0,C.Cg)([
|
|
3493
|
+
`}}(0,C.Cg)([md],Ld.prototype,"config",void 0),(0,C.Cg)([xd],Ld.prototype,"networkMonitor",void 0),(0,C.Cg)([l.observable],Ld.prototype,"resourceList",void 0),(0,C.Cg)([l.observable],Ld.prototype,"isOpen",void 0),(0,C.Cg)([l.observable],Ld.prototype,"wasOpenedByUser",void 0),(0,C.Cg)([l.observable],Ld.prototype,"isDismissed",void 0),(0,C.Cg)([l.observable],Ld.prototype,"templateClassNames",void 0),(0,C.Cg)([l.observable],Ld.prototype,"containerClassNames",void 0),(0,C.Cg)([l.observable],Ld.prototype,"isOnlineClassNames",void 0),(0,C.Cg)([l.observable],Ld.prototype,"isHealthyClassNames",void 0),(0,C.Cg)([l.observable],Ld.prototype,"isSocketHealthyClassNames",void 0),(0,C.Cg)([l.observable],Ld.prototype,"resourcesAllConnectedClassNames",void 0),(0,C.Cg)([l.observable],Ld.prototype,"timeTillNextUpdate",void 0),(0,C.Cg)([l.observable],Ld.prototype,"saveDataCallback",void 0),(0,C.Cg)([l.attr],Ld.prototype,"mode",void 0),(0,C.Cg)([(0,l.attr)({attribute:"log-level",converter:l.nullableNumberConverter})],Ld.prototype,"logLevel",void 0),(0,C.Cg)([l.observable],Ld.prototype,"status",void 0);const Nd=(e,t)=>l.html`
|
|
3378
3494
|
<template class="${e=>e.templateClassNames}">
|
|
3379
3495
|
<header class="${e=>e.isHealthyClassNames}" part="header">
|
|
3380
|
-
<h1>System ${e=>(0,
|
|
3496
|
+
<h1>System ${e=>(0,Ea.fL)(e.isHealthyClassNames)}</h1>
|
|
3381
3497
|
${(0,l.when)(e=>!e.status.isHealthy,l.html`
|
|
3382
3498
|
<span class="data-warning">Data Validity Unknown</span>
|
|
3383
3499
|
`)}
|
|
@@ -3406,7 +3522,7 @@
|
|
|
3406
3522
|
</header>
|
|
3407
3523
|
<div class="container ${e=>e.containerClassNames}" part="container">
|
|
3408
3524
|
<section class="network-section ${e=>e.isOnlineClassNames}" part="network-section">
|
|
3409
|
-
<h2>Network ${e=>(0,
|
|
3525
|
+
<h2>Network ${e=>(0,Ea.fL)(e.status.isOnline?"online":"offline")}</h2>
|
|
3410
3526
|
<dl class="resource-list">
|
|
3411
3527
|
<div class="resource ${e=>e.isOnlineClassNames}">
|
|
3412
3528
|
<div class="attributes">
|
|
@@ -3426,11 +3542,11 @@
|
|
|
3426
3542
|
`)}
|
|
3427
3543
|
<div class="platform-type">
|
|
3428
3544
|
<dt>Platform Type</dt>
|
|
3429
|
-
<dd>${e=>{var t;return(0,
|
|
3545
|
+
<dd>${e=>{var t;return(0,Ea.fL)(null===(t=e.status.browserInformation.platform)||void 0===t?void 0:t.type)}}</dd>
|
|
3430
3546
|
</div>
|
|
3431
3547
|
<div class="os-name">
|
|
3432
3548
|
<dt>OS Name</dt>
|
|
3433
|
-
<dd>${e=>{var t;return(0,
|
|
3549
|
+
<dd>${e=>{var t;return(0,Ea.fL)(null===(t=e.status.browserInformation.os)||void 0===t?void 0:t.name)}}</dd>
|
|
3434
3550
|
</div>
|
|
3435
3551
|
<div class="os-version">
|
|
3436
3552
|
<dt>OS Version</dt>
|
|
@@ -3440,7 +3556,7 @@
|
|
|
3440
3556
|
<div class="attributes">
|
|
3441
3557
|
<div class="browser-name">
|
|
3442
3558
|
<dt>Browser Name</dt>
|
|
3443
|
-
<dd>${e=>{var t;return(0,
|
|
3559
|
+
<dd>${e=>{var t;return(0,Ea.fL)(null===(t=e.status.browserInformation.browser)||void 0===t?void 0:t.name)}}</dd>
|
|
3444
3560
|
</div>
|
|
3445
3561
|
<div class="browser-version">
|
|
3446
3562
|
<dt>Browser Version</dt>
|
|
@@ -3448,16 +3564,16 @@
|
|
|
3448
3564
|
</div>
|
|
3449
3565
|
<div class="first-updated">
|
|
3450
3566
|
<dt>First updated</dt>
|
|
3451
|
-
<dd>${e=>(0,
|
|
3567
|
+
<dd>${e=>(0,wi.zT)(e.status.firstUpdated)}</dd>
|
|
3452
3568
|
</div>
|
|
3453
3569
|
<div class="last-updated">
|
|
3454
3570
|
<dt>Last updated</dt>
|
|
3455
|
-
<dd>${e=>(0,
|
|
3571
|
+
<dd>${e=>(0,wi.zT)(e.status.lastUpdated)}</dd>
|
|
3456
3572
|
</div>
|
|
3457
3573
|
${(0,l.when)(e=>!e.status.socket.reconnectionLimitReached,l.html`
|
|
3458
3574
|
<div class="next-update">
|
|
3459
3575
|
<dt>Next update</dt>
|
|
3460
|
-
<dd>${e=>(0,
|
|
3576
|
+
<dd>${e=>(0,wi.zT)(e.status.nextUpdate)}</dd>
|
|
3461
3577
|
</div>
|
|
3462
3578
|
<div class="next-update-progress">
|
|
3463
3579
|
<dt></dt>
|
|
@@ -3470,13 +3586,13 @@
|
|
|
3470
3586
|
`)}
|
|
3471
3587
|
</div>
|
|
3472
3588
|
<div class="controls">
|
|
3473
|
-
${e=>
|
|
3589
|
+
${e=>Ld.getCheckmarkTemplate(e.status.isOnline)}
|
|
3474
3590
|
</div>
|
|
3475
3591
|
</div>
|
|
3476
3592
|
</dl>
|
|
3477
3593
|
</section>
|
|
3478
3594
|
<section class="socket-section ${e=>e.isSocketHealthyClassNames}" part="socket-section">
|
|
3479
|
-
<h2>WebSocket ${e=>(0,
|
|
3595
|
+
<h2>WebSocket ${e=>(0,Ea.fL)(e.isSocketHealthyClassNames)}</h2>
|
|
3480
3596
|
<dl class="resource-list">
|
|
3481
3597
|
<div class="resource ${e=>e.isSocketHealthyClassNames}">
|
|
3482
3598
|
<div class="attributes">
|
|
@@ -3516,7 +3632,7 @@
|
|
|
3516
3632
|
</div>
|
|
3517
3633
|
</div>
|
|
3518
3634
|
<div class="controls">
|
|
3519
|
-
${e=>
|
|
3635
|
+
${e=>Ld.getCheckmarkTemplate(e.isSocketHealthy)}
|
|
3520
3636
|
</div>
|
|
3521
3637
|
</div>
|
|
3522
3638
|
</dl>
|
|
@@ -3525,7 +3641,7 @@
|
|
|
3525
3641
|
class="resource-section ${e=>e.resourcesAllConnectedClassNames}"
|
|
3526
3642
|
part="resource-section"
|
|
3527
3643
|
>
|
|
3528
|
-
<h2>Resources ${e=>(0,
|
|
3644
|
+
<h2>Resources ${e=>(0,Ea.fL)(e.resourcesAllConnectedClassNames)}</h2>
|
|
3529
3645
|
<dl class="resource-list">
|
|
3530
3646
|
${(0,l.repeat)(e=>e.resourceList,l.html`
|
|
3531
3647
|
<div class="resource ${e=>e.isConnected?"healthy":"unhealthy"}">
|
|
@@ -3540,7 +3656,7 @@
|
|
|
3540
3656
|
</div>
|
|
3541
3657
|
<div class="last-checked">
|
|
3542
3658
|
<dt>Checked</dt>
|
|
3543
|
-
<dd>${e=>(0,
|
|
3659
|
+
<dd>${e=>(0,wi.zT)(e.lastUpdated)}</dd>
|
|
3544
3660
|
</div>
|
|
3545
3661
|
<div class="subscriptions">
|
|
3546
3662
|
<dt>Subscriptions</dt>
|
|
@@ -3552,7 +3668,7 @@
|
|
|
3552
3668
|
</div>
|
|
3553
3669
|
</div>
|
|
3554
3670
|
<div class="controls">
|
|
3555
|
-
${e=>
|
|
3671
|
+
${e=>Ld.getCheckmarkTemplate(e.isConnected)}
|
|
3556
3672
|
</div>
|
|
3557
3673
|
</div>
|
|
3558
3674
|
`)}
|
|
@@ -3560,7 +3676,7 @@
|
|
|
3560
3676
|
</section>
|
|
3561
3677
|
</div>
|
|
3562
3678
|
</template>
|
|
3563
|
-
`,
|
|
3679
|
+
`,Fd=(e,t)=>l.css`
|
|
3564
3680
|
:host {
|
|
3565
3681
|
--font-family: Menlo, Consolas, monospace;
|
|
3566
3682
|
|
|
@@ -3831,7 +3947,7 @@
|
|
|
3831
3947
|
padding: 0.2em 0.5em;
|
|
3832
3948
|
background-color: var(--color-unhealthy-opacity-20);
|
|
3833
3949
|
}
|
|
3834
|
-
`,
|
|
3950
|
+
`,Md=void 0,_d={},Pd=Ld.compose(Object.assign({baseName:"system-health-overlay",template:Nd,styles:Fd,shadowOptions:Md},_d)),Hd=l.css`
|
|
3835
3951
|
:host {
|
|
3836
3952
|
--pill-fill: var(--neutral-fill-rest, #e5e5e5);
|
|
3837
3953
|
--pill-fill-hover: var(--neutral-fill-hover, #d9d9d9);
|
|
@@ -3909,7 +4025,7 @@
|
|
|
3909
4025
|
.pill-remove:hover:not(:disabled) {
|
|
3910
4026
|
background: var(--pill-fill-hover);
|
|
3911
4027
|
}
|
|
3912
|
-
`,
|
|
4028
|
+
`,zd=e=>l.html`
|
|
3913
4029
|
<div class="pill" part="pill" ?disabled=${e=>e.disabled}>
|
|
3914
4030
|
<button
|
|
3915
4031
|
class="pill-body"
|
|
@@ -3943,9 +4059,9 @@
|
|
|
3943
4059
|
</button>
|
|
3944
4060
|
`)}
|
|
3945
4061
|
</div>
|
|
3946
|
-
`,
|
|
3947
|
-
${e=>
|
|
3948
|
-
`,
|
|
4062
|
+
`,Ud=l.html`
|
|
4063
|
+
${e=>zd(I(e))}
|
|
4064
|
+
`,Bd=void 0,Vd={};class Gd extends a.FoundationElement{constructor(){super(...arguments),this.removable=!0,this.disabled=!1}handleBodyClick(){this.disabled||this.$emit("pill-click")}handleRemoveClick(e){null==e||e.stopPropagation(),this.disabled||this.$emit("remove")}}(0,C.Cg)([l.attr],Gd.prototype,"label",void 0),(0,C.Cg)([l.attr],Gd.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gd.prototype,"removable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gd.prototype,"disabled",void 0);const jd=Gd.compose(Object.assign({baseName:"pill",template:Ud,styles:Hd,shadowOptions:Bd},Vd));var Yd=i(4934);const Wd={toView:e=>JSON.stringify(e),fromView:e=>null==e?e:JSON.parse(e)};class qd extends a.FoundationElement{constructor(){super(...arguments),this.show=!1,this.event="click",this.placement="bottom",this.flip=!1}selectorChanged(e,t){t!==e&&(this.popper&&this.popper.destroy(),this.target&&this.target.removeEventListener(this.event,this.toggle.bind(this)),this.target=this.getRootNode().querySelector(this.selector),this.target.addEventListener(this.event,this.toggle.bind(this)),this.popper=(0,Yd.n4)(this.target,this,this.buildOptions()))}placementChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}offsetChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}flipChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}buildOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset||[0,0]}},{name:"flip",enabled:this.flip}]}}toggle(){this.show=!this.show}disconnectedCallback(){super.disconnectedCallback(),this.popper&&(this.popper.destroy(),this.popper=null)}}(0,C.Cg)([l.attr],qd.prototype,"selector",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],qd.prototype,"show",void 0),(0,C.Cg)([l.attr],qd.prototype,"event",void 0),(0,C.Cg)([l.attr],qd.prototype,"placement",void 0),(0,C.Cg)([(0,l.attr)({converter:Wd})],qd.prototype,"offset",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],qd.prototype,"flip",void 0);const Kd=l.css`
|
|
3949
4065
|
:host {
|
|
3950
4066
|
display: none;
|
|
3951
4067
|
inset: unset !important;
|
|
@@ -3955,39 +4071,39 @@
|
|
|
3955
4071
|
:host([show]) {
|
|
3956
4072
|
display: block;
|
|
3957
4073
|
}
|
|
3958
|
-
`,
|
|
4074
|
+
`,Xd=l.html`
|
|
3959
4075
|
<template>
|
|
3960
4076
|
<slot></slot>
|
|
3961
4077
|
</template>
|
|
3962
|
-
`,
|
|
4078
|
+
`,Jd=qd.compose({baseName:"popper",styles:Kd,template:Xd}),Qd=(e,t)=>l.css`
|
|
3963
4079
|
${(0,r.progressRingStyles)(e,t)}
|
|
3964
|
-
`,
|
|
4080
|
+
`,Zd=(e,t)=>(0,a.progressRingTemplate)(e,t);class ec extends r.Progress{}const tc=void 0,ic={indeterminateIndicator:'\n <svg class="progress" part="progress" viewBox="0 0 16 16">\n <circle class="background" part="background" cx="8px" cy="8px" r="7px"></circle>\n <circle class="indeterminate-indicator-1" part="indeterminate-indicator-1" cx="8px" cy="8px" r="7px"></circle>\n </svg>\n '},oc=ec.compose(Object.assign({baseName:"progress-ring",template:Zd,styles:Qd,shadowOptions:tc},ic)),nc=(e,t)=>l.css`
|
|
3965
4081
|
${(0,r.radioStyles)(e,t)}
|
|
3966
|
-
`,
|
|
4082
|
+
`,sc=(e,t)=>(0,a.radioTemplate)(e,t);class ac extends r.Radio{}const rc=void 0,lc={checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '},dc=ac.compose(Object.assign({baseName:"radio",template:sc,styles:nc,shadowOptions:rc},lc)),cc=(e,t)=>l.css`
|
|
3967
4083
|
${(0,r.radioGroupStyles)(e,t)}
|
|
3968
|
-
`,
|
|
4084
|
+
`,uc=(e,t)=>(0,a.radioGroupTemplate)(e,t);class hc extends r.RadioGroup{}const pc=void 0,mc={},gc=hc.compose(Object.assign({baseName:"radio-group",template:uc,styles:cc,shadowOptions:pc},mc)),vc=l.css`
|
|
3969
4085
|
/* Host */
|
|
3970
4086
|
:host {
|
|
3971
4087
|
display: flex;
|
|
3972
4088
|
flex-direction: column;
|
|
3973
4089
|
width: 100%;
|
|
3974
4090
|
}
|
|
3975
|
-
`,
|
|
4091
|
+
`,fc=e=>l.html`
|
|
3976
4092
|
<template>
|
|
3977
4093
|
<${e}-scheduler-timezone
|
|
3978
|
-
:timezone=${(0,
|
|
4094
|
+
:timezone=${(0,W.O)(e=>e.timezone)}
|
|
3979
4095
|
@change=${(e,t)=>e.handleChange(t.event,"timezone")}
|
|
3980
4096
|
></${e}-scheduler-timezone>
|
|
3981
4097
|
<${e}-scheduler-cron-builder
|
|
3982
|
-
:cron=${(0,
|
|
4098
|
+
:cron=${(0,W.O)(e=>e.cron)}
|
|
3983
4099
|
@change=${(e,t)=>e.handleChange(t.event,"cronExpression")}
|
|
3984
4100
|
min-minute-interval=${e=>e.minMinuteInterval}
|
|
3985
4101
|
?disable-tooltips=${e=>e.disableTooltips}
|
|
3986
4102
|
></${e}-scheduler-cron-builder>
|
|
3987
4103
|
</template>
|
|
3988
|
-
`,
|
|
3989
|
-
${e=>
|
|
3990
|
-
`;class
|
|
4104
|
+
`,bc=l.html`
|
|
4105
|
+
${e=>fc(I(e))}
|
|
4106
|
+
`;class yc extends a.FoundationElement{constructor(){super(...arguments),this.disableTooltips=!1,this.timezone="",this.cron=""}cronConfigChanged(){var e,t;this.timezone=(null===(e=this.cronConfig)||void 0===e?void 0:e.timezone)||"",this.cron=(null===(t=this.cronConfig)||void 0===t?void 0:t.cronExpression)||""}handleChange(e,t){e.stopPropagation();const{value:i}=e.target;this.cronConfig=Object.assign(Object.assign({},this.cronConfig),{[t]:i}),this.$emit("change",this.cronConfig)}}(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],yc.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],yc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],yc.prototype,"timezone",void 0),(0,C.Cg)([l.observable],yc.prototype,"cron",void 0),(0,C.Cg)([l.observable],yc.prototype,"cronConfig",void 0);const wc=void 0,Cc={},xc=yc.compose(Object.assign({baseName:"scheduler",styles:vc,template:bc,shadowOptions:wc},Cc)),$c=(e,t,i)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let o={title:e.title,body:e.body,iconName:e.iconName},n={};e.createdAt&&(o=Object.assign({createdAt:e.createdAt},o)),null!=e.logLevel&&(o=Object.assign({logLevel:e.logLevel},o)),e.toast&&(n=Object.assign({toast:e.toast},n),o=Object.assign({config:n},o)),Ee(o,t,i)};var Sc,Ec,Oc;!function(e){e.MINUTES="Minutes",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e.MONTHLY="Monthly",e.YEARLY="Yearly"}(Sc||(Sc={})),function(e){e.WEEK="Week",e.WORK_WEEK="Work week"}(Ec||(Ec={})),function(e){e.DATE="Date",e.DAY_OF_MONTH="Day of month"}(Oc||(Oc={}));const Tc=[{value:"2",label:"Monday"},{value:"3",label:"Tuesday"},{value:"4",label:"Wednesday"},{value:"5",label:"Thursday"},{value:"6",label:"Friday"},{value:"7",label:"Saturday"},{value:"1",label:"Sunday"}],kc=[{value:"1",label:"First"},{value:"2",label:"Second"},{value:"3",label:"Third"},{value:"4",label:"Fourth"},{value:"-1",label:"Last"}],Dc=[{value:"1",label:"January"},{value:"2",label:"February"},{value:"3",label:"March"},{value:"4",label:"April"},{value:"5",label:"May"},{value:"6",label:"June"},{value:"7",label:"July"},{value:"8",label:"August"},{value:"9",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}],Ic=12,Rc=31,Ac=6,Lc=7,Nc=24,Fc=60,Mc=4,_c=30;var Pc;!function(e){e.updateCronConfig="update-cron-config"}(Pc||(Pc={}));const Hc=e=>Number(e)>1?`/${e}`:"";const zc=(e,t,i)=>{const o=Number(e);return!isNaN(o)&&o<=i&&o>=t};function Uc(e,t,i,o=!1,n=zc){if("*"===e)return!0;if(o&&("?"===e||"L"===e))return!0;if(o&&e.endsWith("L"))return n(e.slice(0,-1),t,i);if(e.startsWith("*/"))return n(e.substring(2),1,i);if(e.startsWith("0/"))return n(e.substring(2),1,i);if(o&&e.includes("#")){const[o,s]=e.split("#");return n(o,t,i)&&n(s,1,Mc)}if(n(e,t,i))return!0;if(e.includes("-")){const[o,s]=e.split("-");return n(o,t,i)&&n(s,t,i)}return!!e.includes(",")&&e.split(",").every(e=>Uc(e,t,i,o,n))}function Bc(e,t){return{type:Sc.DAILY,frequency:e.startsWith("*/")?e.split("*/")[1]:"1",weekType:"?"===t?Ec.WEEK:Ec.WORK_WEEK}}function Vc(e){const t=e.includes("/");return{type:Sc.HOURLY,frequency:t?e.split("/")[1]:"1",during:t?"every_hour":"specific_hours",hours:t?void 0:e}}function Gc(e,t="*"){const i="*"!==t&&"0/1"!==t;return{type:Sc.MINUTES,frequency:e.includes("/")?e.split("/")[1]:"1",during:i?"specific_hours":"every_hour",hours:i?t:void 0}}function jc(e){return{type:Sc.WEEKLY,selectedDays:"*"!==e?new Set(e.split(",")):new Set}}const Yc=(e,t,i,o)=>{let n;return n="?"===t?{type:Oc.DAY_OF_MONTH,day:o.split(/[L#]/)[0],weekNumber:o.includes("#")?o.split("#")[1]:"-1"}:{type:Oc.DATE,dayDate:t},e===Sc.YEARLY&&(n.month=i),n};function Wc(e,t,i,o=Yc){return{type:Sc.YEARLY,frequency:2===i.split("/").length?i.split("/")[1]:"1",dateOrDay:o(Sc.YEARLY,e,t,i.split("/")[0])}}function qc(e,t,i,o=Yc){return{type:Sc.MONTHLY,frequency:t.startsWith("*/")?t.split("*/")[1]:"1",dateOrDay:o(Sc.MONTHLY,e,t,i.split("/")[0])}}const Kc=l.css`
|
|
3991
4107
|
.input-container {
|
|
3992
4108
|
display: flex;
|
|
3993
4109
|
flex-direction: column;
|
|
@@ -4023,8 +4139,8 @@
|
|
|
4023
4139
|
width: 100%;
|
|
4024
4140
|
height: 0;
|
|
4025
4141
|
}
|
|
4026
|
-
`,
|
|
4027
|
-
${
|
|
4142
|
+
`,Xc=l.css`
|
|
4143
|
+
${Kc}
|
|
4028
4144
|
/* Host */
|
|
4029
4145
|
:host {
|
|
4030
4146
|
display: flex;
|
|
@@ -4084,32 +4200,32 @@
|
|
|
4084
4200
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
4085
4201
|
white-space: nowrap;
|
|
4086
4202
|
}
|
|
4087
|
-
`;var
|
|
4203
|
+
`;var Jc=i(20633);const Qc=(e,t,i)=>l.html`
|
|
4088
4204
|
<${t}-icon tooltip="${()=>e}" name="${()=>i}"></${t}-icon>
|
|
4089
|
-
`,
|
|
4090
|
-
${
|
|
4091
|
-
`,
|
|
4205
|
+
`,Zc=e=>class extends e{$emit(...e){const[t,i,o]=((...e)=>{let[t,i,o]=e,n=i;var s;if(((null==(s=i)?void 0:s.hasOwnProperty("bubbles"))||(null==s?void 0:s.hasOwnProperty("cancelable"))||(null==s?void 0:s.hasOwnProperty("composed"))||(null==s?void 0:s.hasOwnProperty("broadcast")))&&(o=i,n=void 0),"string"!=typeof t)throw new Error("$emit event types must be typeof string.");return[t,n,o]})(...e);if(null==o?void 0:o.broadcast){const e=new CustomEvent(t,Object.assign({detail:i,bubbles:!0,composed:!0,cancelable:!0},o));return e.broadcast=!0,this.dispatchEvent(e)}return super.$emit(t,i,o)}},eu=l.css`
|
|
4206
|
+
${Kc}
|
|
4207
|
+
`,tu="\n <p>Select one or more hours.</p>\n",iu=l.html`
|
|
4092
4208
|
${e=>{return t=e.prefix,l.html`
|
|
4093
4209
|
<template>
|
|
4094
4210
|
<div class="input-container">
|
|
4095
|
-
<label class="label">Of ${e=>e.disableTooltips?"":
|
|
4211
|
+
<label class="label">Of ${e=>e.disableTooltips?"":Qc("\n <p>Controls the daily frequency:</p>\n <ul>\n <li><strong>Week:</strong> allows you to configure the frequency of repeating days, including both weekdays and weekends.</li>\n <li><strong>Work week:</strong> runs the schedule at the specified time on every weekday (Monday - Friday). When this option is selected you cannot change the day frequency, it's every weekday.</li>\n </ul>\n",t)}</label>
|
|
4096
4212
|
<${t}-select
|
|
4097
4213
|
data-test-id="select-week-type"
|
|
4098
|
-
:value=${(0,
|
|
4214
|
+
:value=${(0,W.O)(e=>e.weekType)}
|
|
4099
4215
|
@change="${e=>e.updateCronConfig()}"
|
|
4100
4216
|
>
|
|
4101
|
-
<${t}-option data-test-id="${
|
|
4102
|
-
${
|
|
4217
|
+
<${t}-option data-test-id="${Ec.WEEK}">
|
|
4218
|
+
${Ec.WEEK}
|
|
4103
4219
|
</${t}-option>
|
|
4104
|
-
<${t}-option data-test-id="${
|
|
4105
|
-
${
|
|
4220
|
+
<${t}-option data-test-id="${Ec.WORK_WEEK}">
|
|
4221
|
+
${Ec.WORK_WEEK}
|
|
4106
4222
|
</${t}-option>
|
|
4107
4223
|
</${t}-select>
|
|
4108
4224
|
</div>
|
|
4109
4225
|
</template>
|
|
4110
4226
|
`;var t}}
|
|
4111
|
-
`;let
|
|
4112
|
-
${
|
|
4227
|
+
`;let ou=class extends(Zc(a.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix=""}configChanged(){var e;this.weekType=(null===(e=this.config)||void 0===e?void 0:e.weekType)||Ec.WORK_WEEK}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{weekType:this.weekType}),this.$emit(Pc.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],ou.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],ou.prototype,"prefix",void 0),(0,C.Cg)([l.observable],ou.prototype,"config",void 0),(0,C.Cg)([l.observable],ou.prototype,"weekType",void 0),ou=(0,C.Cg)([(0,l.customElement)({name:"daily-recurrence",template:iu,styles:eu})],ou);const nu=l.css`
|
|
4228
|
+
${Kc}
|
|
4113
4229
|
:host {
|
|
4114
4230
|
display: flex;
|
|
4115
4231
|
flex-direction: column;
|
|
@@ -4130,43 +4246,43 @@
|
|
|
4130
4246
|
.day-date-number-field::part(root) {
|
|
4131
4247
|
width: 40%;
|
|
4132
4248
|
}
|
|
4133
|
-
`,
|
|
4249
|
+
`,su=e=>l.html`
|
|
4134
4250
|
<div class="input-container">
|
|
4135
4251
|
<label class="label">Month</label>
|
|
4136
|
-
<${e}-select data-test-id="month-dropdown" :value=${(0,
|
|
4137
|
-
${(0,l.repeat)(()
|
|
4252
|
+
<${e}-select data-test-id="month-dropdown" :value=${(0,W.O)(e=>e.selectedMonth)} @change="${e=>e.updateCronConfig()}" >
|
|
4253
|
+
${(0,l.repeat)(()=>Dc,l.html`
|
|
4138
4254
|
<${e}-option value="${e=>e.value}">
|
|
4139
4255
|
${e=>e.label}
|
|
4140
4256
|
</${e}-option>
|
|
4141
4257
|
`)}
|
|
4142
4258
|
</${e}-select>
|
|
4143
4259
|
</div>
|
|
4144
|
-
`,
|
|
4260
|
+
`,au=e=>l.html`
|
|
4145
4261
|
${(e=>l.html`
|
|
4146
4262
|
<div class="input-container">
|
|
4147
4263
|
<label class="label">On</label>
|
|
4148
4264
|
<${e}-select
|
|
4149
4265
|
data-test-id="select-day-or-date"
|
|
4150
|
-
:value=${(0,
|
|
4266
|
+
:value=${(0,W.O)(e=>e.dayOrDate)}
|
|
4151
4267
|
@change="${e=>e.updateCronConfig()}"
|
|
4152
4268
|
>
|
|
4153
|
-
<${e}-option data-test-id="${
|
|
4154
|
-
${
|
|
4269
|
+
<${e}-option data-test-id="${Oc.DATE}">
|
|
4270
|
+
${Oc.DATE}
|
|
4155
4271
|
</${e}-option>
|
|
4156
|
-
<${e}-option data-test-id="${
|
|
4157
|
-
${
|
|
4272
|
+
<${e}-option data-test-id="${Oc.DAY_OF_MONTH}">
|
|
4273
|
+
${Oc.DAY_OF_MONTH}
|
|
4158
4274
|
</${e}-option>
|
|
4159
4275
|
</${e}-select>
|
|
4160
4276
|
</div>
|
|
4161
4277
|
`)(e)}
|
|
4162
|
-
${(0,
|
|
4278
|
+
${(0,An.q)(e=>e.dayOrDate===Oc.DATE,(e=>l.html`
|
|
4163
4279
|
<div class="row">
|
|
4164
|
-
${(0,l.when)(e=>e.config.type===
|
|
4165
|
-
${
|
|
4280
|
+
${(0,l.when)(e=>e.config.type===Sc.YEARLY,l.html`
|
|
4281
|
+
${su(e)}
|
|
4166
4282
|
`)}
|
|
4167
4283
|
<div class="input-container">
|
|
4168
|
-
<label class="label"> ${e=>e.config.type===
|
|
4169
|
-
<${e}-select data-test-id="day-date-dropdown" :value=${(0,
|
|
4284
|
+
<label class="label"> ${e=>e.config.type===Sc.MONTHLY?"Day date":"Day"}</label>
|
|
4285
|
+
<${e}-select data-test-id="day-date-dropdown" :value=${(0,W.O)(e=>e.dayDate)} @change="${e=>e.updateCronConfig()}" >
|
|
4170
4286
|
${(0,l.repeat)(()=>Array.from({length:31},(e,t)=>t+1),l.html`
|
|
4171
4287
|
<${e}-option value="${e=>e}">
|
|
4172
4288
|
${e=>e}
|
|
@@ -4178,17 +4294,17 @@
|
|
|
4178
4294
|
|
|
4179
4295
|
`)(e),(e=>l.html`
|
|
4180
4296
|
<div class="day-of-month-row">
|
|
4181
|
-
${(0,l.when)(e=>e.config.type===
|
|
4182
|
-
${
|
|
4297
|
+
${(0,l.when)(e=>e.config.type===Sc.YEARLY,l.html`
|
|
4298
|
+
${su(e)}
|
|
4183
4299
|
`)}
|
|
4184
4300
|
<div class="input-container">
|
|
4185
4301
|
<label class="label">Day of Month</label>
|
|
4186
4302
|
<${e}-select
|
|
4187
4303
|
data-test-id="select-week-number"
|
|
4188
|
-
:value=${(0,
|
|
4304
|
+
:value=${(0,W.O)(e=>e.weekNumber)}
|
|
4189
4305
|
@change="${e=>e.updateCronConfig()}"
|
|
4190
4306
|
>
|
|
4191
|
-
${(0,l.repeat)(()=>
|
|
4307
|
+
${(0,l.repeat)(()=>kc,l.html`
|
|
4192
4308
|
<${e}-option value="${e=>e.value}">
|
|
4193
4309
|
${e=>e.label}
|
|
4194
4310
|
</${e}-option>
|
|
@@ -4199,10 +4315,10 @@
|
|
|
4199
4315
|
<label class="label">Day</label>
|
|
4200
4316
|
<${e}-select
|
|
4201
4317
|
data-test-id="select-week-day"
|
|
4202
|
-
:value=${(0,
|
|
4318
|
+
:value=${(0,W.O)(e=>e.day)}
|
|
4203
4319
|
@change="${e=>e.updateCronConfig()}"
|
|
4204
4320
|
>
|
|
4205
|
-
${(0,l.repeat)(()=>
|
|
4321
|
+
${(0,l.repeat)(()=>Tc,l.html`
|
|
4206
4322
|
<${e}-option value="${e=>e.value}">
|
|
4207
4323
|
${e=>e.label}
|
|
4208
4324
|
</${e}-option>
|
|
@@ -4211,24 +4327,24 @@
|
|
|
4211
4327
|
</div>
|
|
4212
4328
|
</div>
|
|
4213
4329
|
`)(e))}
|
|
4214
|
-
`,
|
|
4215
|
-
${e=>
|
|
4216
|
-
`;let
|
|
4217
|
-
${
|
|
4330
|
+
`,ru=l.html`
|
|
4331
|
+
${e=>au(e.prefix)}
|
|
4332
|
+
`;let lu=class extends(Zc(a.FoundationElement)){constructor(){super(...arguments),this.prefix="",this.dayOrDate=Oc.DATE,this.weekNumber="1",this.day="1",this.selectedMonth="1"}configChanged(){this.config.type!==Sc.YEARLY&&this.config.type!==Sc.MONTHLY||(this.dayOrDate=this.config.dateOrDay.type||Oc.DATE,this.setFieldsFromConfig())}setFieldsFromConfig(){this.config.type===Sc.YEARLY&&(this.selectedMonth=this.config.dateOrDay.month),this.config.dateOrDay.type===Oc.DAY_OF_MONTH?(this.weekNumber=this.config.dateOrDay.weekNumber||"1",this.day=this.config.dateOrDay.day||"1"):this.dayDate=this.config.dateOrDay.dayDate||"1"}getDayOrDateConfig(){let e;return e=this.dayOrDate===Oc.DATE?{type:Oc.DATE,dayDate:this.dayDate||"1"}:{type:Oc.DAY_OF_MONTH,day:this.day||"1",weekNumber:this.weekNumber||"1"},e}updateCronConfig(){this.config.type===Sc.MONTHLY?this.config=Object.assign(Object.assign({},this.config),{dateOrDay:this.getDayOrDateConfig()}):this.config=Object.assign(Object.assign({},this.config),{dateOrDay:Object.assign(Object.assign({},this.getDayOrDateConfig()),{month:this.selectedMonth||"1"})}),this.$emit(Pc.updateCronConfig,this.config)}};(0,C.Cg)([l.observable],lu.prototype,"prefix",void 0),(0,C.Cg)([l.observable],lu.prototype,"config",void 0),(0,C.Cg)([l.observable],lu.prototype,"dayOrDate",void 0),(0,C.Cg)([l.observable],lu.prototype,"dayDate",void 0),(0,C.Cg)([l.observable],lu.prototype,"weekNumber",void 0),(0,C.Cg)([l.observable],lu.prototype,"day",void 0),(0,C.Cg)([l.observable],lu.prototype,"selectedMonth",void 0),lu=(0,C.Cg)([(0,l.customElement)({name:"monthly-yearly-recurrence",template:ru,styles:nu})],lu);const du=l.css`
|
|
4333
|
+
${Kc}
|
|
4218
4334
|
.weekdays-row {
|
|
4219
4335
|
display: flex;
|
|
4220
4336
|
gap: calc(var(--design-unit) * 3px);
|
|
4221
4337
|
flex-wrap: wrap;
|
|
4222
4338
|
}
|
|
4223
|
-
`,
|
|
4339
|
+
`,cu=l.html`
|
|
4224
4340
|
${e=>{return t=e.prefix,l.html`
|
|
4225
4341
|
<template>
|
|
4226
4342
|
<div class="input-container">
|
|
4227
4343
|
<label class="label">
|
|
4228
|
-
On ${e=>e.disableTooltips?"":
|
|
4344
|
+
On ${e=>e.disableTooltips?"":Qc("\n <p>Select which days to run this recurrence on. It's not valid to select no days, so if there is only a single day selected then its checkbox is disabled. </p>\n <p>If you need to change the day you can enable other days which will allow you to disable days until you only have a single day selected again.</p>\n",t)}
|
|
4229
4345
|
</label>
|
|
4230
4346
|
<div class="weekdays-row">
|
|
4231
|
-
${(0,l.repeat)(()=>
|
|
4347
|
+
${(0,l.repeat)(()=>Tc,l.html`
|
|
4232
4348
|
<${t}-checkbox
|
|
4233
4349
|
part="weekdays-checkbox"
|
|
4234
4350
|
class="weekdays-checkbox"
|
|
@@ -4244,12 +4360,12 @@
|
|
|
4244
4360
|
</div>
|
|
4245
4361
|
</template>
|
|
4246
4362
|
`;var t}}
|
|
4247
|
-
`;let
|
|
4363
|
+
`;let uu=class extends(Zc(a.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix="",this.selectedDays=new Set}configChanged(){var e;this.selectedDays=(null===(e=this.config)||void 0===e?void 0:e.selectedDays)?new Set(this.config.selectedDays):new Set}isDisabled(e){return 1===this.selectedDays.size&&this.selectedDays.has(e)}checkboxChangeHandler(e){const{checked:t,value:i}=e.target;t?this.selectedDays.add(i):this.selectedDays.size>1&&this.selectedDays.delete(i),this.updateCronConfig()}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{selectedDays:this.selectedDays}),this.$emit(Pc.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],uu.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],uu.prototype,"prefix",void 0),(0,C.Cg)([l.observable],uu.prototype,"config",void 0),(0,C.Cg)([l.observable],uu.prototype,"selectedDays",void 0),uu=(0,C.Cg)([(0,l.customElement)({name:"weekly-recurrence",template:cu,styles:du})],uu),(0,Jc.N)(ou,uu,lu);const hu=(e,t)=>l.html`
|
|
4248
4364
|
<monthly-yearly-recurrence
|
|
4249
4365
|
:prefix=${()=>e}
|
|
4250
4366
|
:config=${()=>t.cronConfig}
|
|
4251
4367
|
></monthly-yearly-recurrence>
|
|
4252
|
-
`,
|
|
4368
|
+
`,pu=(e,t,i)=>l.html`
|
|
4253
4369
|
<div class="input-container">
|
|
4254
4370
|
${(0,l.when)(()=>i,l.html`
|
|
4255
4371
|
<label class="label">${i}</label>
|
|
@@ -4258,7 +4374,7 @@
|
|
|
4258
4374
|
class="frequency-select"
|
|
4259
4375
|
?disabled=${()=>t.isDailyFrequencyDisabled}
|
|
4260
4376
|
data-test-id="frequency-dropdown"
|
|
4261
|
-
:value=${(0,
|
|
4377
|
+
:value=${(0,W.O)(()=>t.frequency)}
|
|
4262
4378
|
@change="${()=>t.handleChange("frequency")}"
|
|
4263
4379
|
>
|
|
4264
4380
|
${(0,l.repeat)(()=>t.frequencyList,l.html`
|
|
@@ -4267,42 +4383,42 @@
|
|
|
4267
4383
|
<div slot="end" class="suffix-label">${()=>t.frequencySuffix}</div>
|
|
4268
4384
|
</${e}-select>
|
|
4269
4385
|
</div>
|
|
4270
|
-
`,
|
|
4386
|
+
`,mu=(e,t,i,o)=>l.html`
|
|
4271
4387
|
<div class="input-container">
|
|
4272
4388
|
<label class="label">Time </label>
|
|
4273
4389
|
<div class="flex-row">
|
|
4274
4390
|
${(0,l.when)(()=>i,l.html`
|
|
4275
|
-
<${e}-select class="time-select" data-test-id="hours-dropdown" :value=${(0,
|
|
4276
|
-
${(0,l.repeat)(()=>Array.from({length:
|
|
4391
|
+
<${e}-select class="time-select" data-test-id="hours-dropdown" :value=${(0,W.O)(()=>t.hours)} @change="${()=>t.handleChange("hours")}" >
|
|
4392
|
+
${(0,l.repeat)(()=>Array.from({length:Nc},(e,t)=>t),l.html`
|
|
4277
4393
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4278
4394
|
`)}
|
|
4279
4395
|
<div slot="end" class="suffix-label">hr</div>
|
|
4280
4396
|
</${e}-select>`)}
|
|
4281
4397
|
${(0,l.when)(()=>o,l.html`
|
|
4282
|
-
<${e}-select class="time-select" data-test-id="mins-dropdown" :value=${(0,
|
|
4283
|
-
${(0,l.repeat)(()=>Array.from({length:
|
|
4398
|
+
<${e}-select class="time-select" data-test-id="mins-dropdown" :value=${(0,W.O)(()=>t.minutes)} @change="${()=>t.handleChange("minutes")}" >
|
|
4399
|
+
${(0,l.repeat)(()=>Array.from({length:Fc},(e,t)=>t),l.html`
|
|
4284
4400
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4285
4401
|
`)}
|
|
4286
4402
|
<div slot="end" class="suffix-label">min</div>
|
|
4287
4403
|
</${e}-select>`)}
|
|
4288
|
-
<${e}-select class="time-select" data-test-id="seconds-dropdown" :value=${(0,
|
|
4289
|
-
${(0,l.repeat)(()=>Array.from({length:
|
|
4404
|
+
<${e}-select class="time-select" data-test-id="seconds-dropdown" :value=${(0,W.O)(()=>t.seconds)} @change="${()=>t.handleChange("seconds")}" >
|
|
4405
|
+
${(0,l.repeat)(()=>Array.from({length:Fc},(e,t)=>t),l.html`
|
|
4290
4406
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4291
4407
|
`)}
|
|
4292
4408
|
<div slot="end" class="suffix-label">sec</div>
|
|
4293
4409
|
</${e}-select>
|
|
4294
4410
|
</div>
|
|
4295
4411
|
</div>
|
|
4296
|
-
`,
|
|
4412
|
+
`,gu=(e,t,i)=>{switch(e){case Sc.MINUTES:return l.html`
|
|
4297
4413
|
<div class="minutes-options-row">
|
|
4298
4414
|
<div class="input-container">
|
|
4299
4415
|
<label class="label"
|
|
4300
4416
|
>During
|
|
4301
|
-
${()=>i.disableTooltips?"":
|
|
4417
|
+
${()=>i.disableTooltips?"":Qc("\n <p>Which hours in the day to run this schedule for:</p>\n <ul>\n <li><strong>Every hour:</strong> runs the minute schedule during every hour of the day.</li>\n <li><strong>Specific hours:</strong> specify which hours the minute schedule runs for. For example, just trading hours. Selecting every hour will configure the schedule as <strong>Every hour</strong>.</li>\n </ul>\n",t)}</label
|
|
4302
4418
|
>
|
|
4303
4419
|
<${t}-select
|
|
4304
4420
|
data-test-id="during-select"
|
|
4305
|
-
:value=${(0,
|
|
4421
|
+
:value=${(0,W.O)(()=>i.during)}
|
|
4306
4422
|
@change="${()=>i.handleDuringChange()}"
|
|
4307
4423
|
>
|
|
4308
4424
|
${(0,l.repeat)(()=>i.duringOptions,l.html`
|
|
@@ -4318,7 +4434,7 @@
|
|
|
4318
4434
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4319
4435
|
<div class="input-container">
|
|
4320
4436
|
<label class="label"
|
|
4321
|
-
>Hours ${
|
|
4437
|
+
>Hours ${Qc(tu,t)}</label
|
|
4322
4438
|
>
|
|
4323
4439
|
<${t}-multiselect
|
|
4324
4440
|
class="time-select"
|
|
@@ -4333,31 +4449,31 @@
|
|
|
4333
4449
|
`)}
|
|
4334
4450
|
</div>
|
|
4335
4451
|
<div class="row">
|
|
4336
|
-
${
|
|
4337
|
-
${
|
|
4452
|
+
${pu(t,i,"Every")}
|
|
4453
|
+
${mu(t,i,!1,!1)}
|
|
4338
4454
|
</div>
|
|
4339
|
-
`;case
|
|
4455
|
+
`;case Sc.HOURLY:return l.html`
|
|
4340
4456
|
<div class="row">
|
|
4341
4457
|
<div class="input-container">
|
|
4342
4458
|
<label class="label"
|
|
4343
4459
|
>Mode
|
|
4344
|
-
${()=>i.disableTooltips?"":
|
|
4460
|
+
${()=>i.disableTooltips?"":Qc("\n <p>Select the type of hourly recurrence:</p>\n <ul>\n <li><strong>Interval:</strong> runs at a repeating interval of hours (e.g. every 2 hours).</li>\n <li><strong>Selected Hours:</strong> allows you to choose specific hours of the day (e.g. 9, 10, and 14).</li>\n </ul>\n",t)}</label
|
|
4345
4461
|
>
|
|
4346
4462
|
<${t}-select
|
|
4347
4463
|
data-test-id="hourly-during-select"
|
|
4348
|
-
:value=${(0,
|
|
4464
|
+
:value=${(0,W.O)(()=>i.during)}
|
|
4349
4465
|
@change="${()=>i.handleDuringChange()}"
|
|
4350
4466
|
>
|
|
4351
4467
|
<${t}-option value="every_hour">Interval</${t}-option>
|
|
4352
4468
|
<${t}-option value="specific_hours">Selected Hours</${t}-option>
|
|
4353
4469
|
</${t}-select>
|
|
4354
4470
|
</div>
|
|
4355
|
-
${(0,l.when)(()=>"every_hour"===i.during,
|
|
4471
|
+
${(0,l.when)(()=>"every_hour"===i.during,pu(t,i,"Every"))}
|
|
4356
4472
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4357
4473
|
<div class="break"></div>
|
|
4358
4474
|
<div class="input-container">
|
|
4359
4475
|
<label class="label">
|
|
4360
|
-
Hours ${
|
|
4476
|
+
Hours ${Qc(tu,t)}
|
|
4361
4477
|
</label>
|
|
4362
4478
|
<${t}-multiselect
|
|
4363
4479
|
class="time-select"
|
|
@@ -4369,9 +4485,9 @@
|
|
|
4369
4485
|
></${t}-multiselect>
|
|
4370
4486
|
</div>
|
|
4371
4487
|
`)}
|
|
4372
|
-
${
|
|
4488
|
+
${mu(t,i,!1,!0)}
|
|
4373
4489
|
</div>
|
|
4374
|
-
`;case
|
|
4490
|
+
`;case Sc.DAILY:return l.html`
|
|
4375
4491
|
${((e,t)=>l.html`
|
|
4376
4492
|
<daily-recurrence
|
|
4377
4493
|
:prefix=${()=>e}
|
|
@@ -4380,10 +4496,10 @@
|
|
|
4380
4496
|
></daily-recurrence>
|
|
4381
4497
|
`)(t,i)}
|
|
4382
4498
|
<div class="row">
|
|
4383
|
-
${
|
|
4384
|
-
${
|
|
4499
|
+
${pu(t,i,"Every")}
|
|
4500
|
+
${mu(t,i,!0,!0)}
|
|
4385
4501
|
</div>
|
|
4386
|
-
`;case
|
|
4502
|
+
`;case Sc.WEEKLY:return l.html`
|
|
4387
4503
|
<div class="row">
|
|
4388
4504
|
${((e,t)=>l.html`
|
|
4389
4505
|
<weekly-recurrence
|
|
@@ -4391,63 +4507,63 @@
|
|
|
4391
4507
|
:config=${()=>t.cronConfig}
|
|
4392
4508
|
?disable-tooltips=${()=>t.disableTooltips}
|
|
4393
4509
|
></weekly-recurrence>
|
|
4394
|
-
`)(t,i)} ${
|
|
4510
|
+
`)(t,i)} ${mu(t,i,!0,!0)}
|
|
4395
4511
|
</div>
|
|
4396
|
-
`;case
|
|
4512
|
+
`;case Sc.MONTHLY:return l.html`
|
|
4397
4513
|
<div class="row">
|
|
4398
|
-
${
|
|
4399
|
-
${
|
|
4514
|
+
${pu(t,i,"Every")}
|
|
4515
|
+
${mu(t,i,!0,!0)}
|
|
4400
4516
|
</div>
|
|
4401
|
-
${
|
|
4402
|
-
`;case
|
|
4403
|
-
<div class="row">${
|
|
4404
|
-
${
|
|
4405
|
-
`;default:return l.html``}},
|
|
4517
|
+
${hu(t,i)}
|
|
4518
|
+
`;case Sc.YEARLY:return l.html`
|
|
4519
|
+
<div class="row">${mu(t,i,!0,!0)}</div>
|
|
4520
|
+
${hu(t,i)}
|
|
4521
|
+
`;default:return l.html``}},vu=e=>l.html`
|
|
4406
4522
|
<template>
|
|
4407
4523
|
<div class="container">
|
|
4408
4524
|
<div class="input-container">
|
|
4409
4525
|
<label class="label"
|
|
4410
4526
|
>Recurrence
|
|
4411
4527
|
${(0,l.when)(e=>!e.disableTooltips,l.html`
|
|
4412
|
-
${t=>
|
|
4528
|
+
${t=>Qc(`\n <p>Select how often the event should occur:</p>\n <ul>\n${!t.minMinuteInterval||t.minMinuteInterval<_c?"<li><strong>Minutes:</strong> Runs at every interval of minutes from the hour. Can be for every or specific hours.</li>":""}\n <li><strong>Hourly:</strong> Runs at a specific time in the hour, for one or more hours in the day.</li>\n <li><strong>Daily:</strong> Runs at a specific time of day, for a frequency interval of days per week (or work week).</li>\n <li><strong>Weekly:</strong> Runs at a specific time of day, for specific days of the week.</li>\n <li><strong>Monthly:</strong> Runs at a specific time of day in monthly intervals, on a specific date or day of month .</li>\n <li><strong>Yearly:</strong> Runs at a specific time, every year on a specific date or day of month.</li>\n </ul>\n`,e)}
|
|
4413
4529
|
`)}
|
|
4414
4530
|
</label>
|
|
4415
4531
|
<${e}-select
|
|
4416
4532
|
data-test-id="select-recurrence"
|
|
4417
|
-
:value=${(0,
|
|
4533
|
+
:value=${(0,W.O)(e=>e.recurrence)}
|
|
4418
4534
|
@change="${e=>e.handleRecurrenceChange()}"
|
|
4419
4535
|
>
|
|
4420
4536
|
${(0,l.when)(e=>e.isMinutesRecurrenceEnabled,l.html`
|
|
4421
|
-
<${e}-option data-test-id="${
|
|
4422
|
-
${
|
|
4537
|
+
<${e}-option data-test-id="${Sc.MINUTES}">
|
|
4538
|
+
${Sc.MINUTES}
|
|
4423
4539
|
</${e}-option>
|
|
4424
4540
|
`)}
|
|
4425
|
-
<${e}-option data-test-id="${
|
|
4426
|
-
${
|
|
4541
|
+
<${e}-option data-test-id="${Sc.HOURLY}">
|
|
4542
|
+
${Sc.HOURLY}
|
|
4427
4543
|
</${e}-option>
|
|
4428
|
-
<${e}-option data-test-id="${
|
|
4429
|
-
${
|
|
4544
|
+
<${e}-option data-test-id="${Sc.DAILY}">
|
|
4545
|
+
${Sc.DAILY}
|
|
4430
4546
|
</${e}-option>
|
|
4431
|
-
<${e}-option data-test-id="${
|
|
4432
|
-
${
|
|
4547
|
+
<${e}-option data-test-id="${Sc.WEEKLY}">
|
|
4548
|
+
${Sc.WEEKLY}
|
|
4433
4549
|
</${e}-option>
|
|
4434
|
-
<${e}-option data-test-id="${
|
|
4435
|
-
${
|
|
4550
|
+
<${e}-option data-test-id="${Sc.MONTHLY}">
|
|
4551
|
+
${Sc.MONTHLY}
|
|
4436
4552
|
</${e}-option>
|
|
4437
|
-
<${e}-option data-test-id="${
|
|
4438
|
-
${
|
|
4553
|
+
<${e}-option data-test-id="${Sc.YEARLY}">
|
|
4554
|
+
${Sc.YEARLY}
|
|
4439
4555
|
</${e}-option>
|
|
4440
4556
|
</${e}-select>
|
|
4441
4557
|
</div>
|
|
4442
4558
|
|
|
4443
4559
|
${(0,l.repeat)(e=>[`${e.recurrence}-${e.during}`],l.html`
|
|
4444
|
-
${(t,i)=>
|
|
4560
|
+
${(t,i)=>gu(i.parent.recurrence,e,i.parent)}
|
|
4445
4561
|
`,{recycle:!1})}
|
|
4446
4562
|
</div>
|
|
4447
4563
|
</template>
|
|
4448
|
-
`,
|
|
4449
|
-
${e=>
|
|
4450
|
-
`;class hu extends a.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Hc,buildConfigForHourlyRecurrence:_c,buildConfigForDailyRecurrence:Mc,buildConfigForWeeklyRecurrence:Pc,buildConfigForMonthlyRecurrence:Bc,buildConfigForYearlyRecurrence:Uc},this.recurrence=bc.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:bc.DAILY,weekType:yc.WEEK,hours:"0",minutes:"0",seconds:"0"},this.frequency="1",this.during="every_hour",this.hours="0",this.minutes="0",this.seconds="0",this.disableTooltips=!1,this.timezone=""}cronChanged(){if(this.cron)try{if(!((e,t=Fc)=>{const i=e.trim().split(" ");if(i.length!=Oc)return!1;const[o,n,s,a,r,l]=i;return t(o,0,Dc-1)&&t(n,0,Dc-1)&&t(s,0,kc-1)&&t(a,1,Ec,!0)&&t(r,1,Sc)&&t(l,0,Tc,!0)})(this.cron))return void fc({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},T(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void fc({title:"Cron Scheduler",body:e,toast:{type:"critical"}},T(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case bc.MINUTES:return"Minute(s)";case bc.HOURLY:return"Hour(s)";case bc.DAILY:return"Day(s)";case bc.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case bc.MINUTES:const e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case bc.HOURLY:return Array.from({length:kc-1},(e,t)=>t+1);case bc.DAILY:return Array.from({length:Ec},(e,t)=>t+1);case bc.MONTHLY:case bc.YEARLY:return Array.from({length:Sc},(e,t)=>t+1);case bc.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:kc},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return this.hours&&"*"!==this.hours&&"0"!==this.hours?this.hours.split(","):"*"===this.hours?this.hourOptions.map(e=>e.value):[this.hours]}handleHoursChange(e){const t=e.detail;t.length===kc?(this.hours="*",this.frequency="1",this.cronConfig.frequency="1"):t&&0!==t.length?this.hours=t.sort((e,t)=>Number(e)-Number(t)).join(","):this.hours="0",this.handleChange("hours")}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return"specific_hours"===this.during}get isDailyFrequencyDisabled(){return this.cronConfig.type===bc.DAILY&&this.cronConfig.weekType===yc.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn("Minimum minute interval has no effect on schedules with an hourly or longer recurrance")}connectedCallback(){super.connectedCallback(),this.addEventListener(Ac.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Ac.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case bc.MINUTES:const e=this.getBaseConfigFields(),{minutes:t}=e,i=(0,C.Tt)(e,["minutes"]);this.during="every_hour",this.hours="*";const o=[1,2,3,4,5,6,10,12,15,20,30],n=this.minMinuteInterval?Number(this.minMinuteInterval):1,s=o.find(e=>e>=n)||1;this.cronConfig=Object.assign(Object.assign({type:bc.MINUTES},i),{frequency:s.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case bc.HOURLY:const a=this.getBaseConfigFields(),{hours:r}=a,l=(0,C.Tt)(a,["hours"]);this.during="every_hour",this.hours="0",this.cronConfig=Object.assign(Object.assign({type:bc.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case bc.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:bc.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:yc.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case bc.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:bc.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case bc.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:bc.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:wc.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case bc.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:bc.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:wc.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:fc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}}handleChange(e){if("frequency"===e&&0===Number(this.frequency))throw new Error("Frequency must be greater than 0");this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){"every_hour"===this.during?this.hours="*":"*"===this.hours&&(this.hours="0"),this.cronConfig.type!==bc.MINUTES&&this.cronConfig.type!==bc.HOURLY||(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case bc.MINUTES:this.cron=function(e){const t="specific_hours"===e.during&&e.hours?e.hours:"*";return`${e.seconds} 0/${e.frequency} ${t} ? * *`}(e);break;case bc.HOURLY:this.cron=function(e){return"specific_hours"===e.during&&e.hours&&"*"!==e.hours?`${e.seconds} ${e.minutes} ${e.hours} ? * *`:`${e.seconds} ${e.minutes} 0/${e.frequency} ? * *`}(e);break;case bc.DAILY:this.cron=function(e,t=Lc){const i=e.weekType===yc.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===yc.WORK_WEEK?"2-6":"?"}`}(e,Lc);break;case bc.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case bc.MONTHLY:this.cron=function(e,t=Lc){const{dateOrDay:i,minutes:o,hours:n,seconds:s,frequency:a}=e,r=t(a);return i.type===wc.DATE?`${s} ${o} ${n} ${i.dayDate} *${r} ?`:"-1"===i.weekNumber?`${s} ${o} ${n} ? *${r} ${i.day}L`:`${e.seconds} ${o} ${n} ? *${r} ${i.day}#${i.weekNumber}`}(e,Lc);break;case bc.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===wc.DATE?`${o} ${i} ${n} ${t.dayDate} ${t.month} ?`:"-1"===t.weekNumber?`${o} ${i} ${n} ? ${t.month} ${t.day}L`:`${o} ${i} ${n} ? ${t.month} ${t.day}#${t.weekNumber}`}(e);break;default:fc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}this.value=this.cron,this.$emit("change")}setsFieldsFromCronEx(){this.cronConfig=function(e,t){if(!e)return;const i=e.split(" "),[o,n,s,a,r,l]=i;if("?"!==l&&"?"!==a)throw new Error("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented");if(/^(0|\*)\/\d+$/.test(n))return Object.assign({seconds:o},t.buildConfigForMinutesRecurrence(n,s));if(/^(0|\*)\/\d+$/.test(s))return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("?"===a&&"*"===l)return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("2-6"===l||"?"===l&&("*"===a||a.startsWith("*")))return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForDailyRecurrence(a,l));if(/^([1-7](,[1-7])*)$/.test(l)||"*"===l)return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForWeeklyRecurrence(l));if(l.includes("L")||l.includes("#")||/^([1-9]|[12]\d|3[01])$/.test(a)&&"?"===l)return"*"==r||r.startsWith("*/")?Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForMonthlyRecurrence(a,r,l)):Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForYearlyRecurrence(a,r,l));throw new Error("Invalid Cron Expression")}(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;const e=this.cronConfig;"minutes"in e&&(this.minutes=e.minutes),e.type!==bc.MINUTES&&e.type!==bc.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==bc.HOURLY&&e.type!==bc.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],hu.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],hu.prototype,"cron",void 0),(0,C.Cg)([l.observable],hu.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],hu.prototype,"frequency",void 0),(0,C.Cg)([l.observable],hu.prototype,"during",void 0),(0,C.Cg)([l.volatile],hu.prototype,"duringOptions",null),(0,C.Cg)([l.observable],hu.prototype,"hours",void 0),(0,C.Cg)([l.observable],hu.prototype,"minutes",void 0),(0,C.Cg)([l.observable],hu.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],hu.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],hu.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],hu.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],hu.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],hu.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],hu.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],hu.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],hu.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],hu.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],hu.prototype,"timezone",void 0);const pu=void 0,mu={},gu=hu.compose(Object.assign({baseName:"scheduler-cron-builder",styles:Gc,template:uu,shadowOptions:pu},mu)),vu=l.css`
|
|
4564
|
+
`,fu=l.html`
|
|
4565
|
+
${e=>vu(I(e))}
|
|
4566
|
+
`;class bu extends a.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Gc,buildConfigForHourlyRecurrence:Vc,buildConfigForDailyRecurrence:Bc,buildConfigForWeeklyRecurrence:jc,buildConfigForMonthlyRecurrence:qc,buildConfigForYearlyRecurrence:Wc},this.recurrence=Sc.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:Sc.DAILY,weekType:Ec.WEEK,hours:"0",minutes:"0",seconds:"0"},this.frequency="1",this.during="every_hour",this.hours="0",this.minutes="0",this.seconds="0",this.disableTooltips=!1,this.timezone=""}cronChanged(){if(this.cron)try{if(!((e,t=Uc)=>{const i=e.trim().split(" ");if(i.length!=Ac)return!1;const[o,n,s,a,r,l]=i;return t(o,0,Fc-1)&&t(n,0,Fc-1)&&t(s,0,Nc-1)&&t(a,1,Rc,!0)&&t(r,1,Ic)&&t(l,0,Lc,!0)})(this.cron))return void $c({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},I(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void $c({title:"Cron Scheduler",body:e,toast:{type:"critical"}},I(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case Sc.MINUTES:return"Minute(s)";case Sc.HOURLY:return"Hour(s)";case Sc.DAILY:return"Day(s)";case Sc.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case Sc.MINUTES:const e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case Sc.HOURLY:return Array.from({length:Nc-1},(e,t)=>t+1);case Sc.DAILY:return Array.from({length:Rc},(e,t)=>t+1);case Sc.MONTHLY:case Sc.YEARLY:return Array.from({length:Ic},(e,t)=>t+1);case Sc.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:Nc},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return this.hours&&"*"!==this.hours&&"0"!==this.hours?this.hours.split(","):"*"===this.hours?this.hourOptions.map(e=>e.value):[this.hours]}handleHoursChange(e){const t=e.detail;t.length===Nc?(this.hours="*",this.frequency="1",this.cronConfig.frequency="1"):t&&0!==t.length?this.hours=t.sort((e,t)=>Number(e)-Number(t)).join(","):this.hours="0",this.handleChange("hours")}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return"specific_hours"===this.during}get isDailyFrequencyDisabled(){return this.cronConfig.type===Sc.DAILY&&this.cronConfig.weekType===Ec.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn("Minimum minute interval has no effect on schedules with an hourly or longer recurrance")}connectedCallback(){super.connectedCallback(),this.addEventListener(Pc.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Pc.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case Sc.MINUTES:const e=this.getBaseConfigFields(),{minutes:t}=e,i=(0,C.Tt)(e,["minutes"]);this.during="every_hour",this.hours="*";const o=[1,2,3,4,5,6,10,12,15,20,30],n=this.minMinuteInterval?Number(this.minMinuteInterval):1,s=o.find(e=>e>=n)||1;this.cronConfig=Object.assign(Object.assign({type:Sc.MINUTES},i),{frequency:s.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Sc.HOURLY:const a=this.getBaseConfigFields(),{hours:r}=a,l=(0,C.Tt)(a,["hours"]);this.during="every_hour",this.hours="0",this.cronConfig=Object.assign(Object.assign({type:Sc.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Sc.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Sc.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:Ec.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Sc.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Sc.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Sc.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Sc.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Oc.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Sc.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Sc.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Oc.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:$c({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},I(this))}}handleChange(e){if("frequency"===e&&0===Number(this.frequency))throw new Error("Frequency must be greater than 0");this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){"every_hour"===this.during?this.hours="*":"*"===this.hours&&(this.hours="0"),this.cronConfig.type!==Sc.MINUTES&&this.cronConfig.type!==Sc.HOURLY||(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case Sc.MINUTES:this.cron=function(e){const t="specific_hours"===e.during&&e.hours?e.hours:"*";return`${e.seconds} 0/${e.frequency} ${t} ? * *`}(e);break;case Sc.HOURLY:this.cron=function(e){return"specific_hours"===e.during&&e.hours&&"*"!==e.hours?`${e.seconds} ${e.minutes} ${e.hours} ? * *`:`${e.seconds} ${e.minutes} 0/${e.frequency} ? * *`}(e);break;case Sc.DAILY:this.cron=function(e,t=Hc){const i=e.weekType===Ec.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===Ec.WORK_WEEK?"2-6":"?"}`}(e,Hc);break;case Sc.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case Sc.MONTHLY:this.cron=function(e,t=Hc){const{dateOrDay:i,minutes:o,hours:n,seconds:s,frequency:a}=e,r=t(a);return i.type===Oc.DATE?`${s} ${o} ${n} ${i.dayDate} *${r} ?`:"-1"===i.weekNumber?`${s} ${o} ${n} ? *${r} ${i.day}L`:`${e.seconds} ${o} ${n} ? *${r} ${i.day}#${i.weekNumber}`}(e,Hc);break;case Sc.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===Oc.DATE?`${o} ${i} ${n} ${t.dayDate} ${t.month} ?`:"-1"===t.weekNumber?`${o} ${i} ${n} ? ${t.month} ${t.day}L`:`${o} ${i} ${n} ? ${t.month} ${t.day}#${t.weekNumber}`}(e);break;default:$c({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},I(this))}this.value=this.cron,this.$emit("change")}setsFieldsFromCronEx(){this.cronConfig=function(e,t){if(!e)return;const i=e.split(" "),[o,n,s,a,r,l]=i;if("?"!==l&&"?"!==a)throw new Error("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented");if(/^(0|\*)\/\d+$/.test(n))return Object.assign({seconds:o},t.buildConfigForMinutesRecurrence(n,s));if(/^(0|\*)\/\d+$/.test(s))return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("?"===a&&"*"===l)return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("2-6"===l||"?"===l&&("*"===a||a.startsWith("*")))return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForDailyRecurrence(a,l));if(/^([1-7](,[1-7])*)$/.test(l)||"*"===l)return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForWeeklyRecurrence(l));if(l.includes("L")||l.includes("#")||/^([1-9]|[12]\d|3[01])$/.test(a)&&"?"===l)return"*"==r||r.startsWith("*/")?Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForMonthlyRecurrence(a,r,l)):Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForYearlyRecurrence(a,r,l));throw new Error("Invalid Cron Expression")}(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;const e=this.cronConfig;"minutes"in e&&(this.minutes=e.minutes),e.type!==Sc.MINUTES&&e.type!==Sc.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==Sc.HOURLY&&e.type!==Sc.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],bu.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],bu.prototype,"cron",void 0),(0,C.Cg)([l.observable],bu.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],bu.prototype,"frequency",void 0),(0,C.Cg)([l.observable],bu.prototype,"during",void 0),(0,C.Cg)([l.volatile],bu.prototype,"duringOptions",null),(0,C.Cg)([l.observable],bu.prototype,"hours",void 0),(0,C.Cg)([l.observable],bu.prototype,"minutes",void 0),(0,C.Cg)([l.observable],bu.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],bu.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],bu.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],bu.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],bu.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],bu.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],bu.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],bu.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],bu.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],bu.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],bu.prototype,"timezone",void 0);const yu=void 0,wu={},Cu=bu.compose(Object.assign({baseName:"scheduler-cron-builder",styles:Xc,template:fu,shadowOptions:yu},wu)),xu=l.css`
|
|
4451
4567
|
/* Host */
|
|
4452
4568
|
:host {
|
|
4453
4569
|
display: flex;
|
|
@@ -4474,7 +4590,7 @@
|
|
|
4474
4590
|
.timezone-combobox::part(listbox) {
|
|
4475
4591
|
max-height: 20vh;
|
|
4476
4592
|
}
|
|
4477
|
-
|
|
4593
|
+
`,$u=e=>l.html`
|
|
4478
4594
|
<template>
|
|
4479
4595
|
<div class="container">
|
|
4480
4596
|
<label class="label">Time Zone</label>
|
|
@@ -4482,7 +4598,7 @@
|
|
|
4482
4598
|
data-test-id="cron-scheduler-timezone"
|
|
4483
4599
|
autocomplete="both"
|
|
4484
4600
|
class="timezone-combobox"
|
|
4485
|
-
value="${(0,
|
|
4601
|
+
value="${(0,W.O)(e=>e.timezone)}"
|
|
4486
4602
|
>
|
|
4487
4603
|
${(0,l.repeat)(e=>e.timeZones,l.html`
|
|
4488
4604
|
<${e}-option value="${e=>e}">${e=>e}</${e}-option>
|
|
@@ -4490,9 +4606,9 @@
|
|
|
4490
4606
|
</${e}-combobox>
|
|
4491
4607
|
</div>
|
|
4492
4608
|
</template>
|
|
4493
|
-
`,
|
|
4494
|
-
${e
|
|
4495
|
-
`;class
|
|
4609
|
+
`,Su=l.html`
|
|
4610
|
+
${e=>$u(I(e))}
|
|
4611
|
+
`;class Eu extends a.FoundationElement{constructor(){super(...arguments),this.timezone="",this.value=this.timezone}timezoneChanged(){this.value=this.timezone,this.$emit("change")}connectedCallback(){super.connectedCallback(),this.getTimeZones()}getTimeZones(){return(0,C.sH)(this,void 0,void 0,function*(){const e=["Europe/London","America/New_York"];try{const t=yield this.connect.request("VALID_TIME_ZONE",{REQUEST:{}});if(!t.REPLY||!Array.isArray(t.REPLY))throw new Error("Invalid data returned for Timezones");this.timeZones=t.REPLY.map(e=>e.ZONE_ID).sort((t,i)=>e.includes(t)&&!e.includes(i)?-1:!e.includes(t)&&e.includes(i)?1:t.localeCompare(i))}catch(e){$c({title:"Cron Scheduler",body:"Unable to fetch timezones data.",toast:{type:"critical"}},"rapid"),Qs.v.error(e)}})}}(0,C.Cg)([l.observable],Eu.prototype,"timezone",void 0),(0,C.Cg)([bi.dm],Eu.prototype,"connect",void 0),(0,C.Cg)([l.observable],Eu.prototype,"timeZones",void 0);const Ou=void 0,Tu={},ku=Eu.compose(Object.assign({baseName:"scheduler-timezone",styles:xu,template:Su,shadowOptions:Ou},Tu)),Du=l.css`
|
|
4496
4612
|
.search-bar-combobox {
|
|
4497
4613
|
width: 100%;
|
|
4498
4614
|
min-width: auto;
|
|
@@ -4568,9 +4684,9 @@
|
|
|
4568
4684
|
.close-icon {
|
|
4569
4685
|
color: var(--accent-fill-rest);
|
|
4570
4686
|
}
|
|
4571
|
-
`,
|
|
4687
|
+
`,Iu=(e="start")=>'\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="10px" height="10px">\n <g transform="matrix(1 0 0 1 -256 -14 )">\n <path class="cross-icon" fill="white" d="M 9.9265625 8.865937499999998 L 6.060625000000001 5 L 9.265625 1.795 L 9.9265625 1.1340624999999993 C 10.0240625 1.0365624999999996 10.0240625 0.8781249999999996 9.9265625 0.7806249999999992 L 9.219375 0.07343749999999982 C 9.121875 -0.024062500000000542 8.9634375 -0.024062500000000542 8.8659375 0.07343749999999982 L 5 3.9393750000000005 L 1.1340625 0.073125 C 1.0365625 -0.02437500000000037 0.8781250000000002 -0.02437500000000037 0.7806249999999999 0.073125 L 0.073125 0.7803125 C -0.024375000000000008 0.8778124999999998 -0.024375000000000008 1.0362499999999997 0.073125 1.13375 L 3.9393750000000005 5 L 0.073125 8.865937499999998 C -0.024375000000000008 8.9634375 -0.024375000000000008 9.121875 0.073125 9.219375000000001 L 0.7803125 9.9265625 C 0.8778125000000001 10.0240625 1.03625 10.0240625 1.13375 9.9265625 L 5 6.060625 L 8.205 9.265625 L 8.8659375 9.9265625 C 8.9634375 10.0240625 9.121875 10.0240625 9.219375 9.9265625 L 9.9265625 9.219375000000001 C 10.0240625 9.121875 10.0240625 8.9634375 9.9265625 8.865937499999998 Z " fill-rule="nonzero" fill="#c9c9c9" stroke="none" fill-opacity="0.8" transform="matrix(1 0 0 1 256 14 )"/>\n </g>\n</svg>\n',Ru=()=>'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="30px" height="30px" class="bi bi-plus" viewBox="0 0 16 16">\n <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>\n</svg>',Au=e=>l.html`
|
|
4572
4688
|
|
|
4573
|
-
<label part="label" for="control" data-test-id="label" class=${e=>{var t;return(0
|
|
4689
|
+
<label part="label" for="control" data-test-id="label" class=${e=>{var t;return(0,$.x)("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}
|
|
4574
4690
|
>
|
|
4575
4691
|
<slot
|
|
4576
4692
|
${(0,l.slotted)({property:"defaultSlottedNodes",filter:a.whitespaceFilter})}
|
|
@@ -4648,10 +4764,10 @@
|
|
|
4648
4764
|
</${e}-button>
|
|
4649
4765
|
`)}
|
|
4650
4766
|
</${e}-search-bar-combobox>
|
|
4651
|
-
`,
|
|
4652
|
-
${e=>
|
|
4653
|
-
`,
|
|
4654
|
-
${
|
|
4767
|
+
`,Lu=l.html`
|
|
4768
|
+
${e=>Au(I(e))}
|
|
4769
|
+
`,Nu=10,Fu=3,Mu=1,_u=(e,t)=>(new J.b).withExpression((new X.K).withField(e).withValue(t).withSerialiser(K.n.containsIgnoreCase).build()).build();class Pu extends a.FoundationElement{constructor(){super(...arguments),this.searchTerm="",this.appearance="neutral",this.minlength=Fu,this.position=Yt.BELOW,this.placeholder="Start typing to search",this.clearButton=!0,this.selectedOptions=[],this.normalizeDelimiter=e=>e.trim().replace(/\t|\r\n|\n|\r|,/g," "),this.addOrReplaceSelectedText=(e,t,i)=>(null==t?void 0:t.length)>0?e.replace(t,i):e.concat(i)}clear(){this.selectedOptions=[],this.searchTerm="",this.combobox&&(this.combobox.currentValue="",this.combobox.value=""),this.$emit("selectionChange",[])}clearSearch(){this.clear()}get showClearAffordance(){var e,t,i;if(!this.clearButton)return!1;const o=(null!==(i=null!==(e=this.searchTerm)&&void 0!==e?e:null===(t=this.combobox)||void 0===t?void 0:t.value)&&void 0!==i?i:"").trim();return this.selectedOptions.length>0||o.length>0}get allSearchFieldsUsed(){var e;return!!(null===(e=this.options)||void 0===e?void 0:e.length)&&this.options.every(e=>this.selectedOptions.some(t=>t.field===e.field))}isOptionEnabled(e){return e.isEnabled?e.isEnabled(this.searchTerm,this.selectedOptions,this.minlength):this.searchTerm.length>=this.minlength&&!this.selectedOptions.some(t=>t.field===e.field)}selectedOptionsChanged(){this.applySearchInputLock()}optionsChanged(){this.applySearchInputLock()}applySearchInputLock(){this.combobox&&this.allSearchFieldsUsed&&(this.searchTerm="",this.combobox.value="",this.combobox.currentValue="",this.combobox.open=!1,this.filteredOptions=[])}inputdeleted(){this.selectedOptions.length>0&&this.unselectOption(this.selectedOptions[this.selectedOptions.length-1])}changeHandler(){const e=[];this.combobox.selectedOptions.forEach(t=>{var i,o,n;const s=t.value,a=this.searchTerm.trim();e.push({field:s,term:a,label:(null===(i=this.options.find(e=>e.field===s))||void 0===i?void 0:i.label(a))||t.text,createCriteria:null===(o=this.options.find(e=>e.field===s))||void 0===o?void 0:o.createCriteria,resourceType:null===(n=this.options.find(e=>e.field===s))||void 0===n?void 0:n.resourceType})}),this.selectedOptions=[...this.selectedOptions,...e],this.selectedOptions=this.selectedOptions.filter((e,t,i)=>t===i.findIndex(t=>e.field===t.field&&e.term===t.term)),this.combobox.value="",this.combobox.open=!1,this.$emit("selectionChange",this.selectedOptions),l.DOM.queueUpdate(()=>{setTimeout(()=>{this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth,0)},Nu)})}pasteHandler(e){var t;if(this.allSearchFieldsUsed)return void e.preventDefault();this.loading=!0;const i=e.clipboardData.getData("text/plain"),o=this.normalizeDelimiter(i),n=null===(t=window.getSelection())||void 0===t?void 0:t.toString(),s=this.addOrReplaceSelectedText(this.combobox.value,n,o);(null==s?void 0:s.length)>=this.minlength&&(this.combobox.value=s,this.searchTerm=s,this.options&&this.filterSelectedOptions(s),this.combobox.open=!0),this.loading=!1}hasSelectedOption(e,t){return this.selectedOptions.some(i=>i.term===e&&i.field===t)}unselectOption(e){this.selectedOptions=this.selectedOptions.filter(t=>t!==e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){return(0,C.sH)(this,void 0,void 0,function*(){this.allSearchFieldsUsed?this.applySearchInputLock():(this.loading=!0,this.searchTerm=this.combobox.value,this.combobox.value.length>=this.minlength&&this.filterSelectedOptions(this.combobox.value),this.loading=!1)})}filterSelectedOptions(e){this.filteredOptions=this.options.filter(t=>!this.selectedOptions.find(i=>i.field===t.field&&i.term.trim()===e.trim()))}}(0,C.Cg)([l.observable],Pu.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Pu.prototype,"options",void 0),(0,C.Cg)([l.observable],Pu.prototype,"searchTerm",void 0),(0,C.Cg)([l.attr],Pu.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Pu.prototype,"minlength",void 0),(0,C.Cg)([l.attr],Pu.prototype,"position",void 0),(0,C.Cg)([l.attr],Pu.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Pu.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"clear-button",mode:"boolean"})],Pu.prototype,"clearButton",void 0),(0,C.Cg)([l.observable],Pu.prototype,"loading",void 0),(0,C.Cg)([l.observable],Pu.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Pu.prototype,"filteredOptions",void 0);const Hu=void 0,zu={},Uu=Pu.compose(Object.assign({baseName:"search-bar",template:Lu,styles:Du,shadowOptions:Hu},zu)),Bu=(e,t)=>l.css`
|
|
4770
|
+
${Oi(e,t)}
|
|
4655
4771
|
.control {
|
|
4656
4772
|
width: auto;
|
|
4657
4773
|
padding-left: calc(${r.designUnit} * 1px);
|
|
@@ -4687,7 +4803,7 @@
|
|
|
4687
4803
|
:host(.input-locked) .selected-value {
|
|
4688
4804
|
display: none;
|
|
4689
4805
|
}
|
|
4690
|
-
`,
|
|
4806
|
+
`,Vu=(e,t)=>l.html`
|
|
4691
4807
|
<template
|
|
4692
4808
|
aria-disabled="${e=>e.ariaDisabled}"
|
|
4693
4809
|
autocomplete="${e=>e.autocomplete}"
|
|
@@ -4739,7 +4855,7 @@
|
|
|
4739
4855
|
></slot>
|
|
4740
4856
|
</div>
|
|
4741
4857
|
</template>
|
|
4742
|
-
`,
|
|
4858
|
+
`,Gu=new Set(["Backspace","Delete","Tab","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]);class ju extends r.Combobox{constructor(){super(...arguments),this.minlength=Mu,this.previousLength=-1,this.changeListener=e=>{this.previousLength=0}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",this.changeListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this.changeListener)}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest("option,[role=option]");if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.value=this.control.value,this.$emit("change")}this.control.focus()}}keyupHandler(e){switch(e.key){case"Backspace":case"Delete":this.previousLength<0?this.$emit("inputdeleted"):this.previousLength=this.previousLength-1;break;case"Enter":if(this.open&&-1!==this.selectedIndex){const e=this.slottedOptions[0];this.selectedOptions=[e],this.control.value=e.text,this.value=this.control.value,this.$emit("change")}}super.keyupHandler(e)}keydownHandler(e){const t=e.key;if(this.inputLocked){const i=e.ctrlKey||e.metaKey||e.altKey;if(!(Gu.has(t)||i))return e.preventDefault(),!1}switch(t){case"ArrowUp":case"ArrowDown":return this.control.value.length<this.minlength?void 0:super.keydownHandler(e);case"Enter":return-1!==this.selectedIndex&&super.keydownHandler(e);case"Tab":if(!this.open)return!0;e.shiftKey?this.selectPreviousOption():this.selectNextOption();break;default:return super.keydownHandler(e)}}inputHandler(e){if(this.inputLocked)return this.control.value="",this.value="",this.open=!1,void e.stopImmediatePropagation();this.control.value.length>=this.minlength?this.open=!0:(e.stopImmediatePropagation(),this.open=!1),this.value=this.control.value,this.previousLength=this.control.value.length}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),void this.focusAndScrollOptionIntoView();this.ariaControls="",this.ariaExpanded="false"}}(0,C.Cg)([l.attr],ju.prototype,"minlength",void 0),(0,C.Cg)([l.observable],ju.prototype,"inputLocked",void 0);const Yu={delegatesFocus:!0,mode:"open"},Wu={},qu=ju.compose(Object.assign({baseName:"search-bar-combobox",template:Vu,styles:Bu,shadowOptions:Yu},Wu)),Ku=l.css`
|
|
4743
4859
|
:host {
|
|
4744
4860
|
display: block;
|
|
4745
4861
|
width: 100%;
|
|
@@ -4931,8 +5047,8 @@
|
|
|
4931
5047
|
.section-link.state-none {
|
|
4932
5048
|
color: var(--neutral-foreground-rest);
|
|
4933
5049
|
}
|
|
4934
|
-
`,
|
|
4935
|
-
${e=>{return t=
|
|
5050
|
+
`,Xu=l.html`
|
|
5051
|
+
${e=>{return t=I(e),l.html`
|
|
4936
5052
|
<template>
|
|
4937
5053
|
<div
|
|
4938
5054
|
class="section-navigator-container"
|
|
@@ -4976,7 +5092,7 @@
|
|
|
4976
5092
|
</div>
|
|
4977
5093
|
</template>
|
|
4978
5094
|
`;var t}}
|
|
4979
|
-
`,ju=(0,it.createLogger)("SectionNavigator"),Yu="section-navigator",Wu={setState:`${Yu}-set-state`,setStates:`${Yu}-set-states`,clearState:`${Yu}-clear-state`,clearAllStates:`${Yu}-clear-all-states`},qu={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},Ku={active:{name:"circle-dot",variant:"solid"},inactive:{name:"times-circle",variant:"regular"},pending:{name:"clock",variant:"solid"},disabled:{name:"ban",variant:"solid"},error:{name:"times",variant:"solid"},completed:{name:"check",variant:"solid"}};class Xu extends a.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=qu,this.stateIcons=Ku,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=""}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections))return ju.warn("Sections must be an array"),void(this.sectionItems=[]);this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(this.sectionContent){if(null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0,"top"===this.scrollBehavior)try{const e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(".content-section:last-child");if(t){const i=t.offsetHeight,o=20,n=Math.max(0,e-i-o);this.spacerElement=document.createElement("div"),this.spacerElement.className="scroll-spacer",this.spacerElement.style.height=`${n}px`,this.spacerElement.style.pointerEvents="none",this.sectionContent.appendChild(this.spacerElement)}}catch(e){ju.error("Error updating spacer:",e)}}else ju.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void ju.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){ju.error("Error scrolling to section:",e)}else ju.warn("Section content not available")}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(this.sectionContent)try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},Xu.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener("scroll",this.scrollCheckHandler,{passive:!0});const e=()=>{this.isUserScrolling=!0},t=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};let i;this.sectionContent.addEventListener("wheel",e,{passive:!0}),this.sectionContent.addEventListener("touchstart",e,{passive:!0}),this.sectionContent.addEventListener("mousedown",e,{passive:!0}),this.sectionContent.addEventListener("scrollend",t,{passive:!0}),this.sectionContent.addEventListener("scroll",()=>{clearTimeout(i),i=window.setTimeout(t,Xu.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){ju.error("Error setting up scroll detection:",e)}else ju.warn("Section content not available for scroll detection")}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;const e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2;let t=null,i=1/0;this.sectionItems.forEach(o=>{const n=this.sectionContent.querySelector(`[data-section="${o.name}"]`);if(n){const s=n.offsetTop+n.clientHeight/2,a=Math.abs(s-e);a<i&&(i=a,t=o.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener("scroll",this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){this.sectionContent?(this.handleSetStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.addState(t,i)}catch(e){ju.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){ju.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){ju.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){ju.error("Error handling clear-all-states event:",e)}},this.handleGenericStateEventRef=e=>{try{const t=e.type,i=e.detail;if(null==i?void 0:i.sectionName)return;const o=e.target.closest("[data-section]");let n=null==o?void 0:o.getAttribute("data-section");if(!n){const t=e.target.closest("[slot]");n=(null==t?void 0:t.getAttribute("slot"))||this.activeSection}n||(n=this.activeSection),e.stopPropagation(),e.preventDefault();const s=Object.assign(Object.assign({},i),{sectionName:n}),a=new CustomEvent(t,{detail:s,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){ju.error("Error handling generic state event:",e)}},this.addEventListener(Wu.setState,this.handleSetStateRef),this.addEventListener(Wu.setStates,this.handleSetStatesRef),this.addEventListener(Wu.clearState,this.handleClearStateRef),this.addEventListener(Wu.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(Wu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Wu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Wu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Wu.clearAllStates,this.handleGenericStateEventRef,!0)):ju.warn("Section content not available for event listeners")}updateSectionStates(e,t){const i=this.sectionItems.findIndex(t=>t.name===e);if(-1!==i){const e=Object.assign(Object.assign({},this.sectionItems[i]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,i),e,...this.sectionItems.slice(i+1)]}}addState(e,t){if(!e||!t)return void ju.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ju.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[];if(!o.includes(t)){const i=[...o,t];this.updateSectionStates(e,i)}}addStates(e,t){if(!e||!Array.isArray(t))return void ju.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ju.warn(`Section "${e}" not found`);const o=[...this.sectionItems[i].states||[]];t.forEach(e=>{o.includes(e)||o.push(e)}),this.updateSectionStates(e,o)}clearState(e,t){if(!e||!t)return void ju.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ju.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[],n=o.indexOf(t);if(n>-1){const t=o.filter((e,t)=>t!==n);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e)return void ju.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):ju.warn(`Section "${e}" not found`)}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||"":(ju.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return ju.warn("Section is required"),"state-none";const t=e.states||[];if(0===t.length)return"state-none";if(t.length>1)return"state-multiple";return`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||Ku[e]:(ju.warn("State name is required"),Ku.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(Wu.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(Wu.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(Wu.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(Wu.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(Wu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Wu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Wu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Wu.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}Xu.SCROLL_END_TIMEOUT=150,Xu.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],Xu.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],Xu.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],Xu.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],Xu.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],Xu.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],Xu.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],Xu.prototype,"activeSection",void 0);const Ju={mode:"open"},Qu={},Zu=Xu.compose(Object.assign({baseName:"foundation-section-navigator",template:Gu,styles:Vu,shadowOptions:Ju},Qu)),eh=(e,t)=>l.css`
|
|
5095
|
+
`,Ju=(0,lt.createLogger)("SectionNavigator"),Qu="section-navigator",Zu={setState:`${Qu}-set-state`,setStates:`${Qu}-set-states`,clearState:`${Qu}-clear-state`,clearAllStates:`${Qu}-clear-all-states`},eh={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},th={active:{name:"circle-dot",variant:"solid"},inactive:{name:"times-circle",variant:"regular"},pending:{name:"clock",variant:"solid"},disabled:{name:"ban",variant:"solid"},error:{name:"times",variant:"solid"},completed:{name:"check",variant:"solid"}};class ih extends a.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=eh,this.stateIcons=th,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=""}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections))return Ju.warn("Sections must be an array"),void(this.sectionItems=[]);this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(this.sectionContent){if(null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0,"top"===this.scrollBehavior)try{const e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(".content-section:last-child");if(t){const i=t.offsetHeight,o=20,n=Math.max(0,e-i-o);this.spacerElement=document.createElement("div"),this.spacerElement.className="scroll-spacer",this.spacerElement.style.height=`${n}px`,this.spacerElement.style.pointerEvents="none",this.sectionContent.appendChild(this.spacerElement)}}catch(e){Ju.error("Error updating spacer:",e)}}else Ju.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void Ju.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){Ju.error("Error scrolling to section:",e)}else Ju.warn("Section content not available")}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(this.sectionContent)try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},ih.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener("scroll",this.scrollCheckHandler,{passive:!0});const e=()=>{this.isUserScrolling=!0},t=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};let i;this.sectionContent.addEventListener("wheel",e,{passive:!0}),this.sectionContent.addEventListener("touchstart",e,{passive:!0}),this.sectionContent.addEventListener("mousedown",e,{passive:!0}),this.sectionContent.addEventListener("scrollend",t,{passive:!0}),this.sectionContent.addEventListener("scroll",()=>{clearTimeout(i),i=window.setTimeout(t,ih.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){Ju.error("Error setting up scroll detection:",e)}else Ju.warn("Section content not available for scroll detection")}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;const e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2;let t=null,i=1/0;this.sectionItems.forEach(o=>{const n=this.sectionContent.querySelector(`[data-section="${o.name}"]`);if(n){const s=n.offsetTop+n.clientHeight/2,a=Math.abs(s-e);a<i&&(i=a,t=o.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener("scroll",this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){this.sectionContent?(this.handleSetStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.addState(t,i)}catch(e){Ju.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){Ju.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){Ju.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){Ju.error("Error handling clear-all-states event:",e)}},this.handleGenericStateEventRef=e=>{try{const t=e.type,i=e.detail;if(null==i?void 0:i.sectionName)return;const o=e.target.closest("[data-section]");let n=null==o?void 0:o.getAttribute("data-section");if(!n){const t=e.target.closest("[slot]");n=(null==t?void 0:t.getAttribute("slot"))||this.activeSection}n||(n=this.activeSection),e.stopPropagation(),e.preventDefault();const s=Object.assign(Object.assign({},i),{sectionName:n}),a=new CustomEvent(t,{detail:s,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){Ju.error("Error handling generic state event:",e)}},this.addEventListener(Zu.setState,this.handleSetStateRef),this.addEventListener(Zu.setStates,this.handleSetStatesRef),this.addEventListener(Zu.clearState,this.handleClearStateRef),this.addEventListener(Zu.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(Zu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Zu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Zu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Zu.clearAllStates,this.handleGenericStateEventRef,!0)):Ju.warn("Section content not available for event listeners")}updateSectionStates(e,t){const i=this.sectionItems.findIndex(t=>t.name===e);if(-1!==i){const e=Object.assign(Object.assign({},this.sectionItems[i]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,i),e,...this.sectionItems.slice(i+1)]}}addState(e,t){if(!e||!t)return void Ju.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Ju.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[];if(!o.includes(t)){const i=[...o,t];this.updateSectionStates(e,i)}}addStates(e,t){if(!e||!Array.isArray(t))return void Ju.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Ju.warn(`Section "${e}" not found`);const o=[...this.sectionItems[i].states||[]];t.forEach(e=>{o.includes(e)||o.push(e)}),this.updateSectionStates(e,o)}clearState(e,t){if(!e||!t)return void Ju.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Ju.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[],n=o.indexOf(t);if(n>-1){const t=o.filter((e,t)=>t!==n);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e)return void Ju.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):Ju.warn(`Section "${e}" not found`)}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||"":(Ju.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return Ju.warn("Section is required"),"state-none";const t=e.states||[];if(0===t.length)return"state-none";if(t.length>1)return"state-multiple";return`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||th[e]:(Ju.warn("State name is required"),th.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(Zu.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(Zu.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(Zu.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(Zu.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(Zu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Zu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Zu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Zu.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}ih.SCROLL_END_TIMEOUT=150,ih.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],ih.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],ih.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],ih.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],ih.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],ih.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],ih.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],ih.prototype,"activeSection",void 0);const oh={mode:"open"},nh={},sh=ih.compose(Object.assign({baseName:"foundation-section-navigator",template:Xu,styles:Ku,shadowOptions:oh},nh)),ah=(e,t)=>l.css`
|
|
4980
5096
|
${(0,r.radioGroupStyles)(e,t)}
|
|
4981
5097
|
::slotted(foundation-segmented-item:first-of-type) {
|
|
4982
5098
|
border-radius: calc(var(--control-corner-radius) * 1px) 0 0
|
|
@@ -4989,7 +5105,7 @@
|
|
|
4989
5105
|
calc(var(--control-corner-radius) * 1px) 0;
|
|
4990
5106
|
border-left-width: 0;
|
|
4991
5107
|
}
|
|
4992
|
-
`,
|
|
5108
|
+
`,rh=(e,t)=>(0,a.radioGroupTemplate)(e,t);class lh extends a.RadioGroup{valueChanged(){void 0===this.value&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}}const dh=void 0,ch={},uh=lh.compose(Object.assign({baseName:"segmented-control",template:rh,styles:ah,shadowOptions:dh},ch)),hh=(e,t)=>l.css`
|
|
4993
5109
|
${(0,r.radioStyles)(e,t)}
|
|
4994
5110
|
:host {
|
|
4995
5111
|
padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
|
|
@@ -5000,7 +5116,7 @@
|
|
|
5000
5116
|
:host([aria-checked='true']) {
|
|
5001
5117
|
background: var(--accent-foreground-rest);
|
|
5002
5118
|
}
|
|
5003
|
-
`,
|
|
5119
|
+
`,ph=(e,t)=>l.html`
|
|
5004
5120
|
<template
|
|
5005
5121
|
role="radio"
|
|
5006
5122
|
aria-checked="${e=>e.checked}"
|
|
@@ -5014,7 +5130,7 @@
|
|
|
5014
5130
|
<slot></slot>
|
|
5015
5131
|
</span>
|
|
5016
5132
|
</template>
|
|
5017
|
-
`;class
|
|
5133
|
+
`;class mh extends r.Radio{}const gh=void 0,vh={},fh=mh.compose(Object.assign({baseName:"segmented-item",template:ph,styles:hh,shadowOptions:gh},vh)),bh=(e,t)=>l.css`
|
|
5018
5134
|
${(0,r.selectStyles)(e,t)}
|
|
5019
5135
|
|
|
5020
5136
|
:host(:not([size]):not([multiple]):not([open]):focus-visible),
|
|
@@ -5024,19 +5140,19 @@
|
|
|
5024
5140
|
box-shadow: none;
|
|
5025
5141
|
outline: none;
|
|
5026
5142
|
}
|
|
5027
|
-
`,
|
|
5143
|
+
`,yh=(e,t)=>(0,a.selectTemplate)(e,t);class wh extends r.Select{get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}slottedOptionsChanged(e,t){const i=this.value;super.slottedOptionsChanged(e,t),this.selectedIndex=-1;const o=[];this.slottedOptions&&this.slottedOptions.forEach(e=>{const t=e.nodeName.toLowerCase();if(t.endsWith("-optgroup")){const t=Array.from(e.children).filter(e=>{const t=e.nodeName.toLowerCase();return"option"===e.getAttribute("role")||t.endsWith("-option")});o.push(...t)}else("option"===e.getAttribute("role")||t.endsWith("-option"))&&o.push(e)}),this.options=o,i&&(this.value=i),-1===this.selectedIndex&&this.options.length>0&&(this.selectedIndex=0)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(function(e){const t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement:document.activeElement}(this))&&null!==e&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest"})}))}openChanged(e,t){if(this.collapsible){if(this.$emit("open-change",{open:this.open}),this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void l.DOM.queueUpdate(()=>this.focus());this.ariaControls="",this.ariaExpanded="false"}}keydownHandler(e){switch(e.key){case"ArrowDown":case"ArrowUp":if(this.open){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView({block:"center",behavior:"auto"})}else this.open=!0}return super.keydownHandler(e)}}const Ch=void 0,xh={indicator:'\n <svg\n class="select-indicator"\n part="select-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},$h=wh.compose(Object.assign({baseName:"select",template:yh,styles:bh,shadowOptions:Ch},xh)),Sh=(e,t)=>l.css`
|
|
5028
5144
|
${(0,r.skeletonStyles)(e,t)}
|
|
5029
|
-
`,
|
|
5145
|
+
`,Eh=(e,t)=>(0,a.skeletonTemplate)(e,t);class Oh extends r.Skeleton{}const Th=void 0,kh={},Dh=Oh.compose(Object.assign({baseName:"skeleton",template:Eh,styles:Sh,shadowOptions:Th},kh)),Ih=(e,t)=>l.css`
|
|
5030
5146
|
${(0,r.sliderStyles)(e,t)}
|
|
5031
5147
|
.track-progress {
|
|
5032
5148
|
background-color: var(--accent-fill-rest);
|
|
5033
5149
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
5034
5150
|
}
|
|
5035
|
-
`;var
|
|
5151
|
+
`;var Rh=i(17733);const Ah=(e,t)=>l.html`
|
|
5036
5152
|
<template
|
|
5037
5153
|
role="slider"
|
|
5038
5154
|
class="${e=>e.readOnly?"readonly":""}
|
|
5039
|
-
${e=>e.orientation||
|
|
5155
|
+
${e=>e.orientation||Rh.t.horizontal}"
|
|
5040
5156
|
tabindex="${e=>e.disabled?null:0}"
|
|
5041
5157
|
aria-valuetext="${e=>e.valueTextFormatter(e.value)}"
|
|
5042
5158
|
aria-valuenow="${e=>e.value}"
|
|
@@ -5051,7 +5167,7 @@
|
|
|
5051
5167
|
<div ${(0,l.ref)("track")} part="track-container" class="track">
|
|
5052
5168
|
<div
|
|
5053
5169
|
class="track-progress"
|
|
5054
|
-
style="${e=>{const t=1-(0,
|
|
5170
|
+
style="${e=>{const t=1-(0,x.AB)(0,1,(parseInt(e.value)-e.min)/(e.max-e.min)),i=Math.round(100*(1-t));return"horizontal"===e.orientation?e.isDragging?`height: calc(var(--track-width) * 1px); width: ${i}%;`:`height: calc(var(--track-width) * 1px); width: ${i}%; transition: all 0.2s ease;`:e.isDragging?`width: calc(var(--track-width) * 1px); height: ${i}%;`:`width: calc(var(--track-width) * 1px); height: ${i}%; transition: all 0.2s ease;`}}"
|
|
5055
5171
|
></div>
|
|
5056
5172
|
</div>
|
|
5057
5173
|
<slot></slot>
|
|
@@ -5065,9 +5181,9 @@
|
|
|
5065
5181
|
</div>
|
|
5066
5182
|
</div>
|
|
5067
5183
|
</template>
|
|
5068
|
-
`;class
|
|
5184
|
+
`;class Lh extends r.Slider{}const Nh=void 0,Fh={thumb:'\n <div class="thumb-cursor"></div>\n '},Mh=Lh.compose(Object.assign({baseName:"slider",template:Ah,styles:Ih,shadowOptions:Nh},Fh)),_h=(e,t)=>l.css`
|
|
5069
5185
|
${(0,r.sliderLabelStyles)(e,t)}
|
|
5070
|
-
`,
|
|
5186
|
+
`,Ph=(e,t)=>(0,a.sliderLabelTemplate)(e,t);class Hh extends r.SliderLabel{}const zh=void 0,Uh={},Bh=Hh.compose(Object.assign({baseName:"slider-label",template:Ph,styles:_h,shadowOptions:zh},Uh)),Vh="default",Gh={DEFAULT:Vh,ERROR:"error",SUCCESS:"success"},jh=1e4,Yh={DISMISS:"dismiss",AUTO_DISMISS:"autoDismiss"},Wh=l.css`
|
|
5071
5187
|
@keyframes append-from-left-animate {
|
|
5072
5188
|
from {
|
|
5073
5189
|
transform: translateX(100%);
|
|
@@ -5188,7 +5304,7 @@
|
|
|
5188
5304
|
flex: 1;
|
|
5189
5305
|
overflow: hidden;
|
|
5190
5306
|
}
|
|
5191
|
-
`,
|
|
5307
|
+
`,qh=e=>l.html`
|
|
5192
5308
|
<div
|
|
5193
5309
|
role="alert"
|
|
5194
5310
|
aria-live="polite"
|
|
@@ -5217,10 +5333,10 @@
|
|
|
5217
5333
|
</div>
|
|
5218
5334
|
`)}
|
|
5219
5335
|
</div>
|
|
5220
|
-
`,
|
|
5221
|
-
${e=>
|
|
5222
|
-
`,
|
|
5223
|
-
${
|
|
5336
|
+
`,Kh=l.html`
|
|
5337
|
+
${e=>qh(I(e))}
|
|
5338
|
+
`,Xh={mode:"open",delegatesFocus:!0};class Jh extends a.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=jh,this.autoClose=!0,this.type=Vh,this.dismissEventListener=this.handleDissmis.bind(this)}autoCloseChanged(){this.autoClose&&(this.timeoutRef=setTimeout(()=>{this.handleDissmis(!0)},this.closeTimeout)),!this.autoClose&&this.timeoutRef&&clearTimeout(this.timeoutRef)}connectedCallback(){super.connectedCallback(),this.addEventListener(Yh.DISMISS,this.dismissEventListener)}errorChanged(e,t){var i,o,n;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:Vh}notificationChanged(e,t){var i,o,n,s,a,r,l,d,c;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:Vh,this.autoClose=null===(r=null===(a=null===(s=null==t?void 0:t.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.autoClose)||void 0===r||r,this.closeTimeout=null!==(c=null===(d=null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.snackbar)||void 0===d?void 0:d.closeTimeout)&&void 0!==c?c:jh}handleDissmis(e=!1){this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(Yh.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Yh.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}}(0,C.Cg)([l.observable],Jh.prototype,"error",void 0),(0,C.Cg)([l.observable],Jh.prototype,"notification",void 0),(0,C.Cg)([l.observable],Jh.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"identifier"})],Jh.prototype,"identifier",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],Jh.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Jh.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],Jh.prototype,"type",void 0);const Qh=Jh.compose({baseName:"snackbar",styles:Wh,template:Kh,shadowOptions:Xh}),Zh=(e,t)=>l.css`
|
|
5339
|
+
${Tr()}
|
|
5224
5340
|
|
|
5225
5341
|
.fa-stack {
|
|
5226
5342
|
display: inline-block;
|
|
@@ -5245,14 +5361,14 @@
|
|
|
5245
5361
|
.fa-stack-1x {
|
|
5246
5362
|
z-index: 1;
|
|
5247
5363
|
}
|
|
5248
|
-
`,
|
|
5364
|
+
`,ep=l.html`
|
|
5249
5365
|
<span
|
|
5250
5366
|
class=${e=>`fa-stack fa-${e.size}`}
|
|
5251
5367
|
style=${e=>`vertical-align: ${e["vertical-align"]};`}
|
|
5252
5368
|
>
|
|
5253
5369
|
<slot></slot>
|
|
5254
5370
|
</span>
|
|
5255
|
-
`;class
|
|
5371
|
+
`;class tp extends a.FoundationElement{constructor(){super(...arguments),this.size=Nr,this["vertical-align"]="baseline"}}(0,C.Cg)([l.attr],tp.prototype,"size",void 0),(0,C.Cg)([l.attr],tp.prototype,"vertical-align",void 0);const ip=tp.compose({baseName:"stacking-icons",template:ep,styles:Zh}),op=l.css`
|
|
5256
5372
|
.status-pill {
|
|
5257
5373
|
font-size: var(--ag-data-font-size);
|
|
5258
5374
|
display: inline-flex;
|
|
@@ -5287,8 +5403,8 @@
|
|
|
5287
5403
|
.status-pill-image {
|
|
5288
5404
|
height: 14px;
|
|
5289
5405
|
}
|
|
5290
|
-
`,
|
|
5291
|
-
${e=>{return t=
|
|
5406
|
+
`,np=l.html`
|
|
5407
|
+
${e=>{return t=I(e),l.html`
|
|
5292
5408
|
${(0,l.when)(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),l.html`
|
|
5293
5409
|
<div
|
|
5294
5410
|
data-test-id="status-pill"
|
|
@@ -5318,7 +5434,7 @@
|
|
|
5318
5434
|
</div>
|
|
5319
5435
|
`)}
|
|
5320
5436
|
`;var t}}
|
|
5321
|
-
`,
|
|
5437
|
+
`,sp=(e,t="second")=>{let i=e/1e3;const o=Math.floor(i/86400);i%=86400;const n=Math.floor(i/3600);i%=3600;const s=Math.floor(i/60),a=Math.floor(i%60),r=[];switch(o&&r.push(`${o}d`),t){case"minute":n&&r.push(`${n}h`),s&&r.push(`${s}m`),!s&&a&&r.push("< 1m");break;case"hour":n&&r.push(`${n}h`),n||!s&&!a||r.push("< 1h");break;default:n&&r.push(`${n}h`),s&&r.push(`${s}m`),a&&r.push(`${a}s`)}return r.length?r.join(" "):"0s"};class ap extends a.FoundationElement{constructor(){super(...arguments),this.iconSize="sm",this.dateCountdownCompletedMessage="Expired",this.dateCountdownUnit="second",this.hideWhenCountdownCompleted=!1,this.isCountdownExpired=!1,this.isCountdownVisible=!0}dateCountdownChanged(e,t){if(e!==t){if(!t)return void this.clearCountdownTimer();this.isCountdownExpired=!1,this.setUpDateCountdown(t)}}dateCountdownVisibleAfterChanged(e,t){e!==t&&this.updateVisibilityFromStartTime()}connectedCallback(){this.updateVisibilityFromStartTime(),super.connectedCallback()}disconnectedCallback(){this.clearCountdownTimer(),super.disconnectedCallback()}setUpDateCountdown(e){if(this.clearCountdownTimer(),isNaN(parseInt(e)))dt.warn("invalid date-countdown value passed. Must be a number");else{e=parseInt(e);const t=new Date(e);this.updateCountdown(t),this.dateInterval=setInterval(()=>this.updateCountdown(t),1e3)}}updateCountdown(e){const t=(new Date).getTime(),i=Math.floor(e.getTime()-t),o=void 0!==this.dateCountdownVisibleAfter&&null!==this.dateCountdownVisibleAfter?Number(this.dateCountdownVisibleAfter):void 0;if(void 0!==o&&!isNaN(o)&&t<o)return this.isCountdownVisible=!1,this.countdown=null,void(this.isCountdownExpired=!1);this.isCountdownVisible=!0,i<=0?this.hideWhenCountdownCompleted?(this.isCountdownExpired=!0,this.clearCountdownTimer()):(this.countdown=this.dateCountdownCompletedMessage,clearInterval(this.dateInterval)):this.countdown=sp(i,this.dateCountdownUnit)}updateVisibilityFromStartTime(){const e=void 0!==this.dateCountdownVisibleAfter&&null!==this.dateCountdownVisibleAfter?Number(this.dateCountdownVisibleAfter):void 0;if(void 0===e||isNaN(e))this.isCountdownVisible=!0;else{const t=Date.now();this.isCountdownVisible=t>=e}}clearCountdownTimer(){this.dateInterval&&(clearInterval(this.dateInterval),this.dateInterval=null),this.countdown=null}}(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],ap.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],ap.prototype,"iconName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-src"})],ap.prototype,"iconSrc",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial"})],ap.prototype,"iconInitial",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial-background-color"})],ap.prototype,"iconInitialBackgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],ap.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],ap.prototype,"textColor",void 0),(0,C.Cg)([l.attr],ap.prototype,"text",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown"})],ap.prototype,"dateCountdown",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-completed-message"})],ap.prototype,"dateCountdownCompletedMessage",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-unit"})],ap.prototype,"dateCountdownUnit",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-visible-after"})],ap.prototype,"dateCountdownVisibleAfter",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"hide-when-countdown-completed"})],ap.prototype,"hideWhenCountdownCompleted",void 0),(0,C.Cg)([l.observable],ap.prototype,"countdown",void 0),(0,C.Cg)([l.observable],ap.prototype,"isCountdownExpired",void 0),(0,C.Cg)([l.observable],ap.prototype,"isCountdownVisible",void 0);const rp=ap.compose({baseName:"status-pill",styles:op,template:np}),lp=(e,t)=>l.css`
|
|
5322
5438
|
.tree-item {
|
|
5323
5439
|
cursor: default;
|
|
5324
5440
|
}
|
|
@@ -5428,12 +5544,12 @@
|
|
|
5428
5544
|
width: calc(100% - 28px);
|
|
5429
5545
|
background-color: var(--accent-fill-rest); /* Choose a color */
|
|
5430
5546
|
}
|
|
5431
|
-
`,
|
|
5432
|
-
${(0,
|
|
5547
|
+
`,dp=(e,t)=>{const i=["step",`step-${t}`];return e.selected&&i.push("step-selected"),e.completed&&i.push("step-completed"),e.error&&i.push("step-error"),i.join(" ")},cp=["positioning-region: step-positioning-region","content-region: step-content-region","expand-collapse-button: step-expand-collapse-button","items: step-items"].join(", "),up=e=>l.html`
|
|
5548
|
+
${(0,An.q)(e=>e.orientation===a.TabsOrientation.vertical,l.html`
|
|
5433
5549
|
<${e}-tree-item ${(0,l.ref)("treeItem")}
|
|
5434
|
-
class=${e=>(0
|
|
5435
|
-
part="${e=>
|
|
5436
|
-
exportparts="${
|
|
5550
|
+
class=${e=>(0,$.x)("tree-item",["cursor-pointer",e.showCursorPointer])}
|
|
5551
|
+
part="${e=>dp(e,"vertical")}"
|
|
5552
|
+
exportparts="${cp}"
|
|
5437
5553
|
@click="${(e,t)=>e.$emit("tab-clicked",e.tabPosition-1)}">
|
|
5438
5554
|
${(0,l.when)(e=>e.completed,l.html`
|
|
5439
5555
|
<${e}-icon
|
|
@@ -5457,11 +5573,11 @@
|
|
|
5457
5573
|
</${e}-tree-item>
|
|
5458
5574
|
`,l.html`
|
|
5459
5575
|
<div
|
|
5460
|
-
class=${e=>(0
|
|
5461
|
-
part="${e=>
|
|
5576
|
+
class=${e=>(0,$.x)("step-container",["selected",e.selected])}
|
|
5577
|
+
part="${e=>dp(e,"horizontal")}"
|
|
5462
5578
|
>
|
|
5463
5579
|
<div
|
|
5464
|
-
class=${e=>(0
|
|
5580
|
+
class=${e=>(0,$.x)("step-number-container",["cursor-pointer",e.showCursorPointer])}
|
|
5465
5581
|
part="step-number-container"
|
|
5466
5582
|
@click="${e=>e.$emit("tab-clicked",e.tabPosition-1)}"
|
|
5467
5583
|
>
|
|
@@ -5481,13 +5597,13 @@
|
|
|
5481
5597
|
`)}
|
|
5482
5598
|
</div>
|
|
5483
5599
|
`)}
|
|
5484
|
-
`,
|
|
5485
|
-
${e=>
|
|
5486
|
-
`;class
|
|
5600
|
+
`,hp=l.html`
|
|
5601
|
+
${e=>up(I(e))}
|
|
5602
|
+
`;class pp extends a.FoundationElement{constructor(){super(...arguments),this.slot="tab",this.orientation=a.TabsOrientation.vertical}isCompleted(){return this.completed}selectedChanged(){this.treeItem&&(this.treeItem.selected=this.selected)}disconnectedCallback(){super.disconnectedCallback(),this.completed=void 0,this.error=void 0,this.selected=void 0}}(0,C.Cg)([l.attr],pp.prototype,"slot",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],pp.prototype,"selected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],pp.prototype,"completed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],pp.prototype,"error",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],pp.prototype,"isLast",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],pp.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],pp.prototype,"showCursorPointer",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tab-position"})],pp.prototype,"tabPosition",void 0),(0,C.Cg)([l.attr],pp.prototype,"orientation",void 0);const mp=void 0,gp={},vp=pp.compose(Object.assign({baseName:"stepper-tab",template:hp,styles:lp,shadowOptions:mp},gp)),fp=()=>l.html`
|
|
5487
5603
|
<template slot="tab-panel" role="stepper-tab-panel">
|
|
5488
5604
|
<slot></slot>
|
|
5489
5605
|
</template>
|
|
5490
|
-
`;class
|
|
5606
|
+
`;class bp extends a.FoundationElement{}const yp=void 0,wp={},Cp=bp.compose(Object.assign({baseName:"stepper-tab-panel",template:fp,shadowOptions:yp},wp)),xp=(e,t)=>l.css`
|
|
5491
5607
|
${(0,r.switchStyles)(e,t)}
|
|
5492
5608
|
.checked-indicator {
|
|
5493
5609
|
transform: scale(1.3);
|
|
@@ -5497,20 +5613,20 @@
|
|
|
5497
5613
|
.switch {
|
|
5498
5614
|
border-radius: calc(var(--control-corner-radius) * 3px);
|
|
5499
5615
|
}
|
|
5500
|
-
|
|
5616
|
+
`,$p=(e,t)=>(0,a.switchTemplate)(e,t);class Sp extends r.Switch{}const Ep=void 0,Op={switch:'<div class="checked-indicator" part="checked-indicator"></div>'},Tp=Sp.compose(Object.assign({baseName:"switch",template:$p,styles:xp,shadowOptions:Ep},Op)),kp="--alert-flash-t",Dp="--alert-flash-duration",Ip="alert-flash-clock";let Rp=!1;function Ap(){var e;if(!Rp&&"undefined"!=typeof document){Rp=!0;try{CSS.registerProperty({name:kp,syntax:"<number>",inherits:!0,initialValue:"0"});const t=new CSSStyleSheet;t.replaceSync(`\n @keyframes ${Ip} {\n 0%, 100% { ${kp}: 0; }\n 50% { ${kp}: 1; }\n }\n\n :root {\n animation: ${Ip} var(${Dp}, 1s) ease-in-out\n infinite;\n }\n\n @media (prefers-reduced-motion: reduce) {\n :root {\n animation: none;\n }\n }\n `),document.adoptedStyleSheets=[...null!==(e=document.adoptedStyleSheets)&&void 0!==e?e:[],t]}catch(e){}}}const Lp=(e,t)=>l.css`
|
|
5501
5617
|
${(0,r.tabStyles)(e,t)}
|
|
5502
5618
|
|
|
5503
5619
|
:host {
|
|
5504
5620
|
user-select: none;
|
|
5505
5621
|
}
|
|
5506
|
-
`,
|
|
5622
|
+
`,Np=(e,t)=>(0,a.tabTemplate)(e,t);class Fp extends r.Tab{constructor(){super(...arguments),this.alert=!1}alertChanged(){this.alert&&Ap()}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Fp.prototype,"alert",void 0);const Mp=void 0,_p={},Pp=Fp.compose(Object.assign({baseName:"tab",template:Np,styles:Lp,shadowOptions:Mp},_p)),Hp=(e,t)=>l.css`
|
|
5507
5623
|
${(0,r.tabPanelStyles)(e,t)}
|
|
5508
5624
|
|
|
5509
5625
|
:host {
|
|
5510
5626
|
height: 100%;
|
|
5511
5627
|
padding: 0;
|
|
5512
5628
|
}
|
|
5513
|
-
`,
|
|
5629
|
+
`,zp=(e,t)=>(0,a.tabPanelTemplate)(e,t);class Up extends r.TabPanel{}const Bp=void 0,Vp={},Gp=Up.compose(Object.assign({baseName:"tab-panel",template:zp,styles:Hp,shadowOptions:Bp},Vp)),jp=(e,t)=>l.css`
|
|
5514
5630
|
${(0,r.tabsStyles)(e,t)}
|
|
5515
5631
|
|
|
5516
5632
|
:host {
|
|
@@ -5526,22 +5642,22 @@
|
|
|
5526
5642
|
:host([scrollable]) ::slotted([role='tab']) {
|
|
5527
5643
|
flex: 0 0 auto;
|
|
5528
5644
|
}
|
|
5529
|
-
`,
|
|
5645
|
+
`,Yp=(e,t)=>(0,a.tabsTemplate)(e,t);class Wp extends r.Tabs{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wp.prototype,"scrollable",void 0);const qp=void 0,Kp={},Xp=Wp.compose(Object.assign({baseName:"tabs",template:Yp,styles:jp,shadowOptions:qp},Kp)),Jp=(e,t)=>l.css`
|
|
5530
5646
|
${(0,r.textAreaStyles)(e,t)}
|
|
5531
5647
|
:host .control {
|
|
5532
5648
|
padding: calc(var(--design-unit) * 3px);
|
|
5533
5649
|
}
|
|
5534
|
-
`,
|
|
5650
|
+
`,Qp=(e,t)=>(0,a.textAreaTemplate)(e,t);class Zp extends r.TextArea{}const em=void 0,tm={},im=Zp.compose(Object.assign({baseName:"text-area",template:Qp,styles:Jp,shadowOptions:em},tm)),{create:om}=a.DesignToken,nm=om("active-color-scheme").withDefault(e=>r.baseLayerLuminance.getValueFor(e)===r.StandardLuminance.LightMode?"light":"dark"),sm=(e,t)=>l.css`
|
|
5535
5651
|
${(0,r.textFieldStyles)(e,t)}
|
|
5536
5652
|
/* Override FAST .root align-items: baseline for this flex child so it still fills the row. */
|
|
5537
|
-
${
|
|
5653
|
+
${kl}
|
|
5538
5654
|
|
|
5539
5655
|
input {
|
|
5540
|
-
color-scheme: ${
|
|
5656
|
+
color-scheme: ${nm};
|
|
5541
5657
|
}
|
|
5542
|
-
`,
|
|
5658
|
+
`,am=(e,t)=>l.html`
|
|
5543
5659
|
<template
|
|
5544
|
-
class="${e=>(0
|
|
5660
|
+
class="${e=>(0,$.x)(["readonly",e.readOnly],["has-prefix",!!e.prefix],["has-suffix",!!e.suffix])}"
|
|
5545
5661
|
>
|
|
5546
5662
|
<label
|
|
5547
5663
|
part="label"
|
|
@@ -5621,7 +5737,7 @@
|
|
|
5621
5737
|
${(0,a.endSlotTemplate)(e,t)}
|
|
5622
5738
|
</div>
|
|
5623
5739
|
</template>
|
|
5624
|
-
`;class
|
|
5740
|
+
`;class rm extends(Tl(r.TextField)){constructor(){super(...arguments),this.autocomplete="off",this.autocapitalize="off"}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}autocapitalizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocapitalize=this.autocapitalize)}}(0,C.Cg)([l.attr],rm.prototype,"autocomplete",void 0),(0,C.Cg)([l.attr],rm.prototype,"autocapitalize",void 0),(0,C.Cg)([l.attr],rm.prototype,"step",void 0);const lm={mode:"open",delegatesFocus:!0},dm={},cm=rm.compose(Object.assign({baseName:"text-field",template:am,styles:sm,shadowOptions:lm},dm)),um=l.css`
|
|
5625
5741
|
@keyframes append-animate {
|
|
5626
5742
|
from {
|
|
5627
5743
|
transform: translateX(100%);
|
|
@@ -5732,7 +5848,7 @@
|
|
|
5732
5848
|
margin-left: auto;
|
|
5733
5849
|
color: #879ba6;
|
|
5734
5850
|
}
|
|
5735
|
-
`,
|
|
5851
|
+
`,hm=(e="rapid")=>l.html`
|
|
5736
5852
|
<div
|
|
5737
5853
|
role="alert"
|
|
5738
5854
|
part="root"
|
|
@@ -5759,13 +5875,13 @@
|
|
|
5759
5875
|
</div>
|
|
5760
5876
|
</div>
|
|
5761
5877
|
</div>
|
|
5762
|
-
`,
|
|
5763
|
-
${e=>
|
|
5764
|
-
`,
|
|
5878
|
+
`,pm=l.html`
|
|
5879
|
+
${e=>hm(I(e))}
|
|
5880
|
+
`,mm={mode:"open",delegatesFocus:!0},gm={};class vm extends a.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=1e4,this.autoClose=!1,this.closeTimer=null}connectedCallback(){super.connectedCallback(),this.autoClose&&(this.closeTimer=setTimeout(()=>{this.deleteAnimation="toast-delete",this.toast.onanimationend=()=>{this.remove()}},this.closeTimeout))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.closeTimer),this.closeTimer=null}close(){this.remove()}}(0,C.Cg)([l.observable],vm.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],vm.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close"})],vm.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"notification-icon"})],vm.prototype,"notificationIcon",void 0);const fm=vm.compose(Object.assign({baseName:"toast",styles:um,template:pm,shadowOptions:mm},gm)),bm=(e,t)=>l.css`
|
|
5765
5881
|
${(0,r.toolbarStyles)(e,t)}
|
|
5766
|
-
`,
|
|
5882
|
+
`,ym=(e,t)=>(0,a.toolbarTemplate)(e,t);class wm extends r.Toolbar{}const Cm=void 0,xm={},$m=wm.compose(Object.assign({baseName:"toolbar",template:ym,styles:bm,shadowOptions:Cm},xm)),Sm=(e,t)=>l.css`
|
|
5767
5883
|
${(0,r.tooltipStyles)(e,t)}
|
|
5768
|
-
`,
|
|
5884
|
+
`,Em=(e,t)=>(0,a.tooltipTemplate)(e,t);class Om extends r.Tooltip{}const Tm=void 0,km={},Dm=Om.compose(Object.assign({baseName:"tooltip",template:Em,styles:Sm,shadowOptions:Tm},km)),Im=(e,t)=>l.css`
|
|
5769
5885
|
${(0,r.treeItemStyles)(e,t)}
|
|
5770
5886
|
:host {
|
|
5771
5887
|
--focus-stroke-width: 0;
|
|
@@ -5782,9 +5898,9 @@
|
|
|
5782
5898
|
.positioning-region {
|
|
5783
5899
|
height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);
|
|
5784
5900
|
}
|
|
5785
|
-
`,
|
|
5901
|
+
`,Rm=(e,t)=>(0,a.treeItemTemplate)(e,t);class Am extends r.TreeItem{}const Lm=void 0,Nm={expandCollapseGlyph:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">\n <path d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"></path>\n </svg>'},Fm=Am.compose(Object.assign({baseName:"tree-item",template:Rm,styles:Im,shadowOptions:Lm},Nm)),Mm=(e,t)=>l.css`
|
|
5786
5902
|
${(0,r.treeViewStyles)(e,t)}
|
|
5787
|
-
`,
|
|
5903
|
+
`,_m=(e,t)=>(0,a.treeViewTemplate)(e,t);class Pm extends a.TreeView{}const Hm=void 0,zm={},Um=Pm.compose(Object.assign({baseName:"tree-view",template:_m,styles:Mm,shadowOptions:Hm},zm)),Bm=(e,t)=>l.css`
|
|
5788
5904
|
.container {
|
|
5789
5905
|
position: relative;
|
|
5790
5906
|
width: 100%;
|
|
@@ -5804,7 +5920,7 @@
|
|
|
5804
5920
|
overflow: hidden;
|
|
5805
5921
|
text-overflow: ellipsis;
|
|
5806
5922
|
}
|
|
5807
|
-
`,
|
|
5923
|
+
`,Vm=e=>l.html`
|
|
5808
5924
|
<div class="container" value=${e=>e.value}>
|
|
5809
5925
|
<${e}-text-field
|
|
5810
5926
|
class="url-input"
|
|
@@ -5819,9 +5935,9 @@
|
|
|
5819
5935
|
<a class="url-input-link" href=${e=>e.value} target="_blank">${e=>e.value}</a>
|
|
5820
5936
|
`)}
|
|
5821
5937
|
</div>
|
|
5822
|
-
`,
|
|
5823
|
-
${e=>
|
|
5824
|
-
`,
|
|
5938
|
+
`,Gm=l.html`
|
|
5939
|
+
${e=>Vm(I(e))}
|
|
5940
|
+
`,jm=void 0,Ym={};class Wm extends r.TextField{constructor(){super(...arguments),this.value=""}saveUrl(e){this.value=e.startsWith("http")?e:"https://"+e,this.focused=!1}focus(){this.focused=!0}}(0,C.Cg)([l.observable],Wm.prototype,"value",void 0),(0,C.Cg)([l.observable],Wm.prototype,"focused",void 0);const qm=Wm.compose(Object.assign({baseName:"url-input",template:Gm,styles:Bm,shadowOptions:jm},Ym)),Km=l.css`
|
|
5825
5941
|
:host {
|
|
5826
5942
|
display: block;
|
|
5827
5943
|
font-family: var(--body-font);
|
|
@@ -5890,7 +6006,7 @@
|
|
|
5890
6006
|
line-height: var(--type-ramp-base-line-height);
|
|
5891
6007
|
text-align: center;
|
|
5892
6008
|
outline: none;
|
|
5893
|
-
color-scheme: ${
|
|
6009
|
+
color-scheme: ${nm};
|
|
5894
6010
|
}
|
|
5895
6011
|
|
|
5896
6012
|
.digit[appearance='filled'] .root {
|
|
@@ -5924,8 +6040,8 @@
|
|
|
5924
6040
|
background: var(--neutral-fill-hover);
|
|
5925
6041
|
}
|
|
5926
6042
|
|
|
5927
|
-
${
|
|
5928
|
-
`,
|
|
6043
|
+
${kl}
|
|
6044
|
+
`,Xm=l.html`
|
|
5929
6045
|
<label
|
|
5930
6046
|
part="label"
|
|
5931
6047
|
id="${e=>e.labelId}"
|
|
@@ -5973,7 +6089,7 @@
|
|
|
5973
6089
|
</div>
|
|
5974
6090
|
`)}
|
|
5975
6091
|
</div>
|
|
5976
|
-
`,Ym={mode:"open",delegatesFocus:!0},Wm={},qm=/^\d$/;class Km extends a.FoundationElement{}class Xm extends((0,a.FormAssociated)(Km)){constructor(){super(),this.values=[],this.controlListeners=new Map,this.syncingFromDigits=!1,this.appearance="outline",this.digits=6,this.readOnly=!1,this.autofocus=!1,this.error=!1,this.proxy=document.createElement("input")}get digitsIndexes(){return Array.from({length:this.digits},(e,t)=>t)}get controlIdPrefix(){return this.id||"verification-code"}get labelId(){return`${this.controlIdPrefix}-label`}get hasLabel(){var e;return!!(null===(e=this.defaultSlottedNodes)||void 0===e?void 0:e.length)}getControlId(e){return`${this.controlIdPrefix}-${e}`}clear(){this.value="",this.emitChange(),this.$fastController.isConnected&&this.focusDigit(0)}focus(){this.focusDigit(0)}valueChanged(e,t){const i=this.sanitizeCode(t);this.syncingFromDigits||this.syncDigitsFromValue(i),String(null!=t?t:"")===i?super.valueChanged(e,i):this.value=i}validate(e){var t,i;if(!(this.proxy instanceof HTMLElement))return;const o=null!==(t=null!=e?e:this.getControlElement(0))&&void 0!==t?t:void 0;String(null!==(i=this.value)&&void 0!==i?i:"").length>0&&!this.isComplete()?this.setValidity({patternMismatch:!0},`Please enter a ${this.digits}-digit code.`,o):!this.required||this.isComplete()?this.setValidity({},"",o):this.setValidity({valueMissing:!0},"Please fill out this field.",o)}connectedCallback(){super.connectedCallback(),this.proxy.type="text",this.proxy.inputMode="numeric",l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners(),this.autofocus&&!this.readOnly&&this.focus()})}disconnectedCallback(){super.disconnectedCallback(),this.unbindControlListeners()}digitsChanged(){var e;this.syncDigitsFromValue(this.sanitizeCode(this.value));const t=(null!==(e=this.values)&&void 0!==e?e:[]).join("");this.value!==t?this.value=t:this.validate(),l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners()})}get digitClassnames(){return[this.error&&"error",(this.disabled||this.readOnly)&&"disabled"].filter(Boolean).join(" ")}sanitizeCode(e){const t=Math.max(1,Number(this.digits)||6);return String(null!=e?e:"").replace(/\D/g,"").slice(0,t)}bindControlListeners(){this.unbindControlListeners();this.rootNode.querySelectorAll("[data-digit-index] input.control").forEach(e=>{const t=this.getIndexFromInput(e);if(null===t)return;const i={paste:e=>this.onPaste(e,t),keydown:e=>this.onKeyDown(e,t),input:e=>this.onInput(e,t)};e.addEventListener("paste",i.paste,!0),e.addEventListener("keydown",i.keydown),e.addEventListener("input",i.input),this.controlListeners.set(e,i)})}unbindControlListeners(){var e,t;null===(e=this.controlListeners)||void 0===e||e.forEach((e,t)=>{t.removeEventListener("paste",e.paste,!0),t.removeEventListener("keydown",e.keydown),t.removeEventListener("input",e.input)}),null===(t=this.controlListeners)||void 0===t||t.clear()}onKeyDown(e,t){if(!this.readOnly&&!this.disabled){if(qm.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey)return e.preventDefault(),this.updateDigit(t,e.key),void this.focusDigit(t+1);switch(e.key){case"Backspace":e.preventDefault(),this.handleBackspace(t);break;case"Delete":e.preventDefault(),this.handleDelete(t);break;case"ArrowLeft":e.preventDefault(),this.focusDigit(t-1);break;case"ArrowRight":e.preventDefault(),this.focusDigit(t+1);break;case"Tab":case"Home":case"End":break;default:this.isBlockedCharacter(e)&&e.preventDefault()}}}isBlockedCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(1===e.key.length&&!qm.test(e.key))}onInput(e,t){if(this.readOnly||this.disabled)return;const i=e.target,o=i.value.replace(/\D/g,"");if(o.length>1)return void this.applyDigits(o,t);const n=o.slice(-1);i.value!==n&&(i.value=n),n&&this.values[t]!==n?(this.updateDigit(t,n),this.focusDigit(t+1)):!n&&this.values[t]&&this.updateDigit(t,"")}onPaste(e,t){var i,o;if(this.readOnly||this.disabled)return;e.preventDefault();const n=null!==(o=null===(i=e.clipboardData)||void 0===i?void 0:i.getData("text"))&&void 0!==o?o:"";n&&this.applyDigits(n,t)}handleBackspace(e){this.values[e]?this.updateDigit(e,""):e>0&&(this.updateDigit(e-1,""),this.focusDigit(e-1))}handleDelete(e){this.values[e]&&this.updateDigit(e,"")}getIndexFromInput(e){var t;const i=Number(null===(t=e.closest("[data-digit-index]"))||void 0===t?void 0:t.getAttribute("data-digit-index"));return Number.isNaN(i)?null:i}syncDigitsFromValue(e){var t,i;const o=Math.max(1,Number(this.digits)||6),n=Array.from({length:o},(t,i)=>{var o;return null!==(o=e[i])&&void 0!==o?o:""}),s=null!==(t=this.values)&&void 0!==t?t:[];n.length===s.length&&n.every((e,t)=>e===s[t])||(this.values=n,(null===(i=this.$fastController)||void 0===i?void 0:i.isConnected)&&this.syncFieldValues())}updateDigit(e,t){if(e<0||e>=this.digits)return;const i=[...this.values];i[e]=t,this.values=i,this.syncFieldValue(e),this.commitValues(i)}applyDigits(e,t){const i=e.replace(/\D/g,"").slice(0,this.digits-t);if(!i.length)return;const o=[...this.values];for(let e=0;e<i.length;e+=1)o[t+e]=i[e];this.values=o,this.syncFieldValues(),this.commitValues(o),this.focusDigit(this.isComplete()?this.digits-1:t+i.length)}commitValues(e){const t=e.join("");this.syncingFromDigits=!0;try{this.value!==t?this.value=t:this.validate()}finally{this.syncingFromDigits=!1}this.emitChange(),this.isComplete()&&this.$emit("complete",{value:this.value})}syncFieldValues(){for(let e=0;e<this.digits;e+=1)this.syncFieldValue(e)}syncFieldValue(e){var t;const i=this.getControlElement(e);i&&(i.value=null!==(t=this.values[e])&&void 0!==t?t:"")}focusDigit(e){var t;e<0||e>=this.digits||null===(t=this.getControlElement(e))||void 0===t||t.focus()}get rootNode(){var e;return null!==(e=this.shadowRoot)&&void 0!==e?e:this}getControlElement(e){return this.rootNode.querySelector(`[data-digit-index="${e}"] input.control`)}isComplete(){var e;const t=null!==(e=this.values)&&void 0!==e?e:[];return t.length===this.digits&&t.every(e=>qm.test(e))}emitChange(){this.$emit("change",{value:this.value})}}(0,C.Cg)([l.observable],Xm.prototype,"values",void 0),(0,C.Cg)([l.observable],Xm.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.attr],Xm.prototype,"id",void 0),(0,C.Cg)([l.attr],Xm.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Xm.prototype,"digits",void 0),(0,C.Cg)([(0,l.attr)({attribute:"readonly",mode:"boolean"})],Xm.prototype,"readOnly",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xm.prototype,"autofocus",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xm.prototype,"error",void 0);const Jm=Xm.compose(Object.assign({baseName:"verification-code-input",template:jm,styles:Gm,shadowOptions:Ym},Wm)),Qm={foundationAccordion:m,foundationAiCriteriaSearch:Oe,foundationAiIndicator:Ie,foundationAccordionItem:w,foundationActionsMenu:A,foundationAnchor:Me,foundationAnchoredRegion:Be,foundationAvatar:Ke,foundationBadge:tt,foundationBanner:dt,foundationBreadcrumb:gt,foundationBreadcrumbItem:Ct,foundationButton:Tt,foundationCalendar:Lt,foundationCard:Pt,foundationCategorizedMultiselect:qt,foundationCheckbox:ei,foundationCombobox:Ti,foundationConnectionIndicator:Ai,foundationDataGrid:Hi,foundationDataGridCell:Vi,foundationDataGridRow:qi,foundationDatePicker:Oo,foundationDesignSystemProvider:$n,foundationDialog:Nn,foundationDisclosure:zn,foundationDivider:Yn,foundationDropdownMenu:Zn,foundationErrorBanner:bs,foundationErrorBoundary:As,foundationErrorDialog:Hs,foundationFileReader:js,foundationFileUpload:ra,foundationFilter:ba,foundationFilterBar:Ta,foundationFlexLayout:Fa,foundationFlipper:Ua,foundationFlyout:Ka,foundationGridLayout:nr,foundationGridLayoutItem:dr,foundationHorizontalScroll:gr,foundationIcon:Rr,foundationListbox:_r,foundationListboxOption:Vr,foundationMenu:Kr,foundationMenuItem:tl,foundationModal:rl,foundationMultiselect:vl,foundationNumberField:Wl,foundationOptgroup:Jl,foundationPill:Pd,foundationPopper:jd,foundationProgress:xd,foundationProgressRing:Jd,foundationRadio:oc,foundationRadioGroup:dc,foundationScheduler:vc,foundationSchedulerCronBuilder:gu,foundationSchedulerTimezone:xu,foundationSearchBar:Fu,foundationSearchBarCombobox:Bu,foundationSegmentedControl:sh,foundationSegmentedItem:uh,foundationSelect:fh,foundationSkeleton:$h,foundationSlider:Rh,foundationSliderLabel:_h,foundationSnackbar:Wh,foundationStackingIcons:Jh,foundationStatusPill:ip,foundationEnvironmentIndicator:ps,foundationStepperTab:up,foundationStepperTabPanel:vp,foundationSwitch:xp,foundationSystemHealthOverlay:Ad,foundationTab:Lp,foundationTabPanel:Pp,foundationTabs:jp,foundationTextArea:Jp,foundationTextField:sm,foundationToast:hm,foundationToolbar:bm,foundationTooltip:Sm,foundationTreeItem:Im,foundationTreeView:Mm,foundationUrlInput:Vm,foundationVerificationCodeInput:Jm,foundationSectionNavigator:Zu,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Zm extends l.CSSDirective{constructor(e){super(),this.tokenMap=e}createTokenPartial(e,t){return l.cssPartial`${e}: ${t}`}createTokensCSS(){const e=[];for(const[t,i]of Object.entries(this.tokenMap))e.push(this.createTokenPartial(t,i).createCSS());return e}createCSS(){return this.createTokensCSS().join(";")}}let eg=class extends vi{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()})}getColumnDefs(e){return null==e?void 0:e.flatMap(e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name})}clearData(){ot.debug("clearData - Method not implemented.")}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values()),i=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=i,this.dataGrid.rowsData=t}handleStreamInserts(e){ot.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};eg=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],eg);const tg=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],ig=[...tg,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],og={type:"NULL",maxRules:1,invisible:!0},ng=["int","short","long","bigdecimal","double"],sg=["date","date-time"],ag=["enum",...ng,"string",...sg,"boolean"],rg=[{type:"equal",nbInputs:1,applyTo:ag,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:ag,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...ng,...sg],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...ng,...sg],optgroup:"Comparison"},{type:"contains",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"starts_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"ends_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"one_of",nbInputs:"many",applyTo:[...ag].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...ag].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...ng,...sg],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...ng,...sg],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...ag],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...ag],optgroup:"Null"}];var lg=i(93678);const dg=i.n(lg)()();function cg(e,t,i){const o=function e(o){const n=dg(o);if(n.groupId===t)return n.children=i(n.children),n;const s=[];let a=!1;for(const t of n.children)if("children"in t){const i=e(t);i?(s.push(i),a=!0):s.push(t)}else s.push(t);return n.children=s,a?n:null}(e);if(!o)throw new Error(`Unable to find group with groupId ${t}`);return o}function ug(e,t,i){return function e(o){for(const n of o.children){if(i(n,t))return o;if("children"in n){const t=e(n);if(t)return t}}return null}(e)}function hg(e,t){const i=ug(e,t,(e,t)=>"children"in e&&e.groupId===t);if(!i)throw new Error(`No parent group found for group with ID ${t}`);return i}function pg(e,t){const i=ug(e,t,(e,t)=>"ruleId"in e&&e.ruleId===t);if(!i)throw new Error(`No parent group found for rule with ID ${t}`);return i}function mg(e,t,i){return cg(e,t,e=>[...e,i])}const gg="group-root";function vg(e,t){const i=(e,o)=>{return"children"in e?function(e,o){return Object.assign(Object.assign({},e),{level:o,config:t.getConfig(),groupId:t.getGroupId(),children:e.children.map(e=>i(e,o+1))})}(e,o):(n=e,Object.assign(Object.assign({},n),{ruleId:t.getRuleId(),config:t.getConfig()}));var n};return Object.assign(Object.assign({},e),{config:t.getConfig(),level:1,groupId:gg,children:e.children.map(e=>i(e,2))})}function fg(e){const t=e.children.map(e=>"children"in e?fg(e):function(e){const{operator:t,field:i,value:o}=e;return{operator:t,field:i,value:o}}(e));return{combinator:e.combinator,children:t}}const bg=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,yg=e=>`${bg(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,wg=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.input)&&void 0!==o?o:e.field.input},Cg=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type},xg=e=>{const t={},i=[],o=e=>[...e].sort((e,t)=>"fieldId"in e&&"fieldId"in t?e.fieldId.localeCompare(t.fieldId):"type"in e&&"type"in t?e.type.localeCompare(t.type):0);e.forEach(e=>{if(e.optgroup){const i=e.optgroup;t[i]||(t[i]=[]),t[i].push(e)}else i.push(e)});const n=[];return Object.keys(t).sort().forEach(e=>{n.push({optgroup:e,xs:o(t[e])})}),[...n,...o(i)]};function $g(e,t,i){if(!e.shadowRoot||!(null==t?void 0:t.customStyles))return;const o=t.customStyles[i];if(o){const t=document.createElement("style");t.textContent=o,e.shadowRoot.firstChild?e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild):e.shadowRoot.appendChild(t)}}var Sg;!function(e){e.AddGroup="add-group",e.DelGroup="del-group",e.AddRule="add-rule",e.DelRule="del-rule",e.UpdateGroup="update-group",e.UpdateRule="update-rule",e.FieldSelected="field-selected",e.OperatorSelected="operator-selected",e.ValueUpdated="value-updated",e.RemoveVarArg="remove-variadic-operand"}(Sg||(Sg={}));const Eg=l.css`
|
|
6092
|
+
`,Jm={mode:"open",delegatesFocus:!0},Qm={},Zm=/^\d$/;class eg extends a.FoundationElement{}class tg extends((0,a.FormAssociated)(eg)){constructor(){super(),this.values=[],this.controlListeners=new Map,this.syncingFromDigits=!1,this.appearance="outline",this.digits=6,this.readOnly=!1,this.autofocus=!1,this.error=!1,this.proxy=document.createElement("input")}get digitsIndexes(){return Array.from({length:this.digits},(e,t)=>t)}get controlIdPrefix(){return this.id||"verification-code"}get labelId(){return`${this.controlIdPrefix}-label`}get hasLabel(){var e;return!!(null===(e=this.defaultSlottedNodes)||void 0===e?void 0:e.length)}getControlId(e){return`${this.controlIdPrefix}-${e}`}clear(){this.value="",this.emitChange(),this.$fastController.isConnected&&this.focusDigit(0)}focus(){this.focusDigit(0)}valueChanged(e,t){const i=this.sanitizeCode(t);this.syncingFromDigits||this.syncDigitsFromValue(i),String(null!=t?t:"")===i?super.valueChanged(e,i):this.value=i}validate(e){var t,i;if(!(this.proxy instanceof HTMLElement))return;const o=null!==(t=null!=e?e:this.getControlElement(0))&&void 0!==t?t:void 0;String(null!==(i=this.value)&&void 0!==i?i:"").length>0&&!this.isComplete()?this.setValidity({patternMismatch:!0},`Please enter a ${this.digits}-digit code.`,o):!this.required||this.isComplete()?this.setValidity({},"",o):this.setValidity({valueMissing:!0},"Please fill out this field.",o)}connectedCallback(){super.connectedCallback(),this.proxy.type="text",this.proxy.inputMode="numeric",l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners(),this.autofocus&&!this.readOnly&&this.focus()})}disconnectedCallback(){super.disconnectedCallback(),this.unbindControlListeners()}digitsChanged(){var e;this.syncDigitsFromValue(this.sanitizeCode(this.value));const t=(null!==(e=this.values)&&void 0!==e?e:[]).join("");this.value!==t?this.value=t:this.validate(),l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners()})}get digitClassnames(){return[this.error&&"error",(this.disabled||this.readOnly)&&"disabled"].filter(Boolean).join(" ")}sanitizeCode(e){const t=Math.max(1,Number(this.digits)||6);return String(null!=e?e:"").replace(/\D/g,"").slice(0,t)}bindControlListeners(){this.unbindControlListeners();this.rootNode.querySelectorAll("[data-digit-index] input.control").forEach(e=>{const t=this.getIndexFromInput(e);if(null===t)return;const i={paste:e=>this.onPaste(e,t),keydown:e=>this.onKeyDown(e,t),input:e=>this.onInput(e,t)};e.addEventListener("paste",i.paste,!0),e.addEventListener("keydown",i.keydown),e.addEventListener("input",i.input),this.controlListeners.set(e,i)})}unbindControlListeners(){var e,t;null===(e=this.controlListeners)||void 0===e||e.forEach((e,t)=>{t.removeEventListener("paste",e.paste,!0),t.removeEventListener("keydown",e.keydown),t.removeEventListener("input",e.input)}),null===(t=this.controlListeners)||void 0===t||t.clear()}onKeyDown(e,t){if(!this.readOnly&&!this.disabled){if(Zm.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey)return e.preventDefault(),this.updateDigit(t,e.key),void this.focusDigit(t+1);switch(e.key){case"Backspace":e.preventDefault(),this.handleBackspace(t);break;case"Delete":e.preventDefault(),this.handleDelete(t);break;case"ArrowLeft":e.preventDefault(),this.focusDigit(t-1);break;case"ArrowRight":e.preventDefault(),this.focusDigit(t+1);break;case"Tab":case"Home":case"End":break;default:this.isBlockedCharacter(e)&&e.preventDefault()}}}isBlockedCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(1===e.key.length&&!Zm.test(e.key))}onInput(e,t){if(this.readOnly||this.disabled)return;const i=e.target,o=i.value.replace(/\D/g,"");if(o.length>1)return void this.applyDigits(o,t);const n=o.slice(-1);i.value!==n&&(i.value=n),n&&this.values[t]!==n?(this.updateDigit(t,n),this.focusDigit(t+1)):!n&&this.values[t]&&this.updateDigit(t,"")}onPaste(e,t){var i,o;if(this.readOnly||this.disabled)return;e.preventDefault();const n=null!==(o=null===(i=e.clipboardData)||void 0===i?void 0:i.getData("text"))&&void 0!==o?o:"";n&&this.applyDigits(n,t)}handleBackspace(e){this.values[e]?this.updateDigit(e,""):e>0&&(this.updateDigit(e-1,""),this.focusDigit(e-1))}handleDelete(e){this.values[e]&&this.updateDigit(e,"")}getIndexFromInput(e){var t;const i=Number(null===(t=e.closest("[data-digit-index]"))||void 0===t?void 0:t.getAttribute("data-digit-index"));return Number.isNaN(i)?null:i}syncDigitsFromValue(e){var t,i;const o=Math.max(1,Number(this.digits)||6),n=Array.from({length:o},(t,i)=>{var o;return null!==(o=e[i])&&void 0!==o?o:""}),s=null!==(t=this.values)&&void 0!==t?t:[];n.length===s.length&&n.every((e,t)=>e===s[t])||(this.values=n,(null===(i=this.$fastController)||void 0===i?void 0:i.isConnected)&&this.syncFieldValues())}updateDigit(e,t){if(e<0||e>=this.digits)return;const i=[...this.values];i[e]=t,this.values=i,this.syncFieldValue(e),this.commitValues(i)}applyDigits(e,t){const i=e.replace(/\D/g,"").slice(0,this.digits-t);if(!i.length)return;const o=[...this.values];for(let e=0;e<i.length;e+=1)o[t+e]=i[e];this.values=o,this.syncFieldValues(),this.commitValues(o),this.focusDigit(this.isComplete()?this.digits-1:t+i.length)}commitValues(e){const t=e.join("");this.syncingFromDigits=!0;try{this.value!==t?this.value=t:this.validate()}finally{this.syncingFromDigits=!1}this.emitChange(),this.isComplete()&&this.$emit("complete",{value:this.value})}syncFieldValues(){for(let e=0;e<this.digits;e+=1)this.syncFieldValue(e)}syncFieldValue(e){var t;const i=this.getControlElement(e);i&&(i.value=null!==(t=this.values[e])&&void 0!==t?t:"")}focusDigit(e){var t;e<0||e>=this.digits||null===(t=this.getControlElement(e))||void 0===t||t.focus()}get rootNode(){var e;return null!==(e=this.shadowRoot)&&void 0!==e?e:this}getControlElement(e){return this.rootNode.querySelector(`[data-digit-index="${e}"] input.control`)}isComplete(){var e;const t=null!==(e=this.values)&&void 0!==e?e:[];return t.length===this.digits&&t.every(e=>Zm.test(e))}emitChange(){this.$emit("change",{value:this.value})}}(0,C.Cg)([l.observable],tg.prototype,"values",void 0),(0,C.Cg)([l.observable],tg.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.attr],tg.prototype,"id",void 0),(0,C.Cg)([l.attr],tg.prototype,"appearance",void 0),(0,C.Cg)([l.attr],tg.prototype,"digits",void 0),(0,C.Cg)([(0,l.attr)({attribute:"readonly",mode:"boolean"})],tg.prototype,"readOnly",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tg.prototype,"autofocus",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tg.prototype,"error",void 0);const ig=tg.compose(Object.assign({baseName:"verification-code-input",template:Xm,styles:Km,shadowOptions:Jm},Qm)),og={foundationAccordion:m,foundationAiCriteriaSearch:Ae,foundationAiIndicator:Me,foundationAccordionItem:w,foundationActionsMenu:P,foundationAnchor:Be,foundationAnchoredRegion:qe,foundationAvatar:tt,foundationBadge:rt,foundationBanner:gt,foundationBreadcrumb:Ct,foundationBreadcrumbItem:Tt,foundationButton:Lt,foundationCalendar:Ht,foundationCard:jt,foundationCategorizedMultiselect:ei,foundationCheckbox:ai,foundationCombobox:Li,foundationConnectionIndicator:Pi,foundationDataGrid:Gi,foundationDataGridCell:Ki,foundationDataGridRow:eo,foundationDatePicker:Ao,foundationDesignSystemProvider:Dn,foundationDialog:zn,foundationDisclosure:Yn,foundationDivider:Qn,foundationDropdownMenu:ss,foundationErrorBanner:Ss,foundationErrorBoundary:Ps,foundationErrorDialog:Gs,foundationFileReader:Js,foundationFileUpload:pa,foundationFilter:Sa,foundationFilterBar:La,foundationFlexLayout:Ua,foundationFlipper:Wa,foundationFlyout:tr,foundationGridLayout:cr,foundationGridLayoutItem:gr,foundationHorizontalScroll:Cr,foundationIcon:_r,foundationListbox:Vr,foundationListboxOption:Kr,foundationMenu:tl,foundationMenuItem:rl,foundationModal:pl,foundationMultiselect:xl,foundationNumberField:Zl,foundationOptgroup:od,foundationPill:jd,foundationPopper:Jd,foundationProgress:kd,foundationProgressRing:oc,foundationRadio:dc,foundationRadioGroup:gc,foundationScheduler:xc,foundationSchedulerCronBuilder:Cu,foundationSchedulerTimezone:ku,foundationSearchBar:Uu,foundationSearchBarCombobox:qu,foundationSegmentedControl:uh,foundationSegmentedItem:fh,foundationSelect:$h,foundationSkeleton:Dh,foundationSlider:Mh,foundationSliderLabel:Bh,foundationSnackbar:Qh,foundationStackingIcons:ip,foundationStatusPill:rp,foundationEnvironmentIndicator:ys,foundationStepperTab:vp,foundationStepperTabPanel:Cp,foundationSwitch:Tp,foundationSystemHealthOverlay:Pd,foundationTab:Pp,foundationTabPanel:Gp,foundationTabs:Xp,foundationTextArea:im,foundationTextField:cm,foundationToast:fm,foundationToolbar:$m,foundationTooltip:Dm,foundationTreeItem:Fm,foundationTreeView:Um,foundationUrlInput:qm,foundationVerificationCodeInput:ig,foundationSectionNavigator:sh,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class ng extends l.CSSDirective{constructor(e){super(),this.tokenMap=e}createTokenPartial(e,t){return l.cssPartial`${e}: ${t}`}createTokensCSS(){const e=[];for(const[t,i]of Object.entries(this.tokenMap))e.push(this.createTokenPartial(t,i).createCSS());return e}createCSS(){return this.createTokensCSS().join(";")}}let sg=class extends xi{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()})}getColumnDefs(e){return null==e?void 0:e.flatMap(e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name})}clearData(){dt.debug("clearData - Method not implemented.")}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values()),i=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=i,this.dataGrid.rowsData=t}handleStreamInserts(e){dt.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){dt.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){dt.debug("handleStreamUpdates - Method not implemented.")}};sg=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],sg);const ag=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],rg=[...ag,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],lg={type:"NULL",maxRules:1,invisible:!0},dg=["int","short","long","bigdecimal","double"],cg=["date","date-time"],ug=["enum",...dg,"string",...cg,"boolean"],hg=[{type:"equal",nbInputs:1,applyTo:ug,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:ug,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...dg,...cg],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...dg,...cg],optgroup:"Comparison"},{type:"contains",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"starts_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"ends_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"one_of",nbInputs:"many",applyTo:[...ug].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...ug].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...dg,...cg],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...dg,...cg],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...ug],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...ug],optgroup:"Null"}];var pg=i(93678);const mg=i.n(pg)()();function gg(e,t,i){const o=function e(o){const n=mg(o);if(n.groupId===t)return n.children=i(n.children),n;const s=[];let a=!1;for(const t of n.children)if("children"in t){const i=e(t);i?(s.push(i),a=!0):s.push(t)}else s.push(t);return n.children=s,a?n:null}(e);if(!o)throw new Error(`Unable to find group with groupId ${t}`);return o}function vg(e,t,i){return function e(o){for(const n of o.children){if(i(n,t))return o;if("children"in n){const t=e(n);if(t)return t}}return null}(e)}function fg(e,t){const i=vg(e,t,(e,t)=>"children"in e&&e.groupId===t);if(!i)throw new Error(`No parent group found for group with ID ${t}`);return i}function bg(e,t){const i=vg(e,t,(e,t)=>"ruleId"in e&&e.ruleId===t);if(!i)throw new Error(`No parent group found for rule with ID ${t}`);return i}function yg(e,t,i){return gg(e,t,e=>[...e,i])}const wg="group-root";function Cg(e,t){const i=(e,o)=>{return"children"in e?function(e,o){return Object.assign(Object.assign({},e),{level:o,config:t.getConfig(),groupId:t.getGroupId(),children:e.children.map(e=>i(e,o+1))})}(e,o):(n=e,Object.assign(Object.assign({},n),{ruleId:t.getRuleId(),config:t.getConfig()}));var n};return Object.assign(Object.assign({},e),{config:t.getConfig(),level:1,groupId:wg,children:e.children.map(e=>i(e,2))})}function xg(e){const t=e.children.map(e=>"children"in e?xg(e):function(e){const{operator:t,field:i,value:o}=e;return{operator:t,field:i,value:o}}(e));return{combinator:e.combinator,children:t}}const $g=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,Sg=e=>`${$g(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,Eg=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.input)&&void 0!==o?o:e.field.input},Og=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type},Tg=e=>{const t={},i=[],o=e=>[...e].sort((e,t)=>"fieldId"in e&&"fieldId"in t?e.fieldId.localeCompare(t.fieldId):"type"in e&&"type"in t?e.type.localeCompare(t.type):0);e.forEach(e=>{if(e.optgroup){const i=e.optgroup;t[i]||(t[i]=[]),t[i].push(e)}else i.push(e)});const n=[];return Object.keys(t).sort().forEach(e=>{n.push({optgroup:e,xs:o(t[e])})}),[...n,...o(i)]};function kg(e,t,i){if(!e.shadowRoot||!(null==t?void 0:t.customStyles))return;const o=t.customStyles[i];if(o){const t=document.createElement("style");t.textContent=o,e.shadowRoot.firstChild?e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild):e.shadowRoot.appendChild(t)}}var Dg;!function(e){e.AddGroup="add-group",e.DelGroup="del-group",e.AddRule="add-rule",e.DelRule="del-rule",e.UpdateGroup="update-group",e.UpdateRule="update-rule",e.FieldSelected="field-selected",e.OperatorSelected="operator-selected",e.ValueUpdated="value-updated",e.RemoveVarArg="remove-variadic-operand"}(Dg||(Dg={}));const Ig=l.css`
|
|
5977
6093
|
:host {
|
|
5978
6094
|
--item-vertical-spacing: 4px;
|
|
5979
6095
|
--item-border-radius: 5px;
|
|
@@ -6147,7 +6263,7 @@
|
|
|
6147
6263
|
.rules-list > *:last-child::after {
|
|
6148
6264
|
display: none;
|
|
6149
6265
|
}
|
|
6150
|
-
`,
|
|
6266
|
+
`,Rg=l.css`
|
|
6151
6267
|
.rules-group-container {
|
|
6152
6268
|
border: 1px solid #ccc;
|
|
6153
6269
|
margin-bottom: 10px;
|
|
@@ -6190,10 +6306,10 @@
|
|
|
6190
6306
|
list-style: none;
|
|
6191
6307
|
padding-left: 0;
|
|
6192
6308
|
}
|
|
6193
|
-
`;function
|
|
6309
|
+
`;function Ag(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),s=o(i);return(t,i)=>e(t,i)?n(t,i):s(t,i)}const Lg=l.html`
|
|
6194
6310
|
${e=>{var t,i;const o=null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.radio,{radioTag:n,radioGroupTag:s}=o?{radioTag:o.input,radioGroupTag:o.group}:{radioTag:"input",radioGroupTag:"div"};return l.html`
|
|
6195
6311
|
<div class="btn-group group-conditions">
|
|
6196
|
-
${
|
|
6312
|
+
${Ag(e=>"input"!==n,l.html`
|
|
6197
6313
|
<${s}
|
|
6198
6314
|
class="radio-group-container"
|
|
6199
6315
|
name="combinator"
|
|
@@ -6231,7 +6347,7 @@
|
|
|
6231
6347
|
`)}
|
|
6232
6348
|
</div>
|
|
6233
6349
|
`}}
|
|
6234
|
-
`,
|
|
6350
|
+
`,Ng=l.html`
|
|
6235
6351
|
${e=>{var t,i,o,n,s,a,r,d;const c=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button",u=`Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${null===(s=null===(n=null===(o=e.config)||void 0===o?void 0:o.combinators)||void 0===n?void 0:n[0])||void 0===s?void 0:s.type})`,h=`Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${null===(d=null===(r=null===(a=e.config)||void 0===a?void 0:a.combinators)||void 0===r?void 0:r[0])||void 0===d?void 0:d.type})`;return l.html`
|
|
6236
6352
|
<div class="btn-group float-end group-actions">
|
|
6237
6353
|
${(0,l.when)(e=>e.allowAddRule,l.html`
|
|
@@ -6268,13 +6384,13 @@
|
|
|
6268
6384
|
`)}
|
|
6269
6385
|
</div>
|
|
6270
6386
|
`}}
|
|
6271
|
-
`,
|
|
6387
|
+
`,Fg=l.html`
|
|
6272
6388
|
<div class="rules-group-container">
|
|
6273
|
-
<div class="rules-group-header">${
|
|
6389
|
+
<div class="rules-group-header">${Ng} ${Lg}</div>
|
|
6274
6390
|
<div class="rules-group-body">
|
|
6275
6391
|
<div class="rules-list">
|
|
6276
6392
|
${(0,l.repeat)(e=>{var t,i;return null!==(i=null===(t=e.model)||void 0===t?void 0:t.children)&&void 0!==i?i:[]},l.html`
|
|
6277
|
-
${
|
|
6393
|
+
${Ag(e=>"children"in e,l.html`
|
|
6278
6394
|
<expression-group
|
|
6279
6395
|
:config=${(e,t)=>t.parent.config}
|
|
6280
6396
|
:styles=${(e,t)=>t.parent.styles}
|
|
@@ -6298,7 +6414,7 @@
|
|
|
6298
6414
|
</div>
|
|
6299
6415
|
</div>
|
|
6300
6416
|
</div>
|
|
6301
|
-
`;let
|
|
6417
|
+
`;let Mg=class extends l.FASTElement{connectedCallback(){super.connectedCallback(),kg(this,this.styles,"group")}get allowAddRule(){return!!this.model&&("many"===this.model.combinator.maxRules||this.model.children.length<this.model.combinator.maxRules)}get allowAddGroup(){var e,t;return!!this.model&&(1!==this.model.combinator.maxRules&&(!(2===this.model.combinator.maxRules&&this.model.children.length>=2)&&(!(null===(e=this.config)||void 0===e?void 0:e.maxNesting)||(null===(t=this.config)||void 0===t?void 0:t.maxNesting)<1||this.config.maxNesting>this.model.level)))}dispatchAddRule(e){if(e.stopPropagation(),!this.allowAddRule)throw new Error("Cannot add extra rules to group");const t={parentGroupId:this.model.groupId};this.dispatchEvent(new CustomEvent(Dg.AddRule,{detail:t,bubbles:!0,composed:!0}))}dispatchAddGroup(e){if(e.stopPropagation(),!this.allowAddGroup)throw new Error("Cannot add further nested groups");const t={parentGroupId:this.model.groupId,newGroup:{level:this.model.level+1}};this.dispatchEvent(new CustomEvent(Dg.AddGroup,{detail:t,bubbles:!0,composed:!0}))}dispatchDeleteGroup(e){e.stopPropagation();const t={groupId:this.model.groupId};this.dispatchEvent(new CustomEvent(Dg.DelGroup,{detail:t,bubbles:!0,composed:!0}))}handleCombinatorChange(e){e.stopPropagation();const t=e.target.value;this.updateCombinator(t)}handleCustomCombinatorChange(e){var t;if(e.stopPropagation(),!(null===(t=this.model)||void 0===t?void 0:t.groupId)||!e.target)return;const i=e.target.getAttribute("value");if(!i)throw new Error("No value found in the custom radio group event target");this.updateCombinator(i)}updateCombinator(e){var t,i;const o=this.config.combinators.find(({type:t})=>t===e);if(!o)throw new Error(`Cannot find selected combinator ${e}`);(null===(i=null===(t=this.model)||void 0===t?void 0:t.combinator)||void 0===i?void 0:i.type)!==o.type&&this.dispatchGroupDataUpdated(o)}dispatchGroupDataUpdated(e){const t={groupId:this.model.groupId,newData:{combinator:e}};this.dispatchEvent(new CustomEvent(Dg.UpdateGroup,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Mg.prototype,"config",void 0),(0,C.Cg)([l.observable],Mg.prototype,"styles",void 0),(0,C.Cg)([l.observable],Mg.prototype,"model",void 0),(0,C.Cg)([l.observable],Mg.prototype,"index",void 0),(0,C.Cg)([l.volatile],Mg.prototype,"allowAddRule",null),(0,C.Cg)([l.volatile],Mg.prototype,"allowAddGroup",null),Mg=(0,C.Cg)([(0,l.customElement)({name:"expression-group",template:Fg,styles:Rg,shadowOptions:{delegatesFocus:!0}})],Mg);const _g=l.html`
|
|
6302
6418
|
<div class="query-builder">
|
|
6303
6419
|
${(0,l.when)(e=>null!==e.model,l.html`
|
|
6304
6420
|
<expression-group
|
|
@@ -6308,7 +6424,7 @@
|
|
|
6308
6424
|
></expression-group>
|
|
6309
6425
|
`)}
|
|
6310
6426
|
</div>
|
|
6311
|
-
`,
|
|
6427
|
+
`,Pg=l.html`
|
|
6312
6428
|
${e=>{var t,i,o,n,s,a;const r=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",d=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option",c=(null===(a=null===(s=e.styles)||void 0===s?void 0:s.customElements)||void 0===a?void 0:a.optgroup)||"optgroup";return l.html`
|
|
6313
6429
|
<${r}
|
|
6314
6430
|
class="form-select"
|
|
@@ -6339,7 +6455,7 @@
|
|
|
6339
6455
|
`)}
|
|
6340
6456
|
</${r}>
|
|
6341
6457
|
`}}
|
|
6342
|
-
`;let
|
|
6458
|
+
`;let Hg=class extends l.FASTElement{constructor(){super(...arguments),this.fields=[]}connectedCallback(){super.connectedCallback(),kg(this,this.styles,"field")}get groupedFieldss(){return Tg(this.fields)}dispatchFieldsChanged(e){e.stopPropagation();const t={fieldId:e.target.value};this.dispatchEvent(new CustomEvent(Dg.FieldSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Hg.prototype,"fields",void 0),(0,C.Cg)([l.observable],Hg.prototype,"field",void 0),(0,C.Cg)([l.observable],Hg.prototype,"config",void 0),(0,C.Cg)([l.observable],Hg.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Hg.prototype,"groupedFieldss",null),Hg=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-field",template:Pg})],Hg);const zg=l.html`
|
|
6343
6459
|
${e=>{var t,i,o,n,s,a;const r=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",d=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option",c=(null===(a=null===(s=e.styles)||void 0===s?void 0:s.customElements)||void 0===a?void 0:a.optgroup)||"optgroup";return l.html`
|
|
6344
6460
|
<${r}
|
|
6345
6461
|
class="form-select"
|
|
@@ -6372,7 +6488,7 @@
|
|
|
6372
6488
|
`)}
|
|
6373
6489
|
</${r}>
|
|
6374
6490
|
`}}
|
|
6375
|
-
`;let
|
|
6491
|
+
`;let Ug=class extends l.FASTElement{constructor(){super(...arguments),this.operators=[],this.field=null}connectedCallback(){super.connectedCallback(),kg(this,this.styles,"operator")}get allowedOperators(){const e=e=>{var t,i,o;return null===(o=null===(i=null===(t=this.field)||void 0===t?void 0:t.operators)||void 0===i?void 0:i.includes(e.type))||void 0===o||o},t=e=>{var t,i,o,n;return null===(n=null===(i=null===(t=null==e?void 0:e.applyTo)||void 0===t?void 0:t.includes)||void 0===i?void 0:i.call(t,null===(o=this.field)||void 0===o?void 0:o.type))||void 0===n||n};return this.operators.filter(i=>e(i)&&t(i))}get groupedOperators(){return Tg(this.allowedOperators)}handleOperatorChange(e){e.stopPropagation();const t={operatorId:e.target.value};this.dispatchEvent(new CustomEvent(Dg.OperatorSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Ug.prototype,"operators",void 0),(0,C.Cg)([l.observable],Ug.prototype,"operator",void 0),(0,C.Cg)([l.observable],Ug.prototype,"field",void 0),(0,C.Cg)([l.observable],Ug.prototype,"config",void 0),(0,C.Cg)([l.observable],Ug.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Ug.prototype,"allowedOperators",null),(0,C.Cg)([l.volatile],Ug.prototype,"groupedOperators",null),Ug=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-operator",template:zg})],Ug);const Bg=e=>["short","int","long"].includes(e),Vg=e=>["double","bigdecimal"].includes(e),Gg=(e,t)=>{var i,o;return null===(o=null===(i=(e=>Bg(e)?/^[+-]?[0-9]+$/:Vg(e)?/[+-]?([0-9]*[.])?[0-9]+/:null)(e))||void 0===i?void 0:i.test(t))||void 0===o||o?null:"Invalid number format"},jg=l.css`
|
|
6376
6492
|
.text-input.error {
|
|
6377
6493
|
color: red;
|
|
6378
6494
|
}
|
|
@@ -6381,16 +6497,16 @@
|
|
|
6381
6497
|
display: inline-grid;
|
|
6382
6498
|
align-items: center;
|
|
6383
6499
|
}
|
|
6384
|
-
`,
|
|
6385
|
-
${e=>{var t,i;const o=
|
|
6500
|
+
`,Yg=l.html`
|
|
6501
|
+
${e=>{var t,i;const o=Eg(e),n="datetime-local"===o?"datetimeLocal":o,s=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i[n])||"input";return l.html`
|
|
6386
6502
|
<${s}
|
|
6387
6503
|
type="${o}"
|
|
6388
|
-
class="text-input ${e=>(0
|
|
6504
|
+
class="text-input ${e=>(0,$.x)(["error",e.validationError])}"
|
|
6389
6505
|
value=${e=>e.value}
|
|
6390
6506
|
@blur=${(e,t)=>e.handleInputChange(t.event)}
|
|
6391
6507
|
/>
|
|
6392
6508
|
`}}
|
|
6393
|
-
`,
|
|
6509
|
+
`,Wg=l.html`
|
|
6394
6510
|
${e=>{var t,i,o,n;const s=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",a=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option";return l.html`
|
|
6395
6511
|
<${s}
|
|
6396
6512
|
class="form-select"
|
|
@@ -6408,7 +6524,7 @@
|
|
|
6408
6524
|
`)}
|
|
6409
6525
|
</${s}>
|
|
6410
6526
|
`}}
|
|
6411
|
-
`,
|
|
6527
|
+
`,qg=l.html`
|
|
6412
6528
|
${e=>{var t,i;const o=null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.checkbox,n=o||"input";return l.html`
|
|
6413
6529
|
<label>
|
|
6414
6530
|
<${n}
|
|
@@ -6420,15 +6536,15 @@
|
|
|
6420
6536
|
True
|
|
6421
6537
|
</label>
|
|
6422
6538
|
`}}
|
|
6423
|
-
`,
|
|
6424
|
-
<div>Input type "${e=>
|
|
6425
|
-
`,
|
|
6426
|
-
${e=>{const t=
|
|
6539
|
+
`,Kg=l.html`
|
|
6540
|
+
<div>Input type "${e=>Eg(e)}" not yet supported.</div>
|
|
6541
|
+
`,Xg=l.html`
|
|
6542
|
+
${e=>{const t=Eg(e);return l.html`
|
|
6427
6543
|
<div class="value-and-validation">
|
|
6428
|
-
${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),
|
|
6429
|
-
${(0,l.when)(()=>"select"===t,
|
|
6430
|
-
${(0,l.when)(()=>"checkbox"===t,
|
|
6431
|
-
${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),
|
|
6544
|
+
${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),Yg)}
|
|
6545
|
+
${(0,l.when)(()=>"select"===t,Wg)}
|
|
6546
|
+
${(0,l.when)(()=>"checkbox"===t,qg)}
|
|
6547
|
+
${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),Kg)}
|
|
6432
6548
|
${(0,l.when)(e=>e.validationMsg,l.html`
|
|
6433
6549
|
<p class="validation-msg">${e=>e.validationMsg}</p>
|
|
6434
6550
|
`)}
|
|
@@ -6445,11 +6561,11 @@
|
|
|
6445
6561
|
`}}
|
|
6446
6562
|
`)}
|
|
6447
6563
|
`}}
|
|
6448
|
-
`,
|
|
6449
|
-
${
|
|
6564
|
+
`,Jg=l.html`
|
|
6565
|
+
${Ag(e=>e.field,Xg,l.html`
|
|
6450
6566
|
<div>Select a field to set value</div>
|
|
6451
6567
|
`)}
|
|
6452
|
-
`;let
|
|
6568
|
+
`;let Qg=class extends l.FASTElement{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),kg(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,Gg(Og(this),e)].filter(e=>!!e).join(", ")||null}handleInputChange(e){e.stopPropagation();const t=e.target;if("checkbox"!==t.type&&"select-one"!==t.type){const e=this.validateInput(t.value);if(e)return this.validationError=!0,void(this.validationMsg=e);this.validationError=!1,this.validationMsg=null}let i;i="checkbox"===t.getAttribute("role")?t.checked:"select-one"===t.type?e.target.value:this.field&&Bg(Og(this))?parseInt(t.value):this.field&&Vg(Og(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(Dg.ValueUpdated,{detail:o,bubbles:!0,composed:!0}))}handleRemoveVariadicOperand(){if(!this.variadic)throw new Error("Cannot remove inputs for non-variadic operator");const e={index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(Dg.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};(0,C.Cg)([(0,l.attr)({attribute:"value-index"})],Qg.prototype,"valueIndex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Qg.prototype,"variadic",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"validation-error"})],Qg.prototype,"validationError",void 0),(0,C.Cg)([(0,l.attr)({attribute:"validation-msg"})],Qg.prototype,"validationMsg",void 0),(0,C.Cg)([l.observable],Qg.prototype,"field",void 0),(0,C.Cg)([l.observable],Qg.prototype,"operator",void 0),(0,C.Cg)([l.observable],Qg.prototype,"value",void 0),(0,C.Cg)([l.observable],Qg.prototype,"config",void 0),(0,C.Cg)([l.observable],Qg.prototype,"styles",void 0),Qg=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-value",template:Jg,styles:jg,shadowOptions:{delegatesFocus:!0}})],Qg);const Zg=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:ev(e,t),ev=(e,t)=>{var i,o;switch(Og(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return $g(new Date);case"date-time":return Sg(new Date);case"double":case"int":case"bigdecimal":case"short":case"long":return 0;case"enum":{const n="enum"===(null===(i=null==e?void 0:e.valueType)||void 0===i?void 0:i.type)?null===(o=null==e?void 0:e.valueType)||void 0===o?void 0:o.values:"enum"===t.field.type?t.field.values:{};if(0===Object.keys(n).length)throw new Error("Enums require configured values");return Object.keys(n)[0]}}},tv=(e,t)=>{var i,o,n,s;const a=(r=e,l=t,e=>{var t,i,o;if((null===(t=null==r?void 0:r.valueType)||void 0===t?void 0:t.type)!==(null===(o=null===(i=l.operator)||void 0===i?void 0:i.valueType)||void 0===o?void 0:o.type))return null;if(!("value"in l)||!l.value||!l.operator)return null;const n=1===l.operator.nbInputs?[l.value]:l.value;return e>=n.length?null:n[e]});var r,l;switch(e.nbInputs){case 0:return{field:t.field,operator:e,value:void 0};case 1:return{field:t.field,operator:e,value:null!==(i=a(0))&&void 0!==i?i:Zg(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(o=a(0))&&void 0!==o?o:Zg(e,t),null!==(n=a(1))&&void 0!==n?n:Zg(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(s=a(0))&&void 0!==s?s:Zg(e,t)]}}},iv=(e,t,i)=>{switch(e.operator.nbInputs){case 0:throw new Error("Cannot set the value for a UniraryOperator");case 1:return{field:e.field,operator:e.operator,value:t};case 2:case"many":if(!("value"in e)||!Array.isArray(e.value))throw new Error("Invalid value shape for rule");return{field:e.field,operator:e.operator,value:e.value.map((e,o)=>o===i?t:e)}}},ov=e=>!e&&0!==e,nv=l.css`
|
|
6453
6569
|
.rule-container {
|
|
6454
6570
|
border: 1px solid #eee;
|
|
6455
6571
|
margin-bottom: 5px;
|
|
@@ -6508,9 +6624,9 @@
|
|
|
6508
6624
|
expression-rule-value {
|
|
6509
6625
|
display: flex;
|
|
6510
6626
|
}
|
|
6511
|
-
`,
|
|
6627
|
+
`,sv=l.html`
|
|
6512
6628
|
${e=>{var t,i;const o=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button";return l.html`
|
|
6513
|
-
<div class="rule-container ${e=>(0
|
|
6629
|
+
<div class="rule-container ${e=>(0,$.x)(["error",e.error])}">
|
|
6514
6630
|
<div class="rule-content">
|
|
6515
6631
|
<expression-rule-field
|
|
6516
6632
|
class="margin"
|
|
@@ -6568,19 +6684,19 @@ class="margin"
|
|
|
6568
6684
|
</div>
|
|
6569
6685
|
</div>
|
|
6570
6686
|
`}}
|
|
6571
|
-
`;let tv=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),$g(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==Cg(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(Qg)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,qg(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(Sg.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(Sg.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(Sg.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,o=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,n={ruleId:this.model.ruleId,newData:{field:o,value:null,operator:null}};this.dispatchEvent(new CustomEvent(Sg.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Jg(this.model,t,i)};this.dispatchEvent(new CustomEvent(Sg.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const o=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!o)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(Sg.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Xg(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],tv.prototype,"config",void 0),(0,C.Cg)([l.observable],tv.prototype,"styles",void 0),(0,C.Cg)([l.observable],tv.prototype,"model",void 0),(0,C.Cg)([l.observable],tv.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tv.prototype,"error",void 0),(0,C.Cg)([l.volatile],tv.prototype,"operandIterator",null),tv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:ev,styles:Zg,shadowOptions:{delegatesFocus:!0}})],tv);let iv=class extends l.FASTElement{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=vg(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=fg(t);this.dispatchChangeEvent(i)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(Sg.AddGroup,this.handleAddGroup),this.addEventListener(Sg.DelGroup,this.handleDeleteGroup),this.addEventListener(Sg.AddRule,this.handleAddRule),this.addEventListener(Sg.DelRule,this.handleDeleteRule),this.addEventListener(Sg.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(Sg.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Sg.AddGroup,this.handleAddGroup),this.removeEventListener(Sg.DelGroup,this.handleDeleteGroup),this.removeEventListener(Sg.AddRule,this.handleAddRule),this.removeEventListener(Sg.DelRule,this.handleDeleteRule),this.removeEventListener(Sg.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(Sg.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,o;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(o=e.fields)||void 0===o?void 0:o.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:gg,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,o={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=mg(this.model,t,o)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=mg(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=cg(i=this.model,hg(i,o=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==o))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,o;this.model=cg(i=this.model,pg(i,o=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==o))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===gg?Object.assign(Object.assign({},e),i):cg(e,hg(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return cg(e,pg(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};(0,C.Cg)([l.observable],iv.prototype,"config",void 0),(0,C.Cg)([l.observable],iv.prototype,"styles",void 0),(0,C.Cg)([l.observable],iv.prototype,"model",void 0),iv=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Ag,styles:Eg})],iv);let ov=class extends iv{};ov=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:Eg,template:Ag})],ov);const nv=["int","short","long"],sv=["double","bigdecimal"],av=[...nv,...sv],rv=["date","date-time"],lv=["string","enum"],dv=["boolean"],cv=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type};function uv(e){switch(cv(e)){case"int":case"long":case"double":case"bigdecimal":case"date":case"date-time":case"short":return"NUMBER";case"string":case"enum":return"STRING";case"boolean":return"BOOLEAN"}}function hv(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function pv(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function mv(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function gv(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=cv(e);if(lv.includes(i))return t;if(av.includes(i))return t.toString();if(dv.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(rv.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function vv(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?vv(e,t):t(e)).filter(Boolean)}}function fv(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=cv(e);if(lv.includes(i))return t;if(nv.includes(i))return parseInt(t);if(sv.includes(i))return parseFloat(t);if(dv.includes(i))return t;if(rv.includes(i)){const e=new Date(parseInt(t));return"date"===i?bg(e):yg(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const bv={template:Ag,styles:Eg};var yv;!function(e){e.methodCall={CONTAINS_IGNORE_CASE:"CONTAINS_IGNORE_CASE",CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",TRIM:"TRIM",LONG_TO_DATE:"LONG_TO_DATE",LONG_TO_DATE_TIME:"LONG_TO_DATE_TIME",DATE_TIME_IS_IN_RANGE:"DATE_TIME_IS_IN_RANGE"},e.logicalOperations={AND:"AND",OR:"OR"},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:"GREATER_THAN",LESS_THAN:"LESS_THAN",GREATER_THAN_OR_EQUAL:"GREATER_THAN_OR_EQUAL",LESS_THAN_OR_EQUAL:"LESS_THAN_OR_EQUAL",EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",BITWISE_AND:"BITWISE_AND",BITWISE_OR:"BITWISE_OR",ASSIGNMENT:"ASSIGNMENT",IS_CURRENT:"IS_CURRENT",IS_PREVIOUS:"IS_PREVIOUS"})}(yv||(yv={}));const wv=[{type:yv.logicalOperations.AND,maxRules:"many"},{type:yv.logicalOperations.OR,maxRules:"many"}],Cv={EQUALS:yv.operations.EQUALS,NOT_EQUALS:yv.operations.NOT_EQUALS,IS_NULL:"IS_NULL",NOT_NULL:"NOT_NULL",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",CONTAINS:"CONTAINS",CONTAINS_WORDS_STARTING_WITH:"CONTAINS_WORDS_STARTING_WITH",CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:"CONTAINS_WORDS_STARTING_SPLIT_DELIMITER",GREATER_THAN:yv.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:yv.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:yv.operations.LESS_THAN,LESS_THAN_OR_EQUAL:yv.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:"IS_BEFORE",IS_AFTER:"IS_AFTER",ON_OR_BEFORE:"ON_OR_BEFORE",ON_OR_AFTER:"ON_OR_AFTER",IS_CURRENT:yv.operations.IS_CURRENT,IS_PREVIOUS:yv.operations.IS_PREVIOUS},xv=e=>({type:"enum",input:"select",values:e}),$v=xv({HOUR:{label:"Hour",tooltip:"Beginning of the hour immediately preceding the current one to the current hour."},DAY:{label:"Day",tooltip:"Midnight on the day before today to midnight of the current day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the previous week to midnight on the Monday of the current week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the previous month to midnight on the 1st of the current month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year."}}),Sv=xv({HOUR:{label:"Hour",tooltip:"Beginning of the current hour to beginning of the next hour."},DAY:{label:"Day",tooltip:"Midnight on the current day day to midnight of the next day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the current week to midnight on the Monday of the next week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the current month to midnight on the 1st of the next month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year."}}),Ev=[{type:Cv.EQUALS,label:"Equals",nbInputs:1,applyTo:[...lv,...dv,...av,...rv],tooltip:"Check the equality of the field compared to a set value"},{type:Cv.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...lv,...dv,...av,...rv],tooltip:"Check that the field is different from a set value"},{type:Cv.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...dv,...av,...rv],tooltip:"Check if the field value is null"},{type:Cv.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...dv,...av,...rv],tooltip:"Check if the field value is not null"},{type:Cv.IS_NULL_OR_BLANK,label:"Is null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is null or an empty string"},{type:Cv.NOT_NULL_OR_BLANK,label:"Not null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is not null and not an empty string"},{type:Cv.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:Cv.CONTAINS_WORDS_STARTING_WITH,label:"Contains words starting with",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains words that start with the specified text, split by whitespace (case insensitive)"},{type:Cv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:"Contains words starting with (split)",nbInputs:2,applyTo:["string"],tooltip:"Check if field contains words starting with text, split by a delimiter (case insensitive)"},{type:Cv.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...av],tooltip:"Check if the field value is greater than a specified number"},{type:Cv.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...av],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:Cv.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...av],tooltip:"Check if the field value is less than a specified number"},{type:Cv.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...av],tooltip:"Check if the field value is less than or equal to a specified number"},{type:Cv.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...rv],tooltip:"Check if the field is before a specified date/time"},{type:Cv.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...rv],tooltip:"Check if the field is after a specified date/time"},{type:Cv.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...rv],tooltip:"Check if the field is on or before a specified date/time"},{type:Cv.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...rv],tooltip:"Check if the field is on or after a specified date/time"},{type:Cv.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...rv],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:Sv,optgroup:"Relative Period"},{type:Cv.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...rv],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:$v,optgroup:"Relative Period"}];function Ov(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}function Tv(e,t){switch(t){case Cv.IS_NULL_OR_BLANK:return mv(e,yv.methodCall.IS_NULL_OR_BLANK,[]);case Cv.NOT_NULL_OR_BLANK:return mv(e,yv.methodCall.NOT_NULL_OR_BLANK,[]);case Cv.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return mv(e,yv.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case Cv.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return mv(e,yv.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case Cv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return mv(e,yv.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case Cv.IS_CURRENT:case Cv.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return mv(e,yv.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===Cv.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function kv(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=gv(e),n=uv(o),s=Ov(o.operator.type);switch(s){case Cv.EQUALS:case Cv.NOT_EQUALS:case Cv.GREATER_THAN:case Cv.GREATER_THAN_OR_EQUAL:case Cv.LESS_THAN:case Cv.LESS_THAN_OR_EQUAL:return hv(o,s,n);case Cv.IS_NULL:return pv(o,yv.operations.EQUALS,{TYPE:"NULL"});case Cv.NOT_NULL:return pv(o,yv.operations.NOT_EQUALS,{TYPE:"NULL"});case Cv.IS_NULL_OR_BLANK:case Cv.NOT_NULL_OR_BLANK:case Cv.CONTAINS:case Cv.CONTAINS_WORDS_STARTING_WITH:case Cv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case Cv.IS_CURRENT:case Cv.IS_PREVIOUS:return Tv(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Dv(e,t){if(!("date"===t.field.type||"date-time"===t.field.type))return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}function Iv(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?Cv[Cv.IS_NULL]:Cv[Cv.NOT_NULL];return Ev.find(t=>t.type===e)}const i=Dv(t.OPERATION,e);return Ev.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function Rv(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return fv(Iv({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Av(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[Cv[Cv.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[Cv[Cv.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[Cv[Cv.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[Cv[Cv.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[Cv[Cv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===yv.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[Cv["CURRENT"===t.PARAMETERS[2].VALUE?Cv.IS_CURRENT:Cv.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Ev.find(e=>e.type===i),value:o}}function Lv(e,t){return{combinator:wv.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Lv(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Rv(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Av(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Nv=class extends iv{ruleConfigChanged(e,t){this.config=Object.assign({combinators:wv,operators:Ev,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Lv(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=vv(e,kv);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Nv.prototype,"ruleConfig",void 0),Nv=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:Eg,template:Ag})],Nv);const Fv={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Mv=[{type:Fv.PLUS,label:"Add (+)",applyTo:[...av],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Fv.MINUS,label:"Subtract (-)",applyTo:[...av],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Fv.MULTIPLY,label:"Multiply (*)",applyTo:[...av],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Fv.DIVIDE,label:"Divide (/)",applyTo:[...av],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Fv.CONVERT_TO_DATE,label:"Convert to date",applyTo:["date"],nbInputs:0,tooltip:"Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm"},{type:Fv.CONVERT_TO_DATE_TIME,label:"Convert to date time",applyTo:["date-time"],nbInputs:0,tooltip:"Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss"}];function _v(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=gv(e),n=uv(o),s=o.operator.type;switch(s){case Fv.TRIM:case Fv.CONVERT_TO_DATE:case Fv.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Fv.TRIM:return mv(e,yv.methodCall.TRIM,[]);case Fv.CONVERT_TO_DATE:return mv(e,yv.methodCall.LONG_TO_DATE,[]);case Fv.CONVERT_TO_DATE_TIME:return mv(e,yv.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case Fv.PLUS:case Fv.MINUS:case Fv.DIVIDE:case Fv.MULTIPLY:return hv(o,s,n);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Hv(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return fv(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Mv.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Pv(e,t){return{combinator:og,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Pv(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Hv(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Fv[Fv.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Fv[Fv.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Fv[Fv.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Mv.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let zv=class extends iv{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Pv(t.fields,i);this.config={combinators:[og],operators:Mv,fields:t.fields,model:o,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){if(!("children"in e))throw new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:_v(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],zv.prototype,"valueConfig",void 0),zv=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:Eg,template:Ag})],zv);const Uv=l.html`
|
|
6687
|
+
`;let av=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),kg(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==Og(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(ov)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,Zg(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(Dg.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(Dg.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(Dg.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,o=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,n={ruleId:this.model.ruleId,newData:{field:o,value:null,operator:null}};this.dispatchEvent(new CustomEvent(Dg.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:iv(this.model,t,i)};this.dispatchEvent(new CustomEvent(Dg.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const o=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!o)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(Dg.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:tv(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],av.prototype,"config",void 0),(0,C.Cg)([l.observable],av.prototype,"styles",void 0),(0,C.Cg)([l.observable],av.prototype,"model",void 0),(0,C.Cg)([l.observable],av.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],av.prototype,"error",void 0),(0,C.Cg)([l.volatile],av.prototype,"operandIterator",null),av=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:sv,styles:nv,shadowOptions:{delegatesFocus:!0}})],av);let rv=class extends l.FASTElement{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=Cg(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=xg(t);this.dispatchChangeEvent(i)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(Dg.AddGroup,this.handleAddGroup),this.addEventListener(Dg.DelGroup,this.handleDeleteGroup),this.addEventListener(Dg.AddRule,this.handleAddRule),this.addEventListener(Dg.DelRule,this.handleDeleteRule),this.addEventListener(Dg.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(Dg.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Dg.AddGroup,this.handleAddGroup),this.removeEventListener(Dg.DelGroup,this.handleDeleteGroup),this.removeEventListener(Dg.AddRule,this.handleAddRule),this.removeEventListener(Dg.DelRule,this.handleDeleteRule),this.removeEventListener(Dg.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(Dg.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,o;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(o=e.fields)||void 0===o?void 0:o.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:wg,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,o={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=yg(this.model,t,o)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=yg(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=gg(i=this.model,fg(i,o=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==o))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,o;this.model=gg(i=this.model,bg(i,o=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==o))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===wg?Object.assign(Object.assign({},e),i):gg(e,fg(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return gg(e,bg(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};(0,C.Cg)([l.observable],rv.prototype,"config",void 0),(0,C.Cg)([l.observable],rv.prototype,"styles",void 0),(0,C.Cg)([l.observable],rv.prototype,"model",void 0),rv=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:_g,styles:Ig})],rv);let lv=class extends rv{};lv=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:Ig,template:_g})],lv);const dv=["int","short","long"],cv=["double","bigdecimal"],uv=[...dv,...cv],hv=["date","date-time"],pv=["string","enum"],mv=["boolean"],gv=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type};function vv(e){switch(gv(e)){case"int":case"long":case"double":case"bigdecimal":case"date":case"date-time":case"short":return"NUMBER";case"string":case"enum":return"STRING";case"boolean":return"BOOLEAN"}}function fv(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function bv(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function yv(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function wv(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=gv(e);if(pv.includes(i))return t;if(uv.includes(i))return t.toString();if(mv.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(hv.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function Cv(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?Cv(e,t):t(e)).filter(Boolean)}}function xv(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=gv(e);if(pv.includes(i))return t;if(dv.includes(i))return parseInt(t);if(cv.includes(i))return parseFloat(t);if(mv.includes(i))return t;if(hv.includes(i)){const e=new Date(parseInt(t));return"date"===i?$g(e):Sg(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const $v={template:_g,styles:Ig};var Sv;!function(e){e.methodCall={CONTAINS_IGNORE_CASE:"CONTAINS_IGNORE_CASE",CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",TRIM:"TRIM",LONG_TO_DATE:"LONG_TO_DATE",LONG_TO_DATE_TIME:"LONG_TO_DATE_TIME",DATE_TIME_IS_IN_RANGE:"DATE_TIME_IS_IN_RANGE"},e.logicalOperations={AND:"AND",OR:"OR"},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:"GREATER_THAN",LESS_THAN:"LESS_THAN",GREATER_THAN_OR_EQUAL:"GREATER_THAN_OR_EQUAL",LESS_THAN_OR_EQUAL:"LESS_THAN_OR_EQUAL",EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",BITWISE_AND:"BITWISE_AND",BITWISE_OR:"BITWISE_OR",ASSIGNMENT:"ASSIGNMENT",IS_CURRENT:"IS_CURRENT",IS_PREVIOUS:"IS_PREVIOUS"})}(Sv||(Sv={}));const Ev=[{type:Sv.logicalOperations.AND,maxRules:"many"},{type:Sv.logicalOperations.OR,maxRules:"many"}],Ov={EQUALS:Sv.operations.EQUALS,NOT_EQUALS:Sv.operations.NOT_EQUALS,IS_NULL:"IS_NULL",NOT_NULL:"NOT_NULL",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",CONTAINS:"CONTAINS",CONTAINS_WORDS_STARTING_WITH:"CONTAINS_WORDS_STARTING_WITH",CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:"CONTAINS_WORDS_STARTING_SPLIT_DELIMITER",GREATER_THAN:Sv.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:Sv.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:Sv.operations.LESS_THAN,LESS_THAN_OR_EQUAL:Sv.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:"IS_BEFORE",IS_AFTER:"IS_AFTER",ON_OR_BEFORE:"ON_OR_BEFORE",ON_OR_AFTER:"ON_OR_AFTER",IS_CURRENT:Sv.operations.IS_CURRENT,IS_PREVIOUS:Sv.operations.IS_PREVIOUS},Tv=e=>({type:"enum",input:"select",values:e}),kv=Tv({HOUR:{label:"Hour",tooltip:"Beginning of the hour immediately preceding the current one to the current hour."},DAY:{label:"Day",tooltip:"Midnight on the day before today to midnight of the current day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the previous week to midnight on the Monday of the current week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the previous month to midnight on the 1st of the current month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year."}}),Dv=Tv({HOUR:{label:"Hour",tooltip:"Beginning of the current hour to beginning of the next hour."},DAY:{label:"Day",tooltip:"Midnight on the current day day to midnight of the next day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the current week to midnight on the Monday of the next week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the current month to midnight on the 1st of the next month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year."}}),Iv=[{type:Ov.EQUALS,label:"Equals",nbInputs:1,applyTo:[...pv,...mv,...uv,...hv],tooltip:"Check the equality of the field compared to a set value"},{type:Ov.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...pv,...mv,...uv,...hv],tooltip:"Check that the field is different from a set value"},{type:Ov.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...mv,...uv,...hv],tooltip:"Check if the field value is null"},{type:Ov.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...mv,...uv,...hv],tooltip:"Check if the field value is not null"},{type:Ov.IS_NULL_OR_BLANK,label:"Is null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is null or an empty string"},{type:Ov.NOT_NULL_OR_BLANK,label:"Not null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is not null and not an empty string"},{type:Ov.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:Ov.CONTAINS_WORDS_STARTING_WITH,label:"Contains words starting with",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains words that start with the specified text, split by whitespace (case insensitive)"},{type:Ov.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:"Contains words starting with (split)",nbInputs:2,applyTo:["string"],tooltip:"Check if field contains words starting with text, split by a delimiter (case insensitive)"},{type:Ov.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...uv],tooltip:"Check if the field value is greater than a specified number"},{type:Ov.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...uv],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:Ov.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...uv],tooltip:"Check if the field value is less than a specified number"},{type:Ov.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...uv],tooltip:"Check if the field value is less than or equal to a specified number"},{type:Ov.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...hv],tooltip:"Check if the field is before a specified date/time"},{type:Ov.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...hv],tooltip:"Check if the field is after a specified date/time"},{type:Ov.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...hv],tooltip:"Check if the field is on or before a specified date/time"},{type:Ov.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...hv],tooltip:"Check if the field is on or after a specified date/time"},{type:Ov.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...hv],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:Dv,optgroup:"Relative Period"},{type:Ov.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...hv],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:kv,optgroup:"Relative Period"}];function Rv(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}function Av(e,t){switch(t){case Ov.IS_NULL_OR_BLANK:return yv(e,Sv.methodCall.IS_NULL_OR_BLANK,[]);case Ov.NOT_NULL_OR_BLANK:return yv(e,Sv.methodCall.NOT_NULL_OR_BLANK,[]);case Ov.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return yv(e,Sv.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case Ov.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return yv(e,Sv.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case Ov.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return yv(e,Sv.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case Ov.IS_CURRENT:case Ov.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return yv(e,Sv.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===Ov.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function Lv(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=wv(e),n=vv(o),s=Rv(o.operator.type);switch(s){case Ov.EQUALS:case Ov.NOT_EQUALS:case Ov.GREATER_THAN:case Ov.GREATER_THAN_OR_EQUAL:case Ov.LESS_THAN:case Ov.LESS_THAN_OR_EQUAL:return fv(o,s,n);case Ov.IS_NULL:return bv(o,Sv.operations.EQUALS,{TYPE:"NULL"});case Ov.NOT_NULL:return bv(o,Sv.operations.NOT_EQUALS,{TYPE:"NULL"});case Ov.IS_NULL_OR_BLANK:case Ov.NOT_NULL_OR_BLANK:case Ov.CONTAINS:case Ov.CONTAINS_WORDS_STARTING_WITH:case Ov.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case Ov.IS_CURRENT:case Ov.IS_PREVIOUS:return Av(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Nv(e,t){if(!("date"===t.field.type||"date-time"===t.field.type))return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}function Fv(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?Ov[Ov.IS_NULL]:Ov[Ov.NOT_NULL];return Iv.find(t=>t.type===e)}const i=Nv(t.OPERATION,e);return Iv.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function Mv(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return xv(Fv({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function _v(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[Ov[Ov.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[Ov[Ov.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[Ov[Ov.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[Ov[Ov.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[Ov[Ov.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===Sv.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[Ov["CURRENT"===t.PARAMETERS[2].VALUE?Ov.IS_CURRENT:Ov.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Iv.find(e=>e.type===i),value:o}}function Pv(e,t){return{combinator:Ev.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Pv(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Mv(e,t);if("METHOD_EXPRESSION"===t.TYPE)return _v(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Hv=class extends rv{ruleConfigChanged(e,t){this.config=Object.assign({combinators:Ev,operators:Iv,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Pv(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=Cv(e,Lv);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Hv.prototype,"ruleConfig",void 0),Hv=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:Ig,template:_g})],Hv);const zv={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Uv=[{type:zv.PLUS,label:"Add (+)",applyTo:[...uv],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:zv.MINUS,label:"Subtract (-)",applyTo:[...uv],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:zv.MULTIPLY,label:"Multiply (*)",applyTo:[...uv],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:zv.DIVIDE,label:"Divide (/)",applyTo:[...uv],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:zv.CONVERT_TO_DATE,label:"Convert to date",applyTo:["date"],nbInputs:0,tooltip:"Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm"},{type:zv.CONVERT_TO_DATE_TIME,label:"Convert to date time",applyTo:["date-time"],nbInputs:0,tooltip:"Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss"}];function Bv(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=wv(e),n=vv(o),s=o.operator.type;switch(s){case zv.TRIM:case zv.CONVERT_TO_DATE:case zv.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case zv.TRIM:return yv(e,Sv.methodCall.TRIM,[]);case zv.CONVERT_TO_DATE:return yv(e,Sv.methodCall.LONG_TO_DATE,[]);case zv.CONVERT_TO_DATE_TIME:return yv(e,Sv.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case zv.PLUS:case zv.MINUS:case zv.DIVIDE:case zv.MULTIPLY:return fv(o,s,n);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Vv(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return xv(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Uv.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Gv(e,t){return{combinator:lg,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Gv(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Vv(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[zv[zv.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[zv[zv.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[zv[zv.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Uv.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let jv=class extends rv{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Gv(t.fields,i);this.config={combinators:[lg],operators:Uv,fields:t.fields,model:o,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){if(!("children"in e))throw new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:Bv(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],jv.prototype,"valueConfig",void 0),jv=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:Ig,template:_g})],jv);const Yv=l.html`
|
|
6572
6688
|
<template ${(0,l.ref)("notificationListener")}>
|
|
6573
6689
|
<slot></slot>
|
|
6574
6690
|
</template>
|
|
6575
|
-
`,Bv={mode:"open",delegatesFocus:!0};class Vv extends a.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[],this.reconnections=0,this.reconnection=Promise.resolve(),this.reconnectionWaitMs=1e4}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(pe.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),Ce(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>{if(!e)return;const t=this.reconnections+=1;var i,o;this.reconnection=(i=this.reconnection,o=this.reconnectionWaitMs,new Promise(e=>{const t=setTimeout(e,o);i.finally(()=>{clearTimeout(t),e()})})).then(()=>this.handleReconnection(t)).catch(e=>ot.error(e))})})}handleReconnection(e){return(0,C.sH)(this,void 0,void 0,function*(){var t;const i=()=>e===this.reconnections&&this.isConnected;if(!this.resourceName||!i())return;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0;const o=yield this.initializeDatasource();if(i()){if(!o)throw new Error(`Failed to initialize datasource for ${this.resourceName}`);this.setupDataSubscription()}})}initializeDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){var e;return(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy(),this.datasource.init({resourceName:this.resourceName},!0)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,li.d)(e))}):ot.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:o}=e,n=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const r={title:t,body:i,createdAt:n,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};fc(r,this.tagName)}}(0,C.Cg)([l.observable],Vv.prototype,"notificationListener",void 0),(0,C.Cg)([hi.dm],Vv.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Vv.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Vv.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Vv.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Vv.prototype,"toastPosition",void 0),(0,C.Cg)([pi.yW],Vv.prototype,"datasource",void 0);const Gv=Vv.compose({baseName:"notification-listener",template:Uv,shadowOptions:Bv}),jv=(e,t)=>i=>{const o="function"==typeof t?t:(n=t,e=>Object.assign(Object.assign({},n),e));var n;return l.FASTElement.define(class extends e{},o(i))};function Yv(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=l.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}var Wv;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Wv||(Wv={}));class qv{trackEvent(e,t){Ys.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const Kv=a.DI.createInterface(e=>e.singleton(qv));var Xv=i(98647),Jv=i(35044);const Qv=(0,it.createLogger)("foundation-router");var Zv=i(36132),ef=i(80751),tf=i(3479);const of="$router",nf=Object.freeze({getOrCreateFor:e=>{const t=e[of];return void 0!==t?t:e[of]=new sf(e)},find:e=>tf.Ix.find(e),from:e=>tf.Ix.from(e)});class sf extends tf.LK{}const af=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function rf(e){return af.test(e)}function lf(e){return e.config instanceof Xv.Y?e:nf.find(e)}function df(e){return lf(e).parent}function cf(e){let t=lf(e);for(;t&&t.level>0;)t=t.parent;return t}function uf(e,t="/",i=!1){const o=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&o.endsWith(t)?o.slice(0,-1):o}function hf(e,t="/"){const i=e.split(t);return 2===i.length&&""===i[0]&&""!==i[1]?e:(i.length>1&&i.pop(),i.join(t))}function pf(e){return e.replace(`/*${ef.N}`,"")}function mf(){null===document.querySelector("foundation-router, fast-router")&&window.dispatchEvent(new PopStateEvent("popstate"))}const gf=Object.freeze({path:Object.freeze({get current(){return Zv.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=lf(e);for(;null!==o;){const e=yield o.config.generateRouteFromPath(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t=!0)=>{e&&rf(e)?location.href=e:(history.pushState({},document.title,e),mf(),t&&gf.path.trigger(e))},replace:(e,t=!0)=>{e&&rf(e)?location.href=e:(history.replaceState({},document.title,e),mf(),t&&gf.path.trigger(e))},trigger:e=>{Zv.qh.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=lf(e);for(;null!==o;){const e=yield o.config.generateRouteFromName(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield gf.name.generateRoute(e,t,i);null!==n&&gf.path.push(n,o)}),replace:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield gf.name.generateRoute(e,t,i);null!==n&&gf.path.replace(n,o)}),trigger:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){const o=yield gf.name.generateRoute(e,t,i);null!==o&&gf.path.trigger(o)})})}),vf=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,ff=10;function bf(e,t=vf,i=ff){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,n)=>{e.navItems.filter(t).map((t,o)=>{var s,a,r,l;const d=null!==(s=t.placementIndex)&&void 0!==s?s:n*i+o;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}class yf extends ef.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(Qv.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return Qv.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return Qv.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}(0,C.Cg)([l.observable],yf.prototype,"definitions",void 0);class wf extends Xv.Y{constructor(){super(),this.logger=Qv,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new yf(this),this.basename=es.OB,this.routes=new yf(this)}getNavItems(e=vf){return bf(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Wv.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const n=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),gf.name.replace(e.router,n)}else this.user.trackPath(),gf.name.replace(e.router,this.loginPath)})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),gf.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return(0,C.sH)(this,void 0,void 0,function*(){const o=yield i.generateRouteFromName.call(this,e,t);return o?this.generateNavigationPath(o):null})}navigateTo(e){return(0,C.sH)(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield gf.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&gf.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Jv.C.build(t);let n=i&&!e.startsWith(i)?uf([i,e]):e;return n=o?`${n}?${o}`:n,n}getNavigationPathBasename(){var e,t;const i=this.parent,o=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return o?pf(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([a.Container],wf.prototype,"container",void 0),(0,C.Cg)([Kv],wf.prototype,"analytics",void 0),(0,C.Cg)([Ql.KJ],wf.prototype,"user",void 0),(0,C.Cg)([ki.N],wf.prototype,"_session",void 0);const Cf="navigate-to",xf="generate-navigation-path";let $f=class extends(nf.from(l.FASTElement)){constructor(){super(...arguments),this.logger=Qv,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[of]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),l.DOM.queueUpdate(()=>(0,C.sH)(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(Cf,this.onNavigateTo),this.addEventListener(xf,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(Cf,this.onNavigateTo),this.removeEventListener(xf,this.onGenerateNavigationPath)}};$f=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],$f);const Sf=e=>`control: ${e}-control, content: ${e}-content`,Ef=["background: progress-ring-background","progress: progress-ring-progress","indeterminate-indicator-1: progress-ring-indeterminate"].join(", "),Of=e=>l.html`
|
|
6691
|
+
`,Wv={mode:"open",delegatesFocus:!0};class qv extends a.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[],this.reconnections=0,this.reconnection=Promise.resolve(),this.reconnectionWaitMs=1e4}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(ye.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),Te(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>{if(!e)return;const t=this.reconnections+=1;var i,o;this.reconnection=(i=this.reconnection,o=this.reconnectionWaitMs,new Promise(e=>{const t=setTimeout(e,o);i.finally(()=>{clearTimeout(t),e()})})).then(()=>this.handleReconnection(t)).catch(e=>dt.error(e))})})}handleReconnection(e){return(0,C.sH)(this,void 0,void 0,function*(){var t;const i=()=>e===this.reconnections&&this.isConnected;if(!this.resourceName||!i())return;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0;const o=yield this.initializeDatasource();if(i()){if(!o)throw new Error(`Failed to initialize datasource for ${this.resourceName}`);this.setupDataSubscription()}})}initializeDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){var e;return(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy(),this.datasource.init({resourceName:this.resourceName},!0)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,mi.d)(e))}):dt.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:o}=e,n=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const r={title:t,body:i,createdAt:n,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};$c(r,this.tagName)}}(0,C.Cg)([l.observable],qv.prototype,"notificationListener",void 0),(0,C.Cg)([bi.dm],qv.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],qv.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],qv.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],qv.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],qv.prototype,"toastPosition",void 0),(0,C.Cg)([yi.yW],qv.prototype,"datasource",void 0);const Kv=qv.compose({baseName:"notification-listener",template:Yv,shadowOptions:Wv}),Xv=(e,t)=>i=>{const o="function"==typeof t?t:(n=t,e=>Object.assign(Object.assign({},n),e));var n;return l.FASTElement.define(class extends e{},o(i))};function Jv(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=l.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}var Qv;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Qv||(Qv={}));class Zv{trackEvent(e,t){Qs.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const ef=a.DI.createInterface(e=>e.singleton(Zv));var tf=i(98647),of=i(35044);const nf=(0,lt.createLogger)("foundation-router");var sf=i(36132),af=i(80751),rf=i(3479);const lf="$router",df=Object.freeze({getOrCreateFor:e=>{const t=e[lf];return void 0!==t?t:e[lf]=new cf(e)},find:e=>rf.Ix.find(e),from:e=>rf.Ix.from(e)});class cf extends rf.LK{}const uf=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function hf(e){return uf.test(e)}function pf(e){return e.config instanceof tf.Y?e:df.find(e)}function mf(e){return pf(e).parent}function gf(e){let t=pf(e);for(;t&&t.level>0;)t=t.parent;return t}function vf(e,t="/",i=!1){const o=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&o.endsWith(t)?o.slice(0,-1):o}function ff(e,t="/"){const i=e.split(t);return 2===i.length&&""===i[0]&&""!==i[1]?e:(i.length>1&&i.pop(),i.join(t))}function bf(e){return e.replace(`/*${af.N}`,"")}function yf(){null===document.querySelector("foundation-router, fast-router")&&window.dispatchEvent(new PopStateEvent("popstate"))}const wf=Object.freeze({path:Object.freeze({get current(){return sf.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=pf(e);for(;null!==o;){const e=yield o.config.generateRouteFromPath(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t=!0)=>{e&&hf(e)?location.href=e:(history.pushState({},document.title,e),yf(),t&&wf.path.trigger(e))},replace:(e,t=!0)=>{e&&hf(e)?location.href=e:(history.replaceState({},document.title,e),yf(),t&&wf.path.trigger(e))},trigger:e=>{sf.qh.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=pf(e);for(;null!==o;){const e=yield o.config.generateRouteFromName(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield wf.name.generateRoute(e,t,i);null!==n&&wf.path.push(n,o)}),replace:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield wf.name.generateRoute(e,t,i);null!==n&&wf.path.replace(n,o)}),trigger:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){const o=yield wf.name.generateRoute(e,t,i);null!==o&&wf.path.trigger(o)})})}),Cf=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,xf=10;function $f(e,t=Cf,i=xf){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,n)=>{e.navItems.filter(t).map((t,o)=>{var s,a,r,l;const d=null!==(s=t.placementIndex)&&void 0!==s?s:n*i+o;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}class Sf extends af.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(nf.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return nf.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return nf.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}(0,C.Cg)([l.observable],Sf.prototype,"definitions",void 0);class Ef extends tf.Y{constructor(){super(),this.logger=nf,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new Sf(this),this.basename=as.OB,this.routes=new Sf(this)}getNavItems(e=Cf){return $f(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Qv.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const n=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),wf.name.replace(e.router,n)}else this.user.trackPath(),wf.name.replace(e.router,this.loginPath)})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),wf.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return(0,C.sH)(this,void 0,void 0,function*(){const o=yield i.generateRouteFromName.call(this,e,t);return o?this.generateNavigationPath(o):null})}navigateTo(e){return(0,C.sH)(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield wf.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&wf.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=of.C.build(t);let n=i&&!e.startsWith(i)?vf([i,e]):e;return n=o?`${n}?${o}`:n,n}getNavigationPathBasename(){var e,t;const i=this.parent,o=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return o?bf(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([a.Container],Ef.prototype,"container",void 0),(0,C.Cg)([ef],Ef.prototype,"analytics",void 0),(0,C.Cg)([nd.KJ],Ef.prototype,"user",void 0),(0,C.Cg)([Ni.N],Ef.prototype,"_session",void 0);const Of="navigate-to",Tf="generate-navigation-path";let kf=class extends(df.from(l.FASTElement)){constructor(){super(...arguments),this.logger=nf,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[lf]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),l.DOM.queueUpdate(()=>(0,C.sH)(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(Of,this.onNavigateTo),this.addEventListener(Tf,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(Of,this.onNavigateTo),this.removeEventListener(Tf,this.onGenerateNavigationPath)}};kf=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],kf);const Df=e=>`control: ${e}-control, content: ${e}-content`,If=["background: progress-ring-background","progress: progress-ring-progress","indeterminate-indicator-1: progress-ring-indeterminate"].join(", "),Rf=e=>l.html`
|
|
6576
6692
|
|
|
6577
|
-
<${e}-card class=${e=>(0
|
|
6578
|
-
<div class=${e=>(0
|
|
6693
|
+
<${e}-card class=${e=>(0,$.x)("stepper-tab",["stepper-tab-hidden",e.hideTabs])} part="stepper-tab" @tab-clicked="${(e,t)=>e.handleStepClick(t.event.detail)}" role="stepper-tab" data-test-id="stepper-tab">
|
|
6694
|
+
<div class=${e=>(0,$.x)("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])} part="stepper-tab-menu">
|
|
6579
6695
|
<slot name="tab" ${(0,l.slotted)("tabs")} ></slot>
|
|
6580
6696
|
</div>
|
|
6581
6697
|
${(0,l.when)(e=>e.orientation===a.TabsOrientation.vertical&&!e.hideProgress,l.html`
|
|
6582
6698
|
<div class="stepper-tab-progress" part="stepper-tab-progress">
|
|
6583
|
-
<${e}-progress-ring class="progress-ring" part="progress-ring" exportparts="${
|
|
6699
|
+
<${e}-progress-ring class="progress-ring" part="progress-ring" exportparts="${If}" value=${e=>e.progressValue}></${e}-progress-ring>
|
|
6584
6700
|
<label part="progress-label">You have completed ${e=>e.progressValue}% of the fields required to create a project</label>
|
|
6585
6701
|
</div>`)}
|
|
6586
6702
|
</${e}-card>
|
|
@@ -6592,22 +6708,22 @@ class="margin"
|
|
|
6592
6708
|
${(0,l.when)(e=>!e.hideAllButtons,l.html`
|
|
6593
6709
|
<div class="action-buttons-container" part="action-buttons-container">
|
|
6594
6710
|
<slot name="action-buttons">
|
|
6595
|
-
<${e}-button part="back-button" exportparts="${
|
|
6711
|
+
<${e}-button part="back-button" exportparts="${Df("back-button")}" @click=${e=>e.previousStep()} ?disabled=${e=>e.disabledPreviousStep}>Back</${e}-button>
|
|
6596
6712
|
${(0,l.when)(e=>e.isLastStep&&!e.hideSubmitButton,l.html`
|
|
6597
|
-
<${e}-button part="submit-button" exportparts="${
|
|
6713
|
+
<${e}-button part="submit-button" exportparts="${Df("submit-button")}" @click=${e=>e._submit()} ?disabled=${e=>e.islastStepValid} data-test-id="submit-button">
|
|
6598
6714
|
Submit
|
|
6599
6715
|
</${e}-button>
|
|
6600
6716
|
`)}
|
|
6601
6717
|
${(0,l.when)(e=>!e.isLastStep,l.html`
|
|
6602
|
-
<${e}-button part="next-button" exportparts="${
|
|
6718
|
+
<${e}-button part="next-button" exportparts="${Df("next-button")}" @click=${e=>e.nextStep()} data-test-id="next-button">Next</${e}-button>`)}
|
|
6603
6719
|
</slot>
|
|
6604
6720
|
</div>
|
|
6605
6721
|
`)}
|
|
6606
6722
|
</${e}-card>
|
|
6607
6723
|
`)}
|
|
6608
|
-
`,
|
|
6609
|
-
${e=>
|
|
6610
|
-
`,
|
|
6724
|
+
`,Af=l.html`
|
|
6725
|
+
${e=>Rf(I(e))}
|
|
6726
|
+
`,Lf=l.css`
|
|
6611
6727
|
:host {
|
|
6612
6728
|
display: flex;
|
|
6613
6729
|
height: 100%;
|
|
@@ -6706,5 +6822,5 @@ class="margin"
|
|
|
6706
6822
|
max-height: 70px;
|
|
6707
6823
|
height: 70px;
|
|
6708
6824
|
}
|
|
6709
|
-
`;class
|
|
6710
|
-
//# sourceMappingURL=
|
|
6825
|
+
`;class Nf extends a.FoundationElement{constructor(){super(...arguments),this.hideProgress=!1,this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=a.TabsOrientation.vertical,this.tabs=[],this.tabpanels=[],this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if("tab"===e.slot){const i=this.activeTabIndex===t,o=t+1===this.tabIds.length,n=this.tabIds[t],s=this.tabpanelIds[t];e.setAttribute("id",n),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-disabled",i?"false":"true"),l.DOM.setBooleanAttribute(e,"selected",i),e.setAttribute("orientation",this.orientation),s&&e.setAttribute("aria-controls",s),e.setAttribute("tab-position",String(t+1)),l.DOM.setBooleanAttribute(e,"isLast",o),l.DOM.setBooleanAttribute(e,"hideStepNumber",!0===this.hideStepNumber),e.setAttribute("tabindex",i?"0":"-1"),l.DOM.setBooleanAttribute(e,"showCursorPointer",t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps),i&&(this.activetab=e,this.activeid=n)}}),0===this.activeTabIndex&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});const t=this.indicatorOnly?this.tabs.length:this.tabpanels.length;this.progressValue=t?Math.round(e/t*100):0},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{const i=this.tabIds[t],o=this.tabpanelIds[t];e.setAttribute("id",o),e.setAttribute("aria-labelledby",i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&(this.indicatorOnly||this.tabpanels.length>0)}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}goToStep(e,t=!1){const i=e-1;if(e<1||e>this.tabs.length)return dt.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(i===this.activeTabIndex)return!1;if(t){if(i<this.activeTabIndex)return this.handleBackwardJump(i);if(i>this.activeTabIndex)return this.handleForwardJump(i)}if(i<this.activeTabIndex&&this.allowBackwardJumps){return this.handleBackwardJump(i)}if(i>this.activeTabIndex&&this.allowForwardJumps){return this.handleForwardJump(i)}return i===this.activeTabIndex+1?(this.nextStep(),!0):(dt.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit("validation-failure",{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return 0===this.activeTabIndex}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){var e;const t=this.tabs.length-1;return this.activeTabIndex===t&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs(),!1):(this.tabs[t].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit("submit")}nextStep(){var e;if(!this.slotsInitialized)return void(this.pendingNextStep=!0);if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid())return this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,void this.getCompletedTabs();this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex=this.activeTabIndex+1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit("next-step"),this.$emit("validation-success"));const t=this.tabs.length-1,i=this.activeTabIndex===t;this.hideSubmitButton&&i&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs()):(this.tabs[t].completed=!1,this.getCompletedTabs())}previousStep(){0!==this.activeTabIndex&&(this.tabs[this.activeTabIndex].completed=!1,this.activeTabIndex=this.activeTabIndex-1,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`tab-${(0,Ea.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,Ea.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],Nf.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-progress",mode:"boolean"})],Nf.prototype,"hideProgress",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],Nf.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],Nf.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],Nf.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],Nf.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],Nf.prototype,"hideTabs",void 0),(0,C.Cg)([(0,l.attr)({attribute:"indicator-only",mode:"boolean"})],Nf.prototype,"indicatorOnly",void 0),(0,C.Cg)([l.attr],Nf.prototype,"orientation",void 0),(0,C.Cg)([l.attr],Nf.prototype,"activeid",void 0),(0,C.Cg)([l.observable],Nf.prototype,"tabs",void 0),(0,C.Cg)([l.observable],Nf.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],Nf.prototype,"validation",void 0),(0,C.Cg)([l.observable],Nf.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],Nf.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],Nf.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],Nf.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],Nf.prototype,"islastStepValid",null);const Ff=void 0,Mf={},_f=Nf.compose(Object.assign({baseName:"stepper",template:Af,styles:Lf,shadowOptions:Ff},Mf)),Pf=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],Hf={rapid:(zf="rapid",["text-field","text-area","combobox"].map(e=>`${zf}-${e}`))};var zf;function Uf(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=Hf[e])&&void 0!==t?t:[]}),o=t.filter(Boolean);return Array.from(new Set([...Pf,...i,...o])).join(",")}Uf(["rapid"]);const Bf=()=>Id().register(og)},70997(e,t,i){"use strict";function o(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),s=o(i);return(t,i)=>e(t,i)?n(t,i):s(t,i)}i.d(t,{q:()=>o})},80273(e,t,i){"use strict";i.d(t,{Du:()=>l,IT:()=>a,WP:()=>n,f4:()=>r,zz:()=>s});var o=i(52945);const n=(e,t)=>{(0,o.O5)(e,t)};var s,a;!function(e){e.Italic="italic",e.Normal="normal"}(s||(s={})),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"}(a||(a={}));const r=(e,t=s.Normal,i=a.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${i};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}}}]);
|
|
6826
|
+
//# sourceMappingURL=249.89c72ec851a5758f95ff3a8580759dfc.js.map
|