@genesislcap/design-system-configurator 15.42.0 → 15.43.0-FUI-2629.1
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/{966.966.2381acb57a026abc8fbc.js → 510.510.f4fd2aab0fc47572bdc6.js} +522 -410
- package/dist/510.ad8d1c552f29cb845c9a2916c401e4ce.js.map +1 -0
- package/dist/583.583.92ff967f1e8963b20960.js +1156 -0
- package/dist/583.ec77b2f9e4d7e454573fde0a4ac357b2.js.map +1 -0
- package/dist/{837.837.e0dd5a3edc9cc7f75454.js → 750.750.efbbb3ca3eba6c8712d0.js} +54 -35
- package/dist/750.be3dd0ca7103c90cc6ecbb2dfbbe5e82.js.map +1 -0
- package/dist/913.75c7c7d4c1827cf2d3048c2dc721ba3b.js.map +1 -0
- package/dist/{11.11.fbdae997b64e2ff8a67e.js → 913.913.a4f41ece60987718c25c.js} +85 -59
- package/dist/{947.947.fc38d9de573fb56c11ff.js → 947.947.813b598abb3c321533ac.js} +42 -38
- package/dist/947.e2e9255c04540ecdf117e11ca1d1d7ab.js.map +1 -0
- package/dist/designSystemConfigurator.859ec1cb332817327d705a302cb6a51a.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/main.a84d798e339ed4b5720d2492fb607c47.js.map +1 -0
- package/dist/main.faf591f32abded9a4dff.js +2 -0
- package/dist/remoteEntry.js +2 -2
- package/package.json +12 -12
- package/dist/11.dabc3b8771ea67f554fe02d500a02d0d.js.map +0 -1
- package/dist/470.296a76d8bd5451c1865d7092495c9e02.js.map +0 -1
- package/dist/470.470.20cf3962e8f02494878c.js +0 -1146
- package/dist/837.fc36ee082eb51cec0656e5a122d2faf5.js.map +0 -1
- package/dist/947.f6bfa53667ebe2f26ebb081741f78fa4.js.map +0 -1
- package/dist/966.c46b54bfb80b4c5740e811e2ea439b34.js.map +0 -1
- package/dist/designSystemConfigurator.7b762ce8f0b0c92cac8cb033975f7609.js.map +0 -1
- package/dist/main.6af3c65b8a05568178dd.js +0 -2
- package/dist/main.c2c2270e6710d0efd55bed22e09ee4f2.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,v=new Date,g=r||(s||a?1:v.getDate()),f=s||v.getFullYear(),b=0;s&&!a||(b=a>0?a-1:v.getMonth());var y,w=l||0,C=d||0,x=c||0,$=u||0;return h?new Date(Date.UTC(f,b,g,w,C,x,$+60*h.offset*1e3)):i?new Date(Date.UTC(f,b,g,w,C,x,$)):(y=new Date(f,b,g,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 v=i.apply(this,s);if(v.isValid()){this.$d=v.$d,this.$L=v.$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={},v=Object.keys(e).sort(d);for(p=0;p<v.length;p++){var g=v[p];u(e[g],g,p,a,e,c,h),m[g]=e[g]}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}}},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:()=>wl,AiCriteriaSearch:()=>$e,AiIndicator:()=>De,Anchor:()=>Le,AnchoredRegion:()=>Pe,Avatar:()=>Ye,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Ef,Badge:()=>Qe,Banner:()=>lt,BaseDatasource:()=>vi,BaseFileComponent:()=>Hs,Breadcrumb:()=>ht,BreadcrumbItem:()=>bt,Button:()=>St,COMBO_INPUT_MIN_LENGTH:()=>Eu,CRON_LENGTH:()=>Cc,CSSVarsTokenMapper:()=>Ym,Calendar:()=>It,Card:()=>Mt,CategorizedMultiselect:()=>Wt,Checkbox:()=>Jt,Combobox:()=>$i,ConnectionIndicator:()=>Ii,CronBuilderEvents:()=>Tc,DATETIME_OPERATORS:()=>ee,DATE_OPERATORS:()=>Z,DATE_PICKER_VALUE_FORMAT:()=>fo,DEFUALT_FILTER_BAR_COLUMNS:()=>Sa,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Tf,DataGrid:()=>Fi,DataGridCell:()=>Pi,DataGridDatasource:()=>Wm,DataGridRow:()=>Gi,DateOrDay:()=>vc,DatePicker:()=>So,DefaultRouter:()=>Jg,DesignTokensObservable:()=>Ko,Dialog:()=>An,DialogElement:()=>Rn,Disclosure:()=>Mn,Divider:()=>Bn,DropdownMenu:()=>Jn,EnvironmentIndicator:()=>us,ErrorBanner:()=>gs,ErrorBoundary:()=>Is,ErrorBoundaryEvent:()=>bs,ErrorDialog:()=>Ms,ExpressionBuilderConfig:()=>s,ExpressionBuilderCore:()=>ug,FaPrefixFromStyle:()=>Or,FileReader:()=>Vs,FileUpload:()=>oa,Filter:()=>ga,FilterBar:()=>Ea,FilterEvents:()=>va,FlexLayout:()=>La,FlexMediaQueriesEnum:()=>Ta,Flipper:()=>_a,Flyout:()=>ja,FoundationDesignSystemProvider:()=>Cn,FoundationExpressionBuilder:()=>Xv,FoundationRouteCollection:()=>hf,FoundationRouteNav:()=>lf,FoundationRouter:()=>gf,FoundationRouterConfiguration:()=>pf,FoundationRuleExpressionBuilder:()=>Tg,FoundationValueExpressionBuilder:()=>Lg,GenerateNavigationPathEventType:()=>vf,GridLayout:()=>ir,GridLayoutItem:()=>rr,GridMediaQueriesEnum:()=>Ka,HorizontalScroll:()=>ur,INPUT_MIN_LENGTH:()=>Su,Icon:()=>Dr,Listbox:()=>Lr,ListboxOption:()=>Pr,MAX_DAYS:()=>wc,MAX_HOURS:()=>$c,MAX_MINS_SEC:()=>Sc,MAX_MINUTE_RECURRENCE:()=>Oc,MAX_MONTHS:()=>yc,MAX_WEEK_DAYS:()=>xc,MAX_WEEK_NUMBER:()=>Ec,Menu:()=>jr,MenuItem:()=>Jr,Modal:()=>sl,Multiselect:()=>ml,MultiselectDatasource:()=>dl,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>mf,NotificationListener:()=>Mg,NumberField:()=>Pl,OPERATOR_DISPLAY_LABEL:()=>te,Optgroup:()=>jl,OptionsDatasource:()=>bi,Pill:()=>Ld,Popper:()=>_d,Position:()=>zt,Progress:()=>md,ProgressRing:()=>Vd,Radio:()=>Kd,RadioGroup:()=>tc,RecurrenceType:()=>pc,Router:()=>Xg,RuleExpression:()=>hg,SCROLL_TIMEOUT:()=>$u,SECTION_NAVIGATOR_EVENTS:()=>Bu,SNACKBAR_CLOSE_TIMEOUT:()=>Nh,SNACKBAR_EVENTS_NAMES:()=>Mh,SNACKBAR_TYPES:()=>Fh,SNACKBAR_TYPE_DEFAULT:()=>Lh,STRING_OPERATORS:()=>J,Scheduler:()=>lc,SchedulerCronBuilder:()=>ru,SchedulerTimezone:()=>mu,SearchBar:()=>Tu,SearchBarCombobox:()=>Fu,SectionNavigator:()=>ju,SegmentedControl:()=>Ju,SegmentedItem:()=>oh,Select:()=>dh,Skeleton:()=>vh,Slider:()=>$h,SliderLabel:()=>Dh,Snackbar:()=>Uh,StackingIcons:()=>jh,StatusPill:()=>Xh,Stepper:()=>wf,StepperTab:()=>tp,StepperTabPanel:()=>ap,Switch:()=>hp,SystemHealthOverlay:()=>xd,Tab:()=>$p,TabPanel:()=>Dp,Tabs:()=>Np,TextArea:()=>Up,TextField:()=>Kp,Toast:()=>nm,Toolbar:()=>lm,Tooltip:()=>mm,TreeItem:()=>wm,TreeView:()=>Om,UrlInput:()=>Nm,VerificationCodeInput:()=>Vm,WeekType:()=>mc,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:()=>cn,actionsMenuBaseStyles:()=>$,alertFlashDurationProperty:()=>fp,alertFlashPhaseProperty:()=>gp,applyCustomTokens:()=>tn,baseComponents:()=>jm,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>hn,black:()=>ko,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>kf,categorizedMultiselectStyles:()=>Bt,categorizedMultiselectTemplate:()=>Gt,clientOperators:()=>mg,closeIcon:()=>la,configureDesignSystem:()=>dn,configureEnvironmentIndicator:()=>ds,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>mn,createDesignSystemProxy:()=>bd,createFormData:()=>Xs,crossIcon:()=>yu,daysOfWeek:()=>gc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>Ee,defaultAnchorConfig:()=>Ne,defaultAnchoredRegionConfig:()=>Ue,defaultAvatarConfig:()=>qe,defaultBadgeConfig:()=>et,defaultBreadcrumbConfig:()=>mt,defaultBreadcrumbItemConfig:()=>wt,defaultButtonConfig:()=>Ot,defaultCalendarConfig:()=>At,defaultCardConfig:()=>Ht,defaultCategorizedMultiselectConfig:()=>Yt,defaultCheckboxConfig:()=>Zt,defaultComboboxConfig:()=>Ei,defaultConfig:()=>cc,defaultCronBuilderConfig:()=>du,defaultDataGridCellConfig:()=>Ui,defaultDataGridConfig:()=>Mi,defaultDataGridRowConfig:()=>Yi,defaultDatePickerConfig:()=>$o,defaultDialogConfig:()=>In,defaultDisclosureConfig:()=>Hn,defaultDividerConfig:()=>Gn,defaultFileUploadConfig:()=>sa,defaultFillColor:()=>Io,defaultFlexLayoutConfig:()=>Aa,defaultFlipperConfig:()=>Pa,defaultFlyoutConfig:()=>Wa,defaultGridLayoutConfig:()=>er,defaultGridLayoutItemConfig:()=>ar,defaultHorizontalScrollConfig:()=>pr,defaultIconConfig:()=>Er,defaultListboxConfig:()=>Nr,defaultListboxOptionConfig:()=>Ur,defaultMenuConfig:()=>Wr,defaultMenuItemConfig:()=>Zr,defaultModalConfig:()=>nl,defaultMultiselectConfig:()=>pl,defaultNavItemPredicate:()=>df,defaultNeutralForegroundContrast:()=>Vo,defaultNumberFieldConfig:()=>Ul,defaultPillConfig:()=>Ad,defaultPlacementIndexPadding:()=>cf,defaultProgressConfig:()=>gd,defaultProgressRingConfig:()=>jd,defaultRadioConfig:()=>Jd,defaultRadioGroupConfig:()=>oc,defaultSearchBarComboboxConfig:()=>Mu,defaultSearchBarConfig:()=>Du,defaultSectionNavigatorConfig:()=>Wu,defaultSegmentedControlConfig:()=>Zu,defaultSegmentedItemConfig:()=>sh,defaultSelectConfig:()=>uh,defaultSkeletonConfig:()=>fh,defaultSliderConfig:()=>Eh,defaultSliderLabelConfig:()=>Rh,defaultStepperConfig:()=>xf,defaultStepperTabConfig:()=>op,defaultStepperTabPanelConfig:()=>lp,defaultSwitchConfig:()=>mp,defaultSystemHealthOverlayConfig:()=>Od,defaultTabConfig:()=>Ep,defaultTabPanelConfig:()=>Rp,defaultTabsConfig:()=>_p,defaultTextAreaConfig:()=>Vp,defaultTextFieldConfig:()=>Jp,defaultTimezoneConfig:()=>gu,defaultToastConfig:()=>om,defaultToolbarConfig:()=>cm,defaultTooltipConfig:()=>gm,defaultTreeItemConfig:()=>xm,defaultTreeViewConfig:()=>km,defaultUrlInputConfig:()=>Fm,defaultVerificationCodeInputConfig:()=>zm,defineFactory:()=>Hg,density:()=>r.density,designToken:()=>Qo,designTokensMap:()=>rn,designUnit:()=>r.designUnit,designUnitValue:()=>vn,direction:()=>r.direction,directionValue:()=>pn,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>Qs,dropdownMenuBaseStyles:()=>Yn,environmentIndicatorStyles:()=>es,errorDialogTemplate:()=>Fs,extractMenuItems:()=>qn,faSizeValueDefault:()=>Tr,faSizeValues:()=>kr,fileReaderStyles:()=>Ps,fileReaderTemplate:()=>Bs,fillColor:()=>r.fillColor,filterBarTemplate:()=>xa,findParentRouter:()=>tf,findRouter:()=>ef,findTopLevelRouter:()=>of,flyoutAnimationTime:()=>Ua,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:()=>Kh,formatToPlaceholder:()=>vo,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>v,foundationAccordionItemTemplate:()=>g,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:()=>Fe,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:()=>vt,foundationBreadcrumbItem:()=>Ct,foundationBreadcrumbItemShadowOptions:()=>yt,foundationBreadcrumbItemStyles:()=>gt,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:()=>Ft,foundationCardTemplate:()=>Nt,foundationCategorizedMultiselect:()=>qt,foundationCategorizedMultiselectShadowOptions:()=>jt,foundationCheckbox:()=>ei,foundationCheckboxShadowOptions:()=>Qt,foundationCheckboxStyles:()=>Kt,foundationCheckboxTemplate:()=>Xt,foundationCombobox:()=>Oi,foundationComboboxShadowOptions:()=>Si,foundationComboboxStyles:()=>yi,foundationComboboxTemplate:()=>wi,foundationConnectionIndicator:()=>Ri,foundationConnectionIndicatorStyles:()=>ki,foundationConnectionIndicatorTemplate:()=>Di,foundationDataGrid:()=>_i,foundationDataGridCell:()=>Bi,foundationDataGridCellShadowOptions:()=>zi,foundationDataGridCellStyles:()=>Hi,foundationDataGridCellTemplate:()=>a.dataGridCellTemplate,foundationDataGridRow:()=>Wi,foundationDataGridRowShadowOptions:()=>ji,foundationDataGridRowStyles:()=>Vi,foundationDataGridRowTemplate:()=>a.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Ni,foundationDataGridStyles:()=>Ai,foundationDataGridTemplate:()=>Li,foundationDatePicker:()=>Eo,foundationDatePickerShadowOptions:()=>xo,foundationDatePickerStyles:()=>ro,foundationDatePickerTemplate:()=>uo,foundationDesignSystemProvider:()=>xn,foundationDialog:()=>Ln,foundationDialogShadowOptions:()=>Dn,foundationDialogStyles:()=>Sn,foundationDialogTemplate:()=>kn,foundationDisclosure:()=>Pn,foundationDisclosureShadowOptions:()=>_n,foundationDisclosureStyles:()=>Fn,foundationDisclosureTemplate:()=>Nn,foundationDivider:()=>jn,foundationDividerShadowOptions:()=>Vn,foundationDividerStyles:()=>zn,foundationDividerTemplate:()=>Un,foundationDropdownMenu:()=>Qn,foundationDropdownMenuStyles:()=>Wn,foundationDropdownMenuTemplate:()=>Xn,foundationEnvironmentIndicator:()=>hs,foundationEnvironmentIndicatorTemplate:()=>ts,foundationErrorBanner:()=>fs,foundationErrorBannerShadowOptions:()=>vs,foundationErrorBannerTemplate:()=>ms,foundationErrorBoundary:()=>Rs,foundationErrorBoundaryShadowOptions:()=>Ds,foundationErrorBoundaryTemplate:()=>ks,foundationErrorDialog:()=>_s,foundationErrorDialogShadowOptions:()=>Ns,foundationErrorDialogStyles:()=>As,foundationFileReader:()=>Gs,foundationFileReaderStyles:()=>zs,foundationFileUpload:()=>aa,foundationFileUploadShadowOptions:()=>na,foundationFileUploadStyles:()=>Ws,foundationFileUploadTemplate:()=>Ks,foundationFilter:()=>fa,foundationFilterBar:()=>Oa,foundationFilterBarStyles:()=>ya,foundationFilterBarTemplate:()=>$a,foundationFilterStyles:()=>ra,foundationFilterTemplate:()=>ma,foundationFlexLayout:()=>Fa,foundationFlexLayoutShadowOptions:()=>Ra,foundationFlexLayoutStyles:()=>Da,foundationFlexLayoutTemplate:()=>Ia,foundationFlipper:()=>za,foundationFlipperShadowOptions:()=>Ha,foundationFlipperStyles:()=>Na,foundationFlipperTemplate:()=>Ma,foundationFlyout:()=>qa,foundationFlyoutShadowOptions:()=>Ya,foundationFlyoutStyles:()=>Ba,foundationFlyoutTemplate:()=>Ga,foundationGridLayout:()=>or,foundationGridLayoutItem:()=>lr,foundationGridLayoutItemShadowOptions:()=>sr,foundationGridLayoutItemTemplate:()=>nr,foundationGridLayoutShadowOptions:()=>Za,foundationGridLayoutStyles:()=>Ja,foundationGridLayoutTemplate:()=>Qa,foundationHorizontalScroll:()=>mr,foundationHorizontalScrollShadowOptions:()=>hr,foundationHorizontalScrollStyles:()=>dr,foundationHorizontalScrollTemplate:()=>cr,foundationIcon:()=>Ir,foundationIconShadowOptions:()=>Sr,foundationIconStyles:()=>Cr,foundationIconTemplate:()=>$r,foundationListbox:()=>Mr,foundationListboxOption:()=>Br,foundationListboxOptionShadowOptions:()=>zr,foundationListboxOptionStyles:()=>_r,foundationListboxOptionTemplate:()=>Hr,foundationListboxShadowOptions:()=>Fr,foundationListboxStyles:()=>Rr,foundationListboxTemplate:()=>Ar,foundationMenu:()=>qr,foundationMenuItem:()=>el,foundationMenuItemShadowOptions:()=>Qr,foundationMenuItemStyles:()=>Kr,foundationMenuItemTemplate:()=>Xr,foundationMenuShadowOptions:()=>Yr,foundationMenuStyles:()=>Vr,foundationMenuTemplate:()=>Gr,foundationModal:()=>al,foundationModalShadowOptions:()=>ol,foundationModalStyles:()=>tl,foundationModalTemplate:()=>il,foundationMultiselect:()=>vl,foundationMultiselectShadowOptions:()=>hl,foundationNotificationListener:()=>_g,foundationNotificationListenerShadowOptions:()=>Ng,foundationNotificationListenerTemplate:()=>Fg,foundationNumberField:()=>Bl,foundationNumberFieldShadowOptions:()=>zl,foundationNumberFieldStyles:()=>xl,foundationNumberFieldTemplate:()=>$l,foundationOptgroup:()=>Yl,foundationOptgroupStyles:()=>Vl,foundationOptgroupTemplate:()=>Gl,foundationPill:()=>Fd,foundationPillShadowOptions:()=>Rd,foundationPillTemplate:()=>Id,foundationPopper:()=>zd,foundationProgress:()=>fd,foundationProgressRing:()=>Yd,foundationProgressRingShadowOptions:()=>Gd,foundationProgressRingStyles:()=>Ud,foundationProgressRingTemplate:()=>Bd,foundationProgressShadowOptions:()=>vd,foundationProgressStyles:()=>hd,foundationProgressTemplate:()=>pd,foundationRadio:()=>Qd,foundationRadioGroup:()=>nc,foundationRadioGroupShadowOptions:()=>ic,foundationRadioGroupStyles:()=>Zd,foundationRadioGroupTemplate:()=>ec,foundationRadioShadowOptions:()=>Xd,foundationRadioStyles:()=>Wd,foundationRadioTemplate:()=>qd,foundationScheduler:()=>uc,foundationSchedulerCronBuilder:()=>cu,foundationSchedulerCronBuilderShadowOptions:()=>lu,foundationSchedulerCronBuilderTemplate:()=>au,foundationSchedulerShadowOptions:()=>dc,foundationSchedulerTemplate:()=>rc,foundationSchedulerTimezone:()=>fu,foundationSchedulerTimezoneShadowOptions:()=>vu,foundationSchedulerTimezoneTemplate:()=>pu,foundationSearchBar:()=>Iu,foundationSearchBarCombobox:()=>_u,foundationSearchBarComboboxShadowOptions:()=>Nu,foundationSearchBarComboboxStyles:()=>Ru,foundationSearchBarComboboxTemplate:()=>Au,foundationSearchBarShadowOptions:()=>ku,foundationSearchBarStyles:()=>bu,foundationSearchBarTemplate:()=>xu,foundationSectionNavigator:()=>qu,foundationSectionNavigatorShadowOptions:()=>Yu,foundationSectionNavigatorStyles:()=>Hu,foundationSectionNavigatorTemplate:()=>Pu,foundationSegmentedControl:()=>eh,foundationSegmentedControlShadowOptions:()=>Qu,foundationSegmentedControlStyles:()=>Ku,foundationSegmentedControlTemplate:()=>Xu,foundationSegmentedItem:()=>ah,foundationSegmentedItemShadowOptions:()=>nh,foundationSegmentedItemStyles:()=>th,foundationSegmentedItemTemplate:()=>ih,foundationSelect:()=>hh,foundationSelectShadowOptions:()=>ch,foundationSelectStyles:()=>rh,foundationSelectTemplate:()=>lh,foundationSkeleton:()=>bh,foundationSkeletonShadowOptions:()=>gh,foundationSkeletonStyles:()=>ph,foundationSkeletonTemplate:()=>mh,foundationSlider:()=>Oh,foundationSliderLabel:()=>Ah,foundationSliderLabelShadowOptions:()=>Ih,foundationSliderLabelStyles:()=>Th,foundationSliderLabelTemplate:()=>kh,foundationSliderShadowOptions:()=>Sh,foundationSliderStyles:()=>yh,foundationSliderTemplate:()=>xh,foundationSnackbar:()=>Bh,foundationSnackbarShadowOptions:()=>zh,foundationSnackbarStyles:()=>_h,foundationSnackbarTemplate:()=>Ph,foundationStackingIcons:()=>Yh,foundationStackingIconsStyles:()=>Vh,foundationStackingIconsTemplate:()=>Gh,foundationStatusPill:()=>Jh,foundationStatusPillTemplate:()=>qh,foundationStepper:()=>$f,foundationStepperShadowOptions:()=>Cf,foundationStepperStyles:()=>yf,foundationStepperTab:()=>np,foundationStepperTabPanel:()=>dp,foundationStepperTabPanelShadowOptions:()=>rp,foundationStepperTabPanelTemplate:()=>sp,foundationStepperTabShadowOptions:()=>ip,foundationStepperTabStyles:()=>Qh,foundationStepperTabTemplate:()=>ep,foundationStepperTemplate:()=>bf,foundationSwitch:()=>vp,foundationSwitchShadowOptions:()=>pp,foundationSwitchStyles:()=>cp,foundationSwitchTemplate:()=>up,foundationSystemHealthOverlay:()=>Td,foundationSystemHealthOverlayShadowOptions:()=>Ed,foundationSystemHealthOverlayStyles:()=>Sd,foundationSystemHealthOverlayTemplate:()=>$d,foundationTab:()=>Op,foundationTabPanel:()=>Ap,foundationTabPanelShadowOptions:()=>Ip,foundationTabPanelStyles:()=>Tp,foundationTabPanelTemplate:()=>kp,foundationTabShadowOptions:()=>Sp,foundationTabStyles:()=>Cp,foundationTabTemplate:()=>xp,foundationTabs:()=>Hp,foundationTabsShadowOptions:()=>Mp,foundationTabsStyles:()=>Lp,foundationTabsTemplate:()=>Fp,foundationTextArea:()=>Gp,foundationTextAreaShadowOptions:()=>Bp,foundationTextAreaStyles:()=>Pp,foundationTextAreaTemplate:()=>zp,foundationTextField:()=>Qp,foundationTextFieldShadowOptions:()=>Xp,foundationTextFieldStyles:()=>Wp,foundationTextFieldTemplate:()=>qp,foundationToast:()=>sm,foundationToastShadowOptions:()=>im,foundationToastStyles:()=>Zp,foundationToastTemplate:()=>tm,foundationToolbar:()=>um,foundationToolbarShadowOptions:()=>dm,foundationToolbarStyles:()=>am,foundationToolbarTemplate:()=>rm,foundationTooltip:()=>fm,foundationTooltipShadowOptions:()=>vm,foundationTooltipStyles:()=>hm,foundationTooltipTemplate:()=>pm,foundationTreeItem:()=>$m,foundationTreeItemShadowOptions:()=>Cm,foundationTreeItemStyles:()=>bm,foundationTreeItemTemplate:()=>ym,foundationTreeView:()=>Dm,foundationTreeViewShadowOptions:()=>Tm,foundationTreeViewStyles:()=>Sm,foundationTreeViewTemplate:()=>Em,foundationUrlInput:()=>Mm,foundationUrlInputShadowOptions:()=>Lm,foundationUrlInputStyles:()=>Im,foundationUrlInputTemplate:()=>Am,foundationVerificationCodeInput:()=>Gm,foundationVerificationCodeInputShadowOptions:()=>Pm,foundationVerificationCodeInputStyles:()=>_m,foundationVerificationCodeInputTemplate:()=>Hm,fromBinaryExpression:()=>Sg,fromMethodExpression:()=>Eg,fuiAccentPalette:()=>Po,fuiAccentSwatch:()=>Ho,fuiCardFillColor:()=>Bo,fuiCardForegroundColor:()=>jo,fuiDefaultCardFillColor:()=>Ao,fuiDefaultCardPalette:()=>Lo,fuiFillColor:()=>Uo,fuiNeutralPalette:()=>Mo,fuiNeutralSwatch:()=>No,getBannerTemplate:()=>st,getBrowserLocale:()=>po,getCriteriaBuilder:()=>Ou,getDefaultConfig:()=>nn,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>Tn,getDisplayFormatForLang:()=>mo,getDropdownMenuTemplate:()=>Kn,getErrorDialogTemplate:()=>Ls,getExports:()=>sn,getFontawesomeIconsCss:()=>wr,getNavItems:()=>uf,getPrefixedCategorizedMultiselect:()=>Vt,getPrefixedCronBuilder:()=>su,getPrefixedDatePicker:()=>co,getPrefixedErrorBanner:()=>ps,getPrefixedFileReader:()=>Us,getPrefixedFileUpload:()=>qs,getPrefixedFilterTemplate:()=>pa,getPrefixedFlyout:()=>Va,getPrefixedIcon:()=>xr,getPrefixedMultiselect:()=>cl,getPrefixedScheduler:()=>ac,getPrefixedSchedulerTimezone:()=>hu,getPrefixedSearchBar:()=>Cu,getPrefixedSnackbar:()=>Hh,getPrefixedStepper:()=>ff,getPrefixedStepperTab:()=>Zh,getPrefixedToast:()=>em,getPrefixedUrlInput:()=>Rm,getTypeRampValue:()=>an,groupsToCriteria:()=>X,hasDateValue:()=>go,inputControls:()=>Hc,installAlertFlashClock:()=>wp,isAbsoluteUrl:()=>Zg,jsonConverter:()=>Md,mapType:()=>wa,maxheight:()=>rl,media:()=>je,menuTemplate:()=>k,mixinFoundationFontFamily:()=>fn,months:()=>bc,multiselectStyles:()=>ll,multiselectTemplate:()=>ul,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:()=>Go,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:()=>un,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:()=>en,parseDatePickerValue:()=>bo,pathJoin:()=>nf,pillStyles:()=>kd,plusIcon:()=>wu,provideDesignSystem:()=>yd,provideTokens:()=>Jo,rebuildOperator:()=>$g,registerFoundationDesignSystem:()=>Df,removeChildRouteParameter:()=>af,removeLastPathSegment:()=>sf,resolveDayjsLocale:()=>ho,routerLogger:()=>jg,routerProperty:()=>Kg,ruleExpressionToGroup:()=>Og,ruleToRuleExpression:()=>Cg,ruleToRuleMethodExpression:()=>wg,schedulerCronBuilderStyles:()=>Pc,schedulerStyles:()=>sc,schedulerTimezoneStyles:()=>uu,selectCustomToken:()=>ln,sharedFieldStyles:()=>Cl,singleOptionTemplate:()=>D,statusPillStyles:()=>Wh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>Zo,tagFor:()=>Pg,toIntlNumberFormat:()=>Ll,transformOperatorNameToServerName:()=>yg,transformServerNameToOperatorName:()=>xg,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:()=>Js,validateClauses:()=>ce,validateGroups:()=>ue,weekNumber:()=>fc,white:()=>To});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:()=>Vo,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:()=>Bo,fuiCardForegroundColor:()=>jo,fuiFillColor:()=>Uo,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:()=>Go,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:()=>cn,baseLayerLuminanceValue:()=>hn,controlCornerRadiusValue:()=>mn,designUnitValue:()=>vn,directionValue:()=>pn,neutralPaletteValue:()=>un});var s={};i.r(s),i.d(s,{BASE_LOGICAL_COMBINATORS:()=>qm,BASE_OPERATORS:()=>ev,LOGICAL_COMBINATORS:()=>Km,NULL_COMBINATOR:()=>Xm});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([[510],{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,v=new Date,g=r||(s||a?1:v.getDate()),f=s||v.getFullYear(),b=0;s&&!a||(b=a>0?a-1:v.getMonth());var y,w=l||0,C=d||0,x=c||0,$=u||0;return h?new Date(Date.UTC(f,b,g,w,C,x,$+60*h.offset*1e3)):i?new Date(Date.UTC(f,b,g,w,C,x,$)):(y=new Date(f,b,g,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 v=i.apply(this,s);if(v.isValid()){this.$d=v.$d,this.$L=v.$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={},v=Object.keys(e).sort(d);for(p=0;p<v.length;p++){var g=v[p];u(e[g],g,p,a,e,c,h),m[g]=e[g]}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}}},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}},25510(e,t,i){"use strict";i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>A,AffixMixin:()=>Cl,AiCriteriaSearch:()=>Se,AiIndicator:()=>Ie,Anchor:()=>Ne,AnchoredRegion:()=>ze,Avatar:()=>We,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Af,Badge:()=>Ze,Banner:()=>dt,BaseDatasource:()=>gi,BaseFileComponent:()=>Hs,Breadcrumb:()=>pt,BreadcrumbItem:()=>yt,Button:()=>Et,COMBO_INPUT_MIN_LENGTH:()=>Ou,CRON_LENGTH:()=>xc,CSSVarsTokenMapper:()=>Zm,Calendar:()=>Rt,Card:()=>_t,CategorizedMultiselect:()=>qt,Checkbox:()=>Qt,Combobox:()=>Si,ConnectionIndicator:()=>Ri,CronBuilderEvents:()=>kc,DATETIME_OPERATORS:()=>te,DATE_OPERATORS:()=>ee,DATE_PICKER_VALUE_FORMAT:()=>bo,DEFUALT_FILTER_BAR_COLUMNS:()=>Ea,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Nf,DataGrid:()=>Fi,DataGridCell:()=>zi,DataGridDatasource:()=>ev,DataGridRow:()=>Gi,DateOrDay:()=>gc,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:()=>bg,FaPrefixFromStyle:()=>Tr,FileReader:()=>js,FileUpload:()=>na,Filter:()=>fa,FilterBar:()=>Oa,FilterEvents:()=>ga,FlexLayout:()=>Na,FlexMediaQueriesEnum:()=>ka,Flipper:()=>Pa,Flyout:()=>Ya,FoundationDesignSystemProvider:()=>xn,FoundationExpressionBuilder:()=>og,FoundationRouteCollection:()=>yf,FoundationRouteNav:()=>vf,FoundationRouter:()=>$f,FoundationRouterConfiguration:()=>wf,FoundationRuleExpressionBuilder:()=>Ng,FoundationValueExpressionBuilder:()=>zg,GenerateNavigationPathEventType:()=>xf,GridLayout:()=>or,GridLayoutItem:()=>lr,GridMediaQueriesEnum:()=>Xa,HorizontalScroll:()=>hr,INPUT_MIN_LENGTH:()=>Eu,Icon:()=>Ir,Listbox:()=>Nr,ListboxOption:()=>zr,MAX_DAYS:()=>Cc,MAX_HOURS:()=>Sc,MAX_MINS_SEC:()=>Ec,MAX_MINUTE_RECURRENCE:()=>Tc,MAX_MONTHS:()=>wc,MAX_WEEK_DAYS:()=>$c,MAX_WEEK_NUMBER:()=>Oc,Menu:()=>Yr,MenuItem:()=>Qr,Modal:()=>al,Multiselect:()=>vl,MultiselectDatasource:()=>cl,NUMERIC_OPERATORS:()=>Z,NavigateToEventType:()=>Cf,NotificationListener:()=>Vg,NumberField:()=>zl,OPERATOR_DISPLAY_LABEL:()=>ie,Optgroup:()=>Yl,OptionsDatasource:()=>yi,Pill:()=>Nd,Popper:()=>Pd,Position:()=>Ut,Progress:()=>vd,ProgressRing:()=>jd,Radio:()=>Xd,RadioGroup:()=>ic,RecurrenceType:()=>mc,Router:()=>nf,RuleExpression:()=>yg,SCROLL_TIMEOUT:()=>Su,SECTION_NAVIGATOR_EVENTS:()=>Vu,SNACKBAR_CLOSE_TIMEOUT:()=>Mh,SNACKBAR_EVENTS_NAMES:()=>_h,SNACKBAR_TYPES:()=>Fh,SNACKBAR_TYPE_DEFAULT:()=>Nh,STRING_OPERATORS:()=>Q,Scheduler:()=>dc,SchedulerCronBuilder:()=>lu,SchedulerTimezone:()=>vu,SearchBar:()=>ku,SearchBarCombobox:()=>Fu,SectionNavigator:()=>Yu,SegmentedControl:()=>Qu,SegmentedItem:()=>nh,Select:()=>ch,Skeleton:()=>gh,Slider:()=>Sh,SliderLabel:()=>Ih,Snackbar:()=>Bh,StackingIcons:()=>Yh,StatusPill:()=>Jh,Stepper:()=>Tf,StepperTab:()=>ip,StepperTabPanel:()=>rp,Switch:()=>pp,SystemHealthOverlay:()=>$d,Tab:()=>Sp,TabPanel:()=>Ip,Tabs:()=>Mp,TextArea:()=>Bp,TextField:()=>Xp,Toast:()=>sm,Toolbar:()=>dm,Tooltip:()=>vm,TreeItem:()=>Cm,TreeView:()=>Tm,UrlInput:()=>Mm,VerificationCodeInput:()=>jm,VerticalDropdownMenu:()=>Xm,WeekType:()=>vc,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:()=>S,alertFlashDurationProperty:()=>bp,alertFlashPhaseProperty:()=>fp,applyCustomTokens:()=>on,baseComponents:()=>Qm,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>pn,black:()=>Do,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>Ff,categorizedMultiselectStyles:()=>Vt,categorizedMultiselectTemplate:()=>Gt,clientOperators:()=>Cg,closeIcon:()=>da,configureDesignSystem:()=>cn,configureEnvironmentIndicator:()=>cs,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>vn,createDesignSystemProxy:()=>yd,createFormData:()=>Js,crossIcon:()=>wu,daysOfWeek:()=>fc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>Oe,defaultAnchorConfig:()=>Me,defaultAnchoredRegionConfig:()=>Be,defaultAvatarConfig:()=>Ke,defaultBadgeConfig:()=>tt,defaultBreadcrumbConfig:()=>vt,defaultBreadcrumbItemConfig:()=>Ct,defaultButtonConfig:()=>Tt,defaultCalendarConfig:()=>Lt,defaultCardConfig:()=>Ht,defaultCategorizedMultiselectConfig:()=>Wt,defaultCheckboxConfig:()=>ei,defaultComboboxConfig:()=>Oi,defaultConfig:()=>uc,defaultCronBuilderConfig:()=>cu,defaultDataGridCellConfig:()=>Bi,defaultDataGridConfig:()=>_i,defaultDataGridRowConfig:()=>Wi,defaultDatePickerConfig:()=>So,defaultDialogConfig:()=>Rn,defaultDisclosureConfig:()=>Hn,defaultDividerConfig:()=>Gn,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:()=>gf,defaultNeutralForegroundContrast:()=>jo,defaultNumberFieldConfig:()=>Bl,defaultPillConfig:()=>Ld,defaultPlacementIndexPadding:()=>ff,defaultProgressConfig:()=>fd,defaultProgressRingConfig:()=>Yd,defaultRadioConfig:()=>Qd,defaultRadioGroupConfig:()=>nc,defaultSearchBarComboboxConfig:()=>_u,defaultSearchBarConfig:()=>Iu,defaultSectionNavigatorConfig:()=>qu,defaultSegmentedControlConfig:()=>eh,defaultSegmentedItemConfig:()=>ah,defaultSelectConfig:()=>hh,defaultSkeletonConfig:()=>bh,defaultSliderConfig:()=>Oh,defaultSliderLabelConfig:()=>Ah,defaultStepperConfig:()=>Df,defaultStepperTabConfig:()=>np,defaultStepperTabPanelConfig:()=>dp,defaultSwitchConfig:()=>vp,defaultSystemHealthOverlayConfig:()=>Td,defaultTabConfig:()=>Op,defaultTabPanelConfig:()=>Ap,defaultTabsConfig:()=>Pp,defaultTextAreaConfig:()=>jp,defaultTextFieldConfig:()=>Qp,defaultTimezoneConfig:()=>fu,defaultToastConfig:()=>nm,defaultToolbarConfig:()=>um,defaultTooltipConfig:()=>fm,defaultTreeItemConfig:()=>$m,defaultTreeViewConfig:()=>Dm,defaultUrlInputConfig:()=>Fm,defaultVerificationCodeInputConfig:()=>Um,defineFactory:()=>Gg,density:()=>r.density,designToken:()=>Zo,designTokensMap:()=>ln,designUnit:()=>r.designUnit,designUnitValue:()=>gn,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:()=>Xh,formatToPlaceholder:()=>go,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>v,foundationAccordionItemTemplate:()=>g,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>L,foundationActionsMenuStyles:()=>E,foundationActionsMenuTemplate:()=>R,foundationAiCriteriaSearch:()=>Te,foundationAiCriteriaSearchShadowOptions:()=>Ee,foundationAiCriteriaSearchStyles:()=>P,foundationAiCriteriaSearchTemplate:()=>V,foundationAiIndicator:()=>Re,foundationAiIndicatorStyles:()=>ke,foundationAiIndicatorTemplate:()=>De,foundationAnchor:()=>_e,foundationAnchorShadowOptions:()=>Fe,foundationAnchorStyles:()=>Ae,foundationAnchorTemplate:()=>Le,foundationAnchoredRegion:()=>Ve,foundationAnchoredRegionShadowOptions:()=>Ue,foundationAnchoredRegionStyles:()=>He,foundationAnchoredRegionTemplate:()=>Pe,foundationAvatar:()=>Xe,foundationAvatarShadowOptions:()=>qe,foundationAvatarStyles:()=>je,foundationAvatarTemplate:()=>Ge,foundationBadge:()=>it,foundationBadgeShadowOptions:()=>et,foundationBadgeStyles:()=>Je,foundationBadgeTemplate:()=>Qe,foundationBanner:()=>ct,foundationBannerShadowOptions:()=>lt,foundationBannerStyles:()=>st,foundationBannerTemplate:()=>rt,foundationBreadcrumb:()=>gt,foundationBreadcrumbItem:()=>xt,foundationBreadcrumbItemShadowOptions:()=>wt,foundationBreadcrumbItemStyles:()=>ft,foundationBreadcrumbItemTemplate:()=>bt,foundationBreadcrumbShadowOptions:()=>mt,foundationBreadcrumbStyles:()=>ut,foundationBreadcrumbTemplate:()=>ht,foundationButton:()=>kt,foundationButtonShadowOptions:()=>Ot,foundationButtonStyles:()=>$t,foundationButtonTemplate:()=>St,foundationCalendar:()=>Nt,foundationCalendarShadowOptions:()=>At,foundationCalendarStyles:()=>Dt,foundationCalendarTemplate:()=>It,foundationCard:()=>zt,foundationCardShadowOptions:()=>Pt,foundationCardStyles:()=>Ft,foundationCardTemplate:()=>Mt,foundationCategorizedMultiselect:()=>Kt,foundationCategorizedMultiselectShadowOptions:()=>Yt,foundationCheckbox:()=>ti,foundationCheckboxShadowOptions:()=>Zt,foundationCheckboxStyles:()=>Xt,foundationCheckboxTemplate:()=>Jt,foundationCombobox:()=>Ti,foundationComboboxShadowOptions:()=>Ei,foundationComboboxStyles:()=>wi,foundationComboboxTemplate:()=>Ci,foundationConnectionIndicator:()=>Ai,foundationConnectionIndicatorStyles:()=>Di,foundationConnectionIndicatorTemplate:()=>Ii,foundationDataGrid:()=>Pi,foundationDataGridCell:()=>Vi,foundationDataGridCellShadowOptions:()=>Ui,foundationDataGridCellStyles:()=>Hi,foundationDataGridCellTemplate:()=>a.dataGridCellTemplate,foundationDataGridRow:()=>qi,foundationDataGridRowShadowOptions:()=>Yi,foundationDataGridRowStyles:()=>ji,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:()=>Pn,foundationDisclosureStyles:()=>Fn,foundationDisclosureTemplate:()=>Mn,foundationDivider:()=>Yn,foundationDividerShadowOptions:()=>jn,foundationDividerStyles:()=>Un,foundationDividerTemplate:()=>Bn,foundationDropdownMenu:()=>Zn,foundationDropdownMenuStyles:()=>qn,foundationDropdownMenuTemplate:()=>Jn,foundationEnvironmentIndicator:()=>ps,foundationEnvironmentIndicatorTemplate:()=>is,foundationErrorBanner:()=>bs,foundationErrorBannerShadowOptions:()=>gs,foundationErrorBannerTemplate:()=>vs,foundationErrorBoundary:()=>As,foundationErrorBoundaryShadowOptions:()=>Is,foundationErrorBoundaryTemplate:()=>Ds,foundationErrorDialog:()=>Ps,foundationErrorDialogShadowOptions:()=>Ms,foundationErrorDialogStyles:()=>Ls,foundationFileReader:()=>Gs,foundationFileReaderStyles:()=>Us,foundationFileUpload:()=>ra,foundationFileUploadShadowOptions:()=>sa,foundationFileUploadStyles:()=>qs,foundationFileUploadTemplate:()=>Xs,foundationFilter:()=>ba,foundationFilterBar:()=>Ta,foundationFilterBarStyles:()=>wa,foundationFilterBarTemplate:()=>Sa,foundationFilterStyles:()=>la,foundationFilterTemplate:()=>va,foundationFlexLayout:()=>Fa,foundationFlexLayoutShadowOptions:()=>Aa,foundationFlexLayoutStyles:()=>Ia,foundationFlexLayoutTemplate:()=>Ra,foundationFlipper:()=>Ua,foundationFlipperShadowOptions:()=>Ha,foundationFlipperStyles:()=>Ma,foundationFlipperTemplate:()=>_a,foundationFlyout:()=>Ka,foundationFlyoutShadowOptions:()=>Wa,foundationFlyoutStyles:()=>Va,foundationFlyoutTemplate:()=>Ga,foundationGridLayout:()=>nr,foundationGridLayoutItem:()=>dr,foundationGridLayoutItemShadowOptions:()=>ar,foundationGridLayoutItemTemplate:()=>sr,foundationGridLayoutShadowOptions:()=>er,foundationGridLayoutStyles:()=>Qa,foundationGridLayoutTemplate:()=>Za,foundationHorizontalScroll:()=>vr,foundationHorizontalScrollShadowOptions:()=>pr,foundationHorizontalScrollStyles:()=>cr,foundationHorizontalScrollTemplate:()=>ur,foundationIcon:()=>Rr,foundationIconShadowOptions:()=>Er,foundationIconStyles:()=>xr,foundationIconTemplate:()=>Sr,foundationListbox:()=>_r,foundationListboxOption:()=>Vr,foundationListboxOptionShadowOptions:()=>Ur,foundationListboxOptionStyles:()=>Pr,foundationListboxOptionTemplate:()=>Hr,foundationListboxShadowOptions:()=>Fr,foundationListboxStyles:()=>Ar,foundationListboxTemplate:()=>Lr,foundationMenu:()=>Kr,foundationMenuItem:()=>tl,foundationMenuItemShadowOptions:()=>Zr,foundationMenuItemStyles:()=>Xr,foundationMenuItemTemplate:()=>Jr,foundationMenuShadowOptions:()=>Wr,foundationMenuStyles:()=>jr,foundationMenuTemplate:()=>Gr,foundationModal:()=>rl,foundationModalShadowOptions:()=>nl,foundationModalStyles:()=>il,foundationModalTemplate:()=>ol,foundationMultiselect:()=>gl,foundationMultiselectShadowOptions:()=>pl,foundationNotificationListener:()=>jg,foundationNotificationListenerShadowOptions:()=>Bg,foundationNotificationListenerTemplate:()=>Ug,foundationNumberField:()=>Vl,foundationNumberFieldShadowOptions:()=>Ul,foundationNumberFieldStyles:()=>$l,foundationNumberFieldTemplate:()=>Sl,foundationOptgroup:()=>Wl,foundationOptgroupStyles:()=>jl,foundationOptgroupTemplate:()=>Gl,foundationPill:()=>Fd,foundationPillShadowOptions:()=>Ad,foundationPillTemplate:()=>Rd,foundationPopper:()=>Ud,foundationProgress:()=>bd,foundationProgressRing:()=>Wd,foundationProgressRingShadowOptions:()=>Gd,foundationProgressRingStyles:()=>Bd,foundationProgressRingTemplate:()=>Vd,foundationProgressShadowOptions:()=>gd,foundationProgressStyles:()=>pd,foundationProgressTemplate:()=>md,foundationRadio:()=>Zd,foundationRadioGroup:()=>sc,foundationRadioGroupShadowOptions:()=>oc,foundationRadioGroupStyles:()=>ec,foundationRadioGroupTemplate:()=>tc,foundationRadioShadowOptions:()=>Jd,foundationRadioStyles:()=>qd,foundationRadioTemplate:()=>Kd,foundationScheduler:()=>hc,foundationSchedulerCronBuilder:()=>uu,foundationSchedulerCronBuilderShadowOptions:()=>du,foundationSchedulerCronBuilderTemplate:()=>ru,foundationSchedulerShadowOptions:()=>cc,foundationSchedulerTemplate:()=>lc,foundationSchedulerTimezone:()=>bu,foundationSchedulerTimezoneShadowOptions:()=>gu,foundationSchedulerTimezoneTemplate:()=>mu,foundationSearchBar:()=>Ru,foundationSearchBarCombobox:()=>Pu,foundationSearchBarComboboxShadowOptions:()=>Mu,foundationSearchBarComboboxStyles:()=>Au,foundationSearchBarComboboxTemplate:()=>Lu,foundationSearchBarShadowOptions:()=>Du,foundationSearchBarStyles:()=>yu,foundationSearchBarTemplate:()=>$u,foundationSectionNavigator:()=>Ku,foundationSectionNavigatorShadowOptions:()=>Wu,foundationSectionNavigatorStyles:()=>Hu,foundationSectionNavigatorTemplate:()=>zu,foundationSegmentedControl:()=>th,foundationSegmentedControlShadowOptions:()=>Zu,foundationSegmentedControlStyles:()=>Xu,foundationSegmentedControlTemplate:()=>Ju,foundationSegmentedItem:()=>rh,foundationSegmentedItemShadowOptions:()=>sh,foundationSegmentedItemStyles:()=>ih,foundationSegmentedItemTemplate:()=>oh,foundationSelect:()=>ph,foundationSelectShadowOptions:()=>uh,foundationSelectStyles:()=>lh,foundationSelectTemplate:()=>dh,foundationSkeleton:()=>yh,foundationSkeletonShadowOptions:()=>fh,foundationSkeletonStyles:()=>mh,foundationSkeletonTemplate:()=>vh,foundationSlider:()=>Th,foundationSliderLabel:()=>Lh,foundationSliderLabelShadowOptions:()=>Rh,foundationSliderLabelStyles:()=>kh,foundationSliderLabelTemplate:()=>Dh,foundationSliderShadowOptions:()=>Eh,foundationSliderStyles:()=>wh,foundationSliderTemplate:()=>$h,foundationSnackbar:()=>Vh,foundationSnackbarShadowOptions:()=>Uh,foundationSnackbarStyles:()=>Ph,foundationSnackbarTemplate:()=>zh,foundationStackingIcons:()=>Wh,foundationStackingIconsStyles:()=>jh,foundationStackingIconsTemplate:()=>Gh,foundationStatusPill:()=>Qh,foundationStatusPillTemplate:()=>Kh,foundationStepper:()=>If,foundationStepperShadowOptions:()=>kf,foundationStepperStyles:()=>Of,foundationStepperTab:()=>sp,foundationStepperTabPanel:()=>cp,foundationStepperTabPanelShadowOptions:()=>lp,foundationStepperTabPanelTemplate:()=>ap,foundationStepperTabShadowOptions:()=>op,foundationStepperTabStyles:()=>Zh,foundationStepperTabTemplate:()=>tp,foundationStepperTemplate:()=>Ef,foundationSwitch:()=>gp,foundationSwitchShadowOptions:()=>mp,foundationSwitchStyles:()=>up,foundationSwitchTemplate:()=>hp,foundationSystemHealthOverlay:()=>kd,foundationSystemHealthOverlayShadowOptions:()=>Od,foundationSystemHealthOverlayStyles:()=>Ed,foundationSystemHealthOverlayTemplate:()=>Sd,foundationTab:()=>Tp,foundationTabPanel:()=>Lp,foundationTabPanelShadowOptions:()=>Rp,foundationTabPanelStyles:()=>kp,foundationTabPanelTemplate:()=>Dp,foundationTabShadowOptions:()=>Ep,foundationTabStyles:()=>xp,foundationTabTemplate:()=>$p,foundationTabs:()=>Hp,foundationTabsShadowOptions:()=>_p,foundationTabsStyles:()=>Np,foundationTabsTemplate:()=>Fp,foundationTextArea:()=>Gp,foundationTextAreaShadowOptions:()=>Vp,foundationTextAreaStyles:()=>zp,foundationTextAreaTemplate:()=>Up,foundationTextField:()=>Zp,foundationTextFieldShadowOptions:()=>Jp,foundationTextFieldStyles:()=>qp,foundationTextFieldTemplate:()=>Kp,foundationToast:()=>am,foundationToastShadowOptions:()=>om,foundationToastStyles:()=>em,foundationToastTemplate:()=>im,foundationToolbar:()=>hm,foundationToolbarShadowOptions:()=>cm,foundationToolbarStyles:()=>rm,foundationToolbarTemplate:()=>lm,foundationTooltip:()=>bm,foundationTooltipShadowOptions:()=>gm,foundationTooltipStyles:()=>pm,foundationTooltipTemplate:()=>mm,foundationTreeItem:()=>Sm,foundationTreeItemShadowOptions:()=>xm,foundationTreeItemStyles:()=>ym,foundationTreeItemTemplate:()=>wm,foundationTreeView:()=>Im,foundationTreeViewShadowOptions:()=>km,foundationTreeViewStyles:()=>Em,foundationTreeViewTemplate:()=>Om,foundationUrlInput:()=>_m,foundationUrlInputShadowOptions:()=>Nm,foundationUrlInputStyles:()=>Rm,foundationUrlInputTemplate:()=>Lm,foundationVerificationCodeInput:()=>Gm,foundationVerificationCodeInputShadowOptions:()=>zm,foundationVerificationCodeInputStyles:()=>Pm,foundationVerificationCodeInputTemplate:()=>Hm,foundationVerticalDropdownMenu:()=>Jm,foundationVerticalDropdownMenuStyles:()=>Wm,foundationVerticalDropdownMenuTemplate:()=>Km,fromBinaryExpression:()=>Rg,fromMethodExpression:()=>Ag,fuiAccentPalette:()=>zo,fuiAccentSwatch:()=>Ho,fuiCardFillColor:()=>Vo,fuiCardForegroundColor:()=>Yo,fuiDefaultCardFillColor:()=>Lo,fuiDefaultCardPalette:()=>No,fuiFillColor:()=>Bo,fuiNeutralPalette:()=>_o,fuiNeutralSwatch:()=>Mo,getBannerTemplate:()=>at,getBrowserLocale:()=>mo,getCriteriaBuilder:()=>Tu,getDefaultConfig:()=>sn,getDesignSystemPrefix:()=>k,getDialogTemplate:()=>kn,getDisplayFormatForLang:()=>vo,getDropdownMenuTemplate:()=>Xn,getErrorDialogTemplate:()=>Ns,getExports:()=>an,getFontawesomeIconsCss:()=>Cr,getNavItems:()=>bf,getPrefixedCategorizedMultiselect:()=>jt,getPrefixedCronBuilder:()=>au,getPrefixedDatePicker:()=>uo,getPrefixedErrorBanner:()=>ms,getPrefixedFileReader:()=>Bs,getPrefixedFileUpload:()=>Ks,getPrefixedFilterTemplate:()=>ma,getPrefixedFlyout:()=>ja,getPrefixedIcon:()=>$r,getPrefixedMultiselect:()=>ul,getPrefixedScheduler:()=>rc,getPrefixedSchedulerTimezone:()=>pu,getPrefixedSearchBar:()=>xu,getPrefixedSnackbar:()=>Hh,getPrefixedStepper:()=>Sf,getPrefixedStepperTab:()=>ep,getPrefixedToast:()=>tm,getPrefixedUrlInput:()=>Am,getTypeRampValue:()=>rn,groupsToCriteria:()=>J,hasDateValue:()=>fo,inputControls:()=>Hc,installAlertFlashClock:()=>Cp,isAbsoluteUrl:()=>rf,jsonConverter:()=>_d,mapType:()=>Ca,maxheight:()=>ll,media:()=>Ye,menuTemplate:()=>D,mixinFoundationFontFamily:()=>bn,months:()=>yc,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:()=>Go,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:()=>Bt,paletteFromHex:()=>tn,parseDatePickerValue:()=>yo,pathJoin:()=>uf,pillStyles:()=>Dd,plusIcon:()=>Cu,provideDesignSystem:()=>wd,provideTokens:()=>Qo,rebuildOperator:()=>Ig,registerFoundationDesignSystem:()=>Mf,removeChildRouteParameter:()=>pf,removeLastPathSegment:()=>hf,resolveDayjsLocale:()=>po,routerLogger:()=>Qg,routerProperty:()=>of,ruleExpressionToGroup:()=>Lg,ruleToRuleExpression:()=>kg,ruleToRuleMethodExpression:()=>Tg,schedulerCronBuilderStyles:()=>zc,schedulerStyles:()=>ac,schedulerTimezoneStyles:()=>hu,selectCustomToken:()=>dn,sharedFieldStyles:()=>xl,singleOptionTemplate:()=>I,statusPillStyles:()=>qh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>en,tagFor:()=>Yg,toIntlNumberFormat:()=>Nl,transformOperatorNameToServerName:()=>Og,transformServerNameToOperatorName:()=>Dg,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:()=>ue,validateGroups:()=>he,verticalDropdownMenuBaseStyles:()=>Ym,verticalDropdownMenuTemplate:()=>qm,weekNumber:()=>bc,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:()=>jo,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:()=>Go,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:()=>vn,designUnitValue:()=>gn,directionValue:()=>mn,neutralPaletteValue:()=>hn});var s={};i.r(s),i.d(s,{BASE_LOGICAL_COMBINATORS:()=>tv,BASE_OPERATORS:()=>rv,LOGICAL_COMBINATORS:()=>iv,NULL_COMBINATOR:()=>ov});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)),v=(e,t)=>l.css`
|
|
4
4
|
${(0,r.accordionItemStyles)(e,t)}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
stroke: var(--accent-foreground-rest);
|
|
15
15
|
fill: none;
|
|
16
16
|
}
|
|
17
|
-
`,g=(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:g,styles:v,shadowOptions:b},y));var C=i(55823),x=i(31679);const
|
|
17
|
+
`,g=(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:g,styles:v,shadowOptions:b},y));var C=i(55823),x=i(31679);class ${constructor(e,t,i){this.anchor=e,this.onReposition=t,this.onAnchorDetached=i,this.ancestors=[],this.handleScroll=()=>{this.anchor.isConnected?this.onReposition():this.onAnchorDetached()}}start(){this.stop(),this.ancestors=function(e){var t;const i=[];let o=e.parentNode;for(;o;)if(o instanceof ShadowRoot)o=o.host;else{if(o instanceof Document){i.push(o);break}if(o instanceof HTMLElement){const e=null===(t=o.ownerDocument.defaultView)||void 0===t?void 0:t.getComputedStyle(o);if(!e){o=o.parentNode;continue}(/(auto|scroll|overlay)/.test(e.overflowY)||/(auto|scroll|overlay)/.test(e.overflowX))&&i.push(o)}o=o.parentNode}return i}(this.anchor);for(const e of this.ancestors)e.addEventListener("scroll",this.handleScroll,{passive:!0})}stop(){for(const e of this.ancestors)e.removeEventListener("scroll",this.handleScroll);this.ancestors=[]}}const S=(e,t)=>l.css`
|
|
18
18
|
:host {
|
|
19
19
|
--actions-opener-height-multiplier: 0.7px;
|
|
20
20
|
--actions-opener-bg-color: 249 254 255;
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
display: flex;
|
|
107
107
|
flex-direction: column;
|
|
108
108
|
}
|
|
109
|
-
`,
|
|
110
|
-
${
|
|
111
|
-
`,
|
|
109
|
+
`,E=(e,t)=>l.css`
|
|
110
|
+
${S(e,t)}
|
|
111
|
+
`,O=(e,t)=>!e.composedPath().includes(t),T=(e,t)=>e.composedPath().includes(t),k=e=>e.tagName.toLowerCase().split("-")[0];const D=e=>l.html`
|
|
112
112
|
<${e}-button
|
|
113
113
|
${(0,l.ref)("actionsOpener")}
|
|
114
114
|
id="actiosnMenuTrigger"
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
`)}
|
|
146
146
|
`,{positioning:!0})}
|
|
147
147
|
</${e}-menu>
|
|
148
|
-
`,
|
|
148
|
+
`,I=e=>l.html`
|
|
149
149
|
<${e}-button
|
|
150
150
|
appearance="${e=>e.buttonAppearance}"
|
|
151
151
|
part="actions-opener"
|
|
@@ -155,14 +155,14 @@
|
|
|
155
155
|
>
|
|
156
156
|
${e=>e.getLabel(null==e?void 0:e.singleOption.name)}
|
|
157
157
|
</${e}-button>
|
|
158
|
-
`,
|
|
158
|
+
`,R=l.html`
|
|
159
159
|
<div
|
|
160
160
|
class="actions-container${e=>e.isVertical?" actions-vertical":""}"
|
|
161
161
|
part="actions-container"
|
|
162
162
|
>
|
|
163
|
-
${e=>e.getTemplate(
|
|
163
|
+
${e=>e.getTemplate(k(e))}
|
|
164
164
|
</div>
|
|
165
|
-
`;class
|
|
165
|
+
`;class A 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}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();this.actionsMenu.style.position="fixed",this.actionsMenu.style.top=`${e.top}px`,this.actionsMenu.style.left="auto",this.actionsMenu.style.right=window.innerWidth-e.right+"px"}definitionChanged(e,t){var i;this.actions=null!==(i=null==t?void 0: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.buttonAppearance&&(this.buttonAppearance=t.buttonAppearance,delete this.definition.buttonAppearance),t.hideMenuSingleOption&&(this.hideMenuSingleOption=t.hideMenuSingleOption,delete this.definition.hideMenuSingleOption)}openChanged(){var e;this.classNames=(0,x.x)(["visible",this.open],["hidden",!this.open]),this.open?(this.updateMenuPosition(),this.actionsMenu.showPopover(),this.startTrackingPosition()):(this.stopTrackingPosition(),(null===(e=this.actionsMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.actionsMenu.hidePopover())}startTrackingPosition(){this.positionTracker=new $(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}toggleActionsMenuVisibility(){this.open=!this.open}onActionMenuItemClick(e){this.autoCloseOnAction&&(this.open=!1),e(this.rowData)}get allActions(){var e;const t=[{name:"✖",callback:()=>this.open=!1}];return this.addDefaultActions?[...null!==(e=this.actions)&&void 0!==e?e:[],...t]:this.actions}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.hideMenuSingleOption)return D(e);const t=this.actions.filter(e=>!e.isDisabled||!e.isDisabled(this.rowData));return this.singleOption=null,0!==t.length?1===t.length?(this.singleOption=t[0],I(e)):D(e):void 0}}(0,C.Cg)([l.observable],A.prototype,"actions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"is-vertical",mode:"boolean"})],A.prototype,"isVertical",void 0),(0,C.Cg)([(0,l.attr)({attribute:"add-default-actions",mode:"boolean"})],A.prototype,"addDefaultActions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close-on-action",mode:"boolean"})],A.prototype,"autoCloseOnAction",void 0),(0,C.Cg)([l.observable],A.prototype,"classNames",void 0),(0,C.Cg)([l.observable],A.prototype,"definition",void 0),(0,C.Cg)([l.attr],A.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],A.prototype,"open",void 0),(0,C.Cg)([l.attr],A.prototype,"buttonAppearance",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-disabled",mode:"boolean"})],A.prototype,"hideDisabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-menu-single-option",mode:"boolean"})],A.prototype,"hideMenuSingleOption",void 0),(0,C.Cg)([l.observable],A.prototype,"singleOption",void 0);const L=A.compose({baseName:"actions-menu",styles:E,template:R});function N(){return"undefined"!=typeof window&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)}class F{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 M{constructor(){this.noopProvider=new F}get(e){return e===M.DEFAULT_NAME?this.noopProvider:void 0}default(){return this.noopProvider}defaultName(){return M.DEFAULT_NAME}names(){return[M.DEFAULT_NAME]}getStatus(e){return(0,C.sH)(this,void 0,void 0,function*(){var t,i,o;return void 0!==e&&e!==M.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:M.DEFAULT_NAME,isDefault:!0,status:o}]})}}M.DEFAULT_NAME="default";const _=a.DI.createInterface(e=>e.singleton(M));const P=l.css`
|
|
166
166
|
:host {
|
|
167
167
|
display: block;
|
|
168
168
|
width: 800px;
|
|
@@ -260,9 +260,9 @@
|
|
|
260
260
|
background: var(--neutral-fill-hover);
|
|
261
261
|
color: var(--neutral-foreground-rest);
|
|
262
262
|
}
|
|
263
|
-
`;var H=i(77679);let
|
|
264
|
-
${e=>{return t=
|
|
265
|
-
${(0,l.when)(()=>
|
|
263
|
+
`;var H=i(77679);let z=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(z="true"===GENX_ENABLE_AI)}catch(ad){}const U=()=>z||(0,H.m4)("ai");var B=i(40729);const V=l.html`
|
|
264
|
+
${e=>{return t=k(e),l.html`
|
|
265
|
+
${(0,l.when)(()=>U(),l.html`
|
|
266
266
|
<div class="ai-criteria-search">
|
|
267
267
|
<div class="ai-criteria-search-row">
|
|
268
268
|
${(0,l.when)(e=>!e.showingChips,l.html`
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
class="criteria-input"
|
|
272
272
|
placeholder="${e=>e.placeholder}"
|
|
273
273
|
?disabled=${e=>e.disabled||e.isInterpreting}
|
|
274
|
-
:value=${(0,
|
|
274
|
+
:value=${(0,B.O)(e=>e.inputValue,"string","input")}
|
|
275
275
|
@blur=${e=>e.handleBlur()}
|
|
276
276
|
rows="1"
|
|
277
277
|
></${t}-text-area>
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
</div>
|
|
335
335
|
`)}
|
|
336
336
|
`;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,i;const o=null!==(t=W[e.operator])&&void 0!==t?t:V.n.containsIgnoreCase;return(new G.K).withField(e.field).withValue(null!==(i=e.value)&&void 0!==i?i:null).withSerialiser(o).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","endsWith","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,ve,ge=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"}(ve||(ve={}));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,v,g,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===(v=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===v?void 0:v.autoClose)&&E.setAttribute("auto-close",`${null===(f=null===(g=null==e?void 0:e.config)||void 0===g?void 0:g.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:ge.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:ve.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===ve.Left?fe:"",e.style.right=i===ve.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`
|
|
337
|
+
`;var j=i(95553),G=i(58749),Y=i(14609),W=i(86636);const q={contains:j.n.containsIgnoreCase,equals:j.n.EQ,startsWith:j.n.startsWith,endsWith:j.n.endsWith,greaterThan:j.n.GT,lessThan:j.n.LT,greaterThanOrEqual:j.n.GE,lessThanOrEqual:j.n.LE,notEqual:j.n.NE,dateIsToday:j.n.dateIsToday,dateIsAfter:j.n.dateIsGreaterEqual,dateIsGreaterEqual:j.n.dateIsGreaterEqual,dateIsBefore:j.n.dateIsLessEqual,dateIsLessEqual:j.n.dateIsLessEqual,dateIsEqual:j.n.dateIsEqual,dateTimeIsAfter:j.n.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:j.n.dateTimeIsGreaterEqual,dateTimeIsBefore:j.n.dateTimeIsLessEqual,dateTimeIsLessEqual:j.n.dateTimeIsLessEqual};function K(e){var t,i;const o=null!==(t=q[e.operator])&&void 0!==t?t:j.n.containsIgnoreCase;return(new G.K).withField(e.field).withValue(null!==(i=e.value)&&void 0!==i?i:null).withSerialiser(o).withGroup("default").build()}function X(e,t){return 1===e.length?e[0]:e.reduce((e,i,o)=>0===o?[i]:[...e,t,i],[])}function J(e){var t;const i=new Y.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(K),s="or"===n.logic?W.r.Or():W.r.And(),a=X(e,s),r=e.length>1?{join:s}:{};n.negated?i.And([W.r.Not(),a]):i.And(1===e.length?e[0]:e,r),o=!0}return o?i.build():""}const Q=["contains","equals","startsWith","endsWith","notEqual"],Z=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],ee=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],te=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],ie={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:"≤"},oe=new Set(["DATE","LOCALDATE"]),ne=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),se=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function ae(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function re(e){const t=ae(e);return oe.has(t)?ee:ne.has(t)?te:se.has(t)?Z:Q}function le(e){return se.has(ae(e))}function de(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 ce(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function ue(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";re(l).includes(s)?!ee.includes(s)&&!te.includes(s)||"dateIsToday"===s||de(a)?le(l)&&Z.includes(s)&&!ce(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 he(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}=ue(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 pe=i(60416);var me,ve,ge,fe=i(31274);!function(e){e.NOTIFICATION_EVENT="notification-event"}(me||(me={})),function(e){e.Top="top",e.Bottom="bottom"}(ve||(ve={})),function(e){e.Left="left",e.Right="right"}(ge||(ge={}));const be="12px";var ye=i(52945);const we=(e,t,i)=>{var o,n,s,a,r,l,d,c,u,h,p,m,v,g,f,b,y,w,C;(0,pe.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,ye.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==s?s:(0,pe.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===(v=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===v?void 0:v.autoClose)&&E.setAttribute("auto-close",`${null===(f=null===(g=null==e?void 0:e.config)||void 0===g?void 0:g.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)},Ce={alert:e=>{(0,pe.u_)(e),alert((0,pe.uP)(e))},toast:we,dialog:fe.u,snackbar:(e,t)=>{var i,o,n,s,a,r;(0,pe.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:ve.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,pe.jE)(`snack-container-${c}-${u}`,t);h&&((e,t,i)=>{e.style.position="fixed",e.style.top=t===ve.Top?be:"",e.style.bottom=t===ve.Bottom?be:"",e.style.left=i===ge.Left?be:"",e.style.right=i===ge.Right?be:""})(h,c,u),h.appendChild(d),d.notification=e},banner:(e,t,i)=>{var o;(0,pe.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-banner`),a=(0,pe.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}},xe=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{Ce[o]&&Ce[o](e,t,i)})};function $e(e,t,i){(null==t?void 0:t.trim())&&xe({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class Se 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 N()}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=ie[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=J(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 $e("AI criteria search","AI could not interpret the criteria",k(this)),void(this.isInterpreting=!1);const{valid:a,invalid:r}=he(t.groups,this.fieldMetadata);if(r.length>0&&($e("Criteria validation error",0===(s=r).length?"":1===s.length?s[0].message:s.map(e=>e.message).join("; "),k(this)),this.$emit("validation-errors",r)),a.length>0){const e=[...this.activeGroups,...a],t=J(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue="",this.showingChips=!0,this.$emit("criteria-changed",t)}}catch(e){$e("AI criteria search",e instanceof Error?e.message:"Interpretation failed",k(this))}finally{this.isInterpreting=!1}var s}else $e("AI criteria search","AI provider not configured",k(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(!N())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)([_],Se.prototype,"providerRegistry",void 0),(0,C.Cg)([l.attr],Se.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Se.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Se.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],Se.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],Se.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],Se.prototype,"activeGroups",void 0),(0,C.Cg)([l.observable],Se.prototype,"showingChips",void 0),(0,C.Cg)([l.observable],Se.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],Se.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],Se.prototype,"speechAvailable",null),(0,C.Cg)([l.volatile],Se.prototype,"criteriaChips",null);const Ee=void 0,Oe={},Te=Se.compose(Object.assign({baseName:"ai-criteria-search",template:V,styles:P,shadowOptions:Ee},Oe)),ke=(e,t)=>l.css`
|
|
338
338
|
:host {
|
|
339
339
|
display: flex;
|
|
340
340
|
justify-content: center;
|
|
@@ -464,9 +464,9 @@
|
|
|
464
464
|
margin-top: calc(var(--design-unit) * 3px);
|
|
465
465
|
width: 100%;
|
|
466
466
|
}
|
|
467
|
-
`,
|
|
468
|
-
${e=>{return t=
|
|
469
|
-
${(0,l.when)(()=>
|
|
467
|
+
`,De=l.html`
|
|
468
|
+
${e=>{return t=k(e),l.html`
|
|
469
|
+
${(0,l.when)(()=>U(),l.html`
|
|
470
470
|
<div class="ai-indicator-container" part="ai-indicator-container">
|
|
471
471
|
<div
|
|
472
472
|
class=${e=>(0,x.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])}
|
|
@@ -521,19 +521,19 @@
|
|
|
521
521
|
</div>
|
|
522
522
|
`)}
|
|
523
523
|
`;var t}}
|
|
524
|
-
`;class
|
|
524
|
+
`;class Ie 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){O(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)([_],Ie.prototype,"providerRegistry",void 0),(0,C.Cg)([l.observable],Ie.prototype,"status",void 0),(0,C.Cg)([l.observable],Ie.prototype,"open",void 0),(0,C.Cg)([l.observable],Ie.prototype,"state",void 0),(0,C.Cg)([l.observable],Ie.prototype,"isInstalling",void 0),(0,C.Cg)([l.volatile],Ie.prototype,"chromeStatusLabel",null),(0,C.Cg)([l.volatile],Ie.prototype,"canInstall",null),(0,C.Cg)([l.volatile],Ie.prototype,"isDownloading",null);const Re=Ie.compose({baseName:"ai-indicator",template:De,styles:ke}),Ae=(e,t)=>l.css`
|
|
525
525
|
${(0,r.anchorStyles)(e,t)}
|
|
526
|
-
`,
|
|
526
|
+
`,Le=(e,t)=>(0,a.anchorTemplate)(e,t);class Ne extends r.Anchor{}const Fe={delegatesFocus:!0,mode:"open"},Me={},_e=Ne.compose(Object.assign({baseName:"anchor",template:Le,styles:Ae,shadowOptions:Fe},Me)),Pe=(e,t)=>(0,a.anchoredRegionTemplate)(e,t),He=(e,t)=>l.css`
|
|
527
527
|
${(0,r.anchoredRegionStyles)(e,t)}
|
|
528
|
-
`;class
|
|
528
|
+
`;class ze extends r.AnchoredRegion{}const Ue={delegatesFocus:!0,mode:"open"},Be={},Ve=ze.compose(Object.assign({baseName:"anchored-region",template:Pe,styles:He,shadowOptions:Ue},Be)),je=(e,t)=>l.css`
|
|
529
529
|
${(0,r.avatarStyles)(e,t)}
|
|
530
|
-
`,Ge=(e,t)=>(0,a.avatarTemplate)(e,t),
|
|
530
|
+
`,Ge=(e,t)=>(0,a.avatarTemplate)(e,t),Ye=l.html`
|
|
531
531
|
${(0,l.when)(e=>e.imgSrc,l.html`
|
|
532
532
|
<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />
|
|
533
533
|
`)}
|
|
534
|
-
`;class
|
|
534
|
+
`;class We extends r.Avatar{}const qe={delegatesFocus:!0,mode:"open"},Ke={media:Ye},Xe=We.compose(Object.assign({baseName:"avatar",template:Ge,styles:je,shadowOptions:qe},Ke)),Je=(e,t)=>l.css`
|
|
535
535
|
${(0,r.badgeStyles)(e,t)}
|
|
536
|
-
`,
|
|
536
|
+
`,Qe=(e,t)=>(0,a.badgeTemplate)(e,t);class Ze extends r.Badge{}const et=void 0,tt={},it=Ze.compose(Object.assign({baseName:"badge",template:Qe,styles:Je,shadowOptions:et},tt));var ot=i(66506);const nt=(0,ot.createLogger)("foundation-ui"),st=l.css`
|
|
537
537
|
@keyframes delete-animate {
|
|
538
538
|
from {
|
|
539
539
|
height: 100px;
|
|
@@ -605,7 +605,7 @@
|
|
|
605
605
|
flex: 1;
|
|
606
606
|
overflow: hidden;
|
|
607
607
|
}
|
|
608
|
-
`,
|
|
608
|
+
`,at=e=>l.html`
|
|
609
609
|
<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${(0,l.ref)("banner")}>
|
|
610
610
|
<div part="content" class="content">
|
|
611
611
|
<slot name="content">
|
|
@@ -634,23 +634,23 @@
|
|
|
634
634
|
</slot>
|
|
635
635
|
</div>
|
|
636
636
|
</div>
|
|
637
|
-
`,
|
|
638
|
-
${e=>
|
|
639
|
-
`,
|
|
637
|
+
`,rt=l.html`
|
|
638
|
+
${e=>at(k(e))}
|
|
639
|
+
`,lt={mode:"open",delegatesFocus:!0};class dt 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){nt.error(e)}})}}(0,C.Cg)([l.observable],dt.prototype,"dismissAnimation",void 0),(0,C.Cg)([l.observable],dt.prototype,"notification",void 0);const ct=dt.compose({baseName:"banner",styles:st,template:rt,shadowOptions:lt}),ut=(e,t)=>l.css`
|
|
640
640
|
${(0,r.breadcrumbStyles)(e,t)}
|
|
641
|
-
`,
|
|
641
|
+
`,ht=(e,t)=>(0,a.breadcrumbTemplate)(e,t);class pt extends r.Breadcrumb{}const mt=void 0,vt={},gt=pt.compose(Object.assign({baseName:"breadcrumb",template:ht,styles:ut,shadowOptions:mt},vt)),ft=(e,t)=>l.css`
|
|
642
642
|
${(0,r.breadcrumbItemStyles)(e,t)}
|
|
643
|
-
`,
|
|
643
|
+
`,bt=(e,t)=>(0,a.breadcrumbItemTemplate)(e,t);class yt extends r.BreadcrumbItem{}const wt=void 0,Ct={separator:"/"},xt=yt.compose(Object.assign({baseName:"breadcrumb-item",template:bt,styles:ft,shadowOptions:wt},Ct)),$t=(e,t)=>l.css`
|
|
644
644
|
${(0,r.buttonStyles)(e,t)}
|
|
645
|
-
|
|
645
|
+
`,St=(e,t)=>(0,a.buttonTemplate)(e,t);class Et extends r.Button{}const Ot={delegatesFocus:!0,mode:"open"},Tt={},kt=Et.compose(Object.assign({baseName:"button",template:St,styles:$t,shadowOptions:Ot},Tt)),Dt=()=>l.css`
|
|
646
646
|
${r.CalendarStyles}
|
|
647
|
-
`,
|
|
647
|
+
`,It=(e,t)=>(0,a.calendarTemplate)(e,t);class Rt extends r.Calendar{}const At={delegatesFocus:!0,mode:"open"},Lt={},Nt=Rt.compose(Object.assign({baseName:"calendar",template:It,styles:Dt,shadowOptions:At},Lt)),Ft=(e,t)=>l.css`
|
|
648
648
|
${(0,r.cardStyles)(e,t)}
|
|
649
649
|
:host {
|
|
650
650
|
background-color: var(--fui-card-fill-color);
|
|
651
651
|
color: var(--fui-card-foreground-color);
|
|
652
652
|
}
|
|
653
|
-
`,
|
|
653
|
+
`,Mt=(e,t)=>(0,a.cardTemplate)(e,t);class _t extends r.Card{}const Pt=void 0,Ht={},zt=_t.compose(Object.assign({baseName:"card",template:Mt,styles:Ft,shadowOptions:Pt},Ht));var Ut;!function(e){e.BELOW="below",e.ABOVE="above"}(Ut||(Ut={}));const Bt=450,Vt=l.css`
|
|
654
654
|
.root {
|
|
655
655
|
position: relative;
|
|
656
656
|
width: 100%;
|
|
@@ -838,9 +838,9 @@
|
|
|
838
838
|
|
|
839
839
|
.visible {
|
|
840
840
|
visibility: visible;
|
|
841
|
-
max-height: ${
|
|
841
|
+
max-height: ${Bt.toString()}px;
|
|
842
842
|
}
|
|
843
|
-
`,
|
|
843
|
+
`,jt=(e="foundation")=>l.html`
|
|
844
844
|
<div class="root" part="root">
|
|
845
845
|
<div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}>
|
|
846
846
|
<label
|
|
@@ -863,7 +863,7 @@
|
|
|
863
863
|
<${e}-text-field
|
|
864
864
|
id="filter-search"
|
|
865
865
|
part="filter-search"
|
|
866
|
-
value=${(0,
|
|
866
|
+
value=${(0,B.O)(e=>e.filterSearchValue,"string","input")}
|
|
867
867
|
placeholder="${e=>e.getPlaceholder}"
|
|
868
868
|
@input=${(e,t)=>e.setFilter()}
|
|
869
869
|
@change=${(e,t)=>e.changeHandler(t.event)}
|
|
@@ -910,10 +910,10 @@
|
|
|
910
910
|
</div>
|
|
911
911
|
</div>
|
|
912
912
|
`,Gt=l.html`
|
|
913
|
-
${
|
|
914
|
-
`,
|
|
913
|
+
${jt()}
|
|
914
|
+
`,Yt=void 0,Wt={};class qt 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=Ut.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===Ut.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?Ut.BELOW:Ut.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<t.height&&o>n?Ut.ABOVE:Ut.BELOW}}e===Ut.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===Ut.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){O(e,this)&&(this.open=!1)}}(0,C.Cg)([l.attr],qt.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],qt.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],qt.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],qt.prototype,"disabled",void 0),(0,C.Cg)([l.observable],qt.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],qt.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],qt.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],qt.prototype,"open",void 0),(0,C.Cg)([l.observable],qt.prototype,"options",void 0),(0,C.Cg)([l.observable],qt.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],qt.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],qt.prototype,"position",void 0),(0,C.Cg)([l.volatile],qt.prototype,"getPlaceholder",null);const Kt=qt.compose(Object.assign({baseName:"categorized-multiselect",template:Gt,styles:Vt,shadowOptions:Yt},Wt)),Xt=(e,t)=>l.css`
|
|
915
915
|
${(0,r.checkboxStyles)(e,t)}
|
|
916
|
-
`,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(21281),di=i(34193),ci=i(41119),ui=i(57963),hi=i(49964),pi=i(12066),mi=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.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new mi.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=>{void 0!==e[t]&&(this[t]=e[t])})}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.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.connect.dataLogoff(this.sourceRef),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,"boolean"==typeof e.MORE_ROWS&&(this.moreRowsAvailable=e.MORE_ROWS);const t=e.MESSAGE_TYPE;if(t&&t===li.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,di.d)(e);this.handleStreamUpdate(t)}else 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 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.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,di.d)(e).inserts:void 0}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===ci.w.DATE||t===ci.w.DATETIME?(0,pi.Ey)(e,t===ci.w.DATETIME):e}}function gi(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 fi;(0,C.Cg)([ui.dm],vi.prototype,"connect",void 0),(0,C.Cg)([hi.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 bi=fi=class extends vi{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=fi.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:fi.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-fi.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 fi||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.")}};bi.defaultPageSize=20,bi.scrollLoadThresholdPx=32,(0,C.Cg)([ni.ME],bi.prototype,"resources",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],bi.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],bi.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],bi.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],bi.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],bi.prototype,"allowCustomOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"infinite-scroll"})],bi.prototype,"infiniteScroll",void 0),(0,C.Cg)([(0,l.attr)({attribute:"page-size",converter:l.nullableNumberConverter})],bi.prototype,"pageSize",void 0),(0,C.Cg)([l.observable],bi.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],bi.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],bi.prototype,"initialSelectedValue",void 0),bi=fi=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],bi);const yi=(e,t)=>l.css`
|
|
916
|
+
`,Jt=(e,t)=>(0,a.checkboxTemplate)(e,t);class Qt extends r.Checkbox{}const Zt=void 0,ei={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 '},ti=Qt.compose(Object.assign({baseName:"checkbox",template:Jt,styles:Xt,shadowOptions:Zt},ei));var ii=i(62051),oi=i.n(ii),ni=i(39087),si=i(87917),ai=i(40370),ri=i(6884),li=i(96730),di=i(21281),ci=i(34193),ui=i(41119),hi=i(57963),pi=i(49964),mi=i(12066),vi=i(97156);class gi extends((0,ai.C)(a.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=ri.OD.MAX_ROWS_250,this.maxView=ri.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new vi.t(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==(0,li.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=>{void 0!==e[t]&&(this[t]=e[t])})}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)===ni.v.REQUEST_SERVER?ri.OD.REQUEST_SERVER_ROW_ID:ri.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.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.connect.dataLogoff(this.sourceRef),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)}nt.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,"boolean"==typeof e.MORE_ROWS&&(this.moreRowsAvailable=e.MORE_ROWS);const t=e.MESSAGE_TYPE;if(t&&t===di.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,ci.d)(e);this.handleStreamUpdate(t)}else 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 ni.v.REQUEST_SERVER:return!0;case ni.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===ni.v.DATASERVER)return 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.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,ci.d)(e).inserts:void 0}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,li.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&&nt[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 Y.b;o.withExpression((new G.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(j.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var bi;(0,C.Cg)([hi.dm],gi.prototype,"connect",void 0),(0,C.Cg)([pi.yW],gi.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],gi.prototype,"criteria",void 0),(0,C.Cg)([l.observable],gi.prototype,"data",void 0),(0,C.Cg)([l.attr],gi.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],gi.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],gi.prototype,"maxView",void 0),(0,C.Cg)([l.attr],gi.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],gi.prototype,"request",void 0),(0,C.Cg)([l.attr],gi.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"reverse",void 0),(0,C.Cg)([l.attr],gi.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],gi.prototype,"withTimestampFormatting",void 0);let yi=bi=class extends gi{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:`${k(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||nt.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!==ni.v.DATASERVER}catch(e){nt.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):nt.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===ni.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 Y.b;i.withExpression((new G.K).withField(e.valueField).withValue(t).withSerialiser(j.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 nt.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){nt.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){nt.debug("handleStreamUpdates - Method not implemented.")}};yi.defaultPageSize=20,yi.scrollLoadThresholdPx=32,(0,C.Cg)([si.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`
|
|
917
917
|
.combo-box-indicator {
|
|
918
918
|
transition-property: transform;
|
|
919
919
|
transition-duration: 0.2s;
|
|
@@ -925,7 +925,7 @@
|
|
|
925
925
|
}
|
|
926
926
|
|
|
927
927
|
${(0,r.comboboxStyles)(e,t)}
|
|
928
|
-
`,
|
|
928
|
+
`,Ci=(e,t)=>l.html`
|
|
929
929
|
<template
|
|
930
930
|
aria-activedescendant="${e=>e.activeDescendant}"
|
|
931
931
|
class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}"
|
|
@@ -979,7 +979,7 @@
|
|
|
979
979
|
></slot>
|
|
980
980
|
</div>
|
|
981
981
|
</template>
|
|
982
|
-
`;var
|
|
982
|
+
`;var xi,$i;class Si extends r.Combobox{constructor(){super(...arguments),xi.set(this,void 0),$i.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=oi()(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 yi);(null==t?void 0:t.infiniteScroll)&&(this.async=!0)}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(O(e,this))this.open=!1;else{if(T(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!T(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,$i,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,$i,"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,xi,"f")||(0,C.GG)(this,xi,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,C.gn)(this,xi,"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.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof yi);if(t.length>0){const i=t[0];null==e||""===e?i.criteria=i.baseCriteria||"":fi(i,e),l.DOM.queueUpdate(()=>{this.control.value=e})}else nt.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)}}xi=new WeakMap,$i=new WeakMap,(0,C.Cg)([l.observable],Si.prototype,"activeDescendant",null),(0,C.Cg)([l.observable],Si.prototype,"slottedDatasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Si.prototype,"async",void 0),(0,C.Cg)([l.attr],Si.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"case-sensitive"})],Si.prototype,"caseSensitive",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"ignore-input-click"})],Si.prototype,"ignoreInputClick",void 0),(0,C.Cg)([(0,l.attr)({attribute:"filter-mode"})],Si.prototype,"filterMode",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],Si.prototype,"scrollToSelectedWhenOpening",void 0),(0,C.Cg)([l.observable],Si.prototype,"scrollToSelectedWhenOpeningOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-when-selection-changes"})],Si.prototype,"scrollWhenSelectionChanges",void 0),(0,C.Cg)([l.observable],Si.prototype,"scrollWhenSelectionChangesOptions",void 0);const Ei={delegatesFocus:!0,mode:"open"},Oi={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 '},Ti=Si.compose(Object.assign({baseName:"combobox",template:Ci,styles:wi,shadowOptions:Ei},Oi));var ki=i(98316);const Di=(e,t)=>l.css`
|
|
983
983
|
:host {
|
|
984
984
|
--light-size: 12px;
|
|
985
985
|
--height: calc(var(--design-unit) * 2px + var(--light-size));
|
|
@@ -1027,18 +1027,18 @@
|
|
|
1027
1027
|
text-overflow: ellipsis;
|
|
1028
1028
|
white-space: nowrap;
|
|
1029
1029
|
}
|
|
1030
|
-
`,
|
|
1030
|
+
`,Ii=l.html`
|
|
1031
1031
|
<div class=${e=>(0,x.x)(["light",!0],[e.colour,!0])}></div>
|
|
1032
1032
|
${(0,l.when)(e=>e.showLabel,l.html`
|
|
1033
1033
|
<div class="label">${e=>e.label}</div>
|
|
1034
1034
|
`)}
|
|
1035
|
-
`;class
|
|
1035
|
+
`;class Ri 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)([hi.dm],Ri.prototype,"connect",void 0),(0,C.Cg)([ki.N],Ri.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-label"})],Ri.prototype,"showLabel",void 0),(0,C.Cg)([l.observable],Ri.prototype,"label",void 0),(0,C.Cg)([l.observable],Ri.prototype,"colour",void 0);const Ai=Ri.compose({baseName:"connection-indicator",template:Ii,styles:Di}),Li=(e,t)=>l.css`
|
|
1036
1036
|
${(0,r.dataGridStyles)(e,t)}
|
|
1037
|
-
`,
|
|
1037
|
+
`,Ni=(e,t)=>(0,a.dataGridTemplate)(e,t);class Fi extends r.DataGrid{}const Mi=void 0,_i={},Pi=Fi.compose(Object.assign({baseName:"data-grid",template:Ni,styles:Li,shadowOptions:Mi},_i)),Hi=(e,t)=>l.css`
|
|
1038
1038
|
${(0,r.dataGridCellStyles)(e,t)}
|
|
1039
|
-
`;class
|
|
1039
|
+
`;class zi extends r.DataGridCell{}const Ui=void 0,Bi={},Vi=zi.compose(Object.assign({baseName:"data-grid-cell",template:a.dataGridCellTemplate,styles:Hi,shadowOptions:Ui},Bi)),ji=(e,t)=>l.css`
|
|
1040
1040
|
${(0,r.dataGridRowStyles)(e,t)}
|
|
1041
|
-
`;class Gi extends r.DataGridRow{}const
|
|
1041
|
+
`;class Gi extends r.DataGridRow{}const Yi=void 0,Wi={},qi=Gi.compose(Object.assign({baseName:"data-grid-row",template:a.dataGridRowTemplate,styles:ji,shadowOptions:Yi},Wi));var Ki=i(94343),Xi=i.n(Ki),Ji=i(58915),Qi=i.n(Ji),Zi=i(7554),eo=i.n(Zi),to=i(49916),io=i.n(to),oo=i(33839),no=i.n(oo);class so{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()}}Xi().extend(no());class ao{constructor(e=null,t="default"){const i=new so(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+=Xi()(i.date).isLeapYear()?1:0)}getDay(e){return new so(new Date(this.year,this.number-1,e),this.lang)}}Xi().extend(no());class ro{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new so(null,i),this.year=null!=e?e:this.today.year,this.month=new ao(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 ao(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new ao(new Date(this.year-1,11),this.lang):new ao(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new ao(new Date(this.year+1,0),this.lang):new ao(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new ao(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new ao(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new ao(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new ao(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new ao(new Date(this.year,this.month.number-1-1),this.lang)}}const lo=l.css`
|
|
1042
1042
|
:host {
|
|
1043
1043
|
position: relative;
|
|
1044
1044
|
}
|
|
@@ -1194,7 +1194,7 @@
|
|
|
1194
1194
|
.date-toggle[readonly] .label {
|
|
1195
1195
|
cursor: pointer;
|
|
1196
1196
|
}
|
|
1197
|
-
`,
|
|
1197
|
+
`,co=[1,7],uo=e=>l.html`
|
|
1198
1198
|
<${e}-text-field
|
|
1199
1199
|
data-test-id="date-picker"
|
|
1200
1200
|
readonly
|
|
@@ -1221,7 +1221,7 @@
|
|
|
1221
1221
|
</div>
|
|
1222
1222
|
<div class="week-days ${e=>(0,x.x)(["hide-weekends",e.hideWeekends])}">
|
|
1223
1223
|
${(0,l.repeat)(e=>{var t;return null===(t=e.calendar)||void 0===t?void 0:t.weekDays},l.html`
|
|
1224
|
-
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===
|
|
1224
|
+
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===co.indexOf(t.index+1),l.html`
|
|
1225
1225
|
<span
|
|
1226
1226
|
class="${(e,t)=>(0,x.x)(["disabled",-1!==t.parent.disabledDaysOfWeek.indexOf(t.index+1)])}"
|
|
1227
1227
|
>
|
|
@@ -1232,7 +1232,7 @@
|
|
|
1232
1232
|
</div>
|
|
1233
1233
|
<div class="month-days ${e=>(0,x.x)(["hide-weekends",e.hideWeekends])}">
|
|
1234
1234
|
${(0,l.repeat)(e=>e.monthList,l.html`
|
|
1235
|
-
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===
|
|
1235
|
+
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===co.indexOf(e.dayNumber),l.html`
|
|
1236
1236
|
<button
|
|
1237
1237
|
?disabled="${(e,t)=>-1!==t.parent.disabledDaysOfWeek.indexOf(e.dayNumber)}"
|
|
1238
1238
|
class="month-day
|
|
@@ -1247,44 +1247,44 @@
|
|
|
1247
1247
|
</div>
|
|
1248
1248
|
<slot name="bottom"></slot>
|
|
1249
1249
|
</div>
|
|
1250
|
-
`,
|
|
1251
|
-
${e=>
|
|
1252
|
-
`;i(8420);function ho(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 po(){return"undefined"!=typeof navigator&&navigator.language?navigator.language:"en"}function mo(e="en"){const t=ho(e),i=Ki()().locale(t),o=i.locale();return(n=t)!==(s=o)&&s!==n.split("-")[0]?Ki()().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 go(e){return null!=e&&""!==String(e).trim()}Ki().extend(Ji()),Ki().extend(Zi()),Ki().extend(to());const fo="MM-DD-YYYY";function bo(e,t){const i=String(e).trim(),o=Ki()(i,t,!0);if(o.isValid())return o;const n=Ki()(i,fo,!0);return n.isValid()?n:null}var yo=i(28745);const wo=[1,2,3,4,5,6,7],Co=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=wo.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 no(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,a),i):(yo.v.warn("Date picker disabled days - all days of week have been disabled"),t)},xo=void 0,$o={};class So extends a.FoundationElement{constructor(){super(...arguments),this.format=fo,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=fo,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&go(this.value)&&(this.formatDate=Ki()(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&&(go(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(),Ki().extend(Ji()),Ki().extend(to()),Ki().extend(Zi()),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||go(e)?go(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return go(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||go(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||vo(this.format)}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?po():this.lang}applyLocaleFormat(){this.format=mo(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:Ki()().toDate();this.currentDate=new no(n,this.effectiveLang),this.calendar=new ao(i,o,this.effectiveLang),go(this.value)&&(this.formatDate=Ki()(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=Ki()();this.currentDate=new no(e.toDate(),this.effectiveLang),this.calendar=new ao(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 no(Ki()().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=Co(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(this.currentDate.Date).format(fo)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=bo(e,this.format);t?(this.currentDate=new no(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(this.currentDate.Date).format(fo)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=Ki()();this.currentDate=new no(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&&!go(this.value))&&Ki()(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){Ki()(e.Date).isSame(this.currentDate.Date,"day")&&go(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(e.Date).format(fo)),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],So.prototype,"format",void 0),(0,C.Cg)([l.attr],So.prototype,"lang",void 0),(0,C.Cg)([(0,l.attr)({attribute:"use-locale-format",mode:"boolean"})],So.prototype,"useLocaleFormat",void 0),(0,C.Cg)([l.attr],So.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],So.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],So.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],So.prototype,"position",void 0),(0,C.Cg)([l.attr],So.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-empty",mode:"boolean"})],So.prototype,"allowEmpty",void 0),(0,C.Cg)([l.attr],So.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],So.prototype,"value",void 0),(0,C.Cg)([l.observable],So.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],So.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],So.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],So.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],So.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],So.prototype,"monthList",void 0),(0,C.Cg)([l.observable],So.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],So.prototype,"calendar",void 0);const Eo=So.compose(Object.assign({baseName:"date-picker",styles:ro,template:uo,shadowOptions:xo},$o));var Oo=i(83912);const To=r.SwatchRGB.create(1,1,1),ko=r.SwatchRGB.create(0,0,0),Do=(0,Oo.parseColorHexRGB)("#585858"),Io=r.SwatchRGB.create(Do.r,Do.g,Do.b),Ro=(0,Oo.parseColorHexRGB)("#ffffff"),Ao=r.SwatchRGB.create(Ro.r,Ro.g,Ro.b),Lo=r.PaletteRGB.from(Ao),Fo=(0,Oo.parseColorHexRGB)("#eeeeee"),No=r.SwatchRGB.create(Fo.r,Fo.g,Fo.b),Mo=r.PaletteRGB.from(No),_o=(0,Oo.parseColorHexRGB)("#08c3a5"),Ho=r.SwatchRGB.create(_o.r,_o.g,_o.b),Po=r.PaletteRGB.from(Ho),{create:zo}=a.DesignToken,Uo=zo("fui-fill-color").withDefault(Io),Bo=zo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(Ao),Vo=14;function Go(e,t){return e.colorContrast(t,Vo)}const jo=zo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>Go(zo("fui-card-palette").withDefault(Lo).getValueFor(e),Bo.getValueFor(e))),Yo=(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]=Yo(n,o)}),i)};var Wo=i(80273);const qo={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 Ko{constructor(){this.value=null}}(0,C.Cg)([l.observable],Ko.prototype,"value",void 0);const Xo=new Ko,Jo=(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 Qo(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const Zo={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,Oo.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},en=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,Oo.parseColorHexRGB)(e))),tn=(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)):tn(e,o,n))})},on=["baseClass","baseName","shadowOptions","styles","template"],nn=(e,t=on)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),sn=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:nn(t)}},an=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},rn=()=>Xo,ln=(...e)=>{const t=Xo.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)},dn=(e,t)=>{const i=Yo(qo,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,en(o.color.accent.$value)),r.neutralPalette.setValueFor(e,en(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,an(n,Wo.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,an(s,Wo.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,an(n,Wo.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,an(s,Wo.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,an(n,Wo.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,an(s,Wo.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,an(n,Wo.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,an(s,Wo.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,an(n,Wo.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,an(s,Wo.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,an(n,Wo.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,an(s,Wo.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,an(n,Wo.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,an(s,Wo.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,an(n,Wo.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,an(s,Wo.Du.plusSix)),i.customTokens&&tn(e,i.customTokens),Xo.value=structuredClone(i)},cn=en("#08c3a5"),un=en("#eeeeee"),hn=r.StandardLuminance.DarkMode;const pn=i(85109).O.ltr,mn=4,vn=4;var gn=i(85090);const fn=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,bn=l.css`
|
|
1250
|
+
`,ho=l.html`
|
|
1251
|
+
${e=>uo(k(e))}
|
|
1252
|
+
`;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 vo(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 go(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())||go(this.format)}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?mo():this.lang}applyLocaleFormat(){this.format=vo(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&&O(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),Po=(0,To.parseColorHexRGB)("#08c3a5"),Ho=r.SwatchRGB.create(Po.r,Po.g,Po.b),zo=r.PaletteRGB.from(Ho),{create:Uo}=a.DesignToken,Bo=Uo("fui-fill-color").withDefault(Ro),Vo=Uo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(Lo),jo=14;function Go(e,t){return e.colorContrast(t,jo)}const Yo=Uo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>Go(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,vn=4,gn=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`
|
|
1253
1253
|
${(0,a.display)("flex")}
|
|
1254
1254
|
:host {
|
|
1255
1255
|
flex: 1;
|
|
1256
1256
|
}
|
|
1257
|
-
`,
|
|
1257
|
+
`,wn=l.css`
|
|
1258
1258
|
:host {
|
|
1259
|
-
background-color: ${
|
|
1259
|
+
background-color: ${Bo};
|
|
1260
1260
|
}
|
|
1261
1261
|
`.withBehaviors((0,a.forcedColorsStylesheetBehavior)(l.css`
|
|
1262
1262
|
:host {
|
|
1263
|
-
background-color: ${
|
|
1264
|
-
box-shadow: 0 0 0 1px ${
|
|
1265
|
-
color: ${
|
|
1263
|
+
background-color: ${fn.A.ButtonFace};
|
|
1264
|
+
box-shadow: 0 0 0 1px ${fn.A.CanvasText};
|
|
1265
|
+
color: ${fn.A.ButtonText};
|
|
1266
1266
|
}
|
|
1267
|
-
`)),
|
|
1267
|
+
`)),Cn=(e,t)=>l.css`
|
|
1268
1268
|
${e.name} ${"h"+t} {
|
|
1269
1269
|
margin: 0;
|
|
1270
1270
|
}
|
|
1271
|
-
`;class
|
|
1271
|
+
`;class xn extends r.DesignSystemProvider{constructor(){super(),Qo(o,n,this)}}(0,C.Cg)([(0,l.attr)({attribute:"card-fill-color",converter:en}),Zo(Vo)],xn.prototype,"cardFillColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"card-foreground-color",converter:en}),Zo(Yo)],xn.prototype,"cardForegroundColor",void 0);const $n=xn.compose({baseName:"design-system-provider",template:l.html`
|
|
1272
1272
|
<slot></slot>
|
|
1273
1273
|
`,styles:e=>{const t=(e=>l.css`
|
|
1274
|
-
${
|
|
1275
|
-
${
|
|
1276
|
-
${
|
|
1277
|
-
${
|
|
1278
|
-
${
|
|
1279
|
-
${
|
|
1274
|
+
${Cn(e,"1")}
|
|
1275
|
+
${Cn(e,"2")}
|
|
1276
|
+
${Cn(e,"3")}
|
|
1277
|
+
${Cn(e,"4")}
|
|
1278
|
+
${Cn(e,"5")}
|
|
1279
|
+
${Cn(e,"6")}
|
|
1280
1280
|
`)(e);return t.addStylesTo(document),l.css`
|
|
1281
|
-
${bn}
|
|
1282
1281
|
${yn}
|
|
1282
|
+
${wn}
|
|
1283
1283
|
${t}
|
|
1284
1284
|
:host * {
|
|
1285
|
-
${
|
|
1285
|
+
${bn()}
|
|
1286
1286
|
}
|
|
1287
|
-
`}});var
|
|
1287
|
+
`}});var Sn=i(40543);const En=l.css`
|
|
1288
1288
|
:host {
|
|
1289
1289
|
--dialog-close-icon-display: flex;
|
|
1290
1290
|
--dialog-min-width: 358px;
|
|
@@ -1563,7 +1563,7 @@
|
|
|
1563
1563
|
dialog[style*='position: fixed'] {
|
|
1564
1564
|
margin: 0;
|
|
1565
1565
|
}
|
|
1566
|
-
`;var
|
|
1566
|
+
`;var On=i(70997);const Tn=l.html`
|
|
1567
1567
|
<slot>
|
|
1568
1568
|
${(0,l.when)(e=>e.notification,l.html`
|
|
1569
1569
|
<div class="details">
|
|
@@ -1571,7 +1571,7 @@
|
|
|
1571
1571
|
</div>
|
|
1572
1572
|
`)}
|
|
1573
1573
|
</slot>
|
|
1574
|
-
`,
|
|
1574
|
+
`,kn=e=>l.html`
|
|
1575
1575
|
<dialog ${(0,l.ref)("mainElement")} part="dialog" type=${e=>e.type}>
|
|
1576
1576
|
<div class="content-wrapper" part="content">
|
|
1577
1577
|
<div part="top" class="top" ${(0,l.ref)("topElement")}>
|
|
@@ -1591,9 +1591,9 @@
|
|
|
1591
1591
|
`)}
|
|
1592
1592
|
</div>
|
|
1593
1593
|
</div>
|
|
1594
|
-
${(0,
|
|
1595
|
-
<div class="content-container" part="content-container">${
|
|
1596
|
-
`,
|
|
1594
|
+
${(0,On.q)(e=>e.resizable,l.html`
|
|
1595
|
+
<div class="content-container" part="content-container">${Tn}</div>
|
|
1596
|
+
`,Tn)}
|
|
1597
1597
|
<div part="bottom" class="bottom">
|
|
1598
1598
|
<slot name="bottom">
|
|
1599
1599
|
${(0,l.when)(e=>e.notification,l.html`
|
|
@@ -1623,13 +1623,13 @@
|
|
|
1623
1623
|
<div class="resize-handle resize-handle-sw" data-direction="sw"></div>
|
|
1624
1624
|
`)}
|
|
1625
1625
|
</dialog>
|
|
1626
|
-
`,
|
|
1627
|
-
${e=>
|
|
1628
|
-
`,Dn={mode:"open",delegatesFocus:!0},In={};class Rn 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||$n.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],Rn.prototype,"notification",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],Rn.prototype,"type",void 0),(0,C.Cg)([l.attr],Rn.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-close-icon"})],Rn.prototype,"showCloseIcon",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"resizable"})],Rn.prototype,"resizable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Rn.prototype,"draggable",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-width"})],Rn.prototype,"minWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-height"})],Rn.prototype,"minHeight",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-width"})],Rn.prototype,"initialWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-height"})],Rn.prototype,"initialHeight",void 0),(0,C.Cg)([l.observable],Rn.prototype,"onShowCallback",void 0),(0,C.Cg)([l.observable],Rn.prototype,"onCloseCallback",void 0),(0,C.Cg)([l.observable],Rn.prototype,"isMaximized",void 0),(0,C.Cg)([l.observable],Rn.prototype,"hasBeenResized",void 0),(0,C.Cg)([l.volatile],Rn.prototype,"open",null),(0,C.Cg)([l.volatile],Rn.prototype,"resizeIconName",null);class An extends Rn{show(){this.onShowCallback&&this.onShowCallback(),this.mainElement.show()}}const Ln=An.compose(Object.assign({baseName:"dialog",styles:Sn,template:kn,shadowOptions:Dn},In)),Fn=(e,t)=>l.css`
|
|
1626
|
+
`,Dn=l.html`
|
|
1627
|
+
${e=>kn(k(e))}
|
|
1628
|
+
`,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){nt.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`
|
|
1629
1629
|
${(0,r.disclosureStyles)(e,t)}
|
|
1630
|
-
`,
|
|
1630
|
+
`,Mn=(e,t)=>(0,a.disclosureTemplate)(e,t);class _n extends a.Disclosure{}const Pn=void 0,Hn={},zn=_n.compose(Object.assign({baseName:"disclosure",template:Mn,styles:Fn,shadowOptions:Pn},Hn)),Un=(e,t)=>l.css`
|
|
1631
1631
|
${(0,r.dividerStyles)(e,t)}
|
|
1632
|
-
`,
|
|
1632
|
+
`,Bn=(e,t)=>(0,a.dividerTemplate)(e,t);class Vn extends a.Divider{}const jn=void 0,Gn={},Yn=Vn.compose(Object.assign({baseName:"divider",template:Bn,styles:Un,shadowOptions:jn},Gn)),Wn=(e,t,i)=>l.css`
|
|
1633
1633
|
:host {
|
|
1634
1634
|
--dropdown-opener-height-multiplier: 0.7px;
|
|
1635
1635
|
--menu-item-height-multiplier: 0.7px;
|
|
@@ -1692,9 +1692,9 @@
|
|
|
1692
1692
|
var(--menu-item-height-multiplier)
|
|
1693
1693
|
);
|
|
1694
1694
|
}
|
|
1695
|
-
`,
|
|
1696
|
-
${
|
|
1697
|
-
`,
|
|
1695
|
+
`,qn=(e,t)=>l.css`
|
|
1696
|
+
${Wn("foundation",e,t)}
|
|
1697
|
+
`,Kn=(e,t)=>l.html`
|
|
1698
1698
|
${(0,l.repeat)(()=>e,l.html`
|
|
1699
1699
|
${(0,l.when)(e=>e.isDisabled&&e.isDisabled(),l.html`
|
|
1700
1700
|
<${t}-menu-item class="menu-item" disabled>${e=>e.name}</${t}-menu-item>
|
|
@@ -1715,12 +1715,12 @@
|
|
|
1715
1715
|
`)}
|
|
1716
1716
|
${e=>e.name}
|
|
1717
1717
|
${(0,l.when)(e=>e.submenu,l.html`
|
|
1718
|
-
<${t}-menu>${e=>
|
|
1718
|
+
<${t}-menu>${e=>Kn(e.submenu,t)}</${t}-menu>
|
|
1719
1719
|
`)}
|
|
1720
1720
|
</${t}-menu-item>
|
|
1721
1721
|
`)}
|
|
1722
1722
|
`)}
|
|
1723
|
-
`,
|
|
1723
|
+
`,Xn=e=>l.html`
|
|
1724
1724
|
<div class="actions-container" part="actions-container">
|
|
1725
1725
|
<${e}-button
|
|
1726
1726
|
id="actiosnMenuTrigger"
|
|
@@ -1737,12 +1737,12 @@
|
|
|
1737
1737
|
class="actions-menu ${e=>e.classNames}"
|
|
1738
1738
|
part="actions-menu"
|
|
1739
1739
|
>
|
|
1740
|
-
${t=>
|
|
1740
|
+
${t=>Kn(t.allItems,e)}
|
|
1741
1741
|
</${e}-menu>
|
|
1742
1742
|
</div>
|
|
1743
|
-
`,
|
|
1744
|
-
${e=>
|
|
1745
|
-
`;class
|
|
1743
|
+
`,Jn=l.html`
|
|
1744
|
+
${e=>Xn(k(e))}
|
|
1745
|
+
`;class Qn 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){O(e,this)&&(this.open=!1)}openChanged(){this.classNames=(0,x.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],Qn.prototype,"items",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Qn.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],Qn.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Qn.prototype,"classNames",void 0),(0,C.Cg)([l.attr],Qn.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],Qn.prototype,"open",void 0),(0,C.Cg)([l.attr],Qn.prototype,"buttonAppearance",void 0);const Zn=Qn.compose({baseName:"dropdown-menu",styles:qn,template:Jn});var es=i(84686);const ts=l.css`
|
|
1746
1746
|
.environment-indicator {
|
|
1747
1747
|
font-size: 12px;
|
|
1748
1748
|
display: inline-flex;
|
|
@@ -1769,8 +1769,8 @@
|
|
|
1769
1769
|
.environment-indicator.lg .icon {
|
|
1770
1770
|
font-size: calc(var(--design-unit) * 3.5px);
|
|
1771
1771
|
}
|
|
1772
|
-
`,
|
|
1773
|
-
${e=>{return t=
|
|
1772
|
+
`,is=l.html`
|
|
1773
|
+
${e=>{return t=k(e),l.html`
|
|
1774
1774
|
${(0,l.when)(e=>e.config,l.html`
|
|
1775
1775
|
<div
|
|
1776
1776
|
data-test-id="environment-indicator"
|
|
@@ -1794,7 +1794,7 @@
|
|
|
1794
1794
|
</div>
|
|
1795
1795
|
`)}
|
|
1796
1796
|
`;var t}}
|
|
1797
|
-
`;var
|
|
1797
|
+
`;var os=i(17190);const ns="default",ss={level:ns,showIcon:!1,iconSize:"sm",backgroundColor:"#2222ff",textColor:"#ffffff",label:"DEFAULT"},as=[ss,{level:"dev",showIcon:!1,icon:"code",backgroundColor:"#ff6b35",label:"DEV"},{level:"prod",showIcon:!1,icon:"check-circle",backgroundColor:"#28a745",label:"PROD"}],rs=(0,os.r)(),ls=a.DI.createInterface(e=>e.instance(rs),e=>e.instance(rs)),ds=a.DI.createInterface("EnvironmentIndicatorConfig");function cs(){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:[ss]};a.DI.getOrCreateDOMContainer().register(a.Registration.instance(ls,rs),a.Registration.instance(ds,o)),rs.publish(o)})}const us=(0,ot.createLogger)("EnvironmentIndicator");class hs extends a.FoundationElement{constructor(){super(...arguments),this.size="sm",this.textColor="#ffffff",this.icon="check-circle",this.iconSize="sm",this.useDefaultConfig=!1,this.config=ss,this.envConfigs=as}envConfigsChanged(){this.config=this.getEnvConfigByLevel()}diConfigChanged(){this.config=this.getEnvConfigByLevel()}subscribeToDiConfig(){const e=a.DI.getOrCreateDOMContainer().get(ls);e&&"function"==typeof e.subscribe?this.unsubscribeConfig=e.subscribe(e=>{this.diConfig=e}):us.error("Observer not found or invalid in DI container")}connectedCallback(){super.connectedCallback(),this.diConfig=function(){try{const e=a.DI.getOrCreateDOMContainer().get(ds);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){us.error(e)}return es.H6!==ns?es.H6:this.useDefaultConfig?ns:void 0}getEnvConfigByLevel(){const e=this.getAttributesConfig(),t=this.getCurrentEnvironmentLevel();if(!t)return this.useDefaultConfig?ss:void 0;if(this.label)return Object.assign(Object.assign(Object.assign({},ss),{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],hs.prototype,"level",void 0),(0,C.Cg)([l.attr],hs.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-icon"})],hs.prototype,"showIcon",void 0),(0,C.Cg)([l.attr],hs.prototype,"size",void 0),(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],hs.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],hs.prototype,"textColor",void 0),(0,C.Cg)([l.attr],hs.prototype,"icon",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],hs.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"use-default-config"})],hs.prototype,"useDefaultConfig",void 0),(0,C.Cg)([l.observable],hs.prototype,"config",void 0),(0,C.Cg)([l.observable],hs.prototype,"envConfigs",void 0),(0,C.Cg)([l.observable],hs.prototype,"diConfig",void 0);const ps=hs.compose({baseName:"environment-indicator",template:is,styles:ts}),ms=e=>l.html`
|
|
1798
1798
|
<${e}-banner ${(0,l.ref)("banner")}>
|
|
1799
1799
|
<div slot="content">
|
|
1800
1800
|
<div>
|
|
@@ -1815,13 +1815,13 @@
|
|
|
1815
1815
|
</${e}-button>
|
|
1816
1816
|
`)}
|
|
1817
1817
|
</${e}-banner>
|
|
1818
|
-
`,
|
|
1819
|
-
${e=>
|
|
1820
|
-
`,
|
|
1818
|
+
`,vs=l.html`
|
|
1819
|
+
${e=>ms(k(e))}
|
|
1820
|
+
`,gs={mode:"open",delegatesFocus:!0};class fs extends a.FoundationElement{connectedCallback(){super.connectedCallback(),nt.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){nt.error(e)}})}}(0,C.Cg)([l.observable],fs.prototype,"error",void 0),(0,C.Cg)([l.observable],fs.prototype,"notification",void 0);const bs=fs.compose({baseName:"error-banner",template:vs,shadowOptions:gs});var ys;!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(ys||(ys={}));const ws=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"}`},Cs=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)||ot.LogLevels.error},xs=(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},$s=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},Ss=(0,ot.createLogger)("foundation-error"),Es={alert:e=>{alert(ws(e))},notification:(e,t)=>{var i,o,n,s,a,r,l,d,c,u,h,p,m;const v=t.split("-")[0],g=xs("notify-container",t);if(g)switch(g.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":g.style.top="0",g.style.left="0";break;case"bottom-left":g.style.bottom="0",g.style.left="0";break;case"bottom-right":g.style.bottom="0",g.style.right="0";break;default:g.style.top="0",g.style.right="0"}const f=document.createElement(`${v}-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),g.appendChild(f)},dialog:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-error-dialog`);xs("dialog-container",t).appendChild(o),o.error=e,o.show()},snackbar:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`);xs("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 $s()})(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}},Os=(e,t,i)=>{Ss.log({message:ws(e),level:Cs(e)});Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{Es[o]&&Es[o](e,t,i)})};class Ts{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 ks{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 Ds=l.html`
|
|
1821
1821
|
<template ${(0,l.ref)("errorBoundary")}>
|
|
1822
1822
|
<slot></slot>
|
|
1823
1823
|
</template>
|
|
1824
|
-
`,
|
|
1824
|
+
`,Is={mode:"open",delegatesFocus:!0};class Rs extends a.FoundationElement{constructor(){super(...arguments),this.logger=(0,ot.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(ys.ERROR_BOUNDARY_EVENT,e=>{e.stopImmediatePropagation(),Os(e.detail,this.tagName,this.errorBoundary)}),this.resourceName){if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))return void nt.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;Os((new Ts).withTitle(e).withErrorDetails(i).withNotification((new ks).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],Rs.prototype,"errorBoundary",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Rs.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Rs.prototype,"closeTimeout",void 0),(0,C.Cg)([pi.yW],Rs.prototype,"datasource",void 0);const As=Rs.compose({baseName:"error-boundary",template:Ds,shadowOptions:Is}),Ls=l.css`
|
|
1825
1825
|
:host {
|
|
1826
1826
|
--design-unit: 3;
|
|
1827
1827
|
--dialog-max-width: 358px;
|
|
@@ -1840,7 +1840,7 @@
|
|
|
1840
1840
|
overflow: hidden;
|
|
1841
1841
|
min-height: var(--error-details-min-height);
|
|
1842
1842
|
}
|
|
1843
|
-
`,
|
|
1843
|
+
`,Ns=e=>l.html`
|
|
1844
1844
|
<${e}-dialog show-close-icon="false" ${(0,l.ref)("dialog")}>
|
|
1845
1845
|
<h2 slot="top" class="title">${e=>{var t;return null===(t=e.error)||void 0===t?void 0:t.title}}</h2>
|
|
1846
1846
|
<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>
|
|
@@ -1858,8 +1858,8 @@
|
|
|
1858
1858
|
`)}
|
|
1859
1859
|
</${e}-dialog>
|
|
1860
1860
|
`,Fs=l.html`
|
|
1861
|
-
${e=>
|
|
1862
|
-
`,
|
|
1861
|
+
${e=>Ns(k(e))}
|
|
1862
|
+
`,Ms={mode:"open",delegatesFocus:!0};class _s extends a.FoundationElement{connectedCallback(){super.connectedCallback(),nt.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){nt.error(e)}}}(0,C.Cg)([l.observable],_s.prototype,"error",void 0),(0,C.Cg)([l.observable],_s.prototype,"notification",void 0);const Ps=_s.compose({baseName:"error-dialog",template:Fs,styles:Ls,shadowOptions:Ms});class Hs 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){xe({title:e,body:t,config:{toast:{type:"warning",autoClose:!0,closeTimeout:5e3}}},this.tagName)}}(0,C.Cg)([l.attr],Hs.prototype,"label",void 0),(0,C.Cg)([l.attr],Hs.prototype,"accept",void 0),(0,C.Cg)([(0,l.attr)({attribute:"file-size-limit-bytes"})],Hs.prototype,"fileSizeLimitBytes",void 0),(0,C.Cg)([l.observable],Hs.prototype,"fileName",void 0),(0,C.Cg)([l.observable],Hs.prototype,"isProcessing",void 0);const zs=(e,t,i)=>l.css`
|
|
1863
1863
|
/* Host */
|
|
1864
1864
|
:host {
|
|
1865
1865
|
display: flex;
|
|
@@ -1909,9 +1909,9 @@
|
|
|
1909
1909
|
justify-content: center;
|
|
1910
1910
|
z-index: 2;
|
|
1911
1911
|
}
|
|
1912
|
-
`,
|
|
1913
|
-
${
|
|
1914
|
-
`,
|
|
1912
|
+
`,Us=(e,t)=>l.css`
|
|
1913
|
+
${zs("foundation",e,t)}
|
|
1914
|
+
`,Bs=e=>l.html`
|
|
1915
1915
|
<template>
|
|
1916
1916
|
<div class="file-reader">
|
|
1917
1917
|
${(0,l.when)(e=>e.isProcessing,l.html`
|
|
@@ -1947,9 +1947,9 @@
|
|
|
1947
1947
|
`)}
|
|
1948
1948
|
</div>
|
|
1949
1949
|
</template>
|
|
1950
|
-
`,
|
|
1951
|
-
${e=>
|
|
1952
|
-
`;class
|
|
1950
|
+
`,Vs=l.html`
|
|
1951
|
+
${e=>Bs(k(e))}
|
|
1952
|
+
`;class js extends Hs{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"})],js.prototype,"autoProcess",void 0),(0,C.Cg)([(0,l.attr)({attribute:"processing-delay-ms"})],js.prototype,"processingDelayMs",void 0),(0,C.Cg)([l.observable],js.prototype,"fileContent",void 0),(0,C.Cg)([l.observable],js.prototype,"onFileRead",void 0);const Gs=js.compose({baseName:"file-reader",styles:Us,template:Vs});var Ys=i(17465),Ws=i(32748);const qs=l.css`
|
|
1953
1953
|
/* Host */
|
|
1954
1954
|
:host {
|
|
1955
1955
|
display: flex;
|
|
@@ -1997,7 +1997,7 @@
|
|
|
1997
1997
|
fast-data-grid-row {
|
|
1998
1998
|
align-items: center;
|
|
1999
1999
|
}
|
|
2000
|
-
`,
|
|
2000
|
+
`,Ks=e=>l.html`
|
|
2001
2001
|
<template>
|
|
2002
2002
|
<div class="file-selection">
|
|
2003
2003
|
<input type="file" multiple ${(0,l.ref)("fileInput")}
|
|
@@ -2023,13 +2023,13 @@
|
|
|
2023
2023
|
</${e}-data-grid>
|
|
2024
2024
|
</div>
|
|
2025
2025
|
</template>
|
|
2026
|
-
`,
|
|
2027
|
-
${e=>
|
|
2028
|
-
`,
|
|
2026
|
+
`,Xs=l.html`
|
|
2027
|
+
${e=>Ks(k(e))}
|
|
2028
|
+
`,Js=e=>{const t=new FormData;return e.forEach(e=>{t.append(e.name,e)}),t},Qs=(e,t,i,o)=>{const n=new Headers;return n.append("SESSION_AUTH_TOKEN",i),o.post(e,{body:t,headers:n})},Zs=(e,t,i,o="GET",n,s,a="zero")=>{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&&xe({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),nt.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&&xe({title:"Success",body:"File downloaded successfully",config:{toast:{autoClose:!0,closeTimeout:5e3,type:"success"}}},a),nt.info("File downloaded successfully")}}).catch(e=>{nt.error(e)})},ea=["image/png","image/bmp","image/gif","image/jpeg","image/jpg"],ta=["text/plain","text/csv"],ia=["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"],oa=l.html`
|
|
2029
2029
|
${(0,l.when)(e=>e.rowData,l.html`
|
|
2030
|
-
${e=>"DATETIME"===e.columnDefinition.type?(0,
|
|
2030
|
+
${e=>"DATETIME"===e.columnDefinition.type?(0,mi.zT)(e.rowData[e.columnDefinition.columnDataKey]):e.rowData[e.columnDefinition.columnDataKey]}
|
|
2031
2031
|
`)}
|
|
2032
|
-
`;class
|
|
2032
|
+
`;class na extends Hs{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,...ea]:"office/*"===t?e=[...e,...ia]:"text/*"===t?e=[...e,...ta]: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 Y.b).withExpression((new G.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:Ys.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=>{Ys.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`
|
|
2033
2033
|
<template>
|
|
2034
2034
|
<div class="download-button-container">
|
|
2035
2035
|
<${e}-button
|
|
@@ -2040,7 +2040,7 @@
|
|
|
2040
2040
|
</${e}-button>
|
|
2041
2041
|
</div>
|
|
2042
2042
|
</template>
|
|
2043
|
-
`}}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:
|
|
2043
|
+
`}}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:oa}}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=Js(this.selectedFiles);e.append(this.uploadKey,this.entityId);const t=yield Qs(this.uploadEventName,e,this.session.getItem("authToken","session"),this.http);if(t.ERROR)return Ys.v.error(t.ERROR),void this.$emit("errorOut",t.ERROR);Ys.v.info(t),this.$emit("success",t),this.clearSelection()}catch(e){this.$emit("errorOut",e),Ys.v.error(e)}})}handleFileDownload(e){const t=this.tagName.toLowerCase().split("-")[0];Zs(this.downloadEventName(e),e.FILE_NAME,this.session.getItem("authToken","session"),"GET",!0,void 0,t)}}(0,C.Cg)([l.observable],na.prototype,"gridCriteria",void 0),(0,C.Cg)([hi.dm],na.prototype,"connect",void 0),(0,C.Cg)([Ws.l],na.prototype,"http",void 0),(0,C.Cg)([ki.N],na.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({attribute:"uploaded-files-resource-name"})],na.prototype,"uploadedFilesResourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-event-name"})],na.prototype,"uploadEventName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"field-name"})],na.prototype,"fieldName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"entity-id"})],na.prototype,"entityId",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-key"})],na.prototype,"uploadKey",void 0),(0,C.Cg)([(0,l.attr)({attribute:"grid-fields"})],na.prototype,"gridFields",void 0),(0,C.Cg)([l.observable],na.prototype,"fileName",void 0),(0,C.Cg)([l.observable],na.prototype,"uploadedFilesList",void 0),(0,C.Cg)([l.observable],na.prototype,"filesGridColumnDefinitions",void 0);const sa=void 0,aa={},ra=na.compose(Object.assign({baseName:"file-upload",styles:qs,template:Xs,shadowOptions:sa},aa)),la=l.css`
|
|
2044
2044
|
.filter-wrapper {
|
|
2045
2045
|
border: 1px solid gray;
|
|
2046
2046
|
border-radius: calc(var(--design-unit) * 2px);
|
|
@@ -2091,52 +2091,52 @@
|
|
|
2091
2091
|
.flex-row foundation-select {
|
|
2092
2092
|
flex: 1;
|
|
2093
2093
|
}
|
|
2094
|
-
`,
|
|
2095
|
-
<div class="close-icon" @click=${e=>e.clear()}>${
|
|
2096
|
-
`;function
|
|
2094
|
+
`,da=(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`,ca=l.html`
|
|
2095
|
+
<div class="close-icon" @click=${e=>e.clear()}>${da()}</div>
|
|
2096
|
+
`;function ua(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 ha=[{name:"All",value:"all",selected:!0},{name:"True",value:"true"},{name:"False",value:"false"},{name:"N/A",value:"null"}],pa=(e,t)=>{switch(e.type){case"number":return(e=>l.html`
|
|
2097
2097
|
<div class="flex-row">
|
|
2098
2098
|
<div>${e=>e.label}</div>
|
|
2099
|
-
${
|
|
2099
|
+
${ca}
|
|
2100
2100
|
</div>
|
|
2101
2101
|
<div class="flex-row">
|
|
2102
2102
|
<${e}-text-field
|
|
2103
2103
|
${(0,l.ref)("numFilterFieldMin")}
|
|
2104
2104
|
type="number"
|
|
2105
|
-
:value=${(0,
|
|
2105
|
+
:value=${(0,B.O)(e=>e.numFilterMin)}
|
|
2106
2106
|
placeholder="min"
|
|
2107
2107
|
></${e}-text-field>
|
|
2108
2108
|
<${e}-text-field
|
|
2109
2109
|
${(0,l.ref)("numFilterFieldMax")}
|
|
2110
2110
|
type="number"
|
|
2111
|
-
:value=${(0,
|
|
2111
|
+
:value=${(0,B.O)(e=>e.numFilterMax)}
|
|
2112
2112
|
placeholder="max"
|
|
2113
2113
|
></${e}-text-field>
|
|
2114
2114
|
</div>
|
|
2115
2115
|
`)(t);case"date":return(e=>l.html`
|
|
2116
2116
|
<div class="flex-row">
|
|
2117
2117
|
<div>${e=>e.label}</div>
|
|
2118
|
-
${
|
|
2118
|
+
${ca}
|
|
2119
2119
|
</div>
|
|
2120
2120
|
<div class="flex-row">
|
|
2121
2121
|
<${e}-text-field
|
|
2122
2122
|
${(0,l.ref)("dateFilterFieldMin")}
|
|
2123
2123
|
type="date"
|
|
2124
|
-
:value=${(0,
|
|
2124
|
+
:value=${(0,B.O)(e=>e.dateFilterMin)}
|
|
2125
2125
|
></${e}-text-field>
|
|
2126
2126
|
<${e}-text-field
|
|
2127
2127
|
${(0,l.ref)("dateFilterFieldMax")}
|
|
2128
2128
|
type="date"
|
|
2129
|
-
:value=${(0,
|
|
2129
|
+
:value=${(0,B.O)(e=>e.dateFilterMax)}
|
|
2130
2130
|
></${e}-text-field>
|
|
2131
2131
|
</div>
|
|
2132
2132
|
`)(t);case"boolean":return(e=>l.html`
|
|
2133
2133
|
<div class="flex-row">
|
|
2134
2134
|
<div>${e=>e.label}</div>
|
|
2135
|
-
${
|
|
2135
|
+
${ca}
|
|
2136
2136
|
</div>
|
|
2137
2137
|
<div class="flex-row">
|
|
2138
|
-
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(
|
|
2139
|
-
${(0,l.repeat)(()=>
|
|
2138
|
+
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(ua(t))}}">
|
|
2139
|
+
${(0,l.repeat)(()=>ha,l.html`
|
|
2140
2140
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2141
2141
|
${e=>e.name}
|
|
2142
2142
|
</${e}-option>
|
|
@@ -2146,10 +2146,10 @@
|
|
|
2146
2146
|
`)(t);case"enum":return(e=>l.html`
|
|
2147
2147
|
<div class="flex-row">
|
|
2148
2148
|
<div>${e=>e.label}</div>
|
|
2149
|
-
${
|
|
2149
|
+
${ca}
|
|
2150
2150
|
</div>
|
|
2151
2151
|
<div class="flex-row">
|
|
2152
|
-
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(
|
|
2152
|
+
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(ua(t))}}">
|
|
2153
2153
|
${(0,l.repeat)(e=>e.enumFilterOptions,l.html`
|
|
2154
2154
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2155
2155
|
${e=>e.name}
|
|
@@ -2160,20 +2160,20 @@
|
|
|
2160
2160
|
`)(t);default:return(e=>l.html`
|
|
2161
2161
|
<div class="flex-row">
|
|
2162
2162
|
<div>${e=>e.label}</div>
|
|
2163
|
-
${
|
|
2163
|
+
${ca}
|
|
2164
2164
|
</div>
|
|
2165
2165
|
<div class="flex-row">
|
|
2166
2166
|
<${e}-text-field
|
|
2167
2167
|
${(0,l.ref)("textFilterField")}
|
|
2168
2168
|
type="text"
|
|
2169
|
-
:value=${(0,
|
|
2169
|
+
:value=${(0,B.O)(e=>e.textFilter)}
|
|
2170
2170
|
/>
|
|
2171
2171
|
</div>
|
|
2172
|
-
`)(t)}},
|
|
2173
|
-
<div class="filter-wrapper">${t=>
|
|
2174
|
-
`,
|
|
2175
|
-
${e=>
|
|
2176
|
-
`;var
|
|
2172
|
+
`)(t)}},ma=e=>l.html`
|
|
2173
|
+
<div class="filter-wrapper">${t=>pa(t,e)}</div>
|
|
2174
|
+
`,va=l.html`
|
|
2175
|
+
${e=>ma(k(e))}</div>
|
|
2176
|
+
`;var ga;!function(e){e.change="filter-changed",e.clear="filter-cleared"}(ga||(ga={}));class fa 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(ga.clear,{fieldName:this.fieldName,target:this.target});const i=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(ga.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(ga.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(ga.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(ga.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(ga.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(ga.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){e&&"all"!==e?this.$emit(ga.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target}):this.$emit(ga.clear,{fieldName:this.fieldName,target:this.target})}onEnumFilterSelection(e){e&&"all"!==e?this.$emit(ga.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target}):this.$emit(ga.clear,{fieldName:this.fieldName,target:this.target})}}(0,C.Cg)([l.attr],fa.prototype,"fieldName",void 0),(0,C.Cg)([l.attr],fa.prototype,"type",void 0),(0,C.Cg)([l.attr],fa.prototype,"label",void 0),(0,C.Cg)([l.attr],fa.prototype,"target",void 0),(0,C.Cg)([l.observable],fa.prototype,"textFilter",void 0),(0,C.Cg)([l.observable],fa.prototype,"numFilterMin",void 0),(0,C.Cg)([l.observable],fa.prototype,"numFilterMax",void 0),(0,C.Cg)([l.observable],fa.prototype,"dateFilterMin",void 0),(0,C.Cg)([l.observable],fa.prototype,"dateFilterMax",void 0),(0,C.Cg)([l.attr],fa.prototype,"enumOptions",void 0),(0,C.Cg)([l.observable],fa.prototype,"enumFilterOptions",void 0);const ba=fa.compose({baseName:"filter",template:va,styles:la});var ya=i(64324);const wa=(e,t)=>l.css`
|
|
2177
2177
|
.filter-bar {
|
|
2178
2178
|
background-color: #2c2f33;
|
|
2179
2179
|
padding: calc(var(--design-unit) * 2px);
|
|
@@ -2209,9 +2209,9 @@
|
|
|
2209
2209
|
.toggle-collapsed {
|
|
2210
2210
|
color: #48ed9c;
|
|
2211
2211
|
}
|
|
2212
|
-
`,
|
|
2212
|
+
`,Ca=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"}},xa=l.html`
|
|
2213
2213
|
<p>Fetching metadata for ${e=>e.resource}...</p>
|
|
2214
|
-
|
|
2214
|
+
`,$a=e=>l.html`
|
|
2215
2215
|
<div
|
|
2216
2216
|
class=${e=>(0,x.x)(["toggle",!0],["toggle-collapsed",e.collapsed])}
|
|
2217
2217
|
@click="${e=>e.toggle()}"
|
|
@@ -2231,17 +2231,17 @@
|
|
|
2231
2231
|
<${e}-filter
|
|
2232
2232
|
label="${e=>e.UI_LABEL}"
|
|
2233
2233
|
target="${(e,t)=>{var i;return null===(i=t.parent)||void 0===i?void 0:i.target}}"
|
|
2234
|
-
type="${e=>
|
|
2234
|
+
type="${e=>Ca(e.TYPE)}"
|
|
2235
2235
|
fieldName="${e=>e.NAME}"
|
|
2236
2236
|
enumOptions="${e=>e.VALID_VALUES}"
|
|
2237
2237
|
></${e}-filter>
|
|
2238
2238
|
`)}
|
|
2239
2239
|
</div>
|
|
2240
2240
|
</div>
|
|
2241
|
-
|
|
2242
|
-
${e=>e.ready
|
|
2243
|
-
`,
|
|
2244
|
-
${t&&`@media only screen and ${
|
|
2241
|
+
`,Sa=l.html`
|
|
2242
|
+
${e=>e.ready?$a(k(e)):xa}
|
|
2243
|
+
`,Ea=5;class Oa extends a.FoundationElement{constructor(){super(...arguments),this.columns=Ea,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,ya.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=>nt.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],Oa.prototype,"resource",void 0),(0,C.Cg)([l.attr],Oa.prototype,"only",void 0),(0,C.Cg)([l.attr],Oa.prototype,"labels",void 0),(0,C.Cg)([l.attr],Oa.prototype,"target",void 0),(0,C.Cg)([l.attr],Oa.prototype,"columns",void 0),(0,C.Cg)([l.observable],Oa.prototype,"ready",void 0),(0,C.Cg)([l.observable],Oa.prototype,"fields",void 0),(0,C.Cg)([hi.dm],Oa.prototype,"connect",void 0),(0,C.Cg)([l.observable],Oa.prototype,"collapsed",void 0);const Ta=Oa.compose({baseName:"filter-bar",template:Sa,styles:wa});var ka;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(ka||(ka={}));const Da=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2244
|
+
${t&&`@media only screen and ${ka[e]} {`}
|
|
2245
2245
|
:host(.spacing${t}-1x) slot {
|
|
2246
2246
|
gap: calc(var(--design-unit) * 2px);
|
|
2247
2247
|
}
|
|
@@ -2358,7 +2358,7 @@
|
|
|
2358
2358
|
align-content: space-evenly;
|
|
2359
2359
|
}
|
|
2360
2360
|
${t&&"}"}
|
|
2361
|
-
`},
|
|
2361
|
+
`},Ia=l.css`
|
|
2362
2362
|
:host {
|
|
2363
2363
|
width: 100%;
|
|
2364
2364
|
height: 100%;
|
|
@@ -2370,17 +2370,17 @@
|
|
|
2370
2370
|
display: flex;
|
|
2371
2371
|
}
|
|
2372
2372
|
|
|
2373
|
-
${
|
|
2374
|
-
${
|
|
2375
|
-
${
|
|
2376
|
-
${
|
|
2377
|
-
`,
|
|
2373
|
+
${Da()}
|
|
2374
|
+
${Da("lg")}
|
|
2375
|
+
${Da("md")}
|
|
2376
|
+
${Da("sm")}
|
|
2377
|
+
`,Ra=l.html`
|
|
2378
2378
|
<template>
|
|
2379
2379
|
<slot></slot>
|
|
2380
2380
|
</template>
|
|
2381
|
-
`,
|
|
2381
|
+
`,Aa=void 0,La={};class Na extends a.FoundationElement{}const Fa=Na.compose(Object.assign({baseName:"flex-layout",styles:Ia,template:Ra,shadowOptions:Aa},La)),Ma=(e,t)=>l.css`
|
|
2382
2382
|
${(0,r.flipperStyles)(e,t)}
|
|
2383
|
-
`,
|
|
2383
|
+
`,_a=(e,t)=>(0,a.flipperTemplate)(e,t);class Pa extends r.Flipper{}const Ha=void 0,za={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 '},Ua=Pa.compose(Object.assign({baseName:"flipper",template:_a,styles:Ma,shadowOptions:Ha},za)),Ba=225,Va=l.css`
|
|
2384
2384
|
/* Host */
|
|
2385
2385
|
:host {
|
|
2386
2386
|
display: inline-block;
|
|
@@ -2406,8 +2406,8 @@
|
|
|
2406
2406
|
position: absolute;
|
|
2407
2407
|
/* stylelint-disable-next-line function-name-case */
|
|
2408
2408
|
transition:
|
|
2409
|
-
transform ${
|
|
2410
|
-
width ${
|
|
2409
|
+
transform ${Ba.toString()}ms ease-in,
|
|
2410
|
+
width ${Ba.toString()}ms ease-in-out;
|
|
2411
2411
|
width: var(--flyout-width, 20%);
|
|
2412
2412
|
z-index: 2001;
|
|
2413
2413
|
}
|
|
@@ -2466,7 +2466,7 @@
|
|
|
2466
2466
|
opacity: 50%;
|
|
2467
2467
|
position: absolute;
|
|
2468
2468
|
/* stylelint-disable-next-line function-name-case */
|
|
2469
|
-
transition: opacity ${
|
|
2469
|
+
transition: opacity ${Ba.toString()}ms linear;
|
|
2470
2470
|
width: 100%;
|
|
2471
2471
|
z-index: 2000;
|
|
2472
2472
|
}
|
|
@@ -2474,7 +2474,7 @@
|
|
|
2474
2474
|
:host([visuallyhidden]) div.background {
|
|
2475
2475
|
opacity: 0%;
|
|
2476
2476
|
}
|
|
2477
|
-
`,
|
|
2477
|
+
`,ja=e=>l.html`
|
|
2478
2478
|
<div ?closed=${e=>e.closed} ?visuallyhidden=${e=>e.visuallyhidden}>
|
|
2479
2479
|
<div class="container">
|
|
2480
2480
|
<div class="background" part="background" @click=${e=>e.closeFlyout()}></div>
|
|
@@ -2499,9 +2499,9 @@
|
|
|
2499
2499
|
</div>
|
|
2500
2500
|
</div>
|
|
2501
2501
|
`,Ga=l.html`
|
|
2502
|
-
${e=>
|
|
2503
|
-
`;class
|
|
2504
|
-
${t&&`@media only screen and ${
|
|
2502
|
+
${e=>ja(k(e))}
|
|
2503
|
+
`;class Ya 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],Ya.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({attribute:"flyout-width"})],Ya.prototype,"flyoutWidth",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ya.prototype,"displayHeader",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ya.prototype,"closed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ya.prototype,"visuallyhidden",void 0);const Wa=void 0,qa={},Ka=Ya.compose(Object.assign({baseName:"flyout",styles:Va,template:Ga,shadowOptions:Wa},qa));var Xa;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(Xa||(Xa={}));const Ja=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2504
|
+
${t&&`@media only screen and ${Xa[e]} {`}
|
|
2505
2505
|
:host(.spacing${t}-1x) slot {
|
|
2506
2506
|
gap: calc(var(--design-unit) * 2px);
|
|
2507
2507
|
}
|
|
@@ -2586,32 +2586,32 @@
|
|
|
2586
2586
|
place-items: stretch;
|
|
2587
2587
|
}
|
|
2588
2588
|
${t&&"}"}
|
|
2589
|
-
`},
|
|
2589
|
+
`},Qa=l.css`
|
|
2590
2590
|
slot {
|
|
2591
2591
|
width: 100%;
|
|
2592
2592
|
height: 100%;
|
|
2593
2593
|
display: grid;
|
|
2594
2594
|
}
|
|
2595
2595
|
|
|
2596
|
-
${
|
|
2597
|
-
${
|
|
2598
|
-
${
|
|
2599
|
-
${
|
|
2600
|
-
`,
|
|
2596
|
+
${Ja()}
|
|
2597
|
+
${Ja("lg")}
|
|
2598
|
+
${Ja("md")}
|
|
2599
|
+
${Ja("sm")}
|
|
2600
|
+
`,Za=l.html`
|
|
2601
2601
|
<template>
|
|
2602
2602
|
<slot></slot>
|
|
2603
2603
|
</template>
|
|
2604
|
-
`,
|
|
2604
|
+
`,er=void 0,tr={};class ir{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`
|
|
2605
2605
|
slot {
|
|
2606
2606
|
${a||""}
|
|
2607
2607
|
${s||""}
|
|
2608
2608
|
}
|
|
2609
|
-
`}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
|
|
2609
|
+
`}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 or extends a.FoundationElement{constructor(){super(...arguments),this.behaviors=[]}connectedCallback(){super.connectedCallback(),this.behaviors=Object.keys(Xa).map(e=>{if(this[`col-${e}-count`]||this[`row-${e}-count`])return new ir(Xa[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`
|
|
2610
2610
|
slot {
|
|
2611
2611
|
${e||""}
|
|
2612
2612
|
${t||""}
|
|
2613
2613
|
}
|
|
2614
|
-
`,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],
|
|
2614
|
+
`,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],or.prototype,"col-count",void 0),(0,C.Cg)([l.attr],or.prototype,"col-width",void 0),(0,C.Cg)([l.attr],or.prototype,"col-lg-count",void 0),(0,C.Cg)([l.attr],or.prototype,"col-lg-width",void 0),(0,C.Cg)([l.attr],or.prototype,"col-md-count",void 0),(0,C.Cg)([l.attr],or.prototype,"col-md-width",void 0),(0,C.Cg)([l.attr],or.prototype,"col-sm-count",void 0),(0,C.Cg)([l.attr],or.prototype,"col-sm-width",void 0),(0,C.Cg)([l.attr],or.prototype,"row-count",void 0),(0,C.Cg)([l.attr],or.prototype,"row-height",void 0),(0,C.Cg)([l.attr],or.prototype,"row-lg-count",void 0),(0,C.Cg)([l.attr],or.prototype,"row-lg-height",void 0),(0,C.Cg)([l.attr],or.prototype,"row-md-count",void 0),(0,C.Cg)([l.attr],or.prototype,"row-md-height",void 0),(0,C.Cg)([l.attr],or.prototype,"row-sm-count",void 0),(0,C.Cg)([l.attr],or.prototype,"row-sm-height",void 0);const nr=or.compose(Object.assign({baseName:"grid-layout",styles:Qa,template:Za,shadowOptions:er},tr)),sr=l.html`
|
|
2615
2615
|
<template>
|
|
2616
2616
|
<style>
|
|
2617
2617
|
:host {
|
|
@@ -2637,9 +2637,9 @@
|
|
|
2637
2637
|
</style>
|
|
2638
2638
|
<slot></slot>
|
|
2639
2639
|
</template>
|
|
2640
|
-
`,
|
|
2640
|
+
`,ar=void 0,rr={};class lr 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"})],lr.prototype,"colNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-sm-number"})],lr.prototype,"colSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-md-number"})],lr.prototype,"colMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-lg-number"})],lr.prototype,"colLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-number"})],lr.prototype,"rowNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-sm-number"})],lr.prototype,"rowSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-md-number"})],lr.prototype,"rowMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-lg-number"})],lr.prototype,"rowLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width"})],lr.prototype,"width",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-sm"})],lr.prototype,"widthSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-md"})],lr.prototype,"widthMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-lg"})],lr.prototype,"widthLg",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height"})],lr.prototype,"height",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-sm"})],lr.prototype,"heightSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-md"})],lr.prototype,"heightMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-lg"})],lr.prototype,"heightLg",void 0);const dr=lr.compose(Object.assign({baseName:"grid-layout-item",template:sr,shadowOptions:ar},rr)),cr=(e,t)=>l.css`
|
|
2641
2641
|
${(0,r.horizontalScrollStyles)(e,t)}
|
|
2642
|
-
`,
|
|
2642
|
+
`,ur=(e,t)=>(0,a.horizontalScrollTemplate)(e,t);class hr extends r.HorizontalScroll{}const pr={delegatesFocus:!0,mode:"open"},mr={nextFlipper:l.html`
|
|
2643
2643
|
<foundation-flipper
|
|
2644
2644
|
@click="${e=>e.scrollToNext()}"
|
|
2645
2645
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
@@ -2650,8 +2650,8 @@
|
|
|
2650
2650
|
direction="previous"
|
|
2651
2651
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
2652
2652
|
></foundation-flipper>
|
|
2653
|
-
`},
|
|
2654
|
-
${
|
|
2653
|
+
`},vr=hr.compose(Object.assign({baseName:"horizontal-scroll",template:ur,styles:cr,shadowOptions:pr},mr));var gr=i(70623),fr=i(32808),br=i(10463),yr=i(19037),wr=i(22984);const Cr=()=>(gr.Yv.add(wr.X7I,yr.C91,br.Cvc),gr.tT.css()),xr=(e,t)=>l.css`
|
|
2654
|
+
${Cr()}
|
|
2655
2655
|
|
|
2656
2656
|
.fa-stack-1x {
|
|
2657
2657
|
font-size: 1em;
|
|
@@ -2744,7 +2744,7 @@
|
|
|
2744
2744
|
height: auto;
|
|
2745
2745
|
box-sizing: border-box;
|
|
2746
2746
|
}
|
|
2747
|
-
|
|
2747
|
+
`,$r=e=>l.html`
|
|
2748
2748
|
<template>
|
|
2749
2749
|
<i
|
|
2750
2750
|
${(0,l.ref)("iElement")}
|
|
@@ -2769,9 +2769,9 @@
|
|
|
2769
2769
|
</${e}-tooltip>
|
|
2770
2770
|
`)}
|
|
2771
2771
|
</template>
|
|
2772
|
-
|
|
2773
|
-
${e
|
|
2774
|
-
`,
|
|
2772
|
+
`,Sr=l.html`
|
|
2773
|
+
${e=>$r(k(e))}
|
|
2774
|
+
`,Er={mode:"open",delegatesFocus:!0},Or={};var Tr;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(Tr||(Tr={}));const kr="1x",Dr=["2xs","xs","sm","lg","xl","2xl",kr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class Ir 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,gr.wu)({prefix:Tr[this.variant],iconName:this.name}),t=(0,gr.Kk)(e);t&&t.node&&(this.iElement.innerHTML="",Array.from(t.node).map(e=>this.iElement.appendChild(e)))}}(0,C.Cg)([l.observable],Ir.prototype,"iElement",void 0),(0,C.Cg)([fr.k],Ir.prototype,"uuid",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tooltip-id"})],Ir.prototype,"tooltipId",void 0),(0,C.Cg)([l.attr],Ir.prototype,"tooltip",void 0),(0,C.Cg)([(0,l.attr)({attribute:"error",mode:"boolean"})],Ir.prototype,"isError",void 0),(0,C.Cg)([l.attr],Ir.prototype,"name",void 0),(0,C.Cg)([l.attr],Ir.prototype,"size",void 0),(0,C.Cg)([l.attr],Ir.prototype,"variant",void 0);const Rr=Ir.compose(Object.assign({baseName:"icon",template:Sr,styles:xr,shadowOptions:Er},Or)),Ar=(e,t)=>l.css`
|
|
2775
2775
|
${(0,r.listboxStyles)(e,t)}
|
|
2776
2776
|
|
|
2777
2777
|
:host {
|
|
@@ -2782,11 +2782,11 @@
|
|
|
2782
2782
|
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);
|
|
2783
2783
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
2784
2784
|
}
|
|
2785
|
-
`,
|
|
2785
|
+
`,Lr=(e,t)=>(0,a.listboxTemplate)(e,t);class Nr extends r.Listbox{}const Fr=void 0,Mr={},_r=Nr.compose(Object.assign({baseName:"listbox",template:Lr,styles:Ar,shadowOptions:Fr},Mr)),Pr=(e,t)=>l.css`
|
|
2786
2786
|
${(0,r.optionStyles)(e,t)}
|
|
2787
|
-
`,Hr=(e,t)=>(0,a.listboxOptionTemplate)(e,t);class
|
|
2787
|
+
`,Hr=(e,t)=>(0,a.listboxOptionTemplate)(e,t);class zr extends r.ListboxOption{}const Ur=void 0,Br={},Vr=zr.compose(Object.assign({baseName:"option",template:Hr,styles:Pr,shadowOptions:Ur},Br)),jr=(e,t)=>l.css`
|
|
2788
2788
|
${(0,r.menuStyles)(e,t)}
|
|
2789
|
-
`,Gr=(e,t)=>(0,a.menuTemplate)(e,t);class
|
|
2789
|
+
`,Gr=(e,t)=>(0,a.menuTemplate)(e,t);class Yr extends r.Menu{}const Wr=void 0,qr={},Kr=Yr.compose(Object.assign({baseName:"menu",template:Gr,styles:jr,shadowOptions:Wr},qr)),Xr=(e,t)=>l.css`
|
|
2790
2790
|
${(0,r.menuItemStyles)(e,t)}
|
|
2791
2791
|
|
|
2792
2792
|
:host, :host(.indent-0[aria-haspopup='menu']) {
|
|
@@ -2800,11 +2800,11 @@
|
|
|
2800
2800
|
height: auto;
|
|
2801
2801
|
width: auto;
|
|
2802
2802
|
}
|
|
2803
|
-
`,
|
|
2804
|
-
${
|
|
2805
|
-
`,
|
|
2806
|
-
${
|
|
2807
|
-
`,
|
|
2803
|
+
`,Jr=(e,t)=>(0,a.menuItemTemplate)(e,t);class Qr extends r.MenuItem{connectedCallback(){super.connectedCallback(),this.addEventListener("click",()=>this.$emit("onMenuClick"))}}const Zr=void 0,el={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 '},tl=Qr.compose(Object.assign({baseName:"menu-item",template:Jr,styles:Xr,shadowOptions:Zr},el)),il=l.css`
|
|
2804
|
+
${En}
|
|
2805
|
+
`,ol=l.html`
|
|
2806
|
+
${Dn}
|
|
2807
|
+
`,nl={mode:"open",delegatesFocus:!0},sl={};class al extends An{show(){var e,t;null===(e=this.onShowCallback)||void 0===e||e.call(this),null===(t=this.mainElement)||void 0===t||t.showModal()}}const rl=al.compose(Object.assign({baseName:"modal",template:ol,styles:il,shadowOptions:nl},sl)),ll=230,dl=l.css`
|
|
2808
2808
|
:host {
|
|
2809
2809
|
--scrollbar-width: 12px;
|
|
2810
2810
|
--scrollbar-thumb-width: 8px;
|
|
@@ -2948,7 +2948,7 @@
|
|
|
2948
2948
|
|
|
2949
2949
|
.visible {
|
|
2950
2950
|
visibility: visible;
|
|
2951
|
-
max-height: var(--custom-max-height, ${
|
|
2951
|
+
max-height: var(--custom-max-height, ${ll.toString()}px);
|
|
2952
2952
|
overflow: hidden;
|
|
2953
2953
|
}
|
|
2954
2954
|
|
|
@@ -3045,7 +3045,7 @@
|
|
|
3045
3045
|
resize: none;
|
|
3046
3046
|
overflow: hidden;
|
|
3047
3047
|
}
|
|
3048
|
-
`;let
|
|
3048
|
+
`;let cl=class extends gi{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||nt.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){nt.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){nt.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){nt.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],cl.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],cl.prototype,"labelField",void 0),cl=(0,C.Cg)([(0,l.customElement)({name:"multiselect-datasource"})],cl);const ul=(e="foundation")=>l.html`
|
|
3049
3049
|
<label
|
|
3050
3050
|
part="label"
|
|
3051
3051
|
for="display-field"
|
|
@@ -3070,7 +3070,7 @@
|
|
|
3070
3070
|
@click=${e=>e.toggle()}
|
|
3071
3071
|
?disabled="${e=>e.disabled}"
|
|
3072
3072
|
${(0,l.ref)("filterSearchInput")}
|
|
3073
|
-
value=${(0,
|
|
3073
|
+
value=${(0,B.O)(e=>e.filterSearchValue,"string","input")}
|
|
3074
3074
|
placeholder="${e=>e.getDisplayValue}"
|
|
3075
3075
|
autocomplete="off"
|
|
3076
3076
|
@input=${(e,t)=>e.inputHandler()}
|
|
@@ -3152,11 +3152,11 @@
|
|
|
3152
3152
|
</section>
|
|
3153
3153
|
</div>
|
|
3154
3154
|
<slot
|
|
3155
|
-
${(0,l.slotted)({property:"slottedDatasource",filter:e=>e instanceof
|
|
3155
|
+
${(0,l.slotted)({property:"slottedDatasource",filter:e=>e instanceof cl})}
|
|
3156
3156
|
></slot>
|
|
3157
|
-
`,
|
|
3158
|
-
${
|
|
3159
|
-
`,
|
|
3157
|
+
`,hl=l.html`
|
|
3158
|
+
${ul()}
|
|
3159
|
+
`,pl=void 0,ml={};class vl 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=Ut.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=oi()(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===Ut.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`
|
|
3160
3160
|
${"string"==typeof e?l.html`
|
|
3161
3161
|
<span part="option-label">${()=>t.getItemLabel(e)}</span>
|
|
3162
3162
|
`:l.html`
|
|
@@ -3168,7 +3168,7 @@
|
|
|
3168
3168
|
${()=>t.getItemLabel(e)}
|
|
3169
3169
|
</span>
|
|
3170
3170
|
`}
|
|
3171
|
-
`}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<
|
|
3171
|
+
`}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<ll&&o>n?Ut.ABOVE:Ut.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===Ut.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===Ut.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?fi(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,nt.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){O(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],vl.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],vl.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vl.prototype,"all",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vl.prototype,"allSelected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vl.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vl.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vl.prototype,"creatable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vl.prototype,"async",void 0),(0,C.Cg)([l.attr],vl.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vl.prototype,"resizable",void 0),(0,C.Cg)([l.attr],vl.prototype,"tabindex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"filter-by-contains"})],vl.prototype,"filterByContains",void 0),(0,C.Cg)([l.observable],vl.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],vl.prototype,"slottedDatasource",void 0),(0,C.Cg)([l.observable],vl.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],vl.prototype,"loading",void 0),(0,C.Cg)([l.observable],vl.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],vl.prototype,"open",void 0),(0,C.Cg)([l.observable],vl.prototype,"options",void 0),(0,C.Cg)([l.observable],vl.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],vl.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],vl.prototype,"scrollContainer",void 0),(0,C.Cg)([l.attr],vl.prototype,"position",void 0),(0,C.Cg)([l.observable],vl.prototype,"onAllSelectedCallback",void 0),(0,C.Cg)([l.observable],vl.prototype,"itemRenderer",void 0),(0,C.Cg)([l.volatile],vl.prototype,"getDisplayValue",null),(0,C.Cg)([l.volatile],vl.prototype,"getPlaceholder",null),(0,C.Cg)([l.volatile],vl.prototype,"isAllOptionsDisabled",null),(0,C.Cg)([l.volatile],vl.prototype,"areAllOptionsSelected",null),(0,C.Cg)([l.volatile],vl.prototype,"showCreatable",null),(0,C.Cg)([l.observable],vl.prototype,"optionsHeaderSlottedNodes",void 0);const gl=vl.compose(Object.assign({baseName:"multiselect",template:hl,styles:dl,shadowOptions:pl},ml)),fl={k:1e3,m:1e6,b:1e9},bl=/^(.*?)([kmb])$/i;class yl{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(bl),i=t?fl[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 wl=i(6526);function Cl(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 xl=l.css`
|
|
3172
3172
|
.label-hidden {
|
|
3173
3173
|
margin: 0;
|
|
3174
3174
|
}
|
|
@@ -3228,7 +3228,7 @@
|
|
|
3228
3228
|
:host(.has-prefix.has-suffix) .control-field .control {
|
|
3229
3229
|
border-radius: 0;
|
|
3230
3230
|
}
|
|
3231
|
-
|
|
3231
|
+
`,$l=(e,t)=>l.css`
|
|
3232
3232
|
${(0,r.numberFieldStyles)(e,t)}
|
|
3233
3233
|
::part(label) {
|
|
3234
3234
|
color: var(--neutral-foreground-rest);
|
|
@@ -3259,8 +3259,8 @@
|
|
|
3259
3259
|
margin-inline-end: unset;
|
|
3260
3260
|
}
|
|
3261
3261
|
|
|
3262
|
-
${
|
|
3263
|
-
|
|
3262
|
+
${xl}
|
|
3263
|
+
`,Sl=(e,t)=>l.html`
|
|
3264
3264
|
<template
|
|
3265
3265
|
class="${e=>[e.readOnly?"readonly":"",e.prefix?"has-prefix":"",e.suffix?"has-suffix":""].filter(Boolean).join(" ")}"
|
|
3266
3266
|
>
|
|
@@ -3353,7 +3353,7 @@
|
|
|
3353
3353
|
${(0,a.endSlotTemplate)(e,t)}
|
|
3354
3354
|
</div>
|
|
3355
3355
|
</template>
|
|
3356
|
-
`,Sl=12345.6,El=9,Ol=(e,t)=>{var i;return{decimalSeparator:(null===(i=new Intl.NumberFormat(t).formatToParts(Sl).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)||"."}},Tl=(e,t)=>{var i,o,n;const s=new Intl.NumberFormat(t).formatToParts(Sl),a=null===(i=s.find(e=>"group"===e.type))||void 0===i?void 0:i.value,r=null!==(n=null===(o=s.find(e=>"decimal"===e.type))||void 0===o?void 0:o.value)&&void 0!==n?n:".";let l=e.trim();return a&&(l=l.split(a).join("")),"."!==r&&(l=l.replace(r,".")),l},kl=(e,t)=>{var i,o;const n=null!==(o=null===(i=new Intl.NumberFormat(t).formatToParts(Sl).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)&&void 0!==o?o:".";let s=0;for(const t of e)t===n&&(s+=1);return s},Dl=(e,t)=>kl(e,t)>1,Il=(e,t,i,o)=>((e,t,i)=>{const o=Tl(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&kl(t,i)>0,Rl=(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)=>{var i,o;const n=e.startsWith("-"),s=n?e.slice(1):e,a=null!==(o=null===(i=new Intl.NumberFormat(t).formatToParts(1234567).find(e=>"group"===e.type))||void 0===i?void 0:i.value)&&void 0!==o?o:",",r=[];let l=s;for(;l.length>3;)r.unshift(l.slice(-3)),l=l.slice(0,-3);r.unshift(l);const d=r.join(a);return n?`-${d}`:d})(o?`-${a}`:a,t),{decimalSeparator:u}=Ol(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},Al=(e,t)=>{const{decimalSeparator:i}=Ol(0,t);return"."===i?e:e.replace(/\./g,i)},Ll=(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)?Rl(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),Fl=(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},Nl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;if(Dl(n,t))return"";let a;if(i)a=((e,t)=>{const i=Tl(String(e),t),o=i.replace(/^-/,"").replace(".","").length;return/^-?\d+(\.\d+)?$/.test(i)&&o>15?i:String(new bl(t).parse(String(e)))})(n,t);else{const{decimalSeparator:e}=Ol(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},Ml=(e,t,i,o)=>{if(void 0!==i&&kl(e,t)>0){const n=Tl(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Il(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=Ol(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,Nl(e,t,!0,i),t)},_l=(e,t,i=!0,o,n,s)=>{const a=Nl(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)},Hl=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 Pl extends(wl(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?Hl(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=_l(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?Hl(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=_l(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}restoreControlToCommittedValue(){if(!this.control)return;const e=this.value;if(!e)return this.control.value="",void(this.isUserInput=!1);this.control.value=this.withFormatting&&e?Ll(e,this.locale,this.options):Al(String(e),this.locale),this.isUserInput=!1}handleKeyDown(e){return e.key===yl.Mm&&(this.isUserInput=!1),super.handleKeyDown(e)}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(Dl(this.control.value,this.locale)||Il(this.value,this.control.value,this.locale,this.maximumInputPrecision)?this.restoreControlToCommittedValue():(this.isUserInput=!0,this.withFormatting&&!new bl(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=this.value,t=Ml(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?Ll(t,this.locale,this.options):Al(t,this.locale);this.control.value=Fl(e,this.options)}this.value=Fl(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.control.value=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=_l(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?Ll(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=_l(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?Fl(e,this.options):e),this.control.value=this.withFormatting&&this.value?Ll(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],Pl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Pl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Pl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Pl.prototype,"maximumInputPrecision",void 0);const zl={delegatesFocus:!0,mode:"open"},Ul={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 '},Bl=Pl.compose(Object.assign({baseName:"number-field",template:$l,styles:xl,shadowOptions:zl},Ul)),Vl=(e,t)=>l.css`
|
|
3356
|
+
`,El=12345.6,Ol=9,Tl=(e,t)=>{var i;return{decimalSeparator:(null===(i=new Intl.NumberFormat(t).formatToParts(El).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)||"."}},kl=(e,t)=>{var i,o,n;const s=new Intl.NumberFormat(t).formatToParts(El),a=null===(i=s.find(e=>"group"===e.type))||void 0===i?void 0:i.value,r=null!==(n=null===(o=s.find(e=>"decimal"===e.type))||void 0===o?void 0:o.value)&&void 0!==n?n:".";let l=e.trim();return a&&(l=l.split(a).join("")),"."!==r&&(l=l.replace(r,".")),l},Dl=(e,t)=>{var i,o;const n=null!==(o=null===(i=new Intl.NumberFormat(t).formatToParts(El).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)&&void 0!==o?o:".";let s=0;for(const t of e)t===n&&(s+=1);return s},Il=(e,t)=>Dl(e,t)>1,Rl=(e,t,i,o)=>((e,t,i)=>{const o=kl(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&Dl(t,i)>0,Al=(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)=>{var i,o;const n=e.startsWith("-"),s=n?e.slice(1):e,a=null!==(o=null===(i=new Intl.NumberFormat(t).formatToParts(1234567).find(e=>"group"===e.type))||void 0===i?void 0:i.value)&&void 0!==o?o:",",r=[];let l=s;for(;l.length>3;)r.unshift(l.slice(-3)),l=l.slice(0,-3);r.unshift(l);const d=r.join(a);return n?`-${d}`:d})(o?`-${a}`:a,t),{decimalSeparator:u}=Tl(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},Ll=(e,t)=>{const{decimalSeparator:i}=Tl(0,t);return"."===i?e:e.replace(/\./g,i)},Nl=(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)?Al(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),Fl=(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},Ml=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;if(Il(n,t))return"";let a;if(i)a=((e,t)=>{const i=kl(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}=Tl(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},_l=(e,t,i,o)=>{if(void 0!==i&&Dl(e,t)>0){const n=kl(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Rl(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=Tl(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,Ml(e,t,!0,i),t)},Pl=(e,t,i=!0,o,n,s)=>{const a=Ml(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)},Hl=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 zl 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?Hl(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<=Ol){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<=Ol?(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=Pl(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?Hl(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=Ol.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=Pl(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}restoreControlToCommittedValue(){if(!this.control)return;const e=this.value;if(!e)return this.control.value="",void(this.isUserInput=!1);this.control.value=this.withFormatting&&e?Nl(e,this.locale,this.options):Ll(String(e),this.locale),this.isUserInput=!1}handleKeyDown(e){return e.key===wl.Mm&&(this.isUserInput=!1),super.handleKeyDown(e)}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(Il(this.control.value,this.locale)||Rl(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=_l(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?Nl(t,this.locale,this.options):Ll(t,this.locale);this.control.value=Fl(e,this.options)}this.value=Fl(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.control.value=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=Pl(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?Nl(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=Pl(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?Fl(e,this.options):e),this.control.value=this.withFormatting&&this.value?Nl(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],zl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],zl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],zl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],zl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],zl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],zl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],zl.prototype,"maximumInputPrecision",void 0);const Ul={delegatesFocus:!0,mode:"open"},Bl={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 '},Vl=zl.compose(Object.assign({baseName:"number-field",template:Sl,styles:$l,shadowOptions:Ul},Bl)),jl=(e,t)=>l.css`
|
|
3357
3357
|
:host {
|
|
3358
3358
|
display: block;
|
|
3359
3359
|
}
|
|
@@ -3384,19 +3384,19 @@
|
|
|
3384
3384
|
<slot></slot>
|
|
3385
3385
|
</div>
|
|
3386
3386
|
</template>
|
|
3387
|
-
`;class
|
|
3387
|
+
`;class Yl extends a.ListboxOption{connectedCallback(){super.connectedCallback(),this.disabled=!0}}(0,C.Cg)([(0,l.attr)({attribute:"label"})],Yl.prototype,"groupLabel",void 0);const Wl=Yl.compose({baseName:"optgroup",template:Gl,styles:jl});var ql=i(92277);var Kl=i(72154),Xl=i.n(Kl),Jl=i(57565),Ql=i.n(Jl),Zl=i(13160),ed=i(24669),td=i(5709),id=i(45230);const od={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,hi.tn)(),i=yield t.getMoreColumns(e),o=Date.now(),n=i;return{isConnected:i.MESSAGE_TYPE===di.Go.MORE_COLUMNS_ACK,lastUpdated:o,lastMessage:n}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:o}=t;(0,id.Ol)().sendForStream(e,i,o)}},nd=a.DI.createInterface(e=>e.instance(od)),sd="system-health-changed";var ad;const rd=(0,ot.createLogger)("network-monitor",{level:ot.LogLevels.info}),ld=Date.now(),dd=(null===(ad=window.navigator)||void 0===ad?void 0:ad.userAgent)?Xl().parse(window.navigator.userAgent):void 0,cd=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:Ql()(e,void 0,2,t);class ud{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>(0,C.sH)(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;rd.info("Run health checks, triggered by",cd(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const o=yield this.isOnlineCheck();o?rd.debug(`Network connected at ${i}`):rd.warn(`Network disconnected at ${i}`);const n=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),o),s=this.preFlightSocketChecks(n);if(s||rd.debug("Socket pre-flight checks failed"),!o||!s){rd.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,v,g=!1;r.push((()=>(0,C.sH)(this,void 0,void 0,function*(){var n,s,r;try{rd.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)}))]);g=e.isConnected,u=e.lastUpdated,h=e.lastMessage,m=e.timeout}catch(e){g=!1,u=this.getNowTimestamp(),p=e,h=null!==(n=null==e?void 0:e.receivedMessage)&&void 0!==n?n:e}return v=(null==h?void 0:h.MESSAGE_TYPE)===di.Go.MSG_NACK||(0,di.z2)(h,Zl.v.NOT_FOUND),i=this.getFormattedTimestamp(null!=u?u:this.getNowTimestamp()),g?rd.debug(`${o} is healthy at ${i}`):rd.warn(`${o} is not healthy at ${i}`),h&&rd.debug(`${o} messaged at ${i}`,cd(h)),p&&rd.error(`${o} errored at ${i}`,cd(p)),m&&rd.warn(`${o} timed out at ${i}`),v&&(rd.error(`${o} issue, re-attempting data logon at ${i}`),d(e)),a&&(a=g),{name:o,sourceRef:[c],isConnected:g,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 rd.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});rd.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&&(rd.level=this.config.logLevel)}create(){this.resources?rd.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,di.z2)(s,Zl.v.NOT_FOUND)?a="Please check the resource is running.":(0,di.z2)(s,Zl.v.FORBIDDEN)&&(a="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(o)),rd.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&&rd.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?rd.debug:rd.warn)("Emitting 'system-health-changed' event",cd(this.status)),null==i||i.dispatchEvent(new CustomEvent(sd,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(rd.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 rd.debug("User requested report stability to Genesis."),rd.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:dd,username:l,isHealthy:s,lastUpdated:a,nextUpdate:r,firstUpdated:ld,runAllChecks:()=>{rd.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(d)});return d}preFlightSocketChecks(e){if(!e.isConfigured)return rd.debug("Socket not configured"),!1;if(e.isReconnecting)return rd.debug("Socket reconnecting"),!1;if(e.isConnecting)return rd.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return rd.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&rd.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return rd.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return(0,mi.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)([nd],ud.prototype,"config",void 0),(0,C.Cg)([td.S5],ud.prototype,"socketStatus",void 0),(0,C.Cg)([ed.a4],ud.prototype,"connectEvents",void 0),(0,C.Cg)([ql.KJ],ud.prototype,"user",void 0),(0,C.Cg)([l.observable],ud.prototype,"status",void 0);const hd=a.DI.createInterface(e=>e.singleton(ud));const pd=(e,t)=>l.css`
|
|
3388
3388
|
${(0,r.progressStyles)(e,t)}
|
|
3389
3389
|
:host {
|
|
3390
3390
|
height: calc(var(--design-unit) * 2px);
|
|
3391
3391
|
}
|
|
3392
|
-
`,
|
|
3392
|
+
`,md=(e,t)=>(0,a.progressTemplate)(e,t);class vd extends r.Progress{}const gd=void 0,fd={indeterminateIndicator1:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>',indeterminateIndicator2:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>'},bd=vd.compose(Object.assign({baseName:"progress",template:md,styles:pd,shadowOptions:gd},fd));function yd(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 wd=(e,t="foundation",i,s)=>{e&&Qo(null!=i?i:o,null!=s?s:n,e);return yd(a.DesignSystem.getOrCreate(e).withPrefix(t))},Cd="app",xd="component";wd().register(bd({prefix:"next-update"}));class $d extends a.FoundationElement{constructor(){super(...arguments),this.timeTillNextUpdate={totalMs:1e4,remainMs:1e4,remainPercent:100},this.mode=Cd,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 wl.Is.ArrowUp:e.ctrlKey&&e.altKey&&!this.isOpen&&(this.onOpen(!0),e.preventDefault());break;case wl.Is.ArrowDown:e.ctrlKey&&e.altKey&&this.isOpen&&(this.onClose(),e.preventDefault());break;case wl.F9:this.isOpen&&(this.onDismiss(),e.preventDefault())}}}isOpenChanged(){this.updateTemplateClassNames()}isDismissedChanged(){this.updateTemplateClassNames()}modeChanged(){this.$fastController.isConnected&&this.mode===xd&&nt.warn("SystemHealthOverlay has support for app overlays only right now.")}logLevelChanged(){rd.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.x)(["healthy",this.status.isOnline],["unhealthy",!this.status.isOnline]),this.isHealthyClassNames=(0,x.x)(["healthy",this.status.isHealthy],["unhealthy",!this.status.isHealthy]),this.isSocketHealthyClassNames=(0,x.x)(["healthy",this.isSocketHealthy],["unhealthy",!this.isSocketHealthy]),this.resourcesAllConnectedClassNames=(0,x.x)(["healthy",this.status.resourcesAllConnected],["unhealthy",!this.status.resourcesAllConnected],["hidden",!this.validResourceList]),this.updateTemplateClassNames()}updateTemplateClassNames(){this.templateClassNames=(0,x.x)(["open",this.isOpen],["dismissed",this.isDismissed]),this.containerClassNames=(0,x.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(sd,this.onSystemHealthChanged,!0),document.addEventListener("keydown",this.onDocumentKeydown)}removeEventListeners(){this.eventBridge().removeEventListener(sd,this.onSystemHealthChanged,!0),document.removeEventListener("keydown",this.onDocumentKeydown)}static getCheckmarkTemplate(e){return e?l.html`
|
|
3393
3393
|
<span class="checkmark">✔</span>
|
|
3394
3394
|
`:l.html`
|
|
3395
3395
|
<span class="checkmark">✘</span>
|
|
3396
|
-
`}}(0,C.Cg)([
|
|
3396
|
+
`}}(0,C.Cg)([nd],$d.prototype,"config",void 0),(0,C.Cg)([hd],$d.prototype,"networkMonitor",void 0),(0,C.Cg)([l.observable],$d.prototype,"resourceList",void 0),(0,C.Cg)([l.observable],$d.prototype,"isOpen",void 0),(0,C.Cg)([l.observable],$d.prototype,"wasOpenedByUser",void 0),(0,C.Cg)([l.observable],$d.prototype,"isDismissed",void 0),(0,C.Cg)([l.observable],$d.prototype,"templateClassNames",void 0),(0,C.Cg)([l.observable],$d.prototype,"containerClassNames",void 0),(0,C.Cg)([l.observable],$d.prototype,"isOnlineClassNames",void 0),(0,C.Cg)([l.observable],$d.prototype,"isHealthyClassNames",void 0),(0,C.Cg)([l.observable],$d.prototype,"isSocketHealthyClassNames",void 0),(0,C.Cg)([l.observable],$d.prototype,"resourcesAllConnectedClassNames",void 0),(0,C.Cg)([l.observable],$d.prototype,"timeTillNextUpdate",void 0),(0,C.Cg)([l.observable],$d.prototype,"saveDataCallback",void 0),(0,C.Cg)([l.attr],$d.prototype,"mode",void 0),(0,C.Cg)([(0,l.attr)({attribute:"log-level",converter:l.nullableNumberConverter})],$d.prototype,"logLevel",void 0),(0,C.Cg)([l.observable],$d.prototype,"status",void 0);const Sd=(e,t)=>l.html`
|
|
3397
3397
|
<template class="${e=>e.templateClassNames}">
|
|
3398
3398
|
<header class="${e=>e.isHealthyClassNames}" part="header">
|
|
3399
|
-
<h1>System ${e=>(0,
|
|
3399
|
+
<h1>System ${e=>(0,ya.fL)(e.isHealthyClassNames)}</h1>
|
|
3400
3400
|
${(0,l.when)(e=>!e.status.isHealthy,l.html`
|
|
3401
3401
|
<span class="data-warning">Data Validity Unknown</span>
|
|
3402
3402
|
`)}
|
|
@@ -3425,7 +3425,7 @@
|
|
|
3425
3425
|
</header>
|
|
3426
3426
|
<div class="container ${e=>e.containerClassNames}" part="container">
|
|
3427
3427
|
<section class="network-section ${e=>e.isOnlineClassNames}" part="network-section">
|
|
3428
|
-
<h2>Network ${e=>(0,
|
|
3428
|
+
<h2>Network ${e=>(0,ya.fL)(e.status.isOnline?"online":"offline")}</h2>
|
|
3429
3429
|
<dl class="resource-list">
|
|
3430
3430
|
<div class="resource ${e=>e.isOnlineClassNames}">
|
|
3431
3431
|
<div class="attributes">
|
|
@@ -3445,11 +3445,11 @@
|
|
|
3445
3445
|
`)}
|
|
3446
3446
|
<div class="platform-type">
|
|
3447
3447
|
<dt>Platform Type</dt>
|
|
3448
|
-
<dd>${e=>{var t;return(0,
|
|
3448
|
+
<dd>${e=>{var t;return(0,ya.fL)(null===(t=e.status.browserInformation.platform)||void 0===t?void 0:t.type)}}</dd>
|
|
3449
3449
|
</div>
|
|
3450
3450
|
<div class="os-name">
|
|
3451
3451
|
<dt>OS Name</dt>
|
|
3452
|
-
<dd>${e=>{var t;return(0,
|
|
3452
|
+
<dd>${e=>{var t;return(0,ya.fL)(null===(t=e.status.browserInformation.os)||void 0===t?void 0:t.name)}}</dd>
|
|
3453
3453
|
</div>
|
|
3454
3454
|
<div class="os-version">
|
|
3455
3455
|
<dt>OS Version</dt>
|
|
@@ -3459,7 +3459,7 @@
|
|
|
3459
3459
|
<div class="attributes">
|
|
3460
3460
|
<div class="browser-name">
|
|
3461
3461
|
<dt>Browser Name</dt>
|
|
3462
|
-
<dd>${e=>{var t;return(0,
|
|
3462
|
+
<dd>${e=>{var t;return(0,ya.fL)(null===(t=e.status.browserInformation.browser)||void 0===t?void 0:t.name)}}</dd>
|
|
3463
3463
|
</div>
|
|
3464
3464
|
<div class="browser-version">
|
|
3465
3465
|
<dt>Browser Version</dt>
|
|
@@ -3467,16 +3467,16 @@
|
|
|
3467
3467
|
</div>
|
|
3468
3468
|
<div class="first-updated">
|
|
3469
3469
|
<dt>First updated</dt>
|
|
3470
|
-
<dd>${e=>(0,
|
|
3470
|
+
<dd>${e=>(0,mi.zT)(e.status.firstUpdated)}</dd>
|
|
3471
3471
|
</div>
|
|
3472
3472
|
<div class="last-updated">
|
|
3473
3473
|
<dt>Last updated</dt>
|
|
3474
|
-
<dd>${e=>(0,
|
|
3474
|
+
<dd>${e=>(0,mi.zT)(e.status.lastUpdated)}</dd>
|
|
3475
3475
|
</div>
|
|
3476
3476
|
${(0,l.when)(e=>!e.status.socket.reconnectionLimitReached,l.html`
|
|
3477
3477
|
<div class="next-update">
|
|
3478
3478
|
<dt>Next update</dt>
|
|
3479
|
-
<dd>${e=>(0,
|
|
3479
|
+
<dd>${e=>(0,mi.zT)(e.status.nextUpdate)}</dd>
|
|
3480
3480
|
</div>
|
|
3481
3481
|
<div class="next-update-progress">
|
|
3482
3482
|
<dt></dt>
|
|
@@ -3489,13 +3489,13 @@
|
|
|
3489
3489
|
`)}
|
|
3490
3490
|
</div>
|
|
3491
3491
|
<div class="controls">
|
|
3492
|
-
${e
|
|
3492
|
+
${e=>$d.getCheckmarkTemplate(e.status.isOnline)}
|
|
3493
3493
|
</div>
|
|
3494
3494
|
</div>
|
|
3495
3495
|
</dl>
|
|
3496
3496
|
</section>
|
|
3497
3497
|
<section class="socket-section ${e=>e.isSocketHealthyClassNames}" part="socket-section">
|
|
3498
|
-
<h2>WebSocket ${e=>(0,
|
|
3498
|
+
<h2>WebSocket ${e=>(0,ya.fL)(e.isSocketHealthyClassNames)}</h2>
|
|
3499
3499
|
<dl class="resource-list">
|
|
3500
3500
|
<div class="resource ${e=>e.isSocketHealthyClassNames}">
|
|
3501
3501
|
<div class="attributes">
|
|
@@ -3535,7 +3535,7 @@
|
|
|
3535
3535
|
</div>
|
|
3536
3536
|
</div>
|
|
3537
3537
|
<div class="controls">
|
|
3538
|
-
${e
|
|
3538
|
+
${e=>$d.getCheckmarkTemplate(e.isSocketHealthy)}
|
|
3539
3539
|
</div>
|
|
3540
3540
|
</div>
|
|
3541
3541
|
</dl>
|
|
@@ -3544,7 +3544,7 @@
|
|
|
3544
3544
|
class="resource-section ${e=>e.resourcesAllConnectedClassNames}"
|
|
3545
3545
|
part="resource-section"
|
|
3546
3546
|
>
|
|
3547
|
-
<h2>Resources ${e=>(0,
|
|
3547
|
+
<h2>Resources ${e=>(0,ya.fL)(e.resourcesAllConnectedClassNames)}</h2>
|
|
3548
3548
|
<dl class="resource-list">
|
|
3549
3549
|
${(0,l.repeat)(e=>e.resourceList,l.html`
|
|
3550
3550
|
<div class="resource ${e=>e.isConnected?"healthy":"unhealthy"}">
|
|
@@ -3559,7 +3559,7 @@
|
|
|
3559
3559
|
</div>
|
|
3560
3560
|
<div class="last-checked">
|
|
3561
3561
|
<dt>Checked</dt>
|
|
3562
|
-
<dd>${e=>(0,
|
|
3562
|
+
<dd>${e=>(0,mi.zT)(e.lastUpdated)}</dd>
|
|
3563
3563
|
</div>
|
|
3564
3564
|
<div class="subscriptions">
|
|
3565
3565
|
<dt>Subscriptions</dt>
|
|
@@ -3571,7 +3571,7 @@
|
|
|
3571
3571
|
</div>
|
|
3572
3572
|
</div>
|
|
3573
3573
|
<div class="controls">
|
|
3574
|
-
${e
|
|
3574
|
+
${e=>$d.getCheckmarkTemplate(e.isConnected)}
|
|
3575
3575
|
</div>
|
|
3576
3576
|
</div>
|
|
3577
3577
|
`)}
|
|
@@ -3579,7 +3579,7 @@
|
|
|
3579
3579
|
</section>
|
|
3580
3580
|
</div>
|
|
3581
3581
|
</template>
|
|
3582
|
-
`,
|
|
3582
|
+
`,Ed=(e,t)=>l.css`
|
|
3583
3583
|
:host {
|
|
3584
3584
|
--font-family: Menlo, Consolas, monospace;
|
|
3585
3585
|
|
|
@@ -3850,7 +3850,7 @@
|
|
|
3850
3850
|
padding: 0.2em 0.5em;
|
|
3851
3851
|
background-color: var(--color-unhealthy-opacity-20);
|
|
3852
3852
|
}
|
|
3853
|
-
`,
|
|
3853
|
+
`,Od=void 0,Td={},kd=$d.compose(Object.assign({baseName:"system-health-overlay",template:Sd,styles:Ed,shadowOptions:Od},Td)),Dd=l.css`
|
|
3854
3854
|
:host {
|
|
3855
3855
|
--pill-fill: var(--neutral-fill-rest, #e5e5e5);
|
|
3856
3856
|
--pill-fill-hover: var(--neutral-fill-hover, #d9d9d9);
|
|
@@ -3928,7 +3928,7 @@
|
|
|
3928
3928
|
.pill-remove:hover:not(:disabled) {
|
|
3929
3929
|
background: var(--pill-fill-hover);
|
|
3930
3930
|
}
|
|
3931
|
-
`,
|
|
3931
|
+
`,Id=e=>l.html`
|
|
3932
3932
|
<div class="pill" part="pill" ?disabled=${e=>e.disabled}>
|
|
3933
3933
|
<button
|
|
3934
3934
|
class="pill-body"
|
|
@@ -3962,9 +3962,9 @@
|
|
|
3962
3962
|
</button>
|
|
3963
3963
|
`)}
|
|
3964
3964
|
</div>
|
|
3965
|
-
`,
|
|
3966
|
-
${e=>
|
|
3967
|
-
`,
|
|
3965
|
+
`,Rd=l.html`
|
|
3966
|
+
${e=>Id(k(e))}
|
|
3967
|
+
`,Ad=void 0,Ld={};class Nd 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],Nd.prototype,"label",void 0),(0,C.Cg)([l.attr],Nd.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Nd.prototype,"removable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Nd.prototype,"disabled",void 0);const Fd=Nd.compose(Object.assign({baseName:"pill",template:Rd,styles:Dd,shadowOptions:Ad},Ld));var Md=i(4934);const _d={toView:e=>JSON.stringify(e),fromView:e=>null==e?e:JSON.parse(e)};class Pd 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,Md.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],Pd.prototype,"selector",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pd.prototype,"show",void 0),(0,C.Cg)([l.attr],Pd.prototype,"event",void 0),(0,C.Cg)([l.attr],Pd.prototype,"placement",void 0),(0,C.Cg)([(0,l.attr)({converter:_d})],Pd.prototype,"offset",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pd.prototype,"flip",void 0);const Hd=l.css`
|
|
3968
3968
|
:host {
|
|
3969
3969
|
display: none;
|
|
3970
3970
|
inset: unset !important;
|
|
@@ -3974,39 +3974,39 @@
|
|
|
3974
3974
|
:host([show]) {
|
|
3975
3975
|
display: block;
|
|
3976
3976
|
}
|
|
3977
|
-
`,
|
|
3977
|
+
`,zd=l.html`
|
|
3978
3978
|
<template>
|
|
3979
3979
|
<slot></slot>
|
|
3980
3980
|
</template>
|
|
3981
|
-
`,
|
|
3981
|
+
`,Ud=Pd.compose({baseName:"popper",styles:Hd,template:zd}),Bd=(e,t)=>l.css`
|
|
3982
3982
|
${(0,r.progressRingStyles)(e,t)}
|
|
3983
|
-
`,
|
|
3983
|
+
`,Vd=(e,t)=>(0,a.progressRingTemplate)(e,t);class jd extends r.Progress{}const Gd=void 0,Yd={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 '},Wd=jd.compose(Object.assign({baseName:"progress-ring",template:Vd,styles:Bd,shadowOptions:Gd},Yd)),qd=(e,t)=>l.css`
|
|
3984
3984
|
${(0,r.radioStyles)(e,t)}
|
|
3985
|
-
`,
|
|
3985
|
+
`,Kd=(e,t)=>(0,a.radioTemplate)(e,t);class Xd extends r.Radio{}const Jd=void 0,Qd={checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '},Zd=Xd.compose(Object.assign({baseName:"radio",template:Kd,styles:qd,shadowOptions:Jd},Qd)),ec=(e,t)=>l.css`
|
|
3986
3986
|
${(0,r.radioGroupStyles)(e,t)}
|
|
3987
|
-
`,
|
|
3987
|
+
`,tc=(e,t)=>(0,a.radioGroupTemplate)(e,t);class ic extends r.RadioGroup{}const oc=void 0,nc={},sc=ic.compose(Object.assign({baseName:"radio-group",template:tc,styles:ec,shadowOptions:oc},nc)),ac=l.css`
|
|
3988
3988
|
/* Host */
|
|
3989
3989
|
:host {
|
|
3990
3990
|
display: flex;
|
|
3991
3991
|
flex-direction: column;
|
|
3992
3992
|
width: 100%;
|
|
3993
3993
|
}
|
|
3994
|
-
`,
|
|
3994
|
+
`,rc=e=>l.html`
|
|
3995
3995
|
<template>
|
|
3996
3996
|
<${e}-scheduler-timezone
|
|
3997
|
-
:timezone=${(0,
|
|
3997
|
+
:timezone=${(0,B.O)(e=>e.timezone)}
|
|
3998
3998
|
@change=${(e,t)=>e.handleChange(t.event,"timezone")}
|
|
3999
3999
|
></${e}-scheduler-timezone>
|
|
4000
4000
|
<${e}-scheduler-cron-builder
|
|
4001
|
-
:cron=${(0,
|
|
4001
|
+
:cron=${(0,B.O)(e=>e.cron)}
|
|
4002
4002
|
@change=${(e,t)=>e.handleChange(t.event,"cronExpression")}
|
|
4003
4003
|
min-minute-interval=${e=>e.minMinuteInterval}
|
|
4004
4004
|
?disable-tooltips=${e=>e.disableTooltips}
|
|
4005
4005
|
></${e}-scheduler-cron-builder>
|
|
4006
4006
|
</template>
|
|
4007
|
-
`,
|
|
4008
|
-
${e=>
|
|
4009
|
-
`;class
|
|
4007
|
+
`,lc=l.html`
|
|
4008
|
+
${e=>rc(k(e))}
|
|
4009
|
+
`;class dc 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"})],dc.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],dc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],dc.prototype,"timezone",void 0),(0,C.Cg)([l.observable],dc.prototype,"cron",void 0),(0,C.Cg)([l.observable],dc.prototype,"cronConfig",void 0);const cc=void 0,uc={},hc=dc.compose(Object.assign({baseName:"scheduler",styles:ac,template:lc,shadowOptions:cc},uc)),pc=(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)),we(o,t,i)};var mc,vc,gc;!function(e){e.MINUTES="Minutes",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e.MONTHLY="Monthly",e.YEARLY="Yearly"}(mc||(mc={})),function(e){e.WEEK="Week",e.WORK_WEEK="Work week"}(vc||(vc={})),function(e){e.DATE="Date",e.DAY_OF_MONTH="Day of month"}(gc||(gc={}));const fc=[{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"}],bc=[{value:"1",label:"First"},{value:"2",label:"Second"},{value:"3",label:"Third"},{value:"4",label:"Fourth"},{value:"-1",label:"Last"}],yc=[{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"}],wc=12,Cc=31,xc=6,$c=7,Sc=24,Ec=60,Oc=4,Tc=30;var kc;!function(e){e.updateCronConfig="update-cron-config"}(kc||(kc={}));const Dc=e=>Number(e)>1?`/${e}`:"";const Ic=(e,t,i)=>{const o=Number(e);return!isNaN(o)&&o<=i&&o>=t};function Rc(e,t,i,o=!1,n=Ic){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,Oc)}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=>Rc(e,t,i,o,n))}function Ac(e,t){return{type:mc.DAILY,frequency:e.startsWith("*/")?e.split("*/")[1]:"1",weekType:"?"===t?vc.WEEK:vc.WORK_WEEK}}function Lc(e){const t=e.includes("/");return{type:mc.HOURLY,frequency:t?e.split("/")[1]:"1",during:t?"every_hour":"specific_hours",hours:t?void 0:e}}function Nc(e,t="*"){const i="*"!==t&&"0/1"!==t;return{type:mc.MINUTES,frequency:e.includes("/")?e.split("/")[1]:"1",during:i?"specific_hours":"every_hour",hours:i?t:void 0}}function Fc(e){return{type:mc.WEEKLY,selectedDays:"*"!==e?new Set(e.split(",")):new Set}}const Mc=(e,t,i,o)=>{let n;return n="?"===t?{type:gc.DAY_OF_MONTH,day:o.split(/[L#]/)[0],weekNumber:o.includes("#")?o.split("#")[1]:"-1"}:{type:gc.DATE,dayDate:t},e===mc.YEARLY&&(n.month=i),n};function _c(e,t,i,o=Mc){return{type:mc.YEARLY,frequency:2===i.split("/").length?i.split("/")[1]:"1",dateOrDay:o(mc.YEARLY,e,t,i.split("/")[0])}}function Pc(e,t,i,o=Mc){return{type:mc.MONTHLY,frequency:t.startsWith("*/")?t.split("*/")[1]:"1",dateOrDay:o(mc.MONTHLY,e,t,i.split("/")[0])}}const Hc=l.css`
|
|
4010
4010
|
.input-container {
|
|
4011
4011
|
display: flex;
|
|
4012
4012
|
flex-direction: column;
|
|
@@ -4042,7 +4042,7 @@
|
|
|
4042
4042
|
width: 100%;
|
|
4043
4043
|
height: 0;
|
|
4044
4044
|
}
|
|
4045
|
-
`,
|
|
4045
|
+
`,zc=l.css`
|
|
4046
4046
|
${Hc}
|
|
4047
4047
|
/* Host */
|
|
4048
4048
|
:host {
|
|
@@ -4103,31 +4103,31 @@
|
|
|
4103
4103
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
4104
4104
|
white-space: nowrap;
|
|
4105
4105
|
}
|
|
4106
|
-
`;var
|
|
4106
|
+
`;var Uc=i(20633);const Bc=(e,t,i)=>l.html`
|
|
4107
4107
|
<${t}-icon tooltip="${()=>e}" name="${()=>i}"></${t}-icon>
|
|
4108
|
-
`,
|
|
4108
|
+
`,Vc=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)}},jc=l.css`
|
|
4109
4109
|
${Hc}
|
|
4110
|
-
`,Gc="\n <p>Select one or more hours.</p>\n",
|
|
4110
|
+
`,Gc="\n <p>Select one or more hours.</p>\n",Yc=l.html`
|
|
4111
4111
|
${e=>{return t=e.prefix,l.html`
|
|
4112
4112
|
<template>
|
|
4113
4113
|
<div class="input-container">
|
|
4114
|
-
<label class="label">Of ${e=>e.disableTooltips?"":
|
|
4114
|
+
<label class="label">Of ${e=>e.disableTooltips?"":Bc("\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>
|
|
4115
4115
|
<${t}-select
|
|
4116
4116
|
data-test-id="select-week-type"
|
|
4117
|
-
:value=${(0,
|
|
4117
|
+
:value=${(0,B.O)(e=>e.weekType)}
|
|
4118
4118
|
@change="${e=>e.updateCronConfig()}"
|
|
4119
4119
|
>
|
|
4120
|
-
<${t}-option data-test-id="${
|
|
4121
|
-
${
|
|
4120
|
+
<${t}-option data-test-id="${vc.WEEK}">
|
|
4121
|
+
${vc.WEEK}
|
|
4122
4122
|
</${t}-option>
|
|
4123
|
-
<${t}-option data-test-id="${
|
|
4124
|
-
${
|
|
4123
|
+
<${t}-option data-test-id="${vc.WORK_WEEK}">
|
|
4124
|
+
${vc.WORK_WEEK}
|
|
4125
4125
|
</${t}-option>
|
|
4126
4126
|
</${t}-select>
|
|
4127
4127
|
</div>
|
|
4128
4128
|
</template>
|
|
4129
4129
|
`;var t}}
|
|
4130
|
-
`;let
|
|
4130
|
+
`;let Wc=class extends(Vc(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)||vc.WORK_WEEK}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{weekType:this.weekType}),this.$emit(kc.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Wc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],Wc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],Wc.prototype,"config",void 0),(0,C.Cg)([l.observable],Wc.prototype,"weekType",void 0),Wc=(0,C.Cg)([(0,l.customElement)({name:"daily-recurrence",template:Yc,styles:jc})],Wc);const qc=l.css`
|
|
4131
4131
|
${Hc}
|
|
4132
4132
|
:host {
|
|
4133
4133
|
display: flex;
|
|
@@ -4149,43 +4149,43 @@
|
|
|
4149
4149
|
.day-date-number-field::part(root) {
|
|
4150
4150
|
width: 40%;
|
|
4151
4151
|
}
|
|
4152
|
-
`,
|
|
4152
|
+
`,Kc=e=>l.html`
|
|
4153
4153
|
<div class="input-container">
|
|
4154
4154
|
<label class="label">Month</label>
|
|
4155
|
-
<${e}-select data-test-id="month-dropdown" :value=${(0,
|
|
4156
|
-
${(0,l.repeat)(()=>
|
|
4155
|
+
<${e}-select data-test-id="month-dropdown" :value=${(0,B.O)(e=>e.selectedMonth)} @change="${e=>e.updateCronConfig()}" >
|
|
4156
|
+
${(0,l.repeat)(()=>yc,l.html`
|
|
4157
4157
|
<${e}-option value="${e=>e.value}">
|
|
4158
4158
|
${e=>e.label}
|
|
4159
4159
|
</${e}-option>
|
|
4160
4160
|
`)}
|
|
4161
4161
|
</${e}-select>
|
|
4162
4162
|
</div>
|
|
4163
|
-
`,
|
|
4163
|
+
`,Xc=e=>l.html`
|
|
4164
4164
|
${(e=>l.html`
|
|
4165
4165
|
<div class="input-container">
|
|
4166
4166
|
<label class="label">On</label>
|
|
4167
4167
|
<${e}-select
|
|
4168
4168
|
data-test-id="select-day-or-date"
|
|
4169
|
-
:value=${(0,
|
|
4169
|
+
:value=${(0,B.O)(e=>e.dayOrDate)}
|
|
4170
4170
|
@change="${e=>e.updateCronConfig()}"
|
|
4171
4171
|
>
|
|
4172
|
-
<${e}-option data-test-id="${
|
|
4173
|
-
${
|
|
4172
|
+
<${e}-option data-test-id="${gc.DATE}">
|
|
4173
|
+
${gc.DATE}
|
|
4174
4174
|
</${e}-option>
|
|
4175
|
-
<${e}-option data-test-id="${
|
|
4176
|
-
${
|
|
4175
|
+
<${e}-option data-test-id="${gc.DAY_OF_MONTH}">
|
|
4176
|
+
${gc.DAY_OF_MONTH}
|
|
4177
4177
|
</${e}-option>
|
|
4178
4178
|
</${e}-select>
|
|
4179
4179
|
</div>
|
|
4180
4180
|
`)(e)}
|
|
4181
|
-
${(0,
|
|
4181
|
+
${(0,On.q)(e=>e.dayOrDate===gc.DATE,(e=>l.html`
|
|
4182
4182
|
<div class="row">
|
|
4183
|
-
${(0,l.when)(e=>e.config.type===
|
|
4184
|
-
${
|
|
4183
|
+
${(0,l.when)(e=>e.config.type===mc.YEARLY,l.html`
|
|
4184
|
+
${Kc(e)}
|
|
4185
4185
|
`)}
|
|
4186
4186
|
<div class="input-container">
|
|
4187
|
-
<label class="label"> ${e=>e.config.type===
|
|
4188
|
-
<${e}-select data-test-id="day-date-dropdown" :value=${(0,
|
|
4187
|
+
<label class="label"> ${e=>e.config.type===mc.MONTHLY?"Day date":"Day"}</label>
|
|
4188
|
+
<${e}-select data-test-id="day-date-dropdown" :value=${(0,B.O)(e=>e.dayDate)} @change="${e=>e.updateCronConfig()}" >
|
|
4189
4189
|
${(0,l.repeat)(()=>Array.from({length:31},(e,t)=>t+1),l.html`
|
|
4190
4190
|
<${e}-option value="${e=>e}">
|
|
4191
4191
|
${e=>e}
|
|
@@ -4197,17 +4197,17 @@
|
|
|
4197
4197
|
|
|
4198
4198
|
`)(e),(e=>l.html`
|
|
4199
4199
|
<div class="day-of-month-row">
|
|
4200
|
-
${(0,l.when)(e=>e.config.type===
|
|
4201
|
-
${
|
|
4200
|
+
${(0,l.when)(e=>e.config.type===mc.YEARLY,l.html`
|
|
4201
|
+
${Kc(e)}
|
|
4202
4202
|
`)}
|
|
4203
4203
|
<div class="input-container">
|
|
4204
4204
|
<label class="label">Day of Month</label>
|
|
4205
4205
|
<${e}-select
|
|
4206
4206
|
data-test-id="select-week-number"
|
|
4207
|
-
:value=${(0,
|
|
4207
|
+
:value=${(0,B.O)(e=>e.weekNumber)}
|
|
4208
4208
|
@change="${e=>e.updateCronConfig()}"
|
|
4209
4209
|
>
|
|
4210
|
-
${(0,l.repeat)(()=>
|
|
4210
|
+
${(0,l.repeat)(()=>bc,l.html`
|
|
4211
4211
|
<${e}-option value="${e=>e.value}">
|
|
4212
4212
|
${e=>e.label}
|
|
4213
4213
|
</${e}-option>
|
|
@@ -4218,10 +4218,10 @@
|
|
|
4218
4218
|
<label class="label">Day</label>
|
|
4219
4219
|
<${e}-select
|
|
4220
4220
|
data-test-id="select-week-day"
|
|
4221
|
-
:value=${(0,
|
|
4221
|
+
:value=${(0,B.O)(e=>e.day)}
|
|
4222
4222
|
@change="${e=>e.updateCronConfig()}"
|
|
4223
4223
|
>
|
|
4224
|
-
${(0,l.repeat)(()=>
|
|
4224
|
+
${(0,l.repeat)(()=>fc,l.html`
|
|
4225
4225
|
<${e}-option value="${e=>e.value}">
|
|
4226
4226
|
${e=>e.label}
|
|
4227
4227
|
</${e}-option>
|
|
@@ -4230,24 +4230,24 @@
|
|
|
4230
4230
|
</div>
|
|
4231
4231
|
</div>
|
|
4232
4232
|
`)(e))}
|
|
4233
|
-
`,
|
|
4234
|
-
${e=>
|
|
4235
|
-
`;let
|
|
4233
|
+
`,Jc=l.html`
|
|
4234
|
+
${e=>Xc(e.prefix)}
|
|
4235
|
+
`;let Qc=class extends(Vc(a.FoundationElement)){constructor(){super(...arguments),this.prefix="",this.dayOrDate=gc.DATE,this.weekNumber="1",this.day="1",this.selectedMonth="1"}configChanged(){this.config.type!==mc.YEARLY&&this.config.type!==mc.MONTHLY||(this.dayOrDate=this.config.dateOrDay.type||gc.DATE,this.setFieldsFromConfig())}setFieldsFromConfig(){this.config.type===mc.YEARLY&&(this.selectedMonth=this.config.dateOrDay.month),this.config.dateOrDay.type===gc.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===gc.DATE?{type:gc.DATE,dayDate:this.dayDate||"1"}:{type:gc.DAY_OF_MONTH,day:this.day||"1",weekNumber:this.weekNumber||"1"},e}updateCronConfig(){this.config.type===mc.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(kc.updateCronConfig,this.config)}};(0,C.Cg)([l.observable],Qc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],Qc.prototype,"config",void 0),(0,C.Cg)([l.observable],Qc.prototype,"dayOrDate",void 0),(0,C.Cg)([l.observable],Qc.prototype,"dayDate",void 0),(0,C.Cg)([l.observable],Qc.prototype,"weekNumber",void 0),(0,C.Cg)([l.observable],Qc.prototype,"day",void 0),(0,C.Cg)([l.observable],Qc.prototype,"selectedMonth",void 0),Qc=(0,C.Cg)([(0,l.customElement)({name:"monthly-yearly-recurrence",template:Jc,styles:qc})],Qc);const Zc=l.css`
|
|
4236
4236
|
${Hc}
|
|
4237
4237
|
.weekdays-row {
|
|
4238
4238
|
display: flex;
|
|
4239
4239
|
gap: calc(var(--design-unit) * 3px);
|
|
4240
4240
|
flex-wrap: wrap;
|
|
4241
4241
|
}
|
|
4242
|
-
`,
|
|
4242
|
+
`,eu=l.html`
|
|
4243
4243
|
${e=>{return t=e.prefix,l.html`
|
|
4244
4244
|
<template>
|
|
4245
4245
|
<div class="input-container">
|
|
4246
4246
|
<label class="label">
|
|
4247
|
-
On ${e=>e.disableTooltips?"":
|
|
4247
|
+
On ${e=>e.disableTooltips?"":Bc("\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)}
|
|
4248
4248
|
</label>
|
|
4249
4249
|
<div class="weekdays-row">
|
|
4250
|
-
${(0,l.repeat)(()=>
|
|
4250
|
+
${(0,l.repeat)(()=>fc,l.html`
|
|
4251
4251
|
<${t}-checkbox
|
|
4252
4252
|
part="weekdays-checkbox"
|
|
4253
4253
|
class="weekdays-checkbox"
|
|
@@ -4263,12 +4263,12 @@
|
|
|
4263
4263
|
</div>
|
|
4264
4264
|
</template>
|
|
4265
4265
|
`;var t}}
|
|
4266
|
-
`;let
|
|
4266
|
+
`;let tu=class extends(Vc(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(kc.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],tu.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],tu.prototype,"prefix",void 0),(0,C.Cg)([l.observable],tu.prototype,"config",void 0),(0,C.Cg)([l.observable],tu.prototype,"selectedDays",void 0),tu=(0,C.Cg)([(0,l.customElement)({name:"weekly-recurrence",template:eu,styles:Zc})],tu),(0,Uc.N)(Wc,tu,Qc);const iu=(e,t)=>l.html`
|
|
4267
4267
|
<monthly-yearly-recurrence
|
|
4268
4268
|
:prefix=${()=>e}
|
|
4269
4269
|
:config=${()=>t.cronConfig}
|
|
4270
4270
|
></monthly-yearly-recurrence>
|
|
4271
|
-
`,
|
|
4271
|
+
`,ou=(e,t,i)=>l.html`
|
|
4272
4272
|
<div class="input-container">
|
|
4273
4273
|
${(0,l.when)(()=>i,l.html`
|
|
4274
4274
|
<label class="label">${i}</label>
|
|
@@ -4277,7 +4277,7 @@
|
|
|
4277
4277
|
class="frequency-select"
|
|
4278
4278
|
?disabled=${()=>t.isDailyFrequencyDisabled}
|
|
4279
4279
|
data-test-id="frequency-dropdown"
|
|
4280
|
-
:value=${(0,
|
|
4280
|
+
:value=${(0,B.O)(()=>t.frequency)}
|
|
4281
4281
|
@change="${()=>t.handleChange("frequency")}"
|
|
4282
4282
|
>
|
|
4283
4283
|
${(0,l.repeat)(()=>t.frequencyList,l.html`
|
|
@@ -4286,42 +4286,42 @@
|
|
|
4286
4286
|
<div slot="end" class="suffix-label">${()=>t.frequencySuffix}</div>
|
|
4287
4287
|
</${e}-select>
|
|
4288
4288
|
</div>
|
|
4289
|
-
`,
|
|
4289
|
+
`,nu=(e,t,i,o)=>l.html`
|
|
4290
4290
|
<div class="input-container">
|
|
4291
4291
|
<label class="label">Time </label>
|
|
4292
4292
|
<div class="flex-row">
|
|
4293
4293
|
${(0,l.when)(()=>i,l.html`
|
|
4294
|
-
<${e}-select class="time-select" data-test-id="hours-dropdown" :value=${(0,
|
|
4295
|
-
${(0,l.repeat)(()=>Array.from({length
|
|
4294
|
+
<${e}-select class="time-select" data-test-id="hours-dropdown" :value=${(0,B.O)(()=>t.hours)} @change="${()=>t.handleChange("hours")}" >
|
|
4295
|
+
${(0,l.repeat)(()=>Array.from({length:Sc},(e,t)=>t),l.html`
|
|
4296
4296
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4297
4297
|
`)}
|
|
4298
4298
|
<div slot="end" class="suffix-label">hr</div>
|
|
4299
4299
|
</${e}-select>`)}
|
|
4300
4300
|
${(0,l.when)(()=>o,l.html`
|
|
4301
|
-
<${e}-select class="time-select" data-test-id="mins-dropdown" :value=${(0,
|
|
4302
|
-
${(0,l.repeat)(()=>Array.from({length:
|
|
4301
|
+
<${e}-select class="time-select" data-test-id="mins-dropdown" :value=${(0,B.O)(()=>t.minutes)} @change="${()=>t.handleChange("minutes")}" >
|
|
4302
|
+
${(0,l.repeat)(()=>Array.from({length:Ec},(e,t)=>t),l.html`
|
|
4303
4303
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4304
4304
|
`)}
|
|
4305
4305
|
<div slot="end" class="suffix-label">min</div>
|
|
4306
4306
|
</${e}-select>`)}
|
|
4307
|
-
<${e}-select class="time-select" data-test-id="seconds-dropdown" :value=${(0,
|
|
4308
|
-
${(0,l.repeat)(()=>Array.from({length:
|
|
4307
|
+
<${e}-select class="time-select" data-test-id="seconds-dropdown" :value=${(0,B.O)(()=>t.seconds)} @change="${()=>t.handleChange("seconds")}" >
|
|
4308
|
+
${(0,l.repeat)(()=>Array.from({length:Ec},(e,t)=>t),l.html`
|
|
4309
4309
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4310
4310
|
`)}
|
|
4311
4311
|
<div slot="end" class="suffix-label">sec</div>
|
|
4312
4312
|
</${e}-select>
|
|
4313
4313
|
</div>
|
|
4314
4314
|
</div>
|
|
4315
|
-
`,
|
|
4315
|
+
`,su=(e,t,i)=>{switch(e){case mc.MINUTES:return l.html`
|
|
4316
4316
|
<div class="minutes-options-row">
|
|
4317
4317
|
<div class="input-container">
|
|
4318
4318
|
<label class="label"
|
|
4319
4319
|
>During
|
|
4320
|
-
${()=>i.disableTooltips?"":
|
|
4320
|
+
${()=>i.disableTooltips?"":Bc("\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
|
|
4321
4321
|
>
|
|
4322
4322
|
<${t}-select
|
|
4323
4323
|
data-test-id="during-select"
|
|
4324
|
-
:value=${(0,
|
|
4324
|
+
:value=${(0,B.O)(()=>i.during)}
|
|
4325
4325
|
@change="${()=>i.handleDuringChange()}"
|
|
4326
4326
|
>
|
|
4327
4327
|
${(0,l.repeat)(()=>i.duringOptions,l.html`
|
|
@@ -4337,7 +4337,7 @@
|
|
|
4337
4337
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4338
4338
|
<div class="input-container">
|
|
4339
4339
|
<label class="label"
|
|
4340
|
-
>Hours ${
|
|
4340
|
+
>Hours ${Bc(Gc,t)}</label
|
|
4341
4341
|
>
|
|
4342
4342
|
<${t}-multiselect
|
|
4343
4343
|
class="time-select"
|
|
@@ -4352,31 +4352,31 @@
|
|
|
4352
4352
|
`)}
|
|
4353
4353
|
</div>
|
|
4354
4354
|
<div class="row">
|
|
4355
|
-
${
|
|
4356
|
-
${
|
|
4355
|
+
${ou(t,i,"Every")}
|
|
4356
|
+
${nu(t,i,!1,!1)}
|
|
4357
4357
|
</div>
|
|
4358
|
-
`;case
|
|
4358
|
+
`;case mc.HOURLY:return l.html`
|
|
4359
4359
|
<div class="row">
|
|
4360
4360
|
<div class="input-container">
|
|
4361
4361
|
<label class="label"
|
|
4362
4362
|
>Mode
|
|
4363
|
-
${()=>i.disableTooltips?"":
|
|
4363
|
+
${()=>i.disableTooltips?"":Bc("\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
|
|
4364
4364
|
>
|
|
4365
4365
|
<${t}-select
|
|
4366
4366
|
data-test-id="hourly-during-select"
|
|
4367
|
-
:value=${(0,
|
|
4367
|
+
:value=${(0,B.O)(()=>i.during)}
|
|
4368
4368
|
@change="${()=>i.handleDuringChange()}"
|
|
4369
4369
|
>
|
|
4370
4370
|
<${t}-option value="every_hour">Interval</${t}-option>
|
|
4371
4371
|
<${t}-option value="specific_hours">Selected Hours</${t}-option>
|
|
4372
4372
|
</${t}-select>
|
|
4373
4373
|
</div>
|
|
4374
|
-
${(0,l.when)(()=>"every_hour"===i.during,
|
|
4374
|
+
${(0,l.when)(()=>"every_hour"===i.during,ou(t,i,"Every"))}
|
|
4375
4375
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4376
4376
|
<div class="break"></div>
|
|
4377
4377
|
<div class="input-container">
|
|
4378
4378
|
<label class="label">
|
|
4379
|
-
Hours ${
|
|
4379
|
+
Hours ${Bc(Gc,t)}
|
|
4380
4380
|
</label>
|
|
4381
4381
|
<${t}-multiselect
|
|
4382
4382
|
class="time-select"
|
|
@@ -4388,9 +4388,9 @@
|
|
|
4388
4388
|
></${t}-multiselect>
|
|
4389
4389
|
</div>
|
|
4390
4390
|
`)}
|
|
4391
|
-
${
|
|
4391
|
+
${nu(t,i,!1,!0)}
|
|
4392
4392
|
</div>
|
|
4393
|
-
`;case
|
|
4393
|
+
`;case mc.DAILY:return l.html`
|
|
4394
4394
|
${((e,t)=>l.html`
|
|
4395
4395
|
<daily-recurrence
|
|
4396
4396
|
:prefix=${()=>e}
|
|
@@ -4399,10 +4399,10 @@
|
|
|
4399
4399
|
></daily-recurrence>
|
|
4400
4400
|
`)(t,i)}
|
|
4401
4401
|
<div class="row">
|
|
4402
|
-
${
|
|
4403
|
-
${
|
|
4402
|
+
${ou(t,i,"Every")}
|
|
4403
|
+
${nu(t,i,!0,!0)}
|
|
4404
4404
|
</div>
|
|
4405
|
-
`;case
|
|
4405
|
+
`;case mc.WEEKLY:return l.html`
|
|
4406
4406
|
<div class="row">
|
|
4407
4407
|
${((e,t)=>l.html`
|
|
4408
4408
|
<weekly-recurrence
|
|
@@ -4410,63 +4410,63 @@
|
|
|
4410
4410
|
:config=${()=>t.cronConfig}
|
|
4411
4411
|
?disable-tooltips=${()=>t.disableTooltips}
|
|
4412
4412
|
></weekly-recurrence>
|
|
4413
|
-
`)(t,i)} ${
|
|
4413
|
+
`)(t,i)} ${nu(t,i,!0,!0)}
|
|
4414
4414
|
</div>
|
|
4415
|
-
`;case
|
|
4415
|
+
`;case mc.MONTHLY:return l.html`
|
|
4416
4416
|
<div class="row">
|
|
4417
|
-
${
|
|
4418
|
-
${
|
|
4417
|
+
${ou(t,i,"Every")}
|
|
4418
|
+
${nu(t,i,!0,!0)}
|
|
4419
4419
|
</div>
|
|
4420
|
-
${
|
|
4421
|
-
`;case
|
|
4422
|
-
<div class="row">${
|
|
4423
|
-
${
|
|
4424
|
-
`;default:return l.html``}},
|
|
4420
|
+
${iu(t,i)}
|
|
4421
|
+
`;case mc.YEARLY:return l.html`
|
|
4422
|
+
<div class="row">${nu(t,i,!0,!0)}</div>
|
|
4423
|
+
${iu(t,i)}
|
|
4424
|
+
`;default:return l.html``}},au=e=>l.html`
|
|
4425
4425
|
<template>
|
|
4426
4426
|
<div class="container">
|
|
4427
4427
|
<div class="input-container">
|
|
4428
4428
|
<label class="label"
|
|
4429
4429
|
>Recurrence
|
|
4430
4430
|
${(0,l.when)(e=>!e.disableTooltips,l.html`
|
|
4431
|
-
${t=>
|
|
4431
|
+
${t=>Bc(`\n <p>Select how often the event should occur:</p>\n <ul>\n${!t.minMinuteInterval||t.minMinuteInterval<Tc?"<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)}
|
|
4432
4432
|
`)}
|
|
4433
4433
|
</label>
|
|
4434
4434
|
<${e}-select
|
|
4435
4435
|
data-test-id="select-recurrence"
|
|
4436
|
-
:value=${(0,
|
|
4436
|
+
:value=${(0,B.O)(e=>e.recurrence)}
|
|
4437
4437
|
@change="${e=>e.handleRecurrenceChange()}"
|
|
4438
4438
|
>
|
|
4439
4439
|
${(0,l.when)(e=>e.isMinutesRecurrenceEnabled,l.html`
|
|
4440
|
-
<${e}-option data-test-id="${
|
|
4441
|
-
${
|
|
4440
|
+
<${e}-option data-test-id="${mc.MINUTES}">
|
|
4441
|
+
${mc.MINUTES}
|
|
4442
4442
|
</${e}-option>
|
|
4443
4443
|
`)}
|
|
4444
|
-
<${e}-option data-test-id="${
|
|
4445
|
-
${
|
|
4444
|
+
<${e}-option data-test-id="${mc.HOURLY}">
|
|
4445
|
+
${mc.HOURLY}
|
|
4446
4446
|
</${e}-option>
|
|
4447
|
-
<${e}-option data-test-id="${
|
|
4448
|
-
${
|
|
4447
|
+
<${e}-option data-test-id="${mc.DAILY}">
|
|
4448
|
+
${mc.DAILY}
|
|
4449
4449
|
</${e}-option>
|
|
4450
|
-
<${e}-option data-test-id="${
|
|
4451
|
-
${
|
|
4450
|
+
<${e}-option data-test-id="${mc.WEEKLY}">
|
|
4451
|
+
${mc.WEEKLY}
|
|
4452
4452
|
</${e}-option>
|
|
4453
|
-
<${e}-option data-test-id="${
|
|
4454
|
-
${
|
|
4453
|
+
<${e}-option data-test-id="${mc.MONTHLY}">
|
|
4454
|
+
${mc.MONTHLY}
|
|
4455
4455
|
</${e}-option>
|
|
4456
|
-
<${e}-option data-test-id="${
|
|
4457
|
-
${
|
|
4456
|
+
<${e}-option data-test-id="${mc.YEARLY}">
|
|
4457
|
+
${mc.YEARLY}
|
|
4458
4458
|
</${e}-option>
|
|
4459
4459
|
</${e}-select>
|
|
4460
4460
|
</div>
|
|
4461
4461
|
|
|
4462
4462
|
${(0,l.repeat)(e=>[`${e.recurrence}-${e.during}`],l.html`
|
|
4463
|
-
${(t,i)=>
|
|
4463
|
+
${(t,i)=>su(i.parent.recurrence,e,i.parent)}
|
|
4464
4464
|
`,{recycle:!1})}
|
|
4465
4465
|
</div>
|
|
4466
4466
|
</template>
|
|
4467
|
-
`,
|
|
4468
|
-
${e=>
|
|
4469
|
-
`;class ru extends a.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Lc,buildConfigForHourlyRecurrence:Ac,buildConfigForDailyRecurrence:Rc,buildConfigForWeeklyRecurrence:Fc,buildConfigForMonthlyRecurrence:_c,buildConfigForYearlyRecurrence:Mc},this.recurrence=pc.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:pc.DAILY,weekType:mc.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=Ic)=>{const i=e.trim().split(" ");if(i.length!=Cc)return!1;const[o,n,s,a,r,l]=i;return t(o,0,Sc-1)&&t(n,0,Sc-1)&&t(s,0,$c-1)&&t(a,1,wc,!0)&&t(r,1,yc)&&t(l,0,xc,!0)})(this.cron))return void hc({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},T(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void hc({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 pc.MINUTES:return"Minute(s)";case pc.HOURLY:return"Hour(s)";case pc.DAILY:return"Day(s)";case pc.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case pc.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 pc.HOURLY:return Array.from({length:$c-1},(e,t)=>t+1);case pc.DAILY:return Array.from({length:wc},(e,t)=>t+1);case pc.MONTHLY:case pc.YEARLY:return Array.from({length:yc},(e,t)=>t+1);case pc.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:$c},(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===$c?(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===pc.DAILY&&this.cronConfig.weekType===mc.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(Tc.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Tc.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case pc.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:pc.MINUTES},i),{frequency:s.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.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:pc.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:pc.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:mc.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:pc.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:pc.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:vc.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:pc.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:vc.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:hc({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!==pc.MINUTES&&this.cronConfig.type!==pc.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 pc.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 pc.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 pc.DAILY:this.cron=function(e,t=kc){const i=e.weekType===mc.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===mc.WORK_WEEK?"2-6":"?"}`}(e,kc);break;case pc.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case pc.MONTHLY:this.cron=function(e,t=kc){const{dateOrDay:i,minutes:o,hours:n,seconds:s,frequency:a}=e,r=t(a);return i.type===vc.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,kc);break;case pc.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===vc.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:hc({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!==pc.MINUTES&&e.type!==pc.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==pc.HOURLY&&e.type!==pc.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],ru.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],ru.prototype,"cron",void 0),(0,C.Cg)([l.observable],ru.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],ru.prototype,"frequency",void 0),(0,C.Cg)([l.observable],ru.prototype,"during",void 0),(0,C.Cg)([l.volatile],ru.prototype,"duringOptions",null),(0,C.Cg)([l.observable],ru.prototype,"hours",void 0),(0,C.Cg)([l.observable],ru.prototype,"minutes",void 0),(0,C.Cg)([l.observable],ru.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],ru.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],ru.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],ru.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],ru.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],ru.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],ru.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],ru.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],ru.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],ru.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],ru.prototype,"timezone",void 0);const lu=void 0,du={},cu=ru.compose(Object.assign({baseName:"scheduler-cron-builder",styles:Pc,template:au,shadowOptions:lu},du)),uu=l.css`
|
|
4467
|
+
`,ru=l.html`
|
|
4468
|
+
${e=>au(k(e))}
|
|
4469
|
+
`;class lu extends a.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Nc,buildConfigForHourlyRecurrence:Lc,buildConfigForDailyRecurrence:Ac,buildConfigForWeeklyRecurrence:Fc,buildConfigForMonthlyRecurrence:Pc,buildConfigForYearlyRecurrence:_c},this.recurrence=mc.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:mc.DAILY,weekType:vc.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=Rc)=>{const i=e.trim().split(" ");if(i.length!=xc)return!1;const[o,n,s,a,r,l]=i;return t(o,0,Ec-1)&&t(n,0,Ec-1)&&t(s,0,Sc-1)&&t(a,1,Cc,!0)&&t(r,1,wc)&&t(l,0,$c,!0)})(this.cron))return void pc({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},k(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void pc({title:"Cron Scheduler",body:e,toast:{type:"critical"}},k(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case mc.MINUTES:return"Minute(s)";case mc.HOURLY:return"Hour(s)";case mc.DAILY:return"Day(s)";case mc.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case mc.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 mc.HOURLY:return Array.from({length:Sc-1},(e,t)=>t+1);case mc.DAILY:return Array.from({length:Cc},(e,t)=>t+1);case mc.MONTHLY:case mc.YEARLY:return Array.from({length:wc},(e,t)=>t+1);case mc.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:Sc},(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===Sc?(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===mc.DAILY&&this.cronConfig.weekType===vc.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(kc.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(kc.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case mc.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:mc.MINUTES},i),{frequency:s.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case mc.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:mc.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case mc.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:mc.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:vc.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case mc.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:mc.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case mc.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:mc.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:gc.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case mc.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:mc.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:gc.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:pc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},k(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!==mc.MINUTES&&this.cronConfig.type!==mc.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 mc.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 mc.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 mc.DAILY:this.cron=function(e,t=Dc){const i=e.weekType===vc.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===vc.WORK_WEEK?"2-6":"?"}`}(e,Dc);break;case mc.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case mc.MONTHLY:this.cron=function(e,t=Dc){const{dateOrDay:i,minutes:o,hours:n,seconds:s,frequency:a}=e,r=t(a);return i.type===gc.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,Dc);break;case mc.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===gc.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:pc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},k(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!==mc.MINUTES&&e.type!==mc.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==mc.HOURLY&&e.type!==mc.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],lu.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],lu.prototype,"cron",void 0),(0,C.Cg)([l.observable],lu.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],lu.prototype,"frequency",void 0),(0,C.Cg)([l.observable],lu.prototype,"during",void 0),(0,C.Cg)([l.volatile],lu.prototype,"duringOptions",null),(0,C.Cg)([l.observable],lu.prototype,"hours",void 0),(0,C.Cg)([l.observable],lu.prototype,"minutes",void 0),(0,C.Cg)([l.observable],lu.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],lu.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],lu.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],lu.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],lu.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],lu.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],lu.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],lu.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],lu.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],lu.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],lu.prototype,"timezone",void 0);const du=void 0,cu={},uu=lu.compose(Object.assign({baseName:"scheduler-cron-builder",styles:zc,template:ru,shadowOptions:du},cu)),hu=l.css`
|
|
4470
4470
|
/* Host */
|
|
4471
4471
|
:host {
|
|
4472
4472
|
display: flex;
|
|
@@ -4493,7 +4493,7 @@
|
|
|
4493
4493
|
.timezone-combobox::part(listbox) {
|
|
4494
4494
|
max-height: 20vh;
|
|
4495
4495
|
}
|
|
4496
|
-
`,
|
|
4496
|
+
`,pu=e=>l.html`
|
|
4497
4497
|
<template>
|
|
4498
4498
|
<div class="container">
|
|
4499
4499
|
<label class="label">Time Zone</label>
|
|
@@ -4501,7 +4501,7 @@
|
|
|
4501
4501
|
data-test-id="cron-scheduler-timezone"
|
|
4502
4502
|
autocomplete="both"
|
|
4503
4503
|
class="timezone-combobox"
|
|
4504
|
-
value="${(0,
|
|
4504
|
+
value="${(0,B.O)(e=>e.timezone)}"
|
|
4505
4505
|
>
|
|
4506
4506
|
${(0,l.repeat)(e=>e.timeZones,l.html`
|
|
4507
4507
|
<${e}-option value="${e=>e}">${e=>e}</${e}-option>
|
|
@@ -4509,9 +4509,9 @@
|
|
|
4509
4509
|
</${e}-combobox>
|
|
4510
4510
|
</div>
|
|
4511
4511
|
</template>
|
|
4512
|
-
`,
|
|
4513
|
-
${e=>
|
|
4514
|
-
`;class
|
|
4512
|
+
`,mu=l.html`
|
|
4513
|
+
${e=>pu(k(e))}
|
|
4514
|
+
`;class vu 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){pc({title:"Cron Scheduler",body:"Unable to fetch timezones data.",toast:{type:"critical"}},"rapid"),Ys.v.error(e)}})}}(0,C.Cg)([l.observable],vu.prototype,"timezone",void 0),(0,C.Cg)([hi.dm],vu.prototype,"connect",void 0),(0,C.Cg)([l.observable],vu.prototype,"timeZones",void 0);const gu=void 0,fu={},bu=vu.compose(Object.assign({baseName:"scheduler-timezone",styles:hu,template:mu,shadowOptions:gu},fu)),yu=l.css`
|
|
4515
4515
|
.search-bar-combobox {
|
|
4516
4516
|
width: 100%;
|
|
4517
4517
|
min-width: auto;
|
|
@@ -4587,7 +4587,7 @@
|
|
|
4587
4587
|
.close-icon {
|
|
4588
4588
|
color: var(--accent-fill-rest);
|
|
4589
4589
|
}
|
|
4590
|
-
`,
|
|
4590
|
+
`,wu=(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',Cu=()=>'\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>',xu=e=>l.html`
|
|
4591
4591
|
|
|
4592
4592
|
<label part="label" for="control" data-test-id="label" class=${e=>{var t;return(0,x.x)("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}
|
|
4593
4593
|
>
|
|
@@ -4667,10 +4667,10 @@
|
|
|
4667
4667
|
</${e}-button>
|
|
4668
4668
|
`)}
|
|
4669
4669
|
</${e}-search-bar-combobox>
|
|
4670
|
-
|
|
4671
|
-
${e=>
|
|
4672
|
-
|
|
4673
|
-
${
|
|
4670
|
+
`,$u=l.html`
|
|
4671
|
+
${e=>xu(k(e))}
|
|
4672
|
+
`,Su=10,Eu=3,Ou=1,Tu=(e,t)=>(new Y.b).withExpression((new G.K).withField(e).withValue(t).withSerialiser(j.n.containsIgnoreCase).build()).build();class ku extends a.FoundationElement{constructor(){super(...arguments),this.searchTerm="",this.appearance="neutral",this.minlength=Eu,this.position=Ut.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)},Su)})}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],ku.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],ku.prototype,"options",void 0),(0,C.Cg)([l.observable],ku.prototype,"searchTerm",void 0),(0,C.Cg)([l.attr],ku.prototype,"appearance",void 0),(0,C.Cg)([l.attr],ku.prototype,"minlength",void 0),(0,C.Cg)([l.attr],ku.prototype,"position",void 0),(0,C.Cg)([l.attr],ku.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],ku.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"clear-button",mode:"boolean"})],ku.prototype,"clearButton",void 0),(0,C.Cg)([l.observable],ku.prototype,"loading",void 0),(0,C.Cg)([l.observable],ku.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],ku.prototype,"filteredOptions",void 0);const Du=void 0,Iu={},Ru=ku.compose(Object.assign({baseName:"search-bar",template:$u,styles:yu,shadowOptions:Du},Iu)),Au=(e,t)=>l.css`
|
|
4673
|
+
${wi(e,t)}
|
|
4674
4674
|
.control {
|
|
4675
4675
|
width: auto;
|
|
4676
4676
|
padding-left: calc(${r.designUnit} * 1px);
|
|
@@ -4706,7 +4706,7 @@
|
|
|
4706
4706
|
:host(.input-locked) .selected-value {
|
|
4707
4707
|
display: none;
|
|
4708
4708
|
}
|
|
4709
|
-
`,
|
|
4709
|
+
`,Lu=(e,t)=>l.html`
|
|
4710
4710
|
<template
|
|
4711
4711
|
aria-disabled="${e=>e.ariaDisabled}"
|
|
4712
4712
|
autocomplete="${e=>e.autocomplete}"
|
|
@@ -4758,7 +4758,7 @@
|
|
|
4758
4758
|
></slot>
|
|
4759
4759
|
</div>
|
|
4760
4760
|
</template>
|
|
4761
|
-
`,
|
|
4761
|
+
`,Nu=new Set(["Backspace","Delete","Tab","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]);class Fu extends r.Combobox{constructor(){super(...arguments),this.minlength=Ou,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(!(Nu.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],Fu.prototype,"minlength",void 0),(0,C.Cg)([l.observable],Fu.prototype,"inputLocked",void 0);const Mu={delegatesFocus:!0,mode:"open"},_u={},Pu=Fu.compose(Object.assign({baseName:"search-bar-combobox",template:Lu,styles:Au,shadowOptions:Mu},_u)),Hu=l.css`
|
|
4762
4762
|
:host {
|
|
4763
4763
|
display: block;
|
|
4764
4764
|
width: 100%;
|
|
@@ -4951,8 +4951,8 @@
|
|
|
4951
4951
|
.section-link.state-none {
|
|
4952
4952
|
color: var(--neutral-foreground-rest);
|
|
4953
4953
|
}
|
|
4954
|
-
`,
|
|
4955
|
-
${e=>{return t=
|
|
4954
|
+
`,zu=l.html`
|
|
4955
|
+
${e=>{return t=k(e),l.html`
|
|
4956
4956
|
<template>
|
|
4957
4957
|
<div
|
|
4958
4958
|
class="section-navigator-container"
|
|
@@ -4996,7 +4996,7 @@
|
|
|
4996
4996
|
</div>
|
|
4997
4997
|
</template>
|
|
4998
4998
|
`;var t}}
|
|
4999
|
-
`,zu=(0,it.createLogger)("SectionNavigator"),Uu="section-navigator",Bu={setState:`${Uu}-set-state`,setStates:`${Uu}-set-states`,clearState:`${Uu}-clear-state`,clearAllStates:`${Uu}-clear-all-states`},Vu={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},Gu={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 ju extends a.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=Vu,this.stateIcons=Gu,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 zu.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){zu.error("Error updating spacer:",e)}}else zu.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void zu.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){zu.error("Error scrolling to section:",e)}else zu.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()},ju.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,ju.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){zu.error("Error setting up scroll detection:",e)}else zu.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){zu.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){zu.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){zu.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){zu.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){zu.error("Error handling generic state event:",e)}},this.addEventListener(Bu.setState,this.handleSetStateRef),this.addEventListener(Bu.setStates,this.handleSetStatesRef),this.addEventListener(Bu.clearState,this.handleClearStateRef),this.addEventListener(Bu.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(Bu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Bu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Bu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Bu.clearAllStates,this.handleGenericStateEventRef,!0)):zu.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 zu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void zu.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 zu.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void zu.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 zu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void zu.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 zu.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):zu.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]||"":(zu.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return zu.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]||Gu[e]:(zu.warn("State name is required"),Gu.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(Bu.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(Bu.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(Bu.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(Bu.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(Bu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Bu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Bu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Bu.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}ju.SCROLL_END_TIMEOUT=150,ju.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],ju.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],ju.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],ju.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],ju.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],ju.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],ju.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],ju.prototype,"activeSection",void 0);const Yu={mode:"open"},Wu={},qu=ju.compose(Object.assign({baseName:"foundation-section-navigator",template:Pu,styles:Hu,shadowOptions:Yu},Wu)),Ku=(e,t)=>l.css`
|
|
4999
|
+
`,Uu=(0,ot.createLogger)("SectionNavigator"),Bu="section-navigator",Vu={setState:`${Bu}-set-state`,setStates:`${Bu}-set-states`,clearState:`${Bu}-clear-state`,clearAllStates:`${Bu}-clear-all-states`},ju={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},Gu={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 Yu extends a.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=ju,this.stateIcons=Gu,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 Uu.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){Uu.error("Error updating spacer:",e)}}else Uu.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void Uu.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){Uu.error("Error scrolling to section:",e)}else Uu.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()},Yu.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,Yu.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){Uu.error("Error setting up scroll detection:",e)}else Uu.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){Uu.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){Uu.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){Uu.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){Uu.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){Uu.error("Error handling generic state event:",e)}},this.addEventListener(Vu.setState,this.handleSetStateRef),this.addEventListener(Vu.setStates,this.handleSetStatesRef),this.addEventListener(Vu.clearState,this.handleClearStateRef),this.addEventListener(Vu.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(Vu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Vu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Vu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Vu.clearAllStates,this.handleGenericStateEventRef,!0)):Uu.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 Uu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Uu.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 Uu.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Uu.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 Uu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Uu.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 Uu.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):Uu.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]||"":(Uu.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return Uu.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]||Gu[e]:(Uu.warn("State name is required"),Gu.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(Vu.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(Vu.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(Vu.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(Vu.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(Vu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Vu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Vu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Vu.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}Yu.SCROLL_END_TIMEOUT=150,Yu.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],Yu.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],Yu.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],Yu.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],Yu.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],Yu.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],Yu.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],Yu.prototype,"activeSection",void 0);const Wu={mode:"open"},qu={},Ku=Yu.compose(Object.assign({baseName:"foundation-section-navigator",template:zu,styles:Hu,shadowOptions:Wu},qu)),Xu=(e,t)=>l.css`
|
|
5000
5000
|
${(0,r.radioGroupStyles)(e,t)}
|
|
5001
5001
|
::slotted(foundation-segmented-item:first-of-type) {
|
|
5002
5002
|
border-radius: calc(var(--control-corner-radius) * 1px) 0 0
|
|
@@ -5009,7 +5009,7 @@
|
|
|
5009
5009
|
calc(var(--control-corner-radius) * 1px) 0;
|
|
5010
5010
|
border-left-width: 0;
|
|
5011
5011
|
}
|
|
5012
|
-
`,
|
|
5012
|
+
`,Ju=(e,t)=>(0,a.radioGroupTemplate)(e,t);class Qu extends a.RadioGroup{valueChanged(){void 0===this.value&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}}const Zu=void 0,eh={},th=Qu.compose(Object.assign({baseName:"segmented-control",template:Ju,styles:Xu,shadowOptions:Zu},eh)),ih=(e,t)=>l.css`
|
|
5013
5013
|
${(0,r.radioStyles)(e,t)}
|
|
5014
5014
|
:host {
|
|
5015
5015
|
padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
|
|
@@ -5020,7 +5020,7 @@
|
|
|
5020
5020
|
:host([aria-checked='true']) {
|
|
5021
5021
|
background: var(--accent-foreground-rest);
|
|
5022
5022
|
}
|
|
5023
|
-
`,
|
|
5023
|
+
`,oh=(e,t)=>l.html`
|
|
5024
5024
|
<template
|
|
5025
5025
|
role="radio"
|
|
5026
5026
|
aria-checked="${e=>e.checked}"
|
|
@@ -5034,7 +5034,7 @@
|
|
|
5034
5034
|
<slot></slot>
|
|
5035
5035
|
</span>
|
|
5036
5036
|
</template>
|
|
5037
|
-
`;class
|
|
5037
|
+
`;class nh extends r.Radio{}const sh=void 0,ah={},rh=nh.compose(Object.assign({baseName:"segmented-item",template:oh,styles:ih,shadowOptions:sh},ah)),lh=(e,t)=>l.css`
|
|
5038
5038
|
${(0,r.selectStyles)(e,t)}
|
|
5039
5039
|
|
|
5040
5040
|
:host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible),
|
|
@@ -5042,19 +5042,19 @@
|
|
|
5042
5042
|
box-shadow: none;
|
|
5043
5043
|
outline: none;
|
|
5044
5044
|
}
|
|
5045
|
-
`,
|
|
5045
|
+
`,dh=(e,t)=>(0,a.selectTemplate)(e,t);class ch 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 uh=void 0,hh={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 '},ph=ch.compose(Object.assign({baseName:"select",template:dh,styles:lh,shadowOptions:uh},hh)),mh=(e,t)=>l.css`
|
|
5046
5046
|
${(0,r.skeletonStyles)(e,t)}
|
|
5047
|
-
`,
|
|
5047
|
+
`,vh=(e,t)=>(0,a.skeletonTemplate)(e,t);class gh extends r.Skeleton{}const fh=void 0,bh={},yh=gh.compose(Object.assign({baseName:"skeleton",template:vh,styles:mh,shadowOptions:fh},bh)),wh=(e,t)=>l.css`
|
|
5048
5048
|
${(0,r.sliderStyles)(e,t)}
|
|
5049
5049
|
.track-progress {
|
|
5050
5050
|
background-color: var(--accent-fill-rest);
|
|
5051
5051
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
5052
5052
|
}
|
|
5053
|
-
`;var
|
|
5053
|
+
`;var Ch=i(17733),xh=i(54120);const $h=(e,t)=>l.html`
|
|
5054
5054
|
<template
|
|
5055
5055
|
role="slider"
|
|
5056
5056
|
class="${e=>e.readOnly?"readonly":""}
|
|
5057
|
-
${e=>e.orientation||
|
|
5057
|
+
${e=>e.orientation||Ch.t.horizontal}"
|
|
5058
5058
|
tabindex="${e=>e.disabled?null:0}"
|
|
5059
5059
|
aria-valuetext="${e=>e.valueTextFormatter(e.value)}"
|
|
5060
5060
|
aria-valuenow="${e=>e.value}"
|
|
@@ -5069,7 +5069,7 @@
|
|
|
5069
5069
|
<div ${(0,l.ref)("track")} part="track-container" class="track">
|
|
5070
5070
|
<div
|
|
5071
5071
|
class="track-progress"
|
|
5072
|
-
style="${e=>{const t=1-(0,
|
|
5072
|
+
style="${e=>{const t=1-(0,xh.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;`}}"
|
|
5073
5073
|
></div>
|
|
5074
5074
|
</div>
|
|
5075
5075
|
<slot></slot>
|
|
@@ -5083,9 +5083,9 @@
|
|
|
5083
5083
|
</div>
|
|
5084
5084
|
</div>
|
|
5085
5085
|
</template>
|
|
5086
|
-
`;class
|
|
5086
|
+
`;class Sh extends r.Slider{}const Eh=void 0,Oh={thumb:'\n <div class="thumb-cursor"></div>\n '},Th=Sh.compose(Object.assign({baseName:"slider",template:$h,styles:wh,shadowOptions:Eh},Oh)),kh=(e,t)=>l.css`
|
|
5087
5087
|
${(0,r.sliderLabelStyles)(e,t)}
|
|
5088
|
-
`,
|
|
5088
|
+
`,Dh=(e,t)=>(0,a.sliderLabelTemplate)(e,t);class Ih extends r.SliderLabel{}const Rh=void 0,Ah={},Lh=Ih.compose(Object.assign({baseName:"slider-label",template:Dh,styles:kh,shadowOptions:Rh},Ah)),Nh="default",Fh={DEFAULT:Nh,ERROR:"error",SUCCESS:"success"},Mh=1e4,_h={DISMISS:"dismiss",AUTO_DISMISS:"autoDismiss"},Ph=l.css`
|
|
5089
5089
|
@keyframes append-from-left-animate {
|
|
5090
5090
|
from {
|
|
5091
5091
|
transform: translateX(100%);
|
|
@@ -5235,10 +5235,10 @@
|
|
|
5235
5235
|
</div>
|
|
5236
5236
|
`)}
|
|
5237
5237
|
</div>
|
|
5238
|
-
`,
|
|
5239
|
-
${e=>Hh(
|
|
5240
|
-
`,
|
|
5241
|
-
${
|
|
5238
|
+
`,zh=l.html`
|
|
5239
|
+
${e=>Hh(k(e))}
|
|
5240
|
+
`,Uh={mode:"open",delegatesFocus:!0};class Bh extends a.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=Mh,this.autoClose=!0,this.type=Nh,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(_h.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:Nh}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:Nh,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:Mh}handleDissmis(e=!1){this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(_h.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(_h.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}}(0,C.Cg)([l.observable],Bh.prototype,"error",void 0),(0,C.Cg)([l.observable],Bh.prototype,"notification",void 0),(0,C.Cg)([l.observable],Bh.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"identifier"})],Bh.prototype,"identifier",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],Bh.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Bh.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],Bh.prototype,"type",void 0);const Vh=Bh.compose({baseName:"snackbar",styles:Ph,template:zh,shadowOptions:Uh}),jh=(e,t)=>l.css`
|
|
5241
|
+
${Cr()}
|
|
5242
5242
|
|
|
5243
5243
|
.fa-stack {
|
|
5244
5244
|
display: inline-block;
|
|
@@ -5270,7 +5270,7 @@
|
|
|
5270
5270
|
>
|
|
5271
5271
|
<slot></slot>
|
|
5272
5272
|
</span>
|
|
5273
|
-
`;class
|
|
5273
|
+
`;class Yh extends a.FoundationElement{constructor(){super(...arguments),this.size=kr,this["vertical-align"]="baseline"}}(0,C.Cg)([l.attr],Yh.prototype,"size",void 0),(0,C.Cg)([l.attr],Yh.prototype,"vertical-align",void 0);const Wh=Yh.compose({baseName:"stacking-icons",template:Gh,styles:jh}),qh=l.css`
|
|
5274
5274
|
.status-pill {
|
|
5275
5275
|
font-size: var(--ag-data-font-size);
|
|
5276
5276
|
display: inline-flex;
|
|
@@ -5305,8 +5305,8 @@
|
|
|
5305
5305
|
.status-pill-image {
|
|
5306
5306
|
height: 14px;
|
|
5307
5307
|
}
|
|
5308
|
-
`,
|
|
5309
|
-
${e=>{return t=
|
|
5308
|
+
`,Kh=l.html`
|
|
5309
|
+
${e=>{return t=k(e),l.html`
|
|
5310
5310
|
${(0,l.when)(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),l.html`
|
|
5311
5311
|
<div
|
|
5312
5312
|
data-test-id="status-pill"
|
|
@@ -5336,7 +5336,7 @@
|
|
|
5336
5336
|
</div>
|
|
5337
5337
|
`)}
|
|
5338
5338
|
`;var t}}
|
|
5339
|
-
`,
|
|
5339
|
+
`,Xh=(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 Jh 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)))nt.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=Xh(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"})],Jh.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],Jh.prototype,"iconName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-src"})],Jh.prototype,"iconSrc",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial"})],Jh.prototype,"iconInitial",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial-background-color"})],Jh.prototype,"iconInitialBackgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],Jh.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],Jh.prototype,"textColor",void 0),(0,C.Cg)([l.attr],Jh.prototype,"text",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown"})],Jh.prototype,"dateCountdown",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-completed-message"})],Jh.prototype,"dateCountdownCompletedMessage",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-unit"})],Jh.prototype,"dateCountdownUnit",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-visible-after"})],Jh.prototype,"dateCountdownVisibleAfter",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"hide-when-countdown-completed"})],Jh.prototype,"hideWhenCountdownCompleted",void 0),(0,C.Cg)([l.observable],Jh.prototype,"countdown",void 0),(0,C.Cg)([l.observable],Jh.prototype,"isCountdownExpired",void 0),(0,C.Cg)([l.observable],Jh.prototype,"isCountdownVisible",void 0);const Qh=Jh.compose({baseName:"status-pill",styles:qh,template:Kh}),Zh=(e,t)=>l.css`
|
|
5340
5340
|
.tree-item {
|
|
5341
5341
|
cursor: default;
|
|
5342
5342
|
}
|
|
@@ -5446,8 +5446,8 @@
|
|
|
5446
5446
|
width: calc(100% - 28px);
|
|
5447
5447
|
background-color: var(--accent-fill-rest); /* Choose a color */
|
|
5448
5448
|
}
|
|
5449
|
-
`,
|
|
5450
|
-
${(0,
|
|
5449
|
+
`,ep=e=>l.html`
|
|
5450
|
+
${(0,On.q)(e=>e.orientation===a.TabsOrientation.vertical,l.html`
|
|
5451
5451
|
<${e}-tree-item ${(0,l.ref)("treeItem")}
|
|
5452
5452
|
class=${e=>(0,x.x)("tree-item",["cursor-pointer",e.showCursorPointer])}
|
|
5453
5453
|
@click="${(e,t)=>e.$emit("tab-clicked",e.tabPosition-1)}">
|
|
@@ -5490,13 +5490,13 @@
|
|
|
5490
5490
|
`)}
|
|
5491
5491
|
</div>
|
|
5492
5492
|
`)}
|
|
5493
|
-
`,
|
|
5494
|
-
${e=>
|
|
5495
|
-
`;class
|
|
5493
|
+
`,tp=l.html`
|
|
5494
|
+
${e=>ep(k(e))}
|
|
5495
|
+
`;class ip 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],ip.prototype,"slot",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ip.prototype,"selected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ip.prototype,"completed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ip.prototype,"error",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ip.prototype,"isLast",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ip.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ip.prototype,"showCursorPointer",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tab-position"})],ip.prototype,"tabPosition",void 0),(0,C.Cg)([l.attr],ip.prototype,"orientation",void 0);const op=void 0,np={},sp=ip.compose(Object.assign({baseName:"stepper-tab",template:tp,styles:Zh,shadowOptions:op},np)),ap=()=>l.html`
|
|
5496
5496
|
<template slot="tab-panel" role="stepper-tab-panel">
|
|
5497
5497
|
<slot></slot>
|
|
5498
5498
|
</template>
|
|
5499
|
-
`;class
|
|
5499
|
+
`;class rp extends a.FoundationElement{}const lp=void 0,dp={},cp=rp.compose(Object.assign({baseName:"stepper-tab-panel",template:ap,shadowOptions:lp},dp)),up=(e,t)=>l.css`
|
|
5500
5500
|
${(0,r.switchStyles)(e,t)}
|
|
5501
5501
|
.checked-indicator {
|
|
5502
5502
|
transform: scale(1.3);
|
|
@@ -5509,20 +5509,20 @@
|
|
|
5509
5509
|
.checked-indicator {
|
|
5510
5510
|
border-radius: calc(var(--control-corner-radius) * 2px);
|
|
5511
5511
|
}
|
|
5512
|
-
`,
|
|
5512
|
+
`,hp=(e,t)=>(0,a.switchTemplate)(e,t);class pp extends r.Switch{}const mp=void 0,vp={switch:'<div class="checked-indicator" part="checked-indicator"></div>'},gp=pp.compose(Object.assign({baseName:"switch",template:hp,styles:up,shadowOptions:mp},vp)),fp="--alert-flash-t",bp="--alert-flash-duration",yp="alert-flash-clock";let wp=!1;function Cp(){var e;if(!wp&&"undefined"!=typeof document){wp=!0;try{CSS.registerProperty({name:fp,syntax:"<number>",inherits:!0,initialValue:"0"});const t=new CSSStyleSheet;t.replaceSync(`\n @keyframes ${yp} {\n 0%, 100% { ${fp}: 0; }\n 50% { ${fp}: 1; }\n }\n\n :root {\n animation: ${yp} var(${bp}, 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 xp=(e,t)=>l.css`
|
|
5513
5513
|
${(0,r.tabStyles)(e,t)}
|
|
5514
5514
|
|
|
5515
5515
|
:host {
|
|
5516
5516
|
user-select: none;
|
|
5517
5517
|
}
|
|
5518
|
-
|
|
5518
|
+
`,$p=(e,t)=>(0,a.tabTemplate)(e,t);class Sp extends r.Tab{constructor(){super(...arguments),this.alert=!1}alertChanged(){this.alert&&Cp()}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Sp.prototype,"alert",void 0);const Ep=void 0,Op={},Tp=Sp.compose(Object.assign({baseName:"tab",template:$p,styles:xp,shadowOptions:Ep},Op)),kp=(e,t)=>l.css`
|
|
5519
5519
|
${(0,r.tabPanelStyles)(e,t)}
|
|
5520
5520
|
|
|
5521
5521
|
:host {
|
|
5522
5522
|
height: 100%;
|
|
5523
5523
|
padding: 0;
|
|
5524
5524
|
}
|
|
5525
|
-
`,
|
|
5525
|
+
`,Dp=(e,t)=>(0,a.tabPanelTemplate)(e,t);class Ip extends r.TabPanel{}const Rp=void 0,Ap={},Lp=Ip.compose(Object.assign({baseName:"tab-panel",template:Dp,styles:kp,shadowOptions:Rp},Ap)),Np=(e,t)=>l.css`
|
|
5526
5526
|
${(0,r.tabsStyles)(e,t)}
|
|
5527
5527
|
|
|
5528
5528
|
:host {
|
|
@@ -5539,20 +5539,20 @@
|
|
|
5539
5539
|
:host([scrollable]) ::slotted([role='tab']) {
|
|
5540
5540
|
flex: 0 0 auto;
|
|
5541
5541
|
}
|
|
5542
|
-
`,Fp=(e,t)=>(0,a.tabsTemplate)(e,t);class
|
|
5542
|
+
`,Fp=(e,t)=>(0,a.tabsTemplate)(e,t);class Mp extends r.Tabs{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Mp.prototype,"scrollable",void 0);const _p=void 0,Pp={},Hp=Mp.compose(Object.assign({baseName:"tabs",template:Fp,styles:Np,shadowOptions:_p},Pp)),zp=(e,t)=>l.css`
|
|
5543
5543
|
${(0,r.textAreaStyles)(e,t)}
|
|
5544
5544
|
:host .control {
|
|
5545
5545
|
padding: calc(var(--design-unit) * 3px);
|
|
5546
5546
|
}
|
|
5547
|
-
`,
|
|
5547
|
+
`,Up=(e,t)=>(0,a.textAreaTemplate)(e,t);class Bp extends r.TextArea{}const Vp=void 0,jp={},Gp=Bp.compose(Object.assign({baseName:"text-area",template:Up,styles:zp,shadowOptions:Vp},jp)),{create:Yp}=a.DesignToken,Wp=Yp("active-color-scheme").withDefault(e=>r.baseLayerLuminance.getValueFor(e)===r.StandardLuminance.LightMode?"light":"dark"),qp=(e,t)=>l.css`
|
|
5548
5548
|
${(0,r.textFieldStyles)(e,t)}
|
|
5549
5549
|
/* Override FAST .root align-items: baseline for this flex child so it still fills the row. */
|
|
5550
|
-
${
|
|
5550
|
+
${xl}
|
|
5551
5551
|
|
|
5552
5552
|
input {
|
|
5553
|
-
color-scheme: ${
|
|
5553
|
+
color-scheme: ${Wp};
|
|
5554
5554
|
}
|
|
5555
|
-
`,
|
|
5555
|
+
`,Kp=(e,t)=>l.html`
|
|
5556
5556
|
<template
|
|
5557
5557
|
class="${e=>(0,x.x)(["readonly",e.readOnly],["has-prefix",!!e.prefix],["has-suffix",!!e.suffix])}"
|
|
5558
5558
|
>
|
|
@@ -5634,7 +5634,7 @@
|
|
|
5634
5634
|
${(0,a.endSlotTemplate)(e,t)}
|
|
5635
5635
|
</div>
|
|
5636
5636
|
</template>
|
|
5637
|
-
`;class
|
|
5637
|
+
`;class Xp extends(Cl(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],Xp.prototype,"autocomplete",void 0),(0,C.Cg)([l.attr],Xp.prototype,"autocapitalize",void 0),(0,C.Cg)([l.attr],Xp.prototype,"step",void 0);const Jp={mode:"open",delegatesFocus:!0},Qp={},Zp=Xp.compose(Object.assign({baseName:"text-field",template:Kp,styles:qp,shadowOptions:Jp},Qp)),em=l.css`
|
|
5638
5638
|
@keyframes append-animate {
|
|
5639
5639
|
from {
|
|
5640
5640
|
transform: translateX(100%);
|
|
@@ -5745,7 +5745,7 @@
|
|
|
5745
5745
|
margin-left: auto;
|
|
5746
5746
|
color: #879ba6;
|
|
5747
5747
|
}
|
|
5748
|
-
`,
|
|
5748
|
+
`,tm=(e="zero")=>l.html`
|
|
5749
5749
|
<div
|
|
5750
5750
|
role="alert"
|
|
5751
5751
|
part="root"
|
|
@@ -5772,13 +5772,13 @@
|
|
|
5772
5772
|
</div>
|
|
5773
5773
|
</div>
|
|
5774
5774
|
</div>
|
|
5775
|
-
`,
|
|
5776
|
-
${e=>
|
|
5777
|
-
`,
|
|
5775
|
+
`,im=l.html`
|
|
5776
|
+
${e=>tm(k(e))}
|
|
5777
|
+
`,om={mode:"open",delegatesFocus:!0},nm={};class sm 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],sm.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],sm.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close"})],sm.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"notification-icon"})],sm.prototype,"notificationIcon",void 0);const am=sm.compose(Object.assign({baseName:"toast",styles:em,template:im,shadowOptions:om},nm)),rm=(e,t)=>l.css`
|
|
5778
5778
|
${(0,r.toolbarStyles)(e,t)}
|
|
5779
|
-
`,
|
|
5779
|
+
`,lm=(e,t)=>(0,a.toolbarTemplate)(e,t);class dm extends r.Toolbar{}const cm=void 0,um={},hm=dm.compose(Object.assign({baseName:"toolbar",template:lm,styles:rm,shadowOptions:cm},um)),pm=(e,t)=>l.css`
|
|
5780
5780
|
${(0,r.tooltipStyles)(e,t)}
|
|
5781
|
-
`,
|
|
5781
|
+
`,mm=(e,t)=>(0,a.tooltipTemplate)(e,t);class vm extends r.Tooltip{}const gm=void 0,fm={},bm=vm.compose(Object.assign({baseName:"tooltip",template:mm,styles:pm,shadowOptions:gm},fm)),ym=(e,t)=>l.css`
|
|
5782
5782
|
${(0,r.treeItemStyles)(e,t)}
|
|
5783
5783
|
:host {
|
|
5784
5784
|
--focus-stroke-width: 0;
|
|
@@ -5795,9 +5795,9 @@
|
|
|
5795
5795
|
.positioning-region {
|
|
5796
5796
|
height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);
|
|
5797
5797
|
}
|
|
5798
|
-
`,
|
|
5798
|
+
`,wm=(e,t)=>(0,a.treeItemTemplate)(e,t);class Cm extends r.TreeItem{}const xm=void 0,$m={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>'},Sm=Cm.compose(Object.assign({baseName:"tree-item",template:wm,styles:ym,shadowOptions:xm},$m)),Em=(e,t)=>l.css`
|
|
5799
5799
|
${(0,r.treeViewStyles)(e,t)}
|
|
5800
|
-
`,
|
|
5800
|
+
`,Om=(e,t)=>(0,a.treeViewTemplate)(e,t);class Tm extends a.TreeView{}const km=void 0,Dm={},Im=Tm.compose(Object.assign({baseName:"tree-view",template:Om,styles:Em,shadowOptions:km},Dm)),Rm=(e,t)=>l.css`
|
|
5801
5801
|
.container {
|
|
5802
5802
|
position: relative;
|
|
5803
5803
|
width: 100%;
|
|
@@ -5817,7 +5817,7 @@
|
|
|
5817
5817
|
overflow: hidden;
|
|
5818
5818
|
text-overflow: ellipsis;
|
|
5819
5819
|
}
|
|
5820
|
-
`,
|
|
5820
|
+
`,Am=e=>l.html`
|
|
5821
5821
|
<div class="container" value=${e=>e.value}>
|
|
5822
5822
|
<${e}-text-field
|
|
5823
5823
|
class="url-input"
|
|
@@ -5832,9 +5832,9 @@
|
|
|
5832
5832
|
<a class="url-input-link" href=${e=>e.value} target="_blank">${e=>e.value}</a>
|
|
5833
5833
|
`)}
|
|
5834
5834
|
</div>
|
|
5835
|
-
`,
|
|
5836
|
-
${e=>
|
|
5837
|
-
`,
|
|
5835
|
+
`,Lm=l.html`
|
|
5836
|
+
${e=>Am(k(e))}
|
|
5837
|
+
`,Nm=void 0,Fm={};class Mm 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],Mm.prototype,"value",void 0),(0,C.Cg)([l.observable],Mm.prototype,"focused",void 0);const _m=Mm.compose(Object.assign({baseName:"url-input",template:Lm,styles:Rm,shadowOptions:Nm},Fm)),Pm=l.css`
|
|
5838
5838
|
:host {
|
|
5839
5839
|
display: block;
|
|
5840
5840
|
font-family: var(--body-font);
|
|
@@ -5903,7 +5903,7 @@
|
|
|
5903
5903
|
line-height: var(--type-ramp-base-line-height);
|
|
5904
5904
|
text-align: center;
|
|
5905
5905
|
outline: none;
|
|
5906
|
-
color-scheme: ${
|
|
5906
|
+
color-scheme: ${Wp};
|
|
5907
5907
|
}
|
|
5908
5908
|
|
|
5909
5909
|
.digit[appearance='filled'] .root {
|
|
@@ -5937,7 +5937,7 @@
|
|
|
5937
5937
|
background: var(--neutral-fill-hover);
|
|
5938
5938
|
}
|
|
5939
5939
|
|
|
5940
|
-
${
|
|
5940
|
+
${xl}
|
|
5941
5941
|
`,Hm=l.html`
|
|
5942
5942
|
<label
|
|
5943
5943
|
part="label"
|
|
@@ -5986,7 +5986,119 @@
|
|
|
5986
5986
|
</div>
|
|
5987
5987
|
`)}
|
|
5988
5988
|
</div>
|
|
5989
|
-
`,Pm={mode:"open",delegatesFocus:!0},zm={},Um=/^\d$/;class Bm extends a.FoundationElement{}class Vm extends((0,a.FormAssociated)(Bm)){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(Um.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&&!Um.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=>Um.test(e))}emitChange(){this.$emit("change",{value:this.value})}}(0,C.Cg)([l.observable],Vm.prototype,"values",void 0),(0,C.Cg)([l.observable],Vm.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.attr],Vm.prototype,"id",void 0),(0,C.Cg)([l.attr],Vm.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Vm.prototype,"digits",void 0),(0,C.Cg)([(0,l.attr)({attribute:"readonly",mode:"boolean"})],Vm.prototype,"readOnly",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vm.prototype,"autofocus",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vm.prototype,"error",void 0);const Gm=Vm.compose(Object.assign({baseName:"verification-code-input",template:Hm,styles:_m,shadowOptions:Pm},zm)),jm={foundationAccordion:m,foundationAiCriteriaSearch:Oe,foundationAiIndicator:Ie,foundationAccordionItem:w,foundationActionsMenu:A,foundationAnchor:Me,foundationAnchoredRegion:Be,foundationAvatar:Ke,foundationBadge:tt,foundationBanner:dt,foundationBreadcrumb:vt,foundationBreadcrumbItem:Ct,foundationButton:Tt,foundationCalendar:Lt,foundationCard:Pt,foundationCategorizedMultiselect:qt,foundationCheckbox:ei,foundationCombobox:Oi,foundationConnectionIndicator:Ri,foundationDataGrid:_i,foundationDataGridCell:Bi,foundationDataGridRow:Wi,foundationDatePicker:Eo,foundationDesignSystemProvider:xn,foundationDialog:Ln,foundationDisclosure:Pn,foundationDivider:jn,foundationDropdownMenu:Qn,foundationErrorBanner:fs,foundationErrorBoundary:Rs,foundationErrorDialog:_s,foundationFileReader:Gs,foundationFileUpload:aa,foundationFilter:fa,foundationFilterBar:Oa,foundationFlexLayout:Fa,foundationFlipper:za,foundationFlyout:qa,foundationGridLayout:or,foundationGridLayoutItem:lr,foundationHorizontalScroll:mr,foundationIcon:Ir,foundationListbox:Mr,foundationListboxOption:Br,foundationMenu:qr,foundationMenuItem:el,foundationModal:al,foundationMultiselect:vl,foundationNumberField:Bl,foundationOptgroup:Yl,foundationPill:Fd,foundationPopper:zd,foundationProgress:fd,foundationProgressRing:Yd,foundationRadio:Qd,foundationRadioGroup:nc,foundationScheduler:uc,foundationSchedulerCronBuilder:cu,foundationSchedulerTimezone:fu,foundationSearchBar:Iu,foundationSearchBarCombobox:_u,foundationSegmentedControl:eh,foundationSegmentedItem:ah,foundationSelect:hh,foundationSkeleton:bh,foundationSlider:Oh,foundationSliderLabel:Ah,foundationSnackbar:Bh,foundationStackingIcons:Yh,foundationStatusPill:Jh,foundationEnvironmentIndicator:hs,foundationStepperTab:np,foundationStepperTabPanel:dp,foundationSwitch:vp,foundationSystemHealthOverlay:Td,foundationTab:Op,foundationTabPanel:Ap,foundationTabs:Hp,foundationTextArea:Gp,foundationTextField:Qp,foundationToast:sm,foundationToolbar:um,foundationTooltip:fm,foundationTreeItem:$m,foundationTreeView:Dm,foundationUrlInput:Mm,foundationVerificationCodeInput:Gm,foundationSectionNavigator:qu,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Ym 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 Wm=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.")}};Wm=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],Wm);const qm=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],Km=[...qm,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],Xm={type:"NULL",maxRules:1,invisible:!0},Jm=["int","short","long","bigdecimal","double"],Qm=["date","date-time"],Zm=["enum",...Jm,"string",...Qm,"boolean"],ev=[{type:"equal",nbInputs:1,applyTo:Zm,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:Zm,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...Jm,...Qm],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...Jm,...Qm],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:[...Zm].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...Zm].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...Jm,...Qm],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...Jm,...Qm],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...Zm],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...Zm],optgroup:"Null"}];var tv=i(93678);const iv=i.n(tv)()();function ov(e,t,i){const o=function e(o){const n=iv(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 nv(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 sv(e,t){const i=nv(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 av(e,t){const i=nv(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 rv(e,t,i){return ov(e,t,e=>[...e,i])}const lv="group-root";function dv(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:lv,children:e.children.map(e=>i(e,2))})}function cv(e){const t=e.children.map(e=>"children"in e?cv(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 uv=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,hv=e=>`${uv(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,pv=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},mv=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},vv=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 gv(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 fv;!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"}(fv||(fv={}));const bv=l.css`
|
|
5989
|
+
`,zm={mode:"open",delegatesFocus:!0},Um={},Bm=/^\d$/;class Vm extends a.FoundationElement{}class jm extends((0,a.FormAssociated)(Vm)){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(Bm.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&&!Bm.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=>Bm.test(e))}emitChange(){this.$emit("change",{value:this.value})}}(0,C.Cg)([l.observable],jm.prototype,"values",void 0),(0,C.Cg)([l.observable],jm.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.attr],jm.prototype,"id",void 0),(0,C.Cg)([l.attr],jm.prototype,"appearance",void 0),(0,C.Cg)([l.attr],jm.prototype,"digits",void 0),(0,C.Cg)([(0,l.attr)({attribute:"readonly",mode:"boolean"})],jm.prototype,"readOnly",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],jm.prototype,"autofocus",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],jm.prototype,"error",void 0);const Gm=jm.compose(Object.assign({baseName:"verification-code-input",template:Hm,styles:Pm,shadowOptions:zm},Um)),Ym=(e,t)=>l.css`
|
|
5990
|
+
:host {
|
|
5991
|
+
--menu-opener-size-multiplier: 0.7px;
|
|
5992
|
+
}
|
|
5993
|
+
|
|
5994
|
+
.vertical-dropdown-menu-container {
|
|
5995
|
+
align-items: center;
|
|
5996
|
+
display: flex;
|
|
5997
|
+
height: 100%;
|
|
5998
|
+
justify-content: center;
|
|
5999
|
+
}
|
|
6000
|
+
|
|
6001
|
+
.menu-opener {
|
|
6002
|
+
align-items: center;
|
|
6003
|
+
align-self: center;
|
|
6004
|
+
display: flex;
|
|
6005
|
+
justify-content: center;
|
|
6006
|
+
padding: 0;
|
|
6007
|
+
height: calc(
|
|
6008
|
+
(var(--base-height-multiplier) + var(--density)) * var(--design-unit) *
|
|
6009
|
+
var(--menu-opener-size-multiplier)
|
|
6010
|
+
);
|
|
6011
|
+
width: calc(
|
|
6012
|
+
(var(--base-height-multiplier) + var(--density)) * var(--design-unit) *
|
|
6013
|
+
var(--menu-opener-size-multiplier)
|
|
6014
|
+
);
|
|
6015
|
+
}
|
|
6016
|
+
|
|
6017
|
+
.dropdown-menu {
|
|
6018
|
+
margin: 0;
|
|
6019
|
+
max-width: 350px;
|
|
6020
|
+
overflow-y: auto;
|
|
6021
|
+
}
|
|
6022
|
+
|
|
6023
|
+
foundation-menu-item {
|
|
6024
|
+
display: flex;
|
|
6025
|
+
user-select: none;
|
|
6026
|
+
}
|
|
6027
|
+
|
|
6028
|
+
foundation-menu-item::part(content) {
|
|
6029
|
+
margin-inline: 10px;
|
|
6030
|
+
}
|
|
6031
|
+
|
|
6032
|
+
foundation-menu-item[disabled] {
|
|
6033
|
+
pointer-events: none;
|
|
6034
|
+
}
|
|
6035
|
+
|
|
6036
|
+
.menu-item {
|
|
6037
|
+
flex: 1;
|
|
6038
|
+
}
|
|
6039
|
+
`,Wm=(e,t)=>l.css`
|
|
6040
|
+
${Ym(e,t)}
|
|
6041
|
+
`,qm=e=>l.html`
|
|
6042
|
+
<${e}-button
|
|
6043
|
+
${(0,l.ref)("menuOpener")}
|
|
6044
|
+
class="menu-opener${e=>e.open?" opened":""}"
|
|
6045
|
+
appearance="${e=>e.buttonAppearance}"
|
|
6046
|
+
part="menu-opener"
|
|
6047
|
+
aria-label="More actions"
|
|
6048
|
+
@click=${e=>e.toggleVisibility()}
|
|
6049
|
+
>
|
|
6050
|
+
<${e}-icon name="${e=>e.iconName}"></${e}-icon>
|
|
6051
|
+
</${e}-button>
|
|
6052
|
+
<${e}-menu
|
|
6053
|
+
${(0,l.ref)("dropdownMenu")}
|
|
6054
|
+
popover="auto"
|
|
6055
|
+
class="dropdown-menu ${e=>e.classNames}"
|
|
6056
|
+
part="dropdown-menu"
|
|
6057
|
+
@toggle=${(e,t)=>e.onPopoverToggle(t.event)}
|
|
6058
|
+
>
|
|
6059
|
+
${(0,l.repeat)(e=>e.visibleItems,l.html`
|
|
6060
|
+
${(0,l.when)((e,t)=>e.isDisabled&&e.isDisabled(t.parent.rowData),l.html`
|
|
6061
|
+
<${e}-menu-item
|
|
6062
|
+
class="menu-item"
|
|
6063
|
+
tabindex="${(e,t)=>t.index}"
|
|
6064
|
+
disabled
|
|
6065
|
+
>
|
|
6066
|
+
${(0,l.when)(e=>e.icon,l.html`
|
|
6067
|
+
<${e}-icon
|
|
6068
|
+
name=${e=>e.icon.name}
|
|
6069
|
+
size=${e=>e.icon.size}
|
|
6070
|
+
variant=${e=>e.icon.variant}
|
|
6071
|
+
slot="start"
|
|
6072
|
+
></${e}-icon>
|
|
6073
|
+
`)}
|
|
6074
|
+
${(e,t)=>t.parent.getLabel(e.label)}
|
|
6075
|
+
</${e}-menu-item>
|
|
6076
|
+
`)}
|
|
6077
|
+
${(0,l.when)((e,t)=>!e.isDisabled||!e.isDisabled(t.parent.rowData),l.html`
|
|
6078
|
+
<${e}-menu-item
|
|
6079
|
+
class="menu-item"
|
|
6080
|
+
tabindex="${(e,t)=>t.index}"
|
|
6081
|
+
@click=${(e,t)=>t.parent.onItemClick(e.callback)}
|
|
6082
|
+
style="${e=>e.color?`color: ${e.color};`:""}"
|
|
6083
|
+
>
|
|
6084
|
+
${(0,l.when)(e=>e.icon,l.html`
|
|
6085
|
+
<${e}-icon
|
|
6086
|
+
name=${e=>e.icon.name}
|
|
6087
|
+
size=${e=>e.icon.size}
|
|
6088
|
+
variant=${e=>e.icon.variant}
|
|
6089
|
+
slot="start"
|
|
6090
|
+
></${e}-icon>
|
|
6091
|
+
`)}
|
|
6092
|
+
${(e,t)=>t.parent.getLabel(e.label)}
|
|
6093
|
+
</${e}-menu-item>
|
|
6094
|
+
`)}
|
|
6095
|
+
`,{positioning:!0})}
|
|
6096
|
+
</${e}-menu>
|
|
6097
|
+
`,Km=l.html`
|
|
6098
|
+
<div class="vertical-dropdown-menu-container" part="vertical-dropdown-menu-container">
|
|
6099
|
+
${e=>e.getTemplate(k(e))}
|
|
6100
|
+
</div>
|
|
6101
|
+
`;class Xm extends a.FoundationElement{constructor(){super(...arguments),this.open=!1,this.iconName="ellipsis-vertical",this.autoCloseOnAction=!0,this.hideDisabled=!1}disconnectedCallback(){var e;this.stopTrackingPosition(),(null===(e=this.dropdownMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.dropdownMenu.hidePopover(),super.disconnectedCallback()}definitionChanged(e,t){var i;t&&(this.items=null!==(i=t.items)&&void 0!==i?i:[],delete this.definition.items,t.iconName&&(this.iconName=t.iconName,delete this.definition.iconName),t.buttonAppearance&&(this.buttonAppearance=t.buttonAppearance,delete this.definition.buttonAppearance))}openChanged(){var e;this.classNames=(0,x.x)(["visible",this.open],["hidden",!this.open]),this.open?(this.updateMenuPosition(),this.dropdownMenu.showPopover(),this.startTrackingPosition()):(this.stopTrackingPosition(),(null===(e=this.dropdownMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.dropdownMenu.hidePopover())}updateMenuPosition(){const e=this.menuOpener.getBoundingClientRect();this.dropdownMenu.style.position="fixed",this.dropdownMenu.style.top=`${e.bottom}px`,this.dropdownMenu.style.left="auto",this.dropdownMenu.style.right=window.innerWidth-e.right+"px"}startTrackingPosition(){this.positionTracker=new $(this.menuOpener,()=>this.updateMenuPosition(),()=>this.open=!1),this.positionTracker.start()}stopTrackingPosition(){var e;null===(e=this.positionTracker)||void 0===e||e.stop(),this.positionTracker=void 0}toggleVisibility(){this.open=!this.open}onPopoverToggle(e){const t=e.newState;t&&(this.open="open"===t)}onItemClick(e){this.autoCloseOnAction&&(this.open=!1),e(this.rowData)}get rowData(){if(!this.definition)return;const{node:e,data:t}=this.definition;return(null==e?void 0:e.data)||t}get resolvedItems(){const e="function"==typeof this.items?this.items(this.rowData):this.items;return null!=e?e:[]}get visibleItems(){return this.hideDisabled?this.resolvedItems.filter(e=>{var t;return!(null===(t=e.isDisabled)||void 0===t?void 0:t.call(e,this.rowData))}):this.resolvedItems}getLabel(e){return"function"==typeof e?e(this.rowData):e}getTemplate(e){if(0!==this.visibleItems.length)return qm(e)}}(0,C.Cg)([l.observable],Xm.prototype,"items",void 0),(0,C.Cg)([l.observable],Xm.prototype,"definition",void 0),(0,C.Cg)([l.observable],Xm.prototype,"classNames",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],Xm.prototype,"open",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],Xm.prototype,"iconName",void 0),(0,C.Cg)([l.attr],Xm.prototype,"buttonAppearance",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close-on-action",mode:"boolean"})],Xm.prototype,"autoCloseOnAction",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-disabled",mode:"boolean"})],Xm.prototype,"hideDisabled",void 0);const Jm=Xm.compose({baseName:"vertical-dropdown-menu",styles:Wm,template:Km}),Qm={foundationAccordion:m,foundationAiCriteriaSearch:Te,foundationAiIndicator:Re,foundationAccordionItem:w,foundationActionsMenu:L,foundationAnchor:_e,foundationAnchoredRegion:Ve,foundationAvatar:Xe,foundationBadge:it,foundationBanner:ct,foundationBreadcrumb:gt,foundationBreadcrumbItem:xt,foundationButton:kt,foundationCalendar:Nt,foundationCard:zt,foundationCategorizedMultiselect:Kt,foundationCheckbox:ti,foundationCombobox:Ti,foundationConnectionIndicator:Ai,foundationDataGrid:Pi,foundationDataGridCell:Vi,foundationDataGridRow:qi,foundationDatePicker:Oo,foundationDesignSystemProvider:$n,foundationDialog:Nn,foundationDisclosure:zn,foundationDivider:Yn,foundationDropdownMenu:Zn,foundationErrorBanner:bs,foundationErrorBoundary:As,foundationErrorDialog:Ps,foundationFileReader:Gs,foundationFileUpload:ra,foundationFilter:ba,foundationFilterBar:Ta,foundationFlexLayout:Fa,foundationFlipper:Ua,foundationFlyout:Ka,foundationGridLayout:nr,foundationGridLayoutItem:dr,foundationHorizontalScroll:vr,foundationIcon:Rr,foundationListbox:_r,foundationListboxOption:Vr,foundationMenu:Kr,foundationMenuItem:tl,foundationModal:rl,foundationMultiselect:gl,foundationNumberField:Vl,foundationOptgroup:Wl,foundationPill:Fd,foundationPopper:Ud,foundationProgress:bd,foundationProgressRing:Wd,foundationRadio:Zd,foundationRadioGroup:sc,foundationScheduler:hc,foundationSchedulerCronBuilder:uu,foundationSchedulerTimezone:bu,foundationSearchBar:Ru,foundationSearchBarCombobox:Pu,foundationSegmentedControl:th,foundationSegmentedItem:rh,foundationSelect:ph,foundationSkeleton:yh,foundationSlider:Th,foundationSliderLabel:Lh,foundationSnackbar:Vh,foundationStackingIcons:Wh,foundationStatusPill:Qh,foundationEnvironmentIndicator:ps,foundationStepperTab:sp,foundationStepperTabPanel:cp,foundationSwitch:gp,foundationSystemHealthOverlay:kd,foundationTab:Tp,foundationTabPanel:Lp,foundationTabs:Hp,foundationTextArea:Gp,foundationTextField:Zp,foundationToast:am,foundationToolbar:hm,foundationTooltip:bm,foundationTreeItem:Sm,foundationTreeView:Im,foundationUrlInput:_m,foundationVerificationCodeInput:Gm,foundationVerticalDropdownMenu:Jm,foundationSectionNavigator:Ku,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 ev=class extends gi{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(){nt.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){nt.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){nt.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){nt.debug("handleStreamUpdates - Method not implemented.")}};ev=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],ev);const tv=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],iv=[...tv,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],ov={type:"NULL",maxRules:1,invisible:!0},nv=["int","short","long","bigdecimal","double"],sv=["date","date-time"],av=["enum",...nv,"string",...sv,"boolean"],rv=[{type:"equal",nbInputs:1,applyTo:av,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:av,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...nv,...sv],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...nv,...sv],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:[...av].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...av].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...nv,...sv],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...nv,...sv],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...av],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...av],optgroup:"Null"}];var lv=i(93678);const dv=i.n(lv)()();function cv(e,t,i){const o=function e(o){const n=dv(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 uv(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 hv(e,t){const i=uv(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 pv(e,t){const i=uv(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 mv(e,t,i){return cv(e,t,e=>[...e,i])}const vv="group-root";function gv(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:vv,children:e.children.map(e=>i(e,2))})}function fv(e){const t=e.children.map(e=>"children"in e?fv(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 bv=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,yv=e=>`${bv(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,wv=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},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},xv=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 $v(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 Sv;!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"}(Sv||(Sv={}));const Ev=l.css`
|
|
5990
6102
|
:host {
|
|
5991
6103
|
--item-vertical-spacing: 4px;
|
|
5992
6104
|
--item-border-radius: 5px;
|
|
@@ -6160,7 +6272,7 @@
|
|
|
6160
6272
|
.rules-list > *:last-child::after {
|
|
6161
6273
|
display: none;
|
|
6162
6274
|
}
|
|
6163
|
-
`,
|
|
6275
|
+
`,Ov=l.css`
|
|
6164
6276
|
.rules-group-container {
|
|
6165
6277
|
border: 1px solid #ccc;
|
|
6166
6278
|
margin-bottom: 10px;
|
|
@@ -6203,10 +6315,10 @@
|
|
|
6203
6315
|
list-style: none;
|
|
6204
6316
|
padding-left: 0;
|
|
6205
6317
|
}
|
|
6206
|
-
`;function
|
|
6318
|
+
`;function Tv(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 kv=l.html`
|
|
6207
6319
|
${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`
|
|
6208
6320
|
<div class="btn-group group-conditions">
|
|
6209
|
-
${
|
|
6321
|
+
${Tv(e=>"input"!==n,l.html`
|
|
6210
6322
|
<${s}
|
|
6211
6323
|
class="radio-group-container"
|
|
6212
6324
|
name="combinator"
|
|
@@ -6244,7 +6356,7 @@
|
|
|
6244
6356
|
`)}
|
|
6245
6357
|
</div>
|
|
6246
6358
|
`}}
|
|
6247
|
-
`,
|
|
6359
|
+
`,Dv=l.html`
|
|
6248
6360
|
${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`
|
|
6249
6361
|
<div class="btn-group float-end group-actions">
|
|
6250
6362
|
${(0,l.when)(e=>e.allowAddRule,l.html`
|
|
@@ -6281,13 +6393,13 @@
|
|
|
6281
6393
|
`)}
|
|
6282
6394
|
</div>
|
|
6283
6395
|
`}}
|
|
6284
|
-
|
|
6396
|
+
`,Iv=l.html`
|
|
6285
6397
|
<div class="rules-group-container">
|
|
6286
|
-
<div class="rules-group-header">${
|
|
6398
|
+
<div class="rules-group-header">${Dv} ${kv}</div>
|
|
6287
6399
|
<div class="rules-group-body">
|
|
6288
6400
|
<div class="rules-list">
|
|
6289
6401
|
${(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`
|
|
6290
|
-
${
|
|
6402
|
+
${Tv(e=>"children"in e,l.html`
|
|
6291
6403
|
<expression-group
|
|
6292
6404
|
:config=${(e,t)=>t.parent.config}
|
|
6293
6405
|
:styles=${(e,t)=>t.parent.styles}
|
|
@@ -6311,7 +6423,7 @@
|
|
|
6311
6423
|
</div>
|
|
6312
6424
|
</div>
|
|
6313
6425
|
</div>
|
|
6314
|
-
`;let
|
|
6426
|
+
`;let Rv=class extends l.FASTElement{connectedCallback(){super.connectedCallback(),$v(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(Sv.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(Sv.AddGroup,{detail:t,bubbles:!0,composed:!0}))}dispatchDeleteGroup(e){e.stopPropagation();const t={groupId:this.model.groupId};this.dispatchEvent(new CustomEvent(Sv.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(Sv.UpdateGroup,{detail:t,bubbles:!0,composed:!0}))}};(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),(0,C.Cg)([l.observable],Rv.prototype,"index",void 0),(0,C.Cg)([l.volatile],Rv.prototype,"allowAddRule",null),(0,C.Cg)([l.volatile],Rv.prototype,"allowAddGroup",null),Rv=(0,C.Cg)([(0,l.customElement)({name:"expression-group",template:Iv,styles:Ov,shadowOptions:{delegatesFocus:!0}})],Rv);const Av=l.html`
|
|
6315
6427
|
<div class="query-builder">
|
|
6316
6428
|
${(0,l.when)(e=>null!==e.model,l.html`
|
|
6317
6429
|
<expression-group
|
|
@@ -6321,7 +6433,7 @@
|
|
|
6321
6433
|
></expression-group>
|
|
6322
6434
|
`)}
|
|
6323
6435
|
</div>
|
|
6324
|
-
`,
|
|
6436
|
+
`,Lv=l.html`
|
|
6325
6437
|
${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`
|
|
6326
6438
|
<${r}
|
|
6327
6439
|
class="form-select"
|
|
@@ -6352,7 +6464,7 @@
|
|
|
6352
6464
|
`)}
|
|
6353
6465
|
</${r}>
|
|
6354
6466
|
`}}
|
|
6355
|
-
`;let
|
|
6467
|
+
`;let Nv=class extends l.FASTElement{constructor(){super(...arguments),this.fields=[]}connectedCallback(){super.connectedCallback(),$v(this,this.styles,"field")}get groupedFieldss(){return xv(this.fields)}dispatchFieldsChanged(e){e.stopPropagation();const t={fieldId:e.target.value};this.dispatchEvent(new CustomEvent(Sv.FieldSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Nv.prototype,"fields",void 0),(0,C.Cg)([l.observable],Nv.prototype,"field",void 0),(0,C.Cg)([l.observable],Nv.prototype,"config",void 0),(0,C.Cg)([l.observable],Nv.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Nv.prototype,"groupedFieldss",null),Nv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-field",template:Lv})],Nv);const Fv=l.html`
|
|
6356
6468
|
${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`
|
|
6357
6469
|
<${r}
|
|
6358
6470
|
class="form-select"
|
|
@@ -6385,7 +6497,7 @@
|
|
|
6385
6497
|
`)}
|
|
6386
6498
|
</${r}>
|
|
6387
6499
|
`}}
|
|
6388
|
-
`;let
|
|
6500
|
+
`;let Mv=class extends l.FASTElement{constructor(){super(...arguments),this.operators=[],this.field=null}connectedCallback(){super.connectedCallback(),$v(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 xv(this.allowedOperators)}handleOperatorChange(e){e.stopPropagation();const t={operatorId:e.target.value};this.dispatchEvent(new CustomEvent(Sv.OperatorSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Mv.prototype,"operators",void 0),(0,C.Cg)([l.observable],Mv.prototype,"operator",void 0),(0,C.Cg)([l.observable],Mv.prototype,"field",void 0),(0,C.Cg)([l.observable],Mv.prototype,"config",void 0),(0,C.Cg)([l.observable],Mv.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Mv.prototype,"allowedOperators",null),(0,C.Cg)([l.volatile],Mv.prototype,"groupedOperators",null),Mv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-operator",template:Fv})],Mv);const _v=e=>["short","int","long"].includes(e),Pv=e=>["double","bigdecimal"].includes(e),Hv=(e,t)=>{var i,o;return null===(o=null===(i=(e=>_v(e)?/^[+-]?[0-9]+$/:Pv(e)?/[+-]?([0-9]*[.])?[0-9]+/:null)(e))||void 0===i?void 0:i.test(t))||void 0===o||o?null:"Invalid number format"},zv=l.css`
|
|
6389
6501
|
.text-input.error {
|
|
6390
6502
|
color: red;
|
|
6391
6503
|
}
|
|
@@ -6394,8 +6506,8 @@
|
|
|
6394
6506
|
display: inline-grid;
|
|
6395
6507
|
align-items: center;
|
|
6396
6508
|
}
|
|
6397
|
-
`,
|
|
6398
|
-
${e=>{var t,i;const o=
|
|
6509
|
+
`,Uv=l.html`
|
|
6510
|
+
${e=>{var t,i;const o=wv(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`
|
|
6399
6511
|
<${s}
|
|
6400
6512
|
type="${o}"
|
|
6401
6513
|
class="text-input ${e=>(0,x.x)(["error",e.validationError])}"
|
|
@@ -6403,7 +6515,7 @@
|
|
|
6403
6515
|
@blur=${(e,t)=>e.handleInputChange(t.event)}
|
|
6404
6516
|
/>
|
|
6405
6517
|
`}}
|
|
6406
|
-
`,
|
|
6518
|
+
`,Bv=l.html`
|
|
6407
6519
|
${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`
|
|
6408
6520
|
<${s}
|
|
6409
6521
|
class="form-select"
|
|
@@ -6421,7 +6533,7 @@
|
|
|
6421
6533
|
`)}
|
|
6422
6534
|
</${s}>
|
|
6423
6535
|
`}}
|
|
6424
|
-
`,
|
|
6536
|
+
`,Vv=l.html`
|
|
6425
6537
|
${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`
|
|
6426
6538
|
<label>
|
|
6427
6539
|
<${n}
|
|
@@ -6433,15 +6545,15 @@
|
|
|
6433
6545
|
True
|
|
6434
6546
|
</label>
|
|
6435
6547
|
`}}
|
|
6436
|
-
`,
|
|
6437
|
-
<div>Input type "${e=>
|
|
6438
|
-
`,
|
|
6439
|
-
${e=>{const t=
|
|
6548
|
+
`,jv=l.html`
|
|
6549
|
+
<div>Input type "${e=>wv(e)}" not yet supported.</div>
|
|
6550
|
+
`,Gv=l.html`
|
|
6551
|
+
${e=>{const t=wv(e);return l.html`
|
|
6440
6552
|
<div class="value-and-validation">
|
|
6441
|
-
${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),
|
|
6442
|
-
${(0,l.when)(()=>"select"===t,
|
|
6443
|
-
${(0,l.when)(()=>"checkbox"===t,
|
|
6444
|
-
${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),
|
|
6553
|
+
${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),Uv)}
|
|
6554
|
+
${(0,l.when)(()=>"select"===t,Bv)}
|
|
6555
|
+
${(0,l.when)(()=>"checkbox"===t,Vv)}
|
|
6556
|
+
${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),jv)}
|
|
6445
6557
|
${(0,l.when)(e=>e.validationMsg,l.html`
|
|
6446
6558
|
<p class="validation-msg">${e=>e.validationMsg}</p>
|
|
6447
6559
|
`)}
|
|
@@ -6458,11 +6570,11 @@
|
|
|
6458
6570
|
`}}
|
|
6459
6571
|
`)}
|
|
6460
6572
|
`}}
|
|
6461
|
-
`,
|
|
6462
|
-
${
|
|
6573
|
+
`,Yv=l.html`
|
|
6574
|
+
${Tv(e=>e.field,Gv,l.html`
|
|
6463
6575
|
<div>Select a field to set value</div>
|
|
6464
6576
|
`)}
|
|
6465
|
-
`;let
|
|
6577
|
+
`;let Wv=class extends l.FASTElement{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),$v(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,Hv(Cv(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&&_v(Cv(this))?parseInt(t.value):this.field&&Pv(Cv(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(Sv.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(Sv.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};(0,C.Cg)([(0,l.attr)({attribute:"value-index"})],Wv.prototype,"valueIndex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wv.prototype,"variadic",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"validation-error"})],Wv.prototype,"validationError",void 0),(0,C.Cg)([(0,l.attr)({attribute:"validation-msg"})],Wv.prototype,"validationMsg",void 0),(0,C.Cg)([l.observable],Wv.prototype,"field",void 0),(0,C.Cg)([l.observable],Wv.prototype,"operator",void 0),(0,C.Cg)([l.observable],Wv.prototype,"value",void 0),(0,C.Cg)([l.observable],Wv.prototype,"config",void 0),(0,C.Cg)([l.observable],Wv.prototype,"styles",void 0),Wv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-value",template:Yv,styles:zv,shadowOptions:{delegatesFocus:!0}})],Wv);const qv=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:Kv(e,t),Kv=(e,t)=>{var i,o;switch(Cv(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return bv(new Date);case"date-time":return yv(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]}}},Xv=(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:qv(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(o=a(0))&&void 0!==o?o:qv(e,t),null!==(n=a(1))&&void 0!==n?n:qv(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(s=a(0))&&void 0!==s?s:qv(e,t)]}}},Jv=(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)}}},Qv=e=>!e&&0!==e,Zv=l.css`
|
|
6466
6578
|
.rule-container {
|
|
6467
6579
|
border: 1px solid #eee;
|
|
6468
6580
|
margin-bottom: 5px;
|
|
@@ -6521,7 +6633,7 @@
|
|
|
6521
6633
|
expression-rule-value {
|
|
6522
6634
|
display: flex;
|
|
6523
6635
|
}
|
|
6524
|
-
`,
|
|
6636
|
+
`,eg=l.html`
|
|
6525
6637
|
${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`
|
|
6526
6638
|
<div class="rule-container ${e=>(0,x.x)(["error",e.error])}">
|
|
6527
6639
|
<div class="rule-content">
|
|
@@ -6581,11 +6693,11 @@ class="margin"
|
|
|
6581
6693
|
</div>
|
|
6582
6694
|
</div>
|
|
6583
6695
|
`}}
|
|
6584
|
-
`;let qv=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),gv(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"!==mv(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(jv)})(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,Uv(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(fv.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(fv.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(fv.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(fv.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Gv(this.model,t,i)};this.dispatchEvent(new CustomEvent(fv.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(fv.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Vv(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],qv.prototype,"config",void 0),(0,C.Cg)([l.observable],qv.prototype,"styles",void 0),(0,C.Cg)([l.observable],qv.prototype,"model",void 0),(0,C.Cg)([l.observable],qv.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],qv.prototype,"error",void 0),(0,C.Cg)([l.volatile],qv.prototype,"operandIterator",null),qv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Wv,styles:Yv,shadowOptions:{delegatesFocus:!0}})],qv);let Kv=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=dv(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=cv(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(fv.AddGroup,this.handleAddGroup),this.addEventListener(fv.DelGroup,this.handleDeleteGroup),this.addEventListener(fv.AddRule,this.handleAddRule),this.addEventListener(fv.DelRule,this.handleDeleteRule),this.addEventListener(fv.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(fv.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(fv.AddGroup,this.handleAddGroup),this.removeEventListener(fv.DelGroup,this.handleDeleteGroup),this.removeEventListener(fv.AddRule,this.handleAddRule),this.removeEventListener(fv.DelRule,this.handleDeleteRule),this.removeEventListener(fv.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(fv.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:lv,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=rv(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=rv(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=ov(i=this.model,sv(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=ov(i=this.model,av(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===lv?Object.assign(Object.assign({},e),i):ov(e,sv(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 ov(e,av(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],Kv.prototype,"config",void 0),(0,C.Cg)([l.observable],Kv.prototype,"styles",void 0),(0,C.Cg)([l.observable],Kv.prototype,"model",void 0),Kv=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Ev,styles:bv})],Kv);let Xv=class extends Kv{};Xv=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:bv,template:Ev})],Xv);const Jv=["int","short","long"],Qv=["double","bigdecimal"],Zv=[...Jv,...Qv],eg=["date","date-time"],tg=["string","enum"],ig=["boolean"],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};function ng(e){switch(og(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 sg(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 ag(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function rg(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function lg(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=og(e);if(tg.includes(i))return t;if(Zv.includes(i))return t.toString();if(ig.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(eg.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function dg(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?dg(e,t):t(e)).filter(Boolean)}}function cg(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=og(e);if(tg.includes(i))return t;if(Jv.includes(i))return parseInt(t);if(Qv.includes(i))return parseFloat(t);if(ig.includes(i))return t;if(eg.includes(i)){const e=new Date(parseInt(t));return"date"===i?uv(e):hv(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const ug={template:Ev,styles:bv};var hg;!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"})}(hg||(hg={}));const pg=[{type:hg.logicalOperations.AND,maxRules:"many"},{type:hg.logicalOperations.OR,maxRules:"many"}],mg={EQUALS:hg.operations.EQUALS,NOT_EQUALS:hg.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:hg.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:hg.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:hg.operations.LESS_THAN,LESS_THAN_OR_EQUAL:hg.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:hg.operations.IS_CURRENT,IS_PREVIOUS:hg.operations.IS_PREVIOUS},vg=e=>({type:"enum",input:"select",values:e}),gg=vg({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."}}),fg=vg({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."}}),bg=[{type:mg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...tg,...ig,...Zv,...eg],tooltip:"Check the equality of the field compared to a set value"},{type:mg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...tg,...ig,...Zv,...eg],tooltip:"Check that the field is different from a set value"},{type:mg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...ig,...Zv,...eg],tooltip:"Check if the field value is null"},{type:mg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...ig,...Zv,...eg],tooltip:"Check if the field value is not null"},{type:mg.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:mg.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:mg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:mg.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:mg.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:mg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...Zv],tooltip:"Check if the field value is greater than a specified number"},{type:mg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...Zv],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:mg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...Zv],tooltip:"Check if the field value is less than a specified number"},{type:mg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...Zv],tooltip:"Check if the field value is less than or equal to a specified number"},{type:mg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is before a specified date/time"},{type:mg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is after a specified date/time"},{type:mg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is on or before a specified date/time"},{type:mg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is on or after a specified date/time"},{type:mg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...eg],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:fg,optgroup:"Relative Period"},{type:mg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...eg],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:gg,optgroup:"Relative Period"}];function yg(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 wg(e,t){switch(t){case mg.IS_NULL_OR_BLANK:return rg(e,hg.methodCall.IS_NULL_OR_BLANK,[]);case mg.NOT_NULL_OR_BLANK:return rg(e,hg.methodCall.NOT_NULL_OR_BLANK,[]);case mg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return rg(e,hg.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case mg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return rg(e,hg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case mg.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 rg(e,hg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case mg.IS_CURRENT:case mg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return rg(e,hg.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===mg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function Cg(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=lg(e),n=ng(o),s=yg(o.operator.type);switch(s){case mg.EQUALS:case mg.NOT_EQUALS:case mg.GREATER_THAN:case mg.GREATER_THAN_OR_EQUAL:case mg.LESS_THAN:case mg.LESS_THAN_OR_EQUAL:return sg(o,s,n);case mg.IS_NULL:return ag(o,hg.operations.EQUALS,{TYPE:"NULL"});case mg.NOT_NULL:return ag(o,hg.operations.NOT_EQUALS,{TYPE:"NULL"});case mg.IS_NULL_OR_BLANK:case mg.NOT_NULL_OR_BLANK:case mg.CONTAINS:case mg.CONTAINS_WORDS_STARTING_WITH:case mg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case mg.IS_CURRENT:case mg.IS_PREVIOUS:return wg(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function xg(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 $g(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?mg[mg.IS_NULL]:mg[mg.NOT_NULL];return bg.find(t=>t.type===e)}const i=xg(t.OPERATION,e);return bg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function Sg(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 cg($g({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Eg(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[mg[mg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[mg[mg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[mg[mg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[mg[mg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[mg[mg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===hg.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[mg["CURRENT"===t.PARAMETERS[2].VALUE?mg.IS_CURRENT:mg.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:bg.find(e=>e.type===i),value:o}}function Og(e,t){return{combinator:pg.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 Og(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Sg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Eg(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Tg=class extends Kv{ruleConfigChanged(e,t){this.config=Object.assign({combinators:pg,operators:bg,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Og(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=dg(e,Cg);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Tg.prototype,"ruleConfig",void 0),Tg=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:bv,template:Ev})],Tg);const kg={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Dg=[{type:kg.PLUS,label:"Add (+)",applyTo:[...Zv],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:kg.MINUS,label:"Subtract (-)",applyTo:[...Zv],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:kg.MULTIPLY,label:"Multiply (*)",applyTo:[...Zv],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:kg.DIVIDE,label:"Divide (/)",applyTo:[...Zv],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:kg.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:kg.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 Ig(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=lg(e),n=ng(o),s=o.operator.type;switch(s){case kg.TRIM:case kg.CONVERT_TO_DATE:case kg.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case kg.TRIM:return rg(e,hg.methodCall.TRIM,[]);case kg.CONVERT_TO_DATE:return rg(e,hg.methodCall.LONG_TO_DATE,[]);case kg.CONVERT_TO_DATE_TIME:return rg(e,hg.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case kg.PLUS:case kg.MINUS:case kg.DIVIDE:case kg.MULTIPLY:return sg(o,s,n);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Rg(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 cg(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Dg.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 Ag(e,t){return{combinator:Xm,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 Ag(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Rg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[kg[kg.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[kg[kg.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[kg[kg.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:Dg.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Lg=class extends Kv{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Ag(t.fields,i);this.config={combinators:[Xm],operators:Dg,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:Ig(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Lg.prototype,"valueConfig",void 0),Lg=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:bv,template:Ev})],Lg);const Fg=l.html`
|
|
6696
|
+
`;let tg=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),$v(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"!==Cv(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(Qv)})(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,qv(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(Sv.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(Sv.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(Sv.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(Sv.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Jv(this.model,t,i)};this.dispatchEvent(new CustomEvent(Sv.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(Sv.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Xv(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],tg.prototype,"config",void 0),(0,C.Cg)([l.observable],tg.prototype,"styles",void 0),(0,C.Cg)([l.observable],tg.prototype,"model",void 0),(0,C.Cg)([l.observable],tg.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tg.prototype,"error",void 0),(0,C.Cg)([l.volatile],tg.prototype,"operandIterator",null),tg=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:eg,styles:Zv,shadowOptions:{delegatesFocus:!0}})],tg);let ig=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=gv(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=fv(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(Sv.AddGroup,this.handleAddGroup),this.addEventListener(Sv.DelGroup,this.handleDeleteGroup),this.addEventListener(Sv.AddRule,this.handleAddRule),this.addEventListener(Sv.DelRule,this.handleDeleteRule),this.addEventListener(Sv.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(Sv.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(Sv.AddGroup,this.handleAddGroup),this.removeEventListener(Sv.DelGroup,this.handleDeleteGroup),this.removeEventListener(Sv.AddRule,this.handleAddRule),this.removeEventListener(Sv.DelRule,this.handleDeleteRule),this.removeEventListener(Sv.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(Sv.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:vv,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=mv(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=mv(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=cv(i=this.model,hv(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=cv(i=this.model,pv(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===vv?Object.assign(Object.assign({},e),i):cv(e,hv(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 cv(e,pv(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],ig.prototype,"config",void 0),(0,C.Cg)([l.observable],ig.prototype,"styles",void 0),(0,C.Cg)([l.observable],ig.prototype,"model",void 0),ig=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Av,styles:Ev})],ig);let og=class extends ig{};og=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:Ev,template:Av})],og);const ng=["int","short","long"],sg=["double","bigdecimal"],ag=[...ng,...sg],rg=["date","date-time"],lg=["string","enum"],dg=["boolean"],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};function ug(e){switch(cg(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 hg(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 pg(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function mg(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function vg(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=cg(e);if(lg.includes(i))return t;if(ag.includes(i))return t.toString();if(dg.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(rg.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function gg(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?gg(e,t):t(e)).filter(Boolean)}}function fg(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=cg(e);if(lg.includes(i))return t;if(ng.includes(i))return parseInt(t);if(sg.includes(i))return parseFloat(t);if(dg.includes(i))return t;if(rg.includes(i)){const e=new Date(parseInt(t));return"date"===i?bv(e):yv(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const bg={template:Av,styles:Ev};var yg;!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"})}(yg||(yg={}));const wg=[{type:yg.logicalOperations.AND,maxRules:"many"},{type:yg.logicalOperations.OR,maxRules:"many"}],Cg={EQUALS:yg.operations.EQUALS,NOT_EQUALS:yg.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:yg.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:yg.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:yg.operations.LESS_THAN,LESS_THAN_OR_EQUAL:yg.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:yg.operations.IS_CURRENT,IS_PREVIOUS:yg.operations.IS_PREVIOUS},xg=e=>({type:"enum",input:"select",values:e}),$g=xg({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."}}),Sg=xg({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."}}),Eg=[{type:Cg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...lg,...dg,...ag,...rg],tooltip:"Check the equality of the field compared to a set value"},{type:Cg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...lg,...dg,...ag,...rg],tooltip:"Check that the field is different from a set value"},{type:Cg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...dg,...ag,...rg],tooltip:"Check if the field value is null"},{type:Cg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...dg,...ag,...rg],tooltip:"Check if the field value is not null"},{type:Cg.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:Cg.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:Cg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:Cg.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:Cg.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:Cg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field value is greater than a specified number"},{type:Cg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:Cg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field value is less than a specified number"},{type:Cg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field value is less than or equal to a specified number"},{type:Cg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...rg],tooltip:"Check if the field is before a specified date/time"},{type:Cg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...rg],tooltip:"Check if the field is after a specified date/time"},{type:Cg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...rg],tooltip:"Check if the field is on or before a specified date/time"},{type:Cg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...rg],tooltip:"Check if the field is on or after a specified date/time"},{type:Cg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...rg],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:Sg,optgroup:"Relative Period"},{type:Cg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...rg],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:$g,optgroup:"Relative Period"}];function Og(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 Tg(e,t){switch(t){case Cg.IS_NULL_OR_BLANK:return mg(e,yg.methodCall.IS_NULL_OR_BLANK,[]);case Cg.NOT_NULL_OR_BLANK:return mg(e,yg.methodCall.NOT_NULL_OR_BLANK,[]);case Cg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return mg(e,yg.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case Cg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return mg(e,yg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case Cg.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 mg(e,yg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case Cg.IS_CURRENT:case Cg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return mg(e,yg.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===Cg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function kg(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=vg(e),n=ug(o),s=Og(o.operator.type);switch(s){case Cg.EQUALS:case Cg.NOT_EQUALS:case Cg.GREATER_THAN:case Cg.GREATER_THAN_OR_EQUAL:case Cg.LESS_THAN:case Cg.LESS_THAN_OR_EQUAL:return hg(o,s,n);case Cg.IS_NULL:return pg(o,yg.operations.EQUALS,{TYPE:"NULL"});case Cg.NOT_NULL:return pg(o,yg.operations.NOT_EQUALS,{TYPE:"NULL"});case Cg.IS_NULL_OR_BLANK:case Cg.NOT_NULL_OR_BLANK:case Cg.CONTAINS:case Cg.CONTAINS_WORDS_STARTING_WITH:case Cg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case Cg.IS_CURRENT:case Cg.IS_PREVIOUS:return Tg(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Dg(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 Ig(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?Cg[Cg.IS_NULL]:Cg[Cg.NOT_NULL];return Eg.find(t=>t.type===e)}const i=Dg(t.OPERATION,e);return Eg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function Rg(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 fg(Ig({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Ag(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[Cg[Cg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[Cg[Cg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[Cg[Cg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[Cg[Cg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[Cg[Cg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===yg.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[Cg["CURRENT"===t.PARAMETERS[2].VALUE?Cg.IS_CURRENT:Cg.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:Eg.find(e=>e.type===i),value:o}}function Lg(e,t){return{combinator:wg.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 Lg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Rg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Ag(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Ng=class extends ig{ruleConfigChanged(e,t){this.config=Object.assign({combinators:wg,operators:Eg,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Lg(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=gg(e,kg);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Ng.prototype,"ruleConfig",void 0),Ng=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:Ev,template:Av})],Ng);const Fg={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Mg=[{type:Fg.PLUS,label:"Add (+)",applyTo:[...ag],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Fg.MINUS,label:"Subtract (-)",applyTo:[...ag],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Fg.MULTIPLY,label:"Multiply (*)",applyTo:[...ag],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Fg.DIVIDE,label:"Divide (/)",applyTo:[...ag],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Fg.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:Fg.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 _g(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=vg(e),n=ug(o),s=o.operator.type;switch(s){case Fg.TRIM:case Fg.CONVERT_TO_DATE:case Fg.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Fg.TRIM:return mg(e,yg.methodCall.TRIM,[]);case Fg.CONVERT_TO_DATE:return mg(e,yg.methodCall.LONG_TO_DATE,[]);case Fg.CONVERT_TO_DATE_TIME:return mg(e,yg.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case Fg.PLUS:case Fg.MINUS:case Fg.DIVIDE:case Fg.MULTIPLY:return hg(o,s,n);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Pg(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 fg(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Mg.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 Hg(e,t){return{combinator:ov,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 Hg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Pg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Fg[Fg.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Fg[Fg.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Fg[Fg.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:Mg.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let zg=class extends ig{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Hg(t.fields,i);this.config={combinators:[ov],operators:Mg,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:_g(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],zg.prototype,"valueConfig",void 0),zg=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:Ev,template:Av})],zg);const Ug=l.html`
|
|
6585
6697
|
<template ${(0,l.ref)("notificationListener")}>
|
|
6586
6698
|
<slot></slot>
|
|
6587
6699
|
</template>
|
|
6588
|
-
`,Ng={mode:"open",delegatesFocus:!0};class Mg extends a.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}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=>(0,C.sH)(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return(0,C.sH)(this,void 0,void 0,function*(){var e;this.resourceName&&(null===(e=this.dataSub)||void 0===e||e.unsubscribe(),this.dataSub=void 0,yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,di.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}};hc(r,this.tagName)}}(0,C.Cg)([l.observable],Mg.prototype,"notificationListener",void 0),(0,C.Cg)([ui.dm],Mg.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Mg.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Mg.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Mg.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Mg.prototype,"toastPosition",void 0),(0,C.Cg)([hi.yW],Mg.prototype,"datasource",void 0);const _g=Mg.compose({baseName:"notification-listener",template:Fg,shadowOptions:Ng}),Hg=(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 Pg(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 zg;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(zg||(zg={}));class Ug{trackEvent(e,t){js.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const Bg=a.DI.createInterface(e=>e.singleton(Ug));var Vg=i(98647),Gg=i(35044);const jg=(0,it.createLogger)("foundation-router");var Yg=i(36132),Wg=i(80751),qg=i(3479);const Kg="$router",Xg=Object.freeze({getOrCreateFor:e=>{const t=e[Kg];return void 0!==t?t:e[Kg]=new Jg(e)},find:e=>qg.Ix.find(e),from:e=>qg.Ix.from(e)});class Jg extends qg.LK{}const Qg=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function Zg(e){return Qg.test(e)}function ef(e){return e.config instanceof Vg.Y?e:Xg.find(e)}function tf(e){return ef(e).parent}function of(e){let t=ef(e);for(;t&&t.level>0;)t=t.parent;return t}function nf(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 sf(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 af(e){return e.replace(`/*${Wg.N}`,"")}function rf(){null===document.querySelector("foundation-router, fast-router")&&window.dispatchEvent(new PopStateEvent("popstate"))}const lf=Object.freeze({path:Object.freeze({get current(){return Yg.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=ef(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&&Zg(e)?location.href=e:(history.pushState({},document.title,e),rf(),t&&lf.path.trigger(e))},replace:(e,t=!0)=>{e&&Zg(e)?location.href=e:(history.replaceState({},document.title,e),rf(),t&&lf.path.trigger(e))},trigger:e=>{Yg.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=ef(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 lf.name.generateRoute(e,t,i);null!==n&&lf.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 lf.name.generateRoute(e,t,i);null!==n&&lf.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 lf.name.generateRoute(e,t,i);null!==o&&lf.path.trigger(o)})})}),df=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,cf=10;function uf(e,t=df,i=cf){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 hf extends Wg.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(jg.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 jg.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return jg.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],hf.prototype,"definitions",void 0);class pf extends Vg.Y{constructor(){super(),this.logger=jg,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new hf(this),this.basename=Zn.OB,this.routes=new hf(this)}getNavItems(e=df){return uf(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(zg.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}.`),lf.name.replace(e.router,n)}else this.user.trackPath(),lf.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(),lf.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 lf.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&lf.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Gg.C.build(t);let n=i&&!e.startsWith(i)?nf([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?af(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([a.Container],pf.prototype,"container",void 0),(0,C.Cg)([Bg],pf.prototype,"analytics",void 0),(0,C.Cg)([Wl.KJ],pf.prototype,"user",void 0),(0,C.Cg)([Ti.N],pf.prototype,"_session",void 0);const mf="navigate-to",vf="generate-navigation-path";let gf=class extends(Xg.from(l.FASTElement)){constructor(){super(...arguments),this.logger=jg,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[Kg]}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(mf,this.onNavigateTo),this.addEventListener(vf,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(mf,this.onNavigateTo),this.removeEventListener(vf,this.onGenerateNavigationPath)}};gf=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],gf);const ff=e=>l.html`
|
|
6700
|
+
`,Bg={mode:"open",delegatesFocus:!0};class Vg extends a.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}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(me.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),xe(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>(0,C.sH)(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return(0,C.sH)(this,void 0,void 0,function*(){var e;this.resourceName&&(null===(e=this.dataSub)||void 0===e||e.unsubscribe(),this.dataSub=void 0,yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,ci.d)(e))}):nt.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}};pc(r,this.tagName)}}(0,C.Cg)([l.observable],Vg.prototype,"notificationListener",void 0),(0,C.Cg)([hi.dm],Vg.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Vg.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Vg.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Vg.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Vg.prototype,"toastPosition",void 0),(0,C.Cg)([pi.yW],Vg.prototype,"datasource",void 0);const jg=Vg.compose({baseName:"notification-listener",template:Ug,shadowOptions:Bg}),Gg=(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 Yg(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 Wg;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Wg||(Wg={}));class qg{trackEvent(e,t){Ys.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const Kg=a.DI.createInterface(e=>e.singleton(qg));var Xg=i(98647),Jg=i(35044);const Qg=(0,ot.createLogger)("foundation-router");var Zg=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 Xg.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 vf=Object.freeze({path:Object.freeze({get current(){return Zg.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&&vf.path.trigger(e))},replace:(e,t=!0)=>{e&&rf(e)?location.href=e:(history.replaceState({},document.title,e),mf(),t&&vf.path.trigger(e))},trigger:e=>{Zg.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 vf.name.generateRoute(e,t,i);null!==n&&vf.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 vf.name.generateRoute(e,t,i);null!==n&&vf.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 vf.name.generateRoute(e,t,i);null!==o&&vf.path.trigger(o)})})}),gf=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,ff=10;function bf(e,t=gf,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)&&(Qg.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 Qg.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return Qg.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 Xg.Y{constructor(){super(),this.logger=Qg,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=gf){return bf(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Wg.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}.`),vf.name.replace(e.router,n)}else this.user.trackPath(),vf.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(),vf.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 vf.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&vf.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Jg.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)([Kg],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=Qg,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=>l.html`
|
|
6589
6701
|
|
|
6590
6702
|
<${e}-card class=${e=>(0,x.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">
|
|
6591
6703
|
<div class=${e=>(0,x.x)("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])} part="stepper-tab-menu">
|
|
@@ -6618,9 +6730,9 @@ class="margin"
|
|
|
6618
6730
|
`)}
|
|
6619
6731
|
</${e}-card>
|
|
6620
6732
|
`)}
|
|
6621
|
-
`,
|
|
6622
|
-
${e=>
|
|
6623
|
-
`,
|
|
6733
|
+
`,Ef=l.html`
|
|
6734
|
+
${e=>Sf(k(e))}
|
|
6735
|
+
`,Of=l.css`
|
|
6624
6736
|
:host {
|
|
6625
6737
|
display: flex;
|
|
6626
6738
|
height: 100%;
|
|
@@ -6719,5 +6831,5 @@ class="margin"
|
|
|
6719
6831
|
max-height: 70px;
|
|
6720
6832
|
height: 70px;
|
|
6721
6833
|
}
|
|
6722
|
-
`;class
|
|
6723
|
-
//# sourceMappingURL=
|
|
6834
|
+
`;class Tf extends a.FoundationElement{constructor(){super(...arguments),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"),e.setAttribute("selected",i?"true":"false"),e.setAttribute("orientation",this.orientation),s&&e.setAttribute("aria-controls",s),e.setAttribute("tab-position",String(t+1)),e.setAttribute("isLast",String(o)),e.setAttribute("hideStepNumber",String(!0===this.hideStepNumber)),e.setAttribute("tabindex",i?"0":"-1"),e.setAttribute("showCursorPointer",String(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 nt.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):(nt.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,ya.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,ya.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],Tf.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],Tf.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],Tf.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],Tf.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],Tf.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],Tf.prototype,"hideTabs",void 0),(0,C.Cg)([(0,l.attr)({attribute:"indicator-only",mode:"boolean"})],Tf.prototype,"indicatorOnly",void 0),(0,C.Cg)([l.attr],Tf.prototype,"orientation",void 0),(0,C.Cg)([l.attr],Tf.prototype,"activeid",void 0),(0,C.Cg)([l.observable],Tf.prototype,"tabs",void 0),(0,C.Cg)([l.observable],Tf.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],Tf.prototype,"validation",void 0),(0,C.Cg)([l.observable],Tf.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],Tf.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],Tf.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],Tf.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],Tf.prototype,"islastStepValid",null);const kf=void 0,Df={},If=Tf.compose(Object.assign({baseName:"stepper",template:Ef,styles:Of,shadowOptions:kf},Df)),Rf=["text-field","text-area","combobox"],Af=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],Lf=e=>Rf.map(t=>`${e}-${t}`),Nf={rapid:Lf("rapid"),zero:Lf("zero")};function Ff(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=Nf[e])&&void 0!==t?t:[]}),o=t.filter(Boolean);return Array.from(new Set([...Af,...i,...o])).join(",")}const Mf=()=>wd().register(Qm)},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}}}]);
|
|
6835
|
+
//# sourceMappingURL=510.ad8d1c552f29cb845c9a2916c401e4ce.js.map
|