@genesislcap/design-system-configurator 15.3.2 → 15.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{100.100.a511cdc8114e47a5f21e.js → 100.100.d8a47e882fab4690e300.js} +2 -2
- package/dist/100.bf63c3f6087a5374ff7e41a03ae914f7.js.map +1 -0
- package/dist/326.192a6f853ee46b58fe8c69b4b57ef8f5.js.map +1 -0
- package/dist/{326.326.99fe190977d60abb46da.js → 326.326.38abd999bb05a8267e60.js} +567 -567
- package/dist/{75.75.840d84a42a83cbadf21f.js → 75.75.461c77d2e054364084c7.js} +202 -202
- package/dist/{75.ce99c5e797b7b8f966ad7e2b67718a70.js.map → 75.7c629e995ed6f04a91b33b6a628127cd.js.map} +1 -1
- package/dist/{designSystemConfigurator.b9f1e72960d4a6c3db8572f0784ac4cc.js.map → designSystemConfigurator.f731034859c4ad84a436a947ad8a650b.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.7f238f51d4ab7fbb016e.js → main.206ebfa9b1c5bce3a35e.js} +2 -2
- package/dist/{main.2a682fe758c3bc716194b1430be17174.js.map → main.4382bece48d94355b679b00232b00a81.js.map} +1 -1
- package/dist/remoteEntry.js +2 -2
- package/package.json +13 -13
- package/dist/100.742b5825de6f10d0054ec7862e34a12a.js.map +0 -1
- package/dist/326.1dc71a113a6ce7811f91daf99a9d5aef.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[75],{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}},4075(e,t,i){"use strict";i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AffixMixin:()=>yl,AiCriteriaSearch:()=>$e,AiIndicator:()=>De,Anchor:()=>Le,AnchoredRegion:()=>Pe,Avatar:()=>Ye,BASE_EDITABLE_ELEMENT_SELECTORS:()=>wf,Badge:()=>Qe,Banner:()=>lt,BaseDatasource:()=>vi,BaseFileComponent:()=>Hs,Breadcrumb:()=>ht,BreadcrumbItem:()=>bt,Button:()=>St,COMBO_INPUT_MIN_LENGTH:()=>Eu,CRON_LENGTH:()=>Cc,CSSVarsTokenMapper:()=>Um,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:()=>xf,DataGrid:()=>Ni,DataGridCell:()=>Pi,DataGridDatasource:()=>Bm,DataGridRow:()=>ji,DateOrDay:()=>vc,DatePicker:()=>So,DefaultRouter:()=>Yg,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:()=>ag,FaPrefixFromStyle:()=>Or,FileReader:()=>Vs,FileUpload:()=>oa,Filter:()=>ga,FilterBar:()=>Ea,FilterEvents:()=>va,FlexLayout:()=>La,FlexMediaQueriesEnum:()=>Ta,Flipper:()=>_a,Flyout:()=>Ga,FoundationDesignSystemProvider:()=>Cn,FoundationExpressionBuilder:()=>Gv,FoundationRouteCollection:()=>rf,FoundationRouteNav:()=>of,FoundationRouter:()=>uf,FoundationRouterConfiguration:()=>lf,FoundationRuleExpressionBuilder:()=>xg,FoundationValueExpressionBuilder:()=>kg,GenerateNavigationPathEventType:()=>cf,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:()=>Gr,MenuItem:()=>Jr,Modal:()=>sl,Multiselect:()=>ml,MultiselectDatasource:()=>dl,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>df,NotificationListener:()=>Rg,NumberField:()=>Hl,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:()=>Gg,RuleExpression:()=>rg,SCROLL_TIMEOUT:()=>$u,SECTION_NAVIGATOR_EVENTS:()=>Bu,SNACKBAR_CLOSE_TIMEOUT:()=>Fh,SNACKBAR_EVENTS_NAMES:()=>Mh,SNACKBAR_TYPES:()=>Nh,SNACKBAR_TYPE_DEFAULT:()=>Lh,STRING_OPERATORS:()=>J,Scheduler:()=>lc,SchedulerCronBuilder:()=>ru,SchedulerTimezone:()=>mu,SearchBar:()=>Tu,SearchBarCombobox:()=>Nu,SectionNavigator:()=>Gu,SegmentedControl:()=>Ju,SegmentedItem:()=>oh,Select:()=>dh,Skeleton:()=>vh,Slider:()=>$h,SliderLabel:()=>Dh,Snackbar:()=>Uh,StackingIcons:()=>Gh,StatusPill:()=>Xh,Stepper:()=>vf,StepperTab:()=>tp,StepperTabPanel:()=>ap,Switch:()=>hp,SystemHealthOverlay:()=>xd,Tab:()=>bp,TabPanel:()=>Sp,Tabs:()=>Ip,TextArea:()=>Mp,TextField:()=>jp,Toast:()=>Zp,Toolbar:()=>om,Tooltip:()=>dm,TreeItem:()=>vm,TreeView:()=>Cm,UrlInput:()=>Im,VerificationCodeInput:()=>Hm,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:()=>$,applyCustomTokens:()=>tn,baseComponents:()=>zm,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>hn,black:()=>ko,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>$f,categorizedMultiselectStyles:()=>Bt,categorizedMultiselectTemplate:()=>jt,clientOperators:()=>dg,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:()=>Fe,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:()=>jn,defaultFileUploadConfig:()=>sa,defaultFillColor:()=>Io,defaultFlexLayoutConfig:()=>Aa,defaultFlipperConfig:()=>Pa,defaultFlyoutConfig:()=>Wa,defaultGridLayoutConfig:()=>er,defaultGridLayoutItemConfig:()=>ar,defaultHorizontalScrollConfig:()=>pr,defaultIconConfig:()=>Er,defaultListboxConfig:()=>Fr,defaultListboxOptionConfig:()=>Ur,defaultMenuConfig:()=>Wr,defaultMenuItemConfig:()=>Zr,defaultModalConfig:()=>nl,defaultMultiselectConfig:()=>pl,defaultNavItemPredicate:()=>nf,defaultNeutralForegroundContrast:()=>Vo,defaultNumberFieldConfig:()=>zl,defaultPillConfig:()=>Ad,defaultPlacementIndexPadding:()=>sf,defaultProgressConfig:()=>gd,defaultProgressRingConfig:()=>Gd,defaultRadioConfig:()=>Jd,defaultRadioGroupConfig:()=>oc,defaultSearchBarComboboxConfig:()=>Mu,defaultSearchBarConfig:()=>Du,defaultSectionNavigatorConfig:()=>Wu,defaultSegmentedControlConfig:()=>Zu,defaultSegmentedItemConfig:()=>sh,defaultSelectConfig:()=>uh,defaultSkeletonConfig:()=>fh,defaultSliderConfig:()=>Eh,defaultSliderLabelConfig:()=>Rh,defaultStepperConfig:()=>ff,defaultStepperTabConfig:()=>op,defaultStepperTabPanelConfig:()=>lp,defaultSwitchConfig:()=>mp,defaultSystemHealthOverlayConfig:()=>Od,defaultTabConfig:()=>wp,defaultTabPanelConfig:()=>Op,defaultTabsConfig:()=>Ap,defaultTextAreaConfig:()=>Hp,defaultTextFieldConfig:()=>Yp,defaultTimezoneConfig:()=>gu,defaultToastConfig:()=>Qp,defaultToolbarConfig:()=>sm,defaultTooltipConfig:()=>um,defaultTreeItemConfig:()=>fm,defaultTreeViewConfig:()=>$m,defaultUrlInputConfig:()=>Dm,defaultVerificationCodeInputConfig:()=>Fm,defineFactory:()=>Lg,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:()=>Ns,extractMenuItems:()=>qn,faSizeValueDefault:()=>Tr,faSizeValues:()=>kr,fileReaderStyles:()=>Ps,fileReaderTemplate:()=>Bs,fillColor:()=>r.fillColor,filterBarTemplate:()=>xa,findParentRouter:()=>Xg,findRouter:()=>Kg,findTopLevelRouter:()=>Jg,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:()=>Ne,foundationAnchorStyles:()=>Re,foundationAnchorTemplate:()=>Ae,foundationAnchoredRegion:()=>Be,foundationAnchoredRegionShadowOptions:()=>ze,foundationAnchoredRegionStyles:()=>He,foundationAnchoredRegionTemplate:()=>_e,foundationAvatar:()=>Ke,foundationAvatarShadowOptions:()=>We,foundationAvatarStyles:()=>Ve,foundationAvatarTemplate:()=>je,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:()=>Nt,foundationCardTemplate:()=>Ft,foundationCategorizedMultiselect:()=>qt,foundationCategorizedMultiselectShadowOptions:()=>Gt,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:()=>Gi,foundationDataGridRowStyles:()=>Vi,foundationDataGridRowTemplate:()=>a.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Fi,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:()=>Nn,foundationDisclosureTemplate:()=>Fn,foundationDivider:()=>Gn,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:()=>Fs,foundationErrorDialogStyles:()=>As,foundationFileReader:()=>js,foundationFileReaderStyles:()=>zs,foundationFileUpload:()=>aa,foundationFileUploadShadowOptions:()=>na,foundationFileUploadStyles:()=>Ws,foundationFileUploadTemplate:()=>Ks,foundationFilter:()=>fa,foundationFilterBar:()=>Oa,foundationFilterBarStyles:()=>ya,foundationFilterBarTemplate:()=>$a,foundationFilterStyles:()=>ra,foundationFilterTemplate:()=>ma,foundationFlexLayout:()=>Na,foundationFlexLayoutShadowOptions:()=>Ra,foundationFlexLayoutStyles:()=>Da,foundationFlexLayoutTemplate:()=>Ia,foundationFlipper:()=>za,foundationFlipperShadowOptions:()=>Ha,foundationFlipperStyles:()=>Fa,foundationFlipperTemplate:()=>Ma,foundationFlyout:()=>qa,foundationFlyoutShadowOptions:()=>Ya,foundationFlyoutStyles:()=>Ba,foundationFlyoutTemplate:()=>ja,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:()=>Nr,foundationListboxStyles:()=>Rr,foundationListboxTemplate:()=>Ar,foundationMenu:()=>qr,foundationMenuItem:()=>el,foundationMenuItemShadowOptions:()=>Qr,foundationMenuItemStyles:()=>Kr,foundationMenuItemTemplate:()=>Xr,foundationMenuShadowOptions:()=>Yr,foundationMenuStyles:()=>Vr,foundationMenuTemplate:()=>jr,foundationModal:()=>al,foundationModalShadowOptions:()=>ol,foundationModalStyles:()=>tl,foundationModalTemplate:()=>il,foundationMultiselect:()=>vl,foundationMultiselectShadowOptions:()=>hl,foundationNotificationListener:()=>Ag,foundationNotificationListenerShadowOptions:()=>Ig,foundationNotificationListenerTemplate:()=>Dg,foundationNumberField:()=>Ul,foundationNumberFieldShadowOptions:()=>Pl,foundationNumberFieldStyles:()=>Cl,foundationNumberFieldTemplate:()=>xl,foundationOptgroup:()=>Gl,foundationOptgroupStyles:()=>Bl,foundationOptgroupTemplate:()=>Vl,foundationPill:()=>Nd,foundationPillShadowOptions:()=>Rd,foundationPillTemplate:()=>Id,foundationPopper:()=>zd,foundationProgress:()=>fd,foundationProgressRing:()=>Yd,foundationProgressRingShadowOptions:()=>jd,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:()=>Fu,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:()=>jh,foundationStatusPill:()=>Jh,foundationStatusPillTemplate:()=>qh,foundationStepper:()=>bf,foundationStepperShadowOptions:()=>gf,foundationStepperStyles:()=>mf,foundationStepperTab:()=>np,foundationStepperTabPanel:()=>dp,foundationStepperTabPanelShadowOptions:()=>rp,foundationStepperTabPanelTemplate:()=>sp,foundationStepperTabShadowOptions:()=>ip,foundationStepperTabStyles:()=>Qh,foundationStepperTabTemplate:()=>ep,foundationStepperTemplate:()=>pf,foundationSwitch:()=>vp,foundationSwitchShadowOptions:()=>pp,foundationSwitchStyles:()=>cp,foundationSwitchTemplate:()=>up,foundationSystemHealthOverlay:()=>Td,foundationSystemHealthOverlayShadowOptions:()=>Ed,foundationSystemHealthOverlayStyles:()=>Sd,foundationSystemHealthOverlayTemplate:()=>$d,foundationTab:()=>Cp,foundationTabPanel:()=>Tp,foundationTabPanelShadowOptions:()=>Ep,foundationTabPanelStyles:()=>xp,foundationTabPanelTemplate:()=>$p,foundationTabShadowOptions:()=>yp,foundationTabStyles:()=>gp,foundationTabTemplate:()=>fp,foundationTabs:()=>Lp,foundationTabsShadowOptions:()=>Rp,foundationTabsStyles:()=>kp,foundationTabsTemplate:()=>Dp,foundationTextArea:()=>Pp,foundationTextAreaShadowOptions:()=>_p,foundationTextAreaStyles:()=>Np,foundationTextAreaTemplate:()=>Fp,foundationTextField:()=>Wp,foundationTextFieldShadowOptions:()=>Gp,foundationTextFieldStyles:()=>Bp,foundationTextFieldTemplate:()=>Vp,foundationToast:()=>em,foundationToastShadowOptions:()=>Jp,foundationToastStyles:()=>qp,foundationToastTemplate:()=>Xp,foundationToolbar:()=>am,foundationToolbarShadowOptions:()=>nm,foundationToolbarStyles:()=>tm,foundationToolbarTemplate:()=>im,foundationTooltip:()=>hm,foundationTooltipShadowOptions:()=>cm,foundationTooltipStyles:()=>rm,foundationTooltipTemplate:()=>lm,foundationTreeItem:()=>bm,foundationTreeItemShadowOptions:()=>gm,foundationTreeItemStyles:()=>pm,foundationTreeItemTemplate:()=>mm,foundationTreeView:()=>Sm,foundationTreeViewShadowOptions:()=>xm,foundationTreeViewStyles:()=>ym,foundationTreeViewTemplate:()=>wm,foundationUrlInput:()=>Rm,foundationUrlInputShadowOptions:()=>km,foundationUrlInputStyles:()=>Em,foundationUrlInputTemplate:()=>Tm,foundationVerificationCodeInput:()=>Pm,foundationVerificationCodeInputShadowOptions:()=>Nm,foundationVerificationCodeInputStyles:()=>Am,foundationVerificationCodeInputTemplate:()=>Lm,fromBinaryExpression:()=>yg,fromMethodExpression:()=>wg,fuiAccentPalette:()=>Po,fuiAccentSwatch:()=>Ho,fuiCardFillColor:()=>Bo,fuiCardForegroundColor:()=>Go,fuiDefaultCardFillColor:()=>Ao,fuiDefaultCardPalette:()=>Lo,fuiFillColor:()=>Uo,fuiNeutralPalette:()=>Mo,fuiNeutralSwatch:()=>Fo,getBannerTemplate:()=>st,getBrowserLocale:()=>po,getCriteriaBuilder:()=>Ou,getDefaultConfig:()=>nn,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>Tn,getDisplayFormatForLang:()=>mo,getDropdownMenuTemplate:()=>Kn,getErrorDialogTemplate:()=>Ls,getExports:()=>sn,getFontawesomeIconsCss:()=>wr,getNavItems:()=>af,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:()=>hf,getPrefixedStepperTab:()=>Zh,getPrefixedToast:()=>Kp,getPrefixedUrlInput:()=>Om,getTypeRampValue:()=>an,groupsToCriteria:()=>X,hasDateValue:()=>go,inputControls:()=>Hc,isAbsoluteUrl:()=>qg,jsonConverter:()=>Md,mapType:()=>wa,maxheight:()=>rl,media:()=>Ge,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:()=>jo,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralPaletteValue:()=>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:()=>Qg,pillStyles:()=>kd,plusIcon:()=>wu,provideDesignSystem:()=>yd,provideTokens:()=>Jo,rebuildOperator:()=>bg,registerFoundationDesignSystem:()=>Sf,removeChildRouteParameter:()=>ef,removeLastPathSegment:()=>Zg,resolveDayjsLocale:()=>ho,routerLogger:()=>zg,routerProperty:()=>jg,ruleExpressionToGroup:()=>Cg,ruleToRuleExpression:()=>gg,ruleToRuleMethodExpression:()=>vg,schedulerCronBuilderStyles:()=>Pc,schedulerStyles:()=>sc,schedulerTimezoneStyles:()=>uu,selectCustomToken:()=>ln,sharedFieldStyles:()=>wl,singleOptionTemplate:()=>D,statusPillStyles:()=>Wh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>Zo,tagFor:()=>Ng,transformOperatorNameToServerName:()=>mg,transformServerNameToOperatorName:()=>fg,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:()=>Go,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:()=>jo,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,strokeWidth:()=>r.strokeWidth,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight});var n={};i.r(n),i.d(n,{accentPaletteValue:()=>cn,baseLayerLuminanceValue:()=>hn,controlCornerRadiusValue:()=>mn,designUnitValue:()=>vn,directionValue:()=>pn,neutralPaletteValue:()=>un});var s={};i.r(s),i.d(s,{BASE_LOGICAL_COMBINATORS:()=>Vm,BASE_OPERATORS:()=>Km,LOGICAL_COMBINATORS:()=>jm,NULL_COMBINATOR:()=>Gm});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([[75],{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?/,a=/\d*[^-_:/,()\s\d]+/,s={},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=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var i,o=s.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:[a,function(e){this.afternoon=u(e,!1)}],a:[a,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:[a,function(e){var t=s.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:[a,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:[a,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=s&&s.formats;for(var a=(i=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,o){var a=o&&o.toUpperCase();return i||n[o]||e[o]||n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),r=a.length,l=0;l<r;l+=1){var d=a[l],c=h[d],u=c&&c[0],p=c&&c[1];a[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=a[i];if("string"==typeof n)o+=n.length;else{var s=n.regex,l=n.parser,d=e.slice(o),c=s.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,a=e.args;this.$u=o;var r=a[1];if("string"==typeof r){var l=!0===a[2],d=!0===a[3],c=l||d,u=a[2];d&&(u=a[2]),s=this.$locale(),!l&&u&&(s=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),a=n.year,s=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||(a||s?1:v.getDate()),f=a||v.getFullYear(),b=0;a&&!s||(b=s>0?s-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("")),s={}}else if(r instanceof Array)for(var h=r.length,m=1;m<=h;m+=1){a[1]=r[m-1];var v=i.apply(this,a);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)},a=function(e,t,i,o,a){var s=e.name?e:e.$locale(),r=n(s[t]),l=n(s[i]),d=r||l.map(function(e){return e.slice(0,o)});if(!a)return d;var c=s.weekStart;return d.map(function(e,t){return d[(t+(c||0))%7]})},s=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"):a(e,"months")},monthsShort:function(t){return t?t.format("MMM"):a(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):a(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):a(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):a(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=s();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 a(s(),"months")},i.monthsShort=function(){return a(s(),"monthsShort","months",3)},i.weekdays=function(e){return a(s(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return a(s(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return a(s(),"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,a=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 a=n&&n.toUpperCase();return o||i[n]||e[n]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(t,void 0===i?{}:i);return a.call(this,o)}}}()},57565(e){e.exports=s,s.default=s,s.stable=c,s.stableStringify=c;var t="[...]",i="[Circular]",o=[],n=[];function a(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,i,s){var r;void 0===s&&(s=a()),l(e,"",0,[],void 0,0,s);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,a){var s=Object.getOwnPropertyDescriptor(a,i);void 0!==s.get?s.configurable?(Object.defineProperty(a,i,{value:e}),o.push([a,i,t,s])):n.push([t,i,e]):(a[i]=e,o.push([a,i,t]))}function l(e,o,n,a,s,d,c){var u;if(d+=1,"object"==typeof e&&null!==e){for(u=0;u<a.length;u++)if(a[u]===e)return void r(i,e,o,s);if(void 0!==c.depthLimit&&d>c.depthLimit)return void r(t,e,o,s);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void r(t,e,o,s);if(a.push(e),Array.isArray(e))for(u=0;u<e.length;u++)l(e[u],u,u,a,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,a,e,d,c)}}a.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function c(e,t,i,s){void 0===s&&(s=a());var r,l=u(e,"",0,[],void 0,0,s)||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,a,s,l,c,h){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;p<s.length;p++)if(s[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&&a+1>h.edgesLimit)return void r(t,e,n,l);if(s.push(e),Array.isArray(e))for(p=0;p<e.length;p++)u(e[p],p,p,s,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,s,e,c,h),m[g]=e[g]}if(void 0===l)return m;o.push([l,n,e]),l[n]=m}s.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 a=n[o];if(a[1]===t&&a[0]===i){i=a[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(s(Array.from(e),t))),n.set(Set,(e,t)=>new Set(s(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)n.set(t[0],t[1]);let a=null;return e.proto?l:r;function s(e,s){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&&(a=n.get(u.constructor)))l[c]=a(u,s);else if(ArrayBuffer.isView(u))l[c]=t(u);else{const e=i.indexOf(u);l[c]=-1!==e?o[e]:s(u)}}return l}function r(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return s(e,r);if(e.constructor!==Object&&(a=n.get(e.constructor)))return a(e,r);const l={};i.push(e),o.push(l);for(const s in e){if(!1===Object.hasOwnProperty.call(e,s))continue;const d=e[s];if("object"!=typeof d||null===d)l[s]=d;else if(d.constructor!==Object&&(a=n.get(d.constructor)))l[s]=a(d,r);else if(ArrayBuffer.isView(d))l[s]=t(d);else{const e=i.indexOf(d);l[s]=-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 s(e,l);if(e.constructor!==Object&&(a=n.get(e.constructor)))return a(e,l);const r={};i.push(e),o.push(r);for(const s in e){const d=e[s];if("object"!=typeof d||null===d)r[s]=d;else if(d.constructor!==Object&&(a=n.get(d.constructor)))r[s]=a(d,l);else if(ArrayBuffer.isView(d))r[s]=t(d);else{const e=i.indexOf(d);r[s]=-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(a){if("object"!=typeof a||null===a)return a;if(Array.isArray(a))return n(a,e);if(a.constructor!==Object&&(o=i.get(a.constructor)))return o(a,e);const s={};for(const n in a){const r=a[n];"object"!=typeof r||null===r?s[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?s[n]=o(r,e):ArrayBuffer.isView(r)?s[n]=t(r):s[n]=e(r)}return s}:function e(a){if("object"!=typeof a||null===a)return a;if(Array.isArray(a))return n(a,e);if(a.constructor!==Object&&(o=i.get(a.constructor)))return o(a,e);const s={};for(const n in a){if(!1===Object.hasOwnProperty.call(a,n))continue;const r=a[n];"object"!=typeof r||null===r?s[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?s[n]=o(r,e):ArrayBuffer.isView(r)?s[n]=t(r):s[n]=e(r)}return s};function n(e,n){const a=Object.keys(e),s=new Array(a.length);for(let r=0;r<a.length;r++){const l=a[r],d=e[l];"object"!=typeof d||null===d?s[l]=d:d.constructor!==Object&&(o=i.get(d.constructor))?s[l]=o(d,n):ArrayBuffer.isView(d)?s[l]=t(d):s[l]=n(d)}return s}}},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],a=document.createElement(`${n}-dialog`),s=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);s.appendChild(a),a.notification=e,a.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),a=i(68424);const s=(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;s.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,a.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}},4075(e,t,i){"use strict";i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AffixMixin:()=>yl,AiCriteriaSearch:()=>$e,AiIndicator:()=>De,Anchor:()=>Le,AnchoredRegion:()=>Pe,Avatar:()=>Ye,BASE_EDITABLE_ELEMENT_SELECTORS:()=>wf,Badge:()=>Qe,Banner:()=>lt,BaseDatasource:()=>vi,BaseFileComponent:()=>Ha,Breadcrumb:()=>ht,BreadcrumbItem:()=>bt,Button:()=>St,COMBO_INPUT_MIN_LENGTH:()=>Eu,CRON_LENGTH:()=>Cc,CSSVarsTokenMapper:()=>Um,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:()=>Ss,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>xf,DataGrid:()=>Ni,DataGridCell:()=>Pi,DataGridDatasource:()=>Bm,DataGridRow:()=>ji,DateOrDay:()=>vc,DatePicker:()=>So,DefaultRouter:()=>Yg,DesignTokensObservable:()=>Ko,Dialog:()=>An,DialogElement:()=>Rn,Disclosure:()=>Mn,Divider:()=>Bn,DropdownMenu:()=>Jn,EnvironmentIndicator:()=>ua,ErrorBanner:()=>ga,ErrorBoundary:()=>Ia,ErrorBoundaryEvent:()=>ba,ErrorDialog:()=>Ma,ExpressionBuilderConfig:()=>a,ExpressionBuilderCore:()=>sg,FaPrefixFromStyle:()=>Or,FileReader:()=>Va,FileUpload:()=>os,Filter:()=>gs,FilterBar:()=>Es,FilterEvents:()=>vs,FlexLayout:()=>Ls,FlexMediaQueriesEnum:()=>Ts,Flipper:()=>_s,Flyout:()=>Gs,FoundationDesignSystemProvider:()=>Cn,FoundationExpressionBuilder:()=>Gv,FoundationRouteCollection:()=>rf,FoundationRouteNav:()=>of,FoundationRouter:()=>uf,FoundationRouterConfiguration:()=>lf,FoundationRuleExpressionBuilder:()=>xg,FoundationValueExpressionBuilder:()=>kg,GenerateNavigationPathEventType:()=>cf,GridLayout:()=>ir,GridLayoutItem:()=>rr,GridMediaQueriesEnum:()=>Ks,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:()=>Gr,MenuItem:()=>Jr,Modal:()=>al,Multiselect:()=>ml,MultiselectDatasource:()=>dl,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>df,NotificationListener:()=>Rg,NumberField:()=>Hl,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:()=>Gg,RuleExpression:()=>rg,SCROLL_TIMEOUT:()=>$u,SECTION_NAVIGATOR_EVENTS:()=>Bu,SNACKBAR_CLOSE_TIMEOUT:()=>Fh,SNACKBAR_EVENTS_NAMES:()=>Mh,SNACKBAR_TYPES:()=>Nh,SNACKBAR_TYPE_DEFAULT:()=>Lh,STRING_OPERATORS:()=>J,Scheduler:()=>lc,SchedulerCronBuilder:()=>ru,SchedulerTimezone:()=>mu,SearchBar:()=>Tu,SearchBarCombobox:()=>Nu,SectionNavigator:()=>Gu,SegmentedControl:()=>Ju,SegmentedItem:()=>oh,Select:()=>dh,Skeleton:()=>vh,Slider:()=>$h,SliderLabel:()=>Dh,Snackbar:()=>Uh,StackingIcons:()=>Gh,StatusPill:()=>Xh,Stepper:()=>vf,StepperTab:()=>tp,StepperTabPanel:()=>sp,Switch:()=>hp,SystemHealthOverlay:()=>xd,Tab:()=>bp,TabPanel:()=>Sp,Tabs:()=>Ip,TextArea:()=>Mp,TextField:()=>jp,Toast:()=>Zp,Toolbar:()=>om,Tooltip:()=>dm,TreeItem:()=>vm,TreeView:()=>Cm,UrlInput:()=>Im,VerificationCodeInput:()=>Hm,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:()=>$,applyCustomTokens:()=>tn,baseComponents:()=>zm,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>hn,black:()=>ko,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>$f,categorizedMultiselectStyles:()=>Bt,categorizedMultiselectTemplate:()=>jt,clientOperators:()=>dg,closeIcon:()=>ls,configureDesignSystem:()=>dn,configureEnvironmentIndicator:()=>da,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>mn,createDesignSystemProxy:()=>bd,createFormData:()=>Xa,crossIcon:()=>yu,daysOfWeek:()=>gc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>Ee,defaultAnchorConfig:()=>Fe,defaultAnchoredRegionConfig:()=>Ue,defaultAvatarConfig:()=>qe,defaultBadgeConfig:()=>et,defaultBreadcrumbConfig:()=>mt,defaultBreadcrumbItemConfig:()=>wt,defaultButtonConfig:()=>Ot,defaultCalendarConfig:()=>At,defaultCardConfig:()=>Ht,defaultCategorizedMultiselectConfig:()=>Yt,defaultCheckboxConfig:()=>Zt,defaultComboboxConfig:()=>Ei,defaultConfig:()=>cc,defaultCronBuilderConfig:()=>du,defaultDataGridCellConfig:()=>Ui,defaultDataGridConfig:()=>Mi,defaultDataGridRowConfig:()=>Yi,defaultDatePickerConfig:()=>$o,defaultDialogConfig:()=>In,defaultDisclosureConfig:()=>Hn,defaultDividerConfig:()=>jn,defaultFileUploadConfig:()=>as,defaultFillColor:()=>Io,defaultFlexLayoutConfig:()=>As,defaultFlipperConfig:()=>Ps,defaultFlyoutConfig:()=>Ws,defaultGridLayoutConfig:()=>er,defaultGridLayoutItemConfig:()=>sr,defaultHorizontalScrollConfig:()=>pr,defaultIconConfig:()=>Er,defaultListboxConfig:()=>Fr,defaultListboxOptionConfig:()=>Ur,defaultMenuConfig:()=>Wr,defaultMenuItemConfig:()=>Zr,defaultModalConfig:()=>nl,defaultMultiselectConfig:()=>pl,defaultNavItemPredicate:()=>nf,defaultNeutralForegroundContrast:()=>Vo,defaultNumberFieldConfig:()=>zl,defaultPillConfig:()=>Ad,defaultPlacementIndexPadding:()=>af,defaultProgressConfig:()=>gd,defaultProgressRingConfig:()=>Gd,defaultRadioConfig:()=>Jd,defaultRadioGroupConfig:()=>oc,defaultSearchBarComboboxConfig:()=>Mu,defaultSearchBarConfig:()=>Du,defaultSectionNavigatorConfig:()=>Wu,defaultSegmentedControlConfig:()=>Zu,defaultSegmentedItemConfig:()=>ah,defaultSelectConfig:()=>uh,defaultSkeletonConfig:()=>fh,defaultSliderConfig:()=>Eh,defaultSliderLabelConfig:()=>Rh,defaultStepperConfig:()=>ff,defaultStepperTabConfig:()=>op,defaultStepperTabPanelConfig:()=>lp,defaultSwitchConfig:()=>mp,defaultSystemHealthOverlayConfig:()=>Od,defaultTabConfig:()=>wp,defaultTabPanelConfig:()=>Op,defaultTabsConfig:()=>Ap,defaultTextAreaConfig:()=>Hp,defaultTextFieldConfig:()=>Yp,defaultTimezoneConfig:()=>gu,defaultToastConfig:()=>Qp,defaultToolbarConfig:()=>am,defaultTooltipConfig:()=>um,defaultTreeItemConfig:()=>fm,defaultTreeViewConfig:()=>$m,defaultUrlInputConfig:()=>Dm,defaultVerificationCodeInputConfig:()=>Fm,defineFactory:()=>Lg,density:()=>r.density,designToken:()=>Qo,designTokensMap:()=>rn,designUnit:()=>r.designUnit,designUnitValue:()=>vn,direction:()=>r.direction,directionValue:()=>pn,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>Qa,dropdownMenuBaseStyles:()=>Yn,environmentIndicatorStyles:()=>ea,errorDialogTemplate:()=>Na,extractMenuItems:()=>qn,faSizeValueDefault:()=>Tr,faSizeValues:()=>kr,fileReaderStyles:()=>Pa,fileReaderTemplate:()=>Ba,fillColor:()=>r.fillColor,filterBarTemplate:()=>xs,findParentRouter:()=>Xg,findRouter:()=>Kg,findTopLevelRouter:()=>Jg,flyoutAnimationTime:()=>Us,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:()=>Ne,foundationAnchorStyles:()=>Re,foundationAnchorTemplate:()=>Ae,foundationAnchoredRegion:()=>Be,foundationAnchoredRegionShadowOptions:()=>ze,foundationAnchoredRegionStyles:()=>He,foundationAnchoredRegionTemplate:()=>_e,foundationAvatar:()=>Ke,foundationAvatarShadowOptions:()=>We,foundationAvatarStyles:()=>Ve,foundationAvatarTemplate:()=>je,foundationBadge:()=>tt,foundationBadgeShadowOptions:()=>Ze,foundationBadgeStyles:()=>Xe,foundationBadgeTemplate:()=>Je,foundationBanner:()=>dt,foundationBannerShadowOptions:()=>rt,foundationBannerStyles:()=>nt,foundationBannerTemplate:()=>st,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:()=>Nt,foundationCardTemplate:()=>Ft,foundationCategorizedMultiselect:()=>qt,foundationCategorizedMultiselectShadowOptions:()=>Gt,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:()=>s.dataGridCellTemplate,foundationDataGridRow:()=>Wi,foundationDataGridRowShadowOptions:()=>Gi,foundationDataGridRowStyles:()=>Vi,foundationDataGridRowTemplate:()=>s.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Fi,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:()=>Nn,foundationDisclosureTemplate:()=>Fn,foundationDivider:()=>Gn,foundationDividerShadowOptions:()=>Vn,foundationDividerStyles:()=>zn,foundationDividerTemplate:()=>Un,foundationDropdownMenu:()=>Qn,foundationDropdownMenuStyles:()=>Wn,foundationDropdownMenuTemplate:()=>Xn,foundationEnvironmentIndicator:()=>ha,foundationEnvironmentIndicatorTemplate:()=>ta,foundationErrorBanner:()=>fa,foundationErrorBannerShadowOptions:()=>va,foundationErrorBannerTemplate:()=>ma,foundationErrorBoundary:()=>Ra,foundationErrorBoundaryShadowOptions:()=>Da,foundationErrorBoundaryTemplate:()=>ka,foundationErrorDialog:()=>_a,foundationErrorDialogShadowOptions:()=>Fa,foundationErrorDialogStyles:()=>Aa,foundationFileReader:()=>ja,foundationFileReaderStyles:()=>za,foundationFileUpload:()=>ss,foundationFileUploadShadowOptions:()=>ns,foundationFileUploadStyles:()=>Wa,foundationFileUploadTemplate:()=>Ka,foundationFilter:()=>fs,foundationFilterBar:()=>Os,foundationFilterBarStyles:()=>ys,foundationFilterBarTemplate:()=>$s,foundationFilterStyles:()=>rs,foundationFilterTemplate:()=>ms,foundationFlexLayout:()=>Ns,foundationFlexLayoutShadowOptions:()=>Rs,foundationFlexLayoutStyles:()=>Ds,foundationFlexLayoutTemplate:()=>Is,foundationFlipper:()=>zs,foundationFlipperShadowOptions:()=>Hs,foundationFlipperStyles:()=>Fs,foundationFlipperTemplate:()=>Ms,foundationFlyout:()=>qs,foundationFlyoutShadowOptions:()=>Ys,foundationFlyoutStyles:()=>Bs,foundationFlyoutTemplate:()=>js,foundationGridLayout:()=>or,foundationGridLayoutItem:()=>lr,foundationGridLayoutItemShadowOptions:()=>ar,foundationGridLayoutItemTemplate:()=>nr,foundationGridLayoutShadowOptions:()=>Zs,foundationGridLayoutStyles:()=>Js,foundationGridLayoutTemplate:()=>Qs,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:()=>Nr,foundationListboxStyles:()=>Rr,foundationListboxTemplate:()=>Ar,foundationMenu:()=>qr,foundationMenuItem:()=>el,foundationMenuItemShadowOptions:()=>Qr,foundationMenuItemStyles:()=>Kr,foundationMenuItemTemplate:()=>Xr,foundationMenuShadowOptions:()=>Yr,foundationMenuStyles:()=>Vr,foundationMenuTemplate:()=>jr,foundationModal:()=>sl,foundationModalShadowOptions:()=>ol,foundationModalStyles:()=>tl,foundationModalTemplate:()=>il,foundationMultiselect:()=>vl,foundationMultiselectShadowOptions:()=>hl,foundationNotificationListener:()=>Ag,foundationNotificationListenerShadowOptions:()=>Ig,foundationNotificationListenerTemplate:()=>Dg,foundationNumberField:()=>Ul,foundationNumberFieldShadowOptions:()=>Pl,foundationNumberFieldStyles:()=>Cl,foundationNumberFieldTemplate:()=>xl,foundationOptgroup:()=>Gl,foundationOptgroupStyles:()=>Bl,foundationOptgroupTemplate:()=>Vl,foundationPill:()=>Nd,foundationPillShadowOptions:()=>Rd,foundationPillTemplate:()=>Id,foundationPopper:()=>zd,foundationProgress:()=>fd,foundationProgressRing:()=>Yd,foundationProgressRingShadowOptions:()=>jd,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:()=>su,foundationSchedulerShadowOptions:()=>dc,foundationSchedulerTemplate:()=>rc,foundationSchedulerTimezone:()=>fu,foundationSchedulerTimezoneShadowOptions:()=>vu,foundationSchedulerTimezoneTemplate:()=>pu,foundationSearchBar:()=>Iu,foundationSearchBarCombobox:()=>_u,foundationSearchBarComboboxShadowOptions:()=>Fu,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:()=>sh,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:()=>jh,foundationStatusPill:()=>Jh,foundationStatusPillTemplate:()=>qh,foundationStepper:()=>bf,foundationStepperShadowOptions:()=>gf,foundationStepperStyles:()=>mf,foundationStepperTab:()=>np,foundationStepperTabPanel:()=>dp,foundationStepperTabPanelShadowOptions:()=>rp,foundationStepperTabPanelTemplate:()=>ap,foundationStepperTabShadowOptions:()=>ip,foundationStepperTabStyles:()=>Qh,foundationStepperTabTemplate:()=>ep,foundationStepperTemplate:()=>pf,foundationSwitch:()=>vp,foundationSwitchShadowOptions:()=>pp,foundationSwitchStyles:()=>cp,foundationSwitchTemplate:()=>up,foundationSystemHealthOverlay:()=>Td,foundationSystemHealthOverlayShadowOptions:()=>Ed,foundationSystemHealthOverlayStyles:()=>Sd,foundationSystemHealthOverlayTemplate:()=>$d,foundationTab:()=>Cp,foundationTabPanel:()=>Tp,foundationTabPanelShadowOptions:()=>Ep,foundationTabPanelStyles:()=>xp,foundationTabPanelTemplate:()=>$p,foundationTabShadowOptions:()=>yp,foundationTabStyles:()=>gp,foundationTabTemplate:()=>fp,foundationTabs:()=>Lp,foundationTabsShadowOptions:()=>Rp,foundationTabsStyles:()=>kp,foundationTabsTemplate:()=>Dp,foundationTextArea:()=>Pp,foundationTextAreaShadowOptions:()=>_p,foundationTextAreaStyles:()=>Np,foundationTextAreaTemplate:()=>Fp,foundationTextField:()=>Wp,foundationTextFieldShadowOptions:()=>Gp,foundationTextFieldStyles:()=>Bp,foundationTextFieldTemplate:()=>Vp,foundationToast:()=>em,foundationToastShadowOptions:()=>Jp,foundationToastStyles:()=>qp,foundationToastTemplate:()=>Xp,foundationToolbar:()=>sm,foundationToolbarShadowOptions:()=>nm,foundationToolbarStyles:()=>tm,foundationToolbarTemplate:()=>im,foundationTooltip:()=>hm,foundationTooltipShadowOptions:()=>cm,foundationTooltipStyles:()=>rm,foundationTooltipTemplate:()=>lm,foundationTreeItem:()=>bm,foundationTreeItemShadowOptions:()=>gm,foundationTreeItemStyles:()=>pm,foundationTreeItemTemplate:()=>mm,foundationTreeView:()=>Sm,foundationTreeViewShadowOptions:()=>xm,foundationTreeViewStyles:()=>ym,foundationTreeViewTemplate:()=>wm,foundationUrlInput:()=>Rm,foundationUrlInputShadowOptions:()=>km,foundationUrlInputStyles:()=>Em,foundationUrlInputTemplate:()=>Tm,foundationVerificationCodeInput:()=>Pm,foundationVerificationCodeInputShadowOptions:()=>Nm,foundationVerificationCodeInputStyles:()=>Am,foundationVerificationCodeInputTemplate:()=>Lm,fromBinaryExpression:()=>yg,fromMethodExpression:()=>wg,fuiAccentPalette:()=>Po,fuiAccentSwatch:()=>Ho,fuiCardFillColor:()=>Bo,fuiCardForegroundColor:()=>Go,fuiDefaultCardFillColor:()=>Ao,fuiDefaultCardPalette:()=>Lo,fuiFillColor:()=>Uo,fuiNeutralPalette:()=>Mo,fuiNeutralSwatch:()=>Fo,getBannerTemplate:()=>at,getBrowserLocale:()=>po,getCriteriaBuilder:()=>Ou,getDefaultConfig:()=>nn,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>Tn,getDisplayFormatForLang:()=>mo,getDropdownMenuTemplate:()=>Kn,getErrorDialogTemplate:()=>La,getExports:()=>an,getFontawesomeIconsCss:()=>wr,getNavItems:()=>sf,getPrefixedCategorizedMultiselect:()=>Vt,getPrefixedCronBuilder:()=>au,getPrefixedDatePicker:()=>co,getPrefixedErrorBanner:()=>pa,getPrefixedFileReader:()=>Ua,getPrefixedFileUpload:()=>qa,getPrefixedFilterTemplate:()=>ps,getPrefixedFlyout:()=>Vs,getPrefixedIcon:()=>xr,getPrefixedMultiselect:()=>cl,getPrefixedScheduler:()=>sc,getPrefixedSchedulerTimezone:()=>hu,getPrefixedSearchBar:()=>Cu,getPrefixedSnackbar:()=>Hh,getPrefixedStepper:()=>hf,getPrefixedStepperTab:()=>Zh,getPrefixedToast:()=>Kp,getPrefixedUrlInput:()=>Om,getTypeRampValue:()=>sn,groupsToCriteria:()=>X,hasDateValue:()=>go,inputControls:()=>Hc,isAbsoluteUrl:()=>qg,jsonConverter:()=>Md,mapType:()=>ws,maxheight:()=>rl,media:()=>Ge,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:()=>jo,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralPaletteValue:()=>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:()=>Qg,pillStyles:()=>kd,plusIcon:()=>wu,provideDesignSystem:()=>yd,provideTokens:()=>Jo,rebuildOperator:()=>bg,registerFoundationDesignSystem:()=>Sf,removeChildRouteParameter:()=>ef,removeLastPathSegment:()=>Zg,resolveDayjsLocale:()=>ho,routerLogger:()=>zg,routerProperty:()=>jg,ruleExpressionToGroup:()=>Cg,ruleToRuleExpression:()=>gg,ruleToRuleMethodExpression:()=>vg,schedulerCronBuilderStyles:()=>Pc,schedulerStyles:()=>ac,schedulerTimezoneStyles:()=>uu,selectCustomToken:()=>ln,sharedFieldStyles:()=>wl,singleOptionTemplate:()=>D,statusPillStyles:()=>Wh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>Zo,tagFor:()=>Ng,toIntlNumberFormat:()=>Al,transformOperatorNameToServerName:()=>mg,transformServerNameToOperatorName:()=>fg,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:()=>Ja,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:()=>Go,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:()=>jo,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,strokeWidth:()=>r.strokeWidth,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight});var n={};i.r(n),i.d(n,{accentPaletteValue:()=>cn,baseLayerLuminanceValue:()=>hn,controlCornerRadiusValue:()=>mn,designUnitValue:()=>vn,directionValue:()=>pn,neutralPaletteValue:()=>un});var a={};i.r(a),i.d(a,{BASE_LOGICAL_COMBINATORS:()=>Vm,BASE_OPERATORS:()=>Km,LOGICAL_COMBINATORS:()=>jm,NULL_COMBINATOR:()=>Gm});var s=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
2
2
|
${(0,r.accordionStyles)(e,t)}
|
|
3
|
-
`,c=(e,t)=>(0,
|
|
3
|
+
`,c=(e,t)=>(0,s.accordionTemplate)(e,t);class u extends s.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)}
|
|
5
5
|
|
|
6
6
|
slot[name='collapsed-icon'] {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
stroke: var(--accent-foreground-rest);
|
|
15
15
|
fill: none;
|
|
16
16
|
}
|
|
17
|
-
`,g=(e,t)=>(0,
|
|
17
|
+
`,g=(e,t)=>(0,s.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 $=(e,t)=>l.css`
|
|
18
18
|
:host {
|
|
19
19
|
--actions-opener-height-multiplier: 0.7px;
|
|
20
20
|
--actions-opener-bg-color: 249 254 255;
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
>
|
|
163
163
|
${e=>e.getTemplate(T(e))}
|
|
164
164
|
</div>
|
|
165
|
-
`;class R extends
|
|
165
|
+
`;class R extends s.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;(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()):(null===(e=this.actionsMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.actionsMenu.hidePopover()}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 k(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],D(e)):k(e):void 0}}(0,C.Cg)([l.observable],R.prototype,"actions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"is-vertical",mode:"boolean"})],R.prototype,"isVertical",void 0),(0,C.Cg)([(0,l.attr)({attribute:"add-default-actions",mode:"boolean"})],R.prototype,"addDefaultActions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close-on-action",mode:"boolean"})],R.prototype,"autoCloseOnAction",void 0),(0,C.Cg)([l.observable],R.prototype,"classNames",void 0),(0,C.Cg)([l.observable],R.prototype,"definition",void 0),(0,C.Cg)([l.attr],R.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],R.prototype,"open",void 0),(0,C.Cg)([l.attr],R.prototype,"buttonAppearance",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-disabled",mode:"boolean"})],R.prototype,"hideDisabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-menu-single-option",mode:"boolean"})],R.prototype,"hideMenuSingleOption",void 0),(0,C.Cg)([l.observable],R.prototype,"singleOption",void 0);const A=R.compose({baseName:"actions-menu",styles:S,template:I});function L(){return"undefined"!=typeof window&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)}class N{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 F{constructor(){this.noopProvider=new N}get(e){return e===F.DEFAULT_NAME?this.noopProvider:void 0}default(){return this.noopProvider}defaultName(){return F.DEFAULT_NAME}names(){return[F.DEFAULT_NAME]}getStatus(e){return(0,C.sH)(this,void 0,void 0,function*(){var t,i,o;return void 0!==e&&e!==F.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:F.DEFAULT_NAME,isDefault:!0,status:o}]})}}F.DEFAULT_NAME="default";const M=s.DI.createInterface(e=>e.singleton(F));const _=l.css`
|
|
166
166
|
:host {
|
|
167
167
|
display: block;
|
|
168
168
|
width: 800px;
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
</div>
|
|
335
335
|
`)}
|
|
336
336
|
`;var t}}
|
|
337
|
-
`;var V=i(95553),j=i(58749),G=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 j.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 G.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 V=i(95553),j=i(58749),G=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 j.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 G.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),a="or"===n.logic?Y.r.Or():Y.r.And(),s=K(e,a),r=e.length>1?{join:a}:{};n.negated?i.And([Y.r.Not(),s]):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 ae(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function se(e){const t=ae(e);return ie.has(t)?Z:oe.has(t)?ee:ne.has(t)?Q:J}function re(e){return ne.has(ae(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:a,value:s}=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";se(l).includes(a)?!Z.includes(a)&&!ee.includes(a)||"dateIsToday"===a||le(s)?re(l)&&Q.includes(a)&&!de(s)?o.push({field:e,operator:a,value:s,message:"Invalid numeric value"}):n.size>0&&!n.has(e)?o.push({field:e,operator:a,value:s,message:`Unknown field '${e}'`}):i.push(t):o.push({field:e,operator:a,value:s,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):o.push({field:e,operator:a,value:s,message:`Operator '${a}' is not allowed for field type ${l}`})}return{valid:i,invalid:o}}function ue(e,t){var i;const o=[],n=[];for(const a of e){if(!(null==a?void 0:a.clauses)||!Array.isArray(a.clauses)){n.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:s}=ce(a.clauses,t);n.push(...s),e.length>0&&o.push({logic:null!==(i=a.logic)&&void 0!==i?i:"and",negated:a.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,a,s,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!==(a=null!=i?i:(e=>(0,be.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==a?a:(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===(s=null==e?void 0:e.createdAt)||void 0===s?void 0:s.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,a,s,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===(s=null===(a=e.config)||void 0===a?void 0:a.snackbar)||void 0===s?void 0:s.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],a=document.createElement(`${n}-banner`),s=(0,he.cL)(i);(null===(o=null==s?void 0:s.children)||void 0===o?void 0:o.length)>0&&(a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%"),s.appendChild(a),a.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 s.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:s,invalid:r}=ue(t.groups,this.fieldMetadata);if(r.length>0&&(xe("Criteria validation error",0===(a=r).length?"":1===a.length?a[0].message:a.map(e=>e.message).join("; "),T(this)),this.$emit("validation-errors",r)),s.length>0){const e=[...this.activeGroups,...s],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 a}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`
|
|
338
338
|
:host {
|
|
339
339
|
display: flex;
|
|
340
340
|
justify-content: center;
|
|
@@ -521,19 +521,19 @@
|
|
|
521
521
|
</div>
|
|
522
522
|
`)}
|
|
523
523
|
`;var t}}
|
|
524
|
-
`;class De extends
|
|
524
|
+
`;class De extends s.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){E(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)([M],De.prototype,"providerRegistry",void 0),(0,C.Cg)([l.observable],De.prototype,"status",void 0),(0,C.Cg)([l.observable],De.prototype,"open",void 0),(0,C.Cg)([l.observable],De.prototype,"state",void 0),(0,C.Cg)([l.observable],De.prototype,"isInstalling",void 0),(0,C.Cg)([l.volatile],De.prototype,"chromeStatusLabel",null),(0,C.Cg)([l.volatile],De.prototype,"canInstall",null),(0,C.Cg)([l.volatile],De.prototype,"isDownloading",null);const Ie=De.compose({baseName:"ai-indicator",template:ke,styles:Te}),Re=(e,t)=>l.css`
|
|
525
525
|
${(0,r.anchorStyles)(e,t)}
|
|
526
|
-
`,Ae=(e,t)=>(0,
|
|
526
|
+
`,Ae=(e,t)=>(0,s.anchorTemplate)(e,t);class Le extends r.Anchor{}const Ne={delegatesFocus:!0,mode:"open"},Fe={},Me=Le.compose(Object.assign({baseName:"anchor",template:Ae,styles:Re,shadowOptions:Ne},Fe)),_e=(e,t)=>(0,s.anchoredRegionTemplate)(e,t),He=(e,t)=>l.css`
|
|
527
527
|
${(0,r.anchoredRegionStyles)(e,t)}
|
|
528
528
|
`;class Pe extends r.AnchoredRegion{}const ze={delegatesFocus:!0,mode:"open"},Ue={},Be=Pe.compose(Object.assign({baseName:"anchored-region",template:_e,styles:He,shadowOptions:ze},Ue)),Ve=(e,t)=>l.css`
|
|
529
529
|
${(0,r.avatarStyles)(e,t)}
|
|
530
|
-
`,je=(e,t)=>(0,
|
|
530
|
+
`,je=(e,t)=>(0,s.avatarTemplate)(e,t),Ge=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
534
|
`;class Ye extends r.Avatar{}const We={delegatesFocus:!0,mode:"open"},qe={media:Ge},Ke=Ye.compose(Object.assign({baseName:"avatar",template:je,styles:Ve,shadowOptions:We},qe)),Xe=(e,t)=>l.css`
|
|
535
535
|
${(0,r.badgeStyles)(e,t)}
|
|
536
|
-
`,Je=(e,t)=>(0,
|
|
536
|
+
`,Je=(e,t)=>(0,s.badgeTemplate)(e,t);class Qe extends r.Badge{}const Ze=void 0,et={},tt=Qe.compose(Object.assign({baseName:"badge",template:Je,styles:Xe,shadowOptions:Ze},et));var it=i(66506);const ot=(0,it.createLogger)("foundation-ui"),nt=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
|
-
`,rt={mode:"open",delegatesFocus:!0};class lt extends
|
|
637
|
+
`,st=l.html`
|
|
638
|
+
${e=>at(T(e))}
|
|
639
|
+
`,rt={mode:"open",delegatesFocus:!0};class lt extends s.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){ot.error(e)}})}}(0,C.Cg)([l.observable],lt.prototype,"dismissAnimation",void 0),(0,C.Cg)([l.observable],lt.prototype,"notification",void 0);const dt=lt.compose({baseName:"banner",styles:nt,template:st,shadowOptions:rt}),ct=(e,t)=>l.css`
|
|
640
640
|
${(0,r.breadcrumbStyles)(e,t)}
|
|
641
|
-
`,ut=(e,t)=>(0,
|
|
641
|
+
`,ut=(e,t)=>(0,s.breadcrumbTemplate)(e,t);class ht extends r.Breadcrumb{}const pt=void 0,mt={},vt=ht.compose(Object.assign({baseName:"breadcrumb",template:ut,styles:ct,shadowOptions:pt},mt)),gt=(e,t)=>l.css`
|
|
642
642
|
${(0,r.breadcrumbItemStyles)(e,t)}
|
|
643
|
-
`,ft=(e,t)=>(0,
|
|
643
|
+
`,ft=(e,t)=>(0,s.breadcrumbItemTemplate)(e,t);class bt extends r.BreadcrumbItem{}const yt=void 0,wt={separator:"/"},Ct=bt.compose(Object.assign({baseName:"breadcrumb-item",template:ft,styles:gt,shadowOptions:yt},wt)),xt=(e,t)=>l.css`
|
|
644
644
|
${(0,r.buttonStyles)(e,t)}
|
|
645
|
-
`,$t=(e,t)=>(0,
|
|
645
|
+
`,$t=(e,t)=>(0,s.buttonTemplate)(e,t);class St extends r.Button{}const Et={delegatesFocus:!0,mode:"open"},Ot={},Tt=St.compose(Object.assign({baseName:"button",template:$t,styles:xt,shadowOptions:Et},Ot)),kt=()=>l.css`
|
|
646
646
|
${r.CalendarStyles}
|
|
647
|
-
`,Dt=(e,t)=>(0,
|
|
647
|
+
`,Dt=(e,t)=>(0,s.calendarTemplate)(e,t);class It extends r.Calendar{}const Rt={delegatesFocus:!0,mode:"open"},At={},Lt=It.compose(Object.assign({baseName:"calendar",template:Dt,styles:kt,shadowOptions:Rt},At)),Nt=(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
|
-
`,Ft=(e,t)=>(0,
|
|
653
|
+
`,Ft=(e,t)=>(0,s.cardTemplate)(e,t);class Mt extends r.Card{}const _t=void 0,Ht={},Pt=Mt.compose(Object.assign({baseName:"card",template:Ft,styles:Nt,shadowOptions:_t},Ht));var zt;!function(e){e.BELOW="below",e.ABOVE="above"}(zt||(zt={}));const Ut=450,Bt=l.css`
|
|
654
654
|
.root {
|
|
655
655
|
position: relative;
|
|
656
656
|
width: 100%;
|
|
@@ -849,7 +849,7 @@
|
|
|
849
849
|
class=${e=>{var t;return(0,x.x)("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}
|
|
850
850
|
>
|
|
851
851
|
<slot
|
|
852
|
-
${(0,l.slotted)({property:"defaultSlottedNodes",filter:
|
|
852
|
+
${(0,l.slotted)({property:"defaultSlottedNodes",filter:s.whitespaceFilter})}
|
|
853
853
|
></slot>
|
|
854
854
|
</label>
|
|
855
855
|
<${e}-button class="control-button" part="control-button">
|
|
@@ -911,9 +911,9 @@
|
|
|
911
911
|
</div>
|
|
912
912
|
`,jt=l.html`
|
|
913
913
|
${Vt()}
|
|
914
|
-
`,Gt=void 0,Yt={};class Wt extends
|
|
914
|
+
`,Gt=void 0,Yt={};class Wt extends s.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=zt.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===zt.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?zt.BELOW:zt.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<t.height&&o>n?zt.ABOVE:zt.BELOW}}e===zt.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===zt.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){E(e,this)&&(this.open=!1)}}(0,C.Cg)([l.attr],Wt.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Wt.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wt.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wt.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Wt.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Wt.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Wt.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Wt.prototype,"open",void 0),(0,C.Cg)([l.observable],Wt.prototype,"options",void 0),(0,C.Cg)([l.observable],Wt.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Wt.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Wt.prototype,"position",void 0),(0,C.Cg)([l.volatile],Wt.prototype,"getPlaceholder",null);const qt=Wt.compose(Object.assign({baseName:"categorized-multiselect",template:jt,styles:Bt,shadowOptions:Gt},Yt)),Kt=(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=Number(this.maxRows)||0;this.moreRowsAvailable="boolean"==typeof o.MORE_ROWS?o.MORE_ROWS:t>0&&n>0&&t>=n,this.nextRequestOffset="number"==typeof o.NEXT_OFFSET&&o.NEXT_OFFSET>0?o.NEXT_OFFSET: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 G.b;o.withExpression((new j.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;if(!e)return;e.scrollTop+e.clientHeight>=e.scrollHeight-fi.scrollLoadThresholdPx&&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&&t!==e&&(this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),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.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."))}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&&(e.scrollHeight>e.clientHeight||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))?gi(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),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.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),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;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const i=e.map(e=>this.rowToOption(e));this.options=[...null!==(t=this.options)&&void 0!==t?t:[],...i],this.renderListboxOptions(i),this.renderedOptionsCount=this.options.length,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
|
+
`,Xt=(e,t)=>(0,s.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),ai=i(40370),si=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,ai.C)(s.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=si.OD.MAX_ROWS_250,this.maxView=si.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?si.OD.REQUEST_SERVER_ROW_ID:si.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 a=e||!this.datasource.initialized;a||(this.connect.dataLogoff(this.sourceRef),this.clearData()),this.sourceRef=void 0;const s=yield this.datasource.init(this.datasourceOptions(),a);if(!n())if(s){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=Number(this.maxRows)||0;this.moreRowsAvailable="boolean"==typeof o.MORE_ROWS?o.MORE_ROWS:t>0&&n>0&&t>=n,this.nextRequestOffset="number"==typeof o.NEXT_OFFSET&&o.NEXT_OFFSET>0?o.NEXT_OFFSET: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 G.b;o.withExpression((new j.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;if(!e)return;e.scrollTop+e.clientHeight>=e.scrollHeight-fi.scrollLoadThresholdPx&&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&&t!==e&&(this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),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.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,a,s;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===(s=null===(a=this.select)||void 0===a?void 0:a.shadowRoot)||void 0===s?void 0:s.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):ot.warn("Unable to locate listbox element, infinite scroll will not be available."))}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&&(e.scrollHeight>e.clientHeight||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))?gi(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),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.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),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;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const i=e.map(e=>this.rowToOption(e));this.options=[...null!==(t=this.options)&&void 0!==t?t:[],...i],this.renderListboxOptions(i),this.renderedOptionsCount=this.options.length,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`
|
|
917
917
|
.combo-box-indicator {
|
|
918
918
|
transition-property: transform;
|
|
919
919
|
transition-duration: 0.2s;
|
|
@@ -935,7 +935,7 @@
|
|
|
935
935
|
@keydown="${(e,t)=>e.keydownHandler(t.event)}"
|
|
936
936
|
>
|
|
937
937
|
<div class="control" part="control">
|
|
938
|
-
${(0,
|
|
938
|
+
${(0,s.startSlotTemplate)(e,t)}
|
|
939
939
|
<slot name="control">
|
|
940
940
|
<input
|
|
941
941
|
aria-activedescendant="${e=>e.activeDescendant}"
|
|
@@ -962,7 +962,7 @@
|
|
|
962
962
|
<slot name="indicator">${t.indicator||""}</slot>
|
|
963
963
|
</div>
|
|
964
964
|
</slot>
|
|
965
|
-
${(0,
|
|
965
|
+
${(0,s.endSlotTemplate)(e,t)}
|
|
966
966
|
</div>
|
|
967
967
|
<div
|
|
968
968
|
class="listbox"
|
|
@@ -975,11 +975,11 @@
|
|
|
975
975
|
>
|
|
976
976
|
<slot
|
|
977
977
|
${(0,l.ref)("slottedDatasource")}
|
|
978
|
-
${(0,l.slotted)({filter:
|
|
978
|
+
${(0,l.slotted)({filter:s.Listbox.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
|
|
979
979
|
></slot>
|
|
980
980
|
</div>
|
|
981
981
|
</template>
|
|
982
|
-
`;var Ci,xi;class $i extends r.Combobox{constructor(){super(...arguments),Ci.set(this,void 0),xi.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=ii()(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(),
|
|
982
|
+
`;var Ci,xi;class $i extends r.Combobox{constructor(){super(...arguments),Ci.set(this,void 0),xi.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=ii()(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(),a=this.options?this.options.findIndex(n):-1,s=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(i=this.options[a])||void 0===i?void 0:i.text;this.selectedIndex=r&&r!==s?a:this.selectedIndex,e&&""!==e.trim()&&-1===a&&(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();const i=!!this.async;super.slottedOptionsChanged(e,t),this.updateValue(i)}enableAsyncForInfiniteScrollDatasource(){var e;if(this.async)return;const t=null===(e=this.slottedDatasource)||void 0===e?void 0:e.assignedNodes().find(e=>e instanceof bi);(null==t?void 0:t.infiniteScroll)&&(this.async=!0)}filterOptions(){this.autocomplete&&this.autocomplete!==s.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(E(e,this))this.open=!1;else{if(O(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!O(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,xi,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,xi,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===s.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,Ci,"f")||(0,C.GG)(this,Ci,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,C.gn)(this,Ci,"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 bi);t.length>0?(gi(t[0],this.control.value),l.DOM.queueUpdate(()=>{this.control.value=e})):ot.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===s.ComboboxAutocomplete.both&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}Ci=new WeakMap,xi=new WeakMap,(0,C.Cg)([l.observable],$i.prototype,"activeDescendant",null),(0,C.Cg)([l.observable],$i.prototype,"slottedDatasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],$i.prototype,"async",void 0),(0,C.Cg)([l.attr],$i.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"case-sensitive"})],$i.prototype,"caseSensitive",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"ignore-input-click"})],$i.prototype,"ignoreInputClick",void 0),(0,C.Cg)([(0,l.attr)({attribute:"filter-mode"})],$i.prototype,"filterMode",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],$i.prototype,"scrollToSelectedWhenOpening",void 0),(0,C.Cg)([l.observable],$i.prototype,"scrollToSelectedWhenOpeningOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-when-selection-changes"})],$i.prototype,"scrollWhenSelectionChanges",void 0),(0,C.Cg)([l.observable],$i.prototype,"scrollWhenSelectionChangesOptions",void 0);const Si={delegatesFocus:!0,mode:"open"},Ei={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 '},Oi=$i.compose(Object.assign({baseName:"combobox",template:wi,styles:yi,shadowOptions:Si},Ei));var Ti=i(98316);const ki=(e,t)=>l.css`
|
|
983
983
|
:host {
|
|
984
984
|
--light-size: 12px;
|
|
985
985
|
--height: calc(var(--design-unit) * 2px + var(--light-size));
|
|
@@ -1032,13 +1032,13 @@
|
|
|
1032
1032
|
${(0,l.when)(e=>e.showLabel,l.html`
|
|
1033
1033
|
<div class="label">${e=>e.label}</div>
|
|
1034
1034
|
`)}
|
|
1035
|
-
`;class Ii extends
|
|
1035
|
+
`;class Ii extends s.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)([ui.dm],Ii.prototype,"connect",void 0),(0,C.Cg)([Ti.N],Ii.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-label"})],Ii.prototype,"showLabel",void 0),(0,C.Cg)([l.observable],Ii.prototype,"label",void 0),(0,C.Cg)([l.observable],Ii.prototype,"colour",void 0);const Ri=Ii.compose({baseName:"connection-indicator",template:Di,styles:ki}),Ai=(e,t)=>l.css`
|
|
1036
1036
|
${(0,r.dataGridStyles)(e,t)}
|
|
1037
|
-
`,Li=(e,t)=>(0,
|
|
1037
|
+
`,Li=(e,t)=>(0,s.dataGridTemplate)(e,t);class Ni extends r.DataGrid{}const Fi=void 0,Mi={},_i=Ni.compose(Object.assign({baseName:"data-grid",template:Li,styles:Ai,shadowOptions:Fi},Mi)),Hi=(e,t)=>l.css`
|
|
1038
1038
|
${(0,r.dataGridCellStyles)(e,t)}
|
|
1039
|
-
`;class Pi extends r.DataGridCell{}const zi=void 0,Ui={},Bi=Pi.compose(Object.assign({baseName:"data-grid-cell",template:
|
|
1039
|
+
`;class Pi extends r.DataGridCell{}const zi=void 0,Ui={},Bi=Pi.compose(Object.assign({baseName:"data-grid-cell",template:s.dataGridCellTemplate,styles:Hi,shadowOptions:zi},Ui)),Vi=(e,t)=>l.css`
|
|
1040
1040
|
${(0,r.dataGridRowStyles)(e,t)}
|
|
1041
|
-
`;class ji extends r.DataGridRow{}const Gi=void 0,Yi={},Wi=ji.compose(Object.assign({baseName:"data-grid-row",template:
|
|
1041
|
+
`;class ji extends r.DataGridRow{}const Gi=void 0,Yi={},Wi=ji.compose(Object.assign({baseName:"data-grid-row",template:s.dataGridRowTemplate,styles:Vi,shadowOptions:Gi},Yi));var qi=i(94343),Ki=i.n(qi),Xi=i(58915),Ji=i.n(Xi),Qi=i(7554),Zi=i.n(Qi),eo=i(49916),to=i.n(eo),io=i(33839),oo=i.n(io);class no{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()}}Ki().extend(oo());class ao{constructor(e=null,t="default"){const i=new no(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+=Ki()(i.date).isLeapYear()?1:0)}getDay(e){return new no(new Date(this.year,this.number-1,e),this.lang)}}Ki().extend(oo());class so{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new no(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 ro=l.css`
|
|
1042
1042
|
:host {
|
|
1043
1043
|
position: relative;
|
|
1044
1044
|
}
|
|
@@ -1249,8 +1249,8 @@
|
|
|
1249
1249
|
</div>
|
|
1250
1250
|
`,uo=l.html`
|
|
1251
1251
|
${e=>co(T(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),No=(0,Oo.parseColorHexRGB)("#eeeeee"),Fo=r.SwatchRGB.create(No.r,No.g,No.b),Mo=r.PaletteRGB.from(Fo),_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 jo(e,t){return e.colorContrast(t,Vo)}const Go=zo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>jo(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`
|
|
1253
|
-
${(0,
|
|
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)!==(a=o)&&a!==n.split("-")[0]?Ki()().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var n,a}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 a=n.find(e=>e>t.dayNumber);a||(a=Math.min(...n));const s=t.dayNumber<a?a-t.dayNumber:a-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,s),i):(yo.v.warn("Date picker disabled days - all days of week have been disabled"),t)},xo=void 0,$o={};class So extends s.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 so(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 so(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 so(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 so(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),No=(0,Oo.parseColorHexRGB)("#eeeeee"),Fo=r.SwatchRGB.create(No.r,No.g,No.b),Mo=r.PaletteRGB.from(Fo),_o=(0,Oo.parseColorHexRGB)("#08c3a5"),Ho=r.SwatchRGB.create(_o.r,_o.g,_o.b),Po=r.PaletteRGB.from(Ho),{create:zo}=s.DesignToken,Uo=zo("fui-fill-color").withDefault(Io),Bo=zo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(Ao),Vo=14;function jo(e,t){return e.colorContrast(t,Vo)}const Go=zo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>jo(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 a=e=>e instanceof Date;!o||"object"!=typeof o||Array.isArray(o)||a(o)||!n||"object"!=typeof n||Array.isArray(n)||a(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),{}),an=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:nn(t)}},sn=(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 a=i[o];return a?e(n,a):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),a=r.typeRampBaseLineHeight.getValueFor(e);r.typeRampMinus1FontSize.setValueFor(e,sn(n,Wo.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,sn(a,Wo.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,sn(n,Wo.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,sn(a,Wo.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,sn(n,Wo.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,sn(a,Wo.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,sn(n,Wo.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,sn(a,Wo.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,sn(n,Wo.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,sn(a,Wo.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,sn(n,Wo.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,sn(a,Wo.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,sn(n,Wo.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,sn(a,Wo.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,sn(n,Wo.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,sn(a,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`
|
|
1253
|
+
${(0,s.display)("flex")}
|
|
1254
1254
|
:host {
|
|
1255
1255
|
flex: 1;
|
|
1256
1256
|
}
|
|
@@ -1258,7 +1258,7 @@
|
|
|
1258
1258
|
:host {
|
|
1259
1259
|
background-color: ${Uo};
|
|
1260
1260
|
}
|
|
1261
|
-
`.withBehaviors((0,
|
|
1261
|
+
`.withBehaviors((0,s.forcedColorsStylesheetBehavior)(l.css`
|
|
1262
1262
|
:host {
|
|
1263
1263
|
background-color: ${gn.A.ButtonFace};
|
|
1264
1264
|
box-shadow: 0 0 0 1px ${gn.A.CanvasText};
|
|
@@ -1619,11 +1619,11 @@
|
|
|
1619
1619
|
</dialog>
|
|
1620
1620
|
`,kn=l.html`
|
|
1621
1621
|
${e=>Tn(T(e))}
|
|
1622
|
-
`,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)),Nn=(e,t)=>l.css`
|
|
1622
|
+
`,Dn={mode:"open",delegatesFocus:!0},In={};class Rn extends s.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,a=this.startLeft,s=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,a=this.startLeft+t,r=!0;break;case"ne":o=this.startWidth+t,n=this.startHeight-i,s=this.startTop+i,r=!0;break;case"nw":o=this.startWidth-t,n=this.startHeight-i,a=this.startLeft+t,s=this.startTop+i,r=!0;break;case"e":o=this.startWidth+t;break;case"w":o=this.startWidth-t,a=this.startLeft+t,r=!0;break;case"s":n=this.startHeight+i;break;case"n":n=this.startHeight-i,s=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")&&(a-=e)}if(n<this.minHeight){const e=this.minHeight-n;n=this.minHeight,this.currentResizeHandle.includes("n")&&(s-=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")){a<0&&(o+=a,a=0);const e=l-a;o>e&&(o=e)}if(this.currentResizeHandle.includes("n")){s<0&&(n+=s,s=0);const e=d-s;n>e&&(n=e)}}this.mainElement.style.width=`${o}px`,this.mainElement.style.height=`${n}px`,r&&(this.mainElement.style.left=`${a}px`,this.mainElement.style.top=`${s}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)),Nn=(e,t)=>l.css`
|
|
1623
1623
|
${(0,r.disclosureStyles)(e,t)}
|
|
1624
|
-
`,Fn=(e,t)=>(0,
|
|
1624
|
+
`,Fn=(e,t)=>(0,s.disclosureTemplate)(e,t);class Mn extends s.Disclosure{}const _n=void 0,Hn={},Pn=Mn.compose(Object.assign({baseName:"disclosure",template:Fn,styles:Nn,shadowOptions:_n},Hn)),zn=(e,t)=>l.css`
|
|
1625
1625
|
${(0,r.dividerStyles)(e,t)}
|
|
1626
|
-
`,Un=(e,t)=>(0,
|
|
1626
|
+
`,Un=(e,t)=>(0,s.dividerTemplate)(e,t);class Bn extends s.Divider{}const Vn=void 0,jn={},Gn=Bn.compose(Object.assign({baseName:"divider",template:Un,styles:zn,shadowOptions:Vn},jn)),Yn=(e,t,i)=>l.css`
|
|
1627
1627
|
:host {
|
|
1628
1628
|
--dropdown-opener-height-multiplier: 0.7px;
|
|
1629
1629
|
--menu-item-height-multiplier: 0.7px;
|
|
@@ -1736,7 +1736,7 @@
|
|
|
1736
1736
|
</div>
|
|
1737
1737
|
`,Xn=l.html`
|
|
1738
1738
|
${e=>Kn(T(e))}
|
|
1739
|
-
`;class Jn extends
|
|
1739
|
+
`;class Jn extends s.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){E(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],Jn.prototype,"items",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Jn.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],Jn.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Jn.prototype,"classNames",void 0),(0,C.Cg)([l.attr],Jn.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],Jn.prototype,"open",void 0),(0,C.Cg)([l.attr],Jn.prototype,"buttonAppearance",void 0);const Qn=Jn.compose({baseName:"dropdown-menu",styles:Wn,template:Xn});var Zn=i(84686);const ea=l.css`
|
|
1740
1740
|
.environment-indicator {
|
|
1741
1741
|
font-size: 12px;
|
|
1742
1742
|
display: inline-flex;
|
|
@@ -1763,7 +1763,7 @@
|
|
|
1763
1763
|
.environment-indicator.lg .icon {
|
|
1764
1764
|
font-size: calc(var(--design-unit) * 3.5px);
|
|
1765
1765
|
}
|
|
1766
|
-
`,
|
|
1766
|
+
`,ta=l.html`
|
|
1767
1767
|
${e=>{return t=T(e),l.html`
|
|
1768
1768
|
${(0,l.when)(e=>e.config,l.html`
|
|
1769
1769
|
<div
|
|
@@ -1788,7 +1788,7 @@
|
|
|
1788
1788
|
</div>
|
|
1789
1789
|
`)}
|
|
1790
1790
|
`;var t}}
|
|
1791
|
-
`;var
|
|
1791
|
+
`;var ia=i(17190);const oa="default",na={level:oa,showIcon:!1,iconSize:"sm",backgroundColor:"#2222ff",textColor:"#ffffff",label:"DEFAULT"},aa=[na,{level:"dev",showIcon:!1,icon:"code",backgroundColor:"#ff6b35",label:"DEV"},{level:"prod",showIcon:!1,icon:"check-circle",backgroundColor:"#28a745",label:"PROD"}],sa=(0,ia.r)(),ra=s.DI.createInterface(e=>e.instance(sa),e=>e.instance(sa)),la=s.DI.createInterface("EnvironmentIndicatorConfig");function da(){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:[na]};s.DI.getOrCreateDOMContainer().register(s.Registration.instance(ra,sa),s.Registration.instance(la,o)),sa.publish(o)})}const ca=(0,it.createLogger)("EnvironmentIndicator");class ua extends s.FoundationElement{constructor(){super(...arguments),this.size="sm",this.textColor="#ffffff",this.icon="check-circle",this.iconSize="sm",this.useDefaultConfig=!1,this.config=na,this.envConfigs=aa}envConfigsChanged(){this.config=this.getEnvConfigByLevel()}diConfigChanged(){this.config=this.getEnvConfigByLevel()}subscribeToDiConfig(){const e=s.DI.getOrCreateDOMContainer().get(ra);e&&"function"==typeof e.subscribe?this.unsubscribeConfig=e.subscribe(e=>{this.diConfig=e}):ca.error("Observer not found or invalid in DI container")}connectedCallback(){super.connectedCallback(),this.diConfig=function(){try{const e=s.DI.getOrCreateDOMContainer().get(la);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){ca.error(e)}return Zn.H6!==oa?Zn.H6:this.useDefaultConfig?oa:void 0}getEnvConfigByLevel(){const e=this.getAttributesConfig(),t=this.getCurrentEnvironmentLevel();if(!t)return this.useDefaultConfig?na:void 0;if(this.label)return Object.assign(Object.assign(Object.assign({},na),{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],ua.prototype,"level",void 0),(0,C.Cg)([l.attr],ua.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-icon"})],ua.prototype,"showIcon",void 0),(0,C.Cg)([l.attr],ua.prototype,"size",void 0),(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],ua.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],ua.prototype,"textColor",void 0),(0,C.Cg)([l.attr],ua.prototype,"icon",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],ua.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"use-default-config"})],ua.prototype,"useDefaultConfig",void 0),(0,C.Cg)([l.observable],ua.prototype,"config",void 0),(0,C.Cg)([l.observable],ua.prototype,"envConfigs",void 0),(0,C.Cg)([l.observable],ua.prototype,"diConfig",void 0);const ha=ua.compose({baseName:"environment-indicator",template:ta,styles:ea}),pa=e=>l.html`
|
|
1792
1792
|
<${e}-banner ${(0,l.ref)("banner")}>
|
|
1793
1793
|
<div slot="content">
|
|
1794
1794
|
<div>
|
|
@@ -1797,7 +1797,7 @@
|
|
|
1797
1797
|
</div>
|
|
1798
1798
|
|
|
1799
1799
|
<${e}-button slot="action" appearance="lightweight" @click=${e=>e.dismiss()}>
|
|
1800
|
-
${e=>{var t,i,o,n,s,
|
|
1800
|
+
${e=>{var t,i,o,n,a,s,r,l;return(null===(n=null===(o=null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner)||void 0===o?void 0:o.dismissingAction)||void 0===n?void 0:n.label)||(null===(l=null===(r=null===(s=null===(a=e.notification)||void 0===a?void 0:a.config)||void 0===s?void 0:s.banner)||void 0===r?void 0:r.dismissingAction)||void 0===l?void 0:l.label)||"Ignore"}}
|
|
1801
1801
|
</${e}-button>
|
|
1802
1802
|
${(0,l.repeat)(e=>{var t,i,o,n;return(null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner.confirmingActions)||(null===(n=null===(o=e.notification)||void 0===o?void 0:o.config)||void 0===n?void 0:n.banner.confirmingActions)},l.html`
|
|
1803
1803
|
<${e}-button
|
|
@@ -1809,13 +1809,13 @@
|
|
|
1809
1809
|
</${e}-button>
|
|
1810
1810
|
`)}
|
|
1811
1811
|
</${e}-banner>
|
|
1812
|
-
`,
|
|
1813
|
-
${e=>
|
|
1814
|
-
`,
|
|
1812
|
+
`,ma=l.html`
|
|
1813
|
+
${e=>pa(T(e))}
|
|
1814
|
+
`,va={mode:"open",delegatesFocus:!0};class ga extends s.FoundationElement{connectedCallback(){super.connectedCallback(),ot.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){ot.error(e)}})}}(0,C.Cg)([l.observable],ga.prototype,"error",void 0),(0,C.Cg)([l.observable],ga.prototype,"notification",void 0);const fa=ga.compose({baseName:"error-banner",template:ma,shadowOptions:va});var ba;!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(ba||(ba={}));const ya=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"}`},wa=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)||it.LogLevels.error},Ca=(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},xa=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},$a=(0,it.createLogger)("foundation-error"),Sa={alert:e=>{alert(ya(e))},notification:(e,t)=>{var i,o,n,a,s,r,l,d,c,u,h,p,m;const v=t.split("-")[0],g=Ca("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===(s=null===(a=null==e?void 0:e.config)||void 0===a?void 0:a.notification)||void 0===s?void 0:s.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`);Ca("dialog-container",t).appendChild(o),o.error=e,o.show()},snackbar:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`);Ca("snack-container",t).appendChild(o),o.error=e},banner:(e,t,i)=>{var o;const n=t.split("-")[0],a=document.createElement(`${n}-error-banner`),s=(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 xa()})(i);(null===(o=null==s?void 0:s.children)||void 0===o?void 0:o.length)>0&&(a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%"),s.appendChild(a),a.error=e}},Ea=(e,t,i)=>{$a.log({message:ya(e),level:wa(e)});Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{Sa[o]&&Sa[o](e,t,i)})};class Oa{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 Ta{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 ka=l.html`
|
|
1815
1815
|
<template ${(0,l.ref)("errorBoundary")}>
|
|
1816
1816
|
<slot></slot>
|
|
1817
1817
|
</template>
|
|
1818
|
-
`,
|
|
1818
|
+
`,Da={mode:"open",delegatesFocus:!0};class Ia extends s.FoundationElement{constructor(){super(...arguments),this.logger=(0,it.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(ba.ERROR_BOUNDARY_EVENT,e=>{e.stopImmediatePropagation(),Ea(e.detail,this.tagName,this.errorBoundary)}),this.resourceName){if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))return void ot.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;Ea((new Oa).withTitle(e).withErrorDetails(i).withNotification((new Ta).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],Ia.prototype,"errorBoundary",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Ia.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Ia.prototype,"closeTimeout",void 0),(0,C.Cg)([hi.yW],Ia.prototype,"datasource",void 0);const Ra=Ia.compose({baseName:"error-boundary",template:ka,shadowOptions:Da}),Aa=l.css`
|
|
1819
1819
|
:host {
|
|
1820
1820
|
--design-unit: 3;
|
|
1821
1821
|
--dialog-max-width: 358px;
|
|
@@ -1834,12 +1834,12 @@
|
|
|
1834
1834
|
overflow: hidden;
|
|
1835
1835
|
min-height: var(--error-details-min-height);
|
|
1836
1836
|
}
|
|
1837
|
-
`,
|
|
1837
|
+
`,La=e=>l.html`
|
|
1838
1838
|
<${e}-dialog show-close-icon="false" ${(0,l.ref)("dialog")}>
|
|
1839
1839
|
<h2 slot="top" class="title">${e=>{var t;return null===(t=e.error)||void 0===t?void 0:t.title}}</h2>
|
|
1840
1840
|
<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>
|
|
1841
1841
|
<${e}-button slot="bottom" appearance="lightweight" @click=${e=>{e.dismiss()}}>
|
|
1842
|
-
${e=>{var t,i,o,n,s,
|
|
1842
|
+
${e=>{var t,i,o,n,a,s,r,l;return(null===(n=null===(o=null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.dialog)||void 0===o?void 0:o.dismissingAction)||void 0===n?void 0:n.label)||(null===(l=null===(r=null===(s=null===(a=e.notification)||void 0===a?void 0:a.config)||void 0===s?void 0:s.dialog)||void 0===r?void 0:r.dismissingAction)||void 0===l?void 0:l.label)||"Ignore"}}
|
|
1843
1843
|
</${e}-button>
|
|
1844
1844
|
${(0,l.repeat)(e=>{var t,i,o,n;return(null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.dialog.confirmingActions)||(null===(n=null===(o=e.notification)||void 0===o?void 0:o.config)||void 0===n?void 0:n.dialog.confirmingActions)},l.html`
|
|
1845
1845
|
<${e}-button
|
|
@@ -1851,9 +1851,9 @@
|
|
|
1851
1851
|
</${e}-button>
|
|
1852
1852
|
`)}
|
|
1853
1853
|
</${e}-dialog>
|
|
1854
|
-
`,
|
|
1855
|
-
${e=>
|
|
1856
|
-
`,
|
|
1854
|
+
`,Na=l.html`
|
|
1855
|
+
${e=>La(T(e))}
|
|
1856
|
+
`,Fa={mode:"open",delegatesFocus:!0};class Ma extends s.FoundationElement{connectedCallback(){super.connectedCallback(),ot.deprecated("ErrorDialog","Use `${prefix}-dialog` instead.")}show(){this.dialog.show()}dismiss(){var e,t,i,o,n,a,s,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===(s=null===(a=null===(n=this.notification)||void 0===n?void 0:n.config)||void 0===a?void 0:a.dialog)||void 0===s?void 0:s.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){ot.error(e)}}}(0,C.Cg)([l.observable],Ma.prototype,"error",void 0),(0,C.Cg)([l.observable],Ma.prototype,"notification",void 0);const _a=Ma.compose({baseName:"error-dialog",template:Na,styles:Aa,shadowOptions:Fa});class Ha extends s.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){Ce({title:e,body:t,config:{toast:{type:"warning",autoClose:!0,closeTimeout:5e3}}},this.tagName)}}(0,C.Cg)([l.attr],Ha.prototype,"label",void 0),(0,C.Cg)([l.attr],Ha.prototype,"accept",void 0),(0,C.Cg)([(0,l.attr)({attribute:"file-size-limit-bytes"})],Ha.prototype,"fileSizeLimitBytes",void 0),(0,C.Cg)([l.observable],Ha.prototype,"fileName",void 0),(0,C.Cg)([l.observable],Ha.prototype,"isProcessing",void 0);const Pa=(e,t,i)=>l.css`
|
|
1857
1857
|
/* Host */
|
|
1858
1858
|
:host {
|
|
1859
1859
|
display: flex;
|
|
@@ -1903,9 +1903,9 @@
|
|
|
1903
1903
|
justify-content: center;
|
|
1904
1904
|
z-index: 2;
|
|
1905
1905
|
}
|
|
1906
|
-
`,
|
|
1907
|
-
${
|
|
1908
|
-
`,
|
|
1906
|
+
`,za=(e,t)=>l.css`
|
|
1907
|
+
${Pa("foundation",e,t)}
|
|
1908
|
+
`,Ua=e=>l.html`
|
|
1909
1909
|
<template>
|
|
1910
1910
|
<div class="file-reader">
|
|
1911
1911
|
${(0,l.when)(e=>e.isProcessing,l.html`
|
|
@@ -1941,9 +1941,9 @@
|
|
|
1941
1941
|
`)}
|
|
1942
1942
|
</div>
|
|
1943
1943
|
</template>
|
|
1944
|
-
`,
|
|
1945
|
-
${e=>
|
|
1946
|
-
`;class
|
|
1944
|
+
`,Ba=l.html`
|
|
1945
|
+
${e=>Ua(T(e))}
|
|
1946
|
+
`;class Va extends Ha{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"})],Va.prototype,"autoProcess",void 0),(0,C.Cg)([(0,l.attr)({attribute:"processing-delay-ms"})],Va.prototype,"processingDelayMs",void 0),(0,C.Cg)([l.observable],Va.prototype,"fileContent",void 0),(0,C.Cg)([l.observable],Va.prototype,"onFileRead",void 0);const ja=Va.compose({baseName:"file-reader",styles:za,template:Ba});var Ga=i(17465),Ya=i(32748);const Wa=l.css`
|
|
1947
1947
|
/* Host */
|
|
1948
1948
|
:host {
|
|
1949
1949
|
display: flex;
|
|
@@ -1991,7 +1991,7 @@
|
|
|
1991
1991
|
fast-data-grid-row {
|
|
1992
1992
|
align-items: center;
|
|
1993
1993
|
}
|
|
1994
|
-
`,
|
|
1994
|
+
`,qa=e=>l.html`
|
|
1995
1995
|
<template>
|
|
1996
1996
|
<div class="file-selection">
|
|
1997
1997
|
<input type="file" multiple ${(0,l.ref)("fileInput")}
|
|
@@ -2017,13 +2017,13 @@
|
|
|
2017
2017
|
</${e}-data-grid>
|
|
2018
2018
|
</div>
|
|
2019
2019
|
</template>
|
|
2020
|
-
`,
|
|
2021
|
-
${e=>
|
|
2022
|
-
`,
|
|
2020
|
+
`,Ka=l.html`
|
|
2021
|
+
${e=>qa(T(e))}
|
|
2022
|
+
`,Xa=e=>{const t=new FormData;return e.forEach(e=>{t.append(e.name,e)}),t},Ja=(e,t,i,o)=>{const n=new Headers;return n.append("SESSION_AUTH_TOKEN",i),o.post(e,{body:t,headers:n})},Qa=(e,t,i,o="GET",n,a,s="zero")=>{const r=new Headers;r.append("SESSION_AUTH_TOKEN",i),fetch(e,{method:o,body:a,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&&Ce({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"}}},s),ot.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&&Ce({title:"Success",body:"File downloaded successfully",config:{toast:{autoClose:!0,closeTimeout:5e3,type:"success"}}},s),ot.info("File downloaded successfully")}}).catch(e=>{ot.error(e)})},Za=["image/png","image/bmp","image/gif","image/jpeg","image/jpg"],es=["text/plain","text/csv"],ts=["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"],is=l.html`
|
|
2023
2023
|
${(0,l.when)(e=>e.rowData,l.html`
|
|
2024
2024
|
${e=>"DATETIME"===e.columnDefinition.type?(0,pi.zT)(e.rowData[e.columnDefinition.columnDataKey]):e.rowData[e.columnDefinition.columnDataKey]}
|
|
2025
2025
|
`)}
|
|
2026
|
-
`;class
|
|
2026
|
+
`;class os extends Ha{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,...Za]:"office/*"===t?e=[...e,...ts]:"text/*"===t?e=[...e,...es]: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 G.b).withExpression((new j.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:Ga.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=>{Ga.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`
|
|
2027
2027
|
<template>
|
|
2028
2028
|
<div class="download-button-container">
|
|
2029
2029
|
<${e}-button
|
|
@@ -2034,7 +2034,7 @@
|
|
|
2034
2034
|
</${e}-button>
|
|
2035
2035
|
</div>
|
|
2036
2036
|
</template>
|
|
2037
|
-
`}}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:
|
|
2037
|
+
`}}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:is}}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=Xa(this.selectedFiles);e.append(this.uploadKey,this.entityId);const t=yield Ja(this.uploadEventName,e,this.session.getItem("authToken","session"),this.http);if(t.ERROR)return Ga.v.error(t.ERROR),void this.$emit("errorOut",t.ERROR);Ga.v.info(t),this.$emit("success",t),this.clearSelection()}catch(e){this.$emit("errorOut",e),Ga.v.error(e)}})}handleFileDownload(e){const t=this.tagName.toLowerCase().split("-")[0];Qa(this.downloadEventName(e),e.FILE_NAME,this.session.getItem("authToken","session"),"GET",!0,void 0,t)}}(0,C.Cg)([l.observable],os.prototype,"gridCriteria",void 0),(0,C.Cg)([ui.dm],os.prototype,"connect",void 0),(0,C.Cg)([Ya.l],os.prototype,"http",void 0),(0,C.Cg)([Ti.N],os.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({attribute:"uploaded-files-resource-name"})],os.prototype,"uploadedFilesResourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-event-name"})],os.prototype,"uploadEventName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"field-name"})],os.prototype,"fieldName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"entity-id"})],os.prototype,"entityId",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-key"})],os.prototype,"uploadKey",void 0),(0,C.Cg)([(0,l.attr)({attribute:"grid-fields"})],os.prototype,"gridFields",void 0),(0,C.Cg)([l.observable],os.prototype,"fileName",void 0),(0,C.Cg)([l.observable],os.prototype,"uploadedFilesList",void 0),(0,C.Cg)([l.observable],os.prototype,"filesGridColumnDefinitions",void 0);const ns=void 0,as={},ss=os.compose(Object.assign({baseName:"file-upload",styles:Wa,template:Ka,shadowOptions:ns},as)),rs=l.css`
|
|
2038
2038
|
.filter-wrapper {
|
|
2039
2039
|
border: 1px solid gray;
|
|
2040
2040
|
border-radius: calc(var(--design-unit) * 2px);
|
|
@@ -2085,12 +2085,12 @@
|
|
|
2085
2085
|
.flex-row foundation-select {
|
|
2086
2086
|
flex: 1;
|
|
2087
2087
|
}
|
|
2088
|
-
`,
|
|
2089
|
-
<div class="close-icon" @click=${e=>e.clear()}>${
|
|
2090
|
-
`;function
|
|
2088
|
+
`,ls=(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`,ds=l.html`
|
|
2089
|
+
<div class="close-icon" @click=${e=>e.clear()}>${ls()}</div>
|
|
2090
|
+
`;function cs(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 us=[{name:"All",value:"all",selected:!0},{name:"True",value:"true"},{name:"False",value:"false"},{name:"N/A",value:"null"}],hs=(e,t)=>{switch(e.type){case"number":return(e=>l.html`
|
|
2091
2091
|
<div class="flex-row">
|
|
2092
2092
|
<div>${e=>e.label}</div>
|
|
2093
|
-
${
|
|
2093
|
+
${ds}
|
|
2094
2094
|
</div>
|
|
2095
2095
|
<div class="flex-row">
|
|
2096
2096
|
<${e}-text-field
|
|
@@ -2109,7 +2109,7 @@
|
|
|
2109
2109
|
`)(t);case"date":return(e=>l.html`
|
|
2110
2110
|
<div class="flex-row">
|
|
2111
2111
|
<div>${e=>e.label}</div>
|
|
2112
|
-
${
|
|
2112
|
+
${ds}
|
|
2113
2113
|
</div>
|
|
2114
2114
|
<div class="flex-row">
|
|
2115
2115
|
<${e}-text-field
|
|
@@ -2126,11 +2126,11 @@
|
|
|
2126
2126
|
`)(t);case"boolean":return(e=>l.html`
|
|
2127
2127
|
<div class="flex-row">
|
|
2128
2128
|
<div>${e=>e.label}</div>
|
|
2129
|
-
${
|
|
2129
|
+
${ds}
|
|
2130
2130
|
</div>
|
|
2131
2131
|
<div class="flex-row">
|
|
2132
|
-
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(
|
|
2133
|
-
${(0,l.repeat)(()=>
|
|
2132
|
+
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(cs(t))}}">
|
|
2133
|
+
${(0,l.repeat)(()=>us,l.html`
|
|
2134
2134
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2135
2135
|
${e=>e.name}
|
|
2136
2136
|
</${e}-option>
|
|
@@ -2140,10 +2140,10 @@
|
|
|
2140
2140
|
`)(t);case"enum":return(e=>l.html`
|
|
2141
2141
|
<div class="flex-row">
|
|
2142
2142
|
<div>${e=>e.label}</div>
|
|
2143
|
-
${
|
|
2143
|
+
${ds}
|
|
2144
2144
|
</div>
|
|
2145
2145
|
<div class="flex-row">
|
|
2146
|
-
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(
|
|
2146
|
+
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(cs(t))}}">
|
|
2147
2147
|
${(0,l.repeat)(e=>e.enumFilterOptions,l.html`
|
|
2148
2148
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2149
2149
|
${e=>e.name}
|
|
@@ -2154,7 +2154,7 @@
|
|
|
2154
2154
|
`)(t);default:return(e=>l.html`
|
|
2155
2155
|
<div class="flex-row">
|
|
2156
2156
|
<div>${e=>e.label}</div>
|
|
2157
|
-
${
|
|
2157
|
+
${ds}
|
|
2158
2158
|
</div>
|
|
2159
2159
|
<div class="flex-row">
|
|
2160
2160
|
<${e}-text-field
|
|
@@ -2163,11 +2163,11 @@
|
|
|
2163
2163
|
:value=${(0,U.O)(e=>e.textFilter)}
|
|
2164
2164
|
/>
|
|
2165
2165
|
</div>
|
|
2166
|
-
`)(t)}},
|
|
2167
|
-
<div class="filter-wrapper">${t=>
|
|
2168
|
-
`,
|
|
2169
|
-
${e=>
|
|
2170
|
-
`;var
|
|
2166
|
+
`)(t)}},ps=e=>l.html`
|
|
2167
|
+
<div class="filter-wrapper">${t=>hs(t,e)}</div>
|
|
2168
|
+
`,ms=l.html`
|
|
2169
|
+
${e=>ps(T(e))}</div>
|
|
2170
|
+
`;var vs;!function(e){e.change="filter-changed",e.clear="filter-cleared"}(vs||(vs={}));class gs extends s.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(vs.clear,{fieldName:this.fieldName,target:this.target});const i=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(vs.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(vs.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(vs.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(vs.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(vs.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(vs.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){e&&"all"!==e?this.$emit(vs.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target}):this.$emit(vs.clear,{fieldName:this.fieldName,target:this.target})}onEnumFilterSelection(e){e&&"all"!==e?this.$emit(vs.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target}):this.$emit(vs.clear,{fieldName:this.fieldName,target:this.target})}}(0,C.Cg)([l.attr],gs.prototype,"fieldName",void 0),(0,C.Cg)([l.attr],gs.prototype,"type",void 0),(0,C.Cg)([l.attr],gs.prototype,"label",void 0),(0,C.Cg)([l.attr],gs.prototype,"target",void 0),(0,C.Cg)([l.observable],gs.prototype,"textFilter",void 0),(0,C.Cg)([l.observable],gs.prototype,"numFilterMin",void 0),(0,C.Cg)([l.observable],gs.prototype,"numFilterMax",void 0),(0,C.Cg)([l.observable],gs.prototype,"dateFilterMin",void 0),(0,C.Cg)([l.observable],gs.prototype,"dateFilterMax",void 0),(0,C.Cg)([l.attr],gs.prototype,"enumOptions",void 0),(0,C.Cg)([l.observable],gs.prototype,"enumFilterOptions",void 0);const fs=gs.compose({baseName:"filter",template:ms,styles:rs});var bs=i(64324);const ys=(e,t)=>l.css`
|
|
2171
2171
|
.filter-bar {
|
|
2172
2172
|
background-color: #2c2f33;
|
|
2173
2173
|
padding: calc(var(--design-unit) * 2px);
|
|
@@ -2203,9 +2203,9 @@
|
|
|
2203
2203
|
.toggle-collapsed {
|
|
2204
2204
|
color: #48ed9c;
|
|
2205
2205
|
}
|
|
2206
|
-
`,
|
|
2206
|
+
`,ws=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"}},Cs=l.html`
|
|
2207
2207
|
<p>Fetching metadata for ${e=>e.resource}...</p>
|
|
2208
|
-
`,
|
|
2208
|
+
`,xs=e=>l.html`
|
|
2209
2209
|
<div
|
|
2210
2210
|
class=${e=>(0,x.x)(["toggle",!0],["toggle-collapsed",e.collapsed])}
|
|
2211
2211
|
@click="${e=>e.toggle()}"
|
|
@@ -2225,17 +2225,17 @@
|
|
|
2225
2225
|
<${e}-filter
|
|
2226
2226
|
label="${e=>e.UI_LABEL}"
|
|
2227
2227
|
target="${(e,t)=>{var i;return null===(i=t.parent)||void 0===i?void 0:i.target}}"
|
|
2228
|
-
type="${e=>
|
|
2228
|
+
type="${e=>ws(e.TYPE)}"
|
|
2229
2229
|
fieldName="${e=>e.NAME}"
|
|
2230
2230
|
enumOptions="${e=>e.VALID_VALUES}"
|
|
2231
2231
|
></${e}-filter>
|
|
2232
2232
|
`)}
|
|
2233
2233
|
</div>
|
|
2234
2234
|
</div>
|
|
2235
|
-
`,$
|
|
2236
|
-
${e=>e.ready?
|
|
2237
|
-
`,
|
|
2238
|
-
${t&&`@media only screen and ${
|
|
2235
|
+
`,$s=l.html`
|
|
2236
|
+
${e=>e.ready?xs(T(e)):Cs}
|
|
2237
|
+
`,Ss=5;class Es extends s.FoundationElement{constructor(){super(...arguments),this.columns=Ss,this.ready=!1,this.collapsed=!0}connectedCallback(){super.connectedCallback(),this.init()}initLabels(){var e,t,i,o;let n=!1,a=[];(null===(e=null==this?void 0:this.labels)||void 0===e?void 0:e.length)&&(a=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==a?void 0:a.length));for(let e=0;e<((null===(o=this.fields)||void 0===o?void 0:o.length)||0);e+=1){const t=n?a[e]:this.camelCasePreserveWhitespace(this.fields[e].NAME.replace(/_/g," "));this.fields[e].UI_LABEL=t}}camelCasePreserveWhitespace(e){return e.split(" ").map(e=>(0,bs.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=>ot.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],Es.prototype,"resource",void 0),(0,C.Cg)([l.attr],Es.prototype,"only",void 0),(0,C.Cg)([l.attr],Es.prototype,"labels",void 0),(0,C.Cg)([l.attr],Es.prototype,"target",void 0),(0,C.Cg)([l.attr],Es.prototype,"columns",void 0),(0,C.Cg)([l.observable],Es.prototype,"ready",void 0),(0,C.Cg)([l.observable],Es.prototype,"fields",void 0),(0,C.Cg)([ui.dm],Es.prototype,"connect",void 0),(0,C.Cg)([l.observable],Es.prototype,"collapsed",void 0);const Os=Es.compose({baseName:"filter-bar",template:$s,styles:ys});var Ts;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(Ts||(Ts={}));const ks=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2238
|
+
${t&&`@media only screen and ${Ts[e]} {`}
|
|
2239
2239
|
:host(.spacing${t}-1x) slot {
|
|
2240
2240
|
gap: calc(var(--design-unit) * 2px);
|
|
2241
2241
|
}
|
|
@@ -2352,7 +2352,7 @@
|
|
|
2352
2352
|
align-content: space-evenly;
|
|
2353
2353
|
}
|
|
2354
2354
|
${t&&"}"}
|
|
2355
|
-
`},
|
|
2355
|
+
`},Ds=l.css`
|
|
2356
2356
|
:host {
|
|
2357
2357
|
width: 100%;
|
|
2358
2358
|
height: 100%;
|
|
@@ -2364,17 +2364,17 @@
|
|
|
2364
2364
|
display: flex;
|
|
2365
2365
|
}
|
|
2366
2366
|
|
|
2367
|
-
${
|
|
2368
|
-
${
|
|
2369
|
-
${
|
|
2370
|
-
${
|
|
2371
|
-
`,
|
|
2367
|
+
${ks()}
|
|
2368
|
+
${ks("lg")}
|
|
2369
|
+
${ks("md")}
|
|
2370
|
+
${ks("sm")}
|
|
2371
|
+
`,Is=l.html`
|
|
2372
2372
|
<template>
|
|
2373
2373
|
<slot></slot>
|
|
2374
2374
|
</template>
|
|
2375
|
-
`,
|
|
2375
|
+
`,Rs=void 0,As={};class Ls extends s.FoundationElement{}const Ns=Ls.compose(Object.assign({baseName:"flex-layout",styles:Ds,template:Is,shadowOptions:Rs},As)),Fs=(e,t)=>l.css`
|
|
2376
2376
|
${(0,r.flipperStyles)(e,t)}
|
|
2377
|
-
`,
|
|
2377
|
+
`,Ms=(e,t)=>(0,s.flipperTemplate)(e,t);class _s extends r.Flipper{}const Hs=void 0,Ps={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 '},zs=_s.compose(Object.assign({baseName:"flipper",template:Ms,styles:Fs,shadowOptions:Hs},Ps)),Us=225,Bs=l.css`
|
|
2378
2378
|
/* Host */
|
|
2379
2379
|
:host {
|
|
2380
2380
|
display: inline-block;
|
|
@@ -2400,8 +2400,8 @@
|
|
|
2400
2400
|
position: absolute;
|
|
2401
2401
|
/* stylelint-disable-next-line function-name-case */
|
|
2402
2402
|
transition:
|
|
2403
|
-
transform ${
|
|
2404
|
-
width ${
|
|
2403
|
+
transform ${Us.toString()}ms ease-in,
|
|
2404
|
+
width ${Us.toString()}ms ease-in-out;
|
|
2405
2405
|
width: var(--flyout-width, 20%);
|
|
2406
2406
|
z-index: 2001;
|
|
2407
2407
|
}
|
|
@@ -2460,7 +2460,7 @@
|
|
|
2460
2460
|
opacity: 50%;
|
|
2461
2461
|
position: absolute;
|
|
2462
2462
|
/* stylelint-disable-next-line function-name-case */
|
|
2463
|
-
transition: opacity ${
|
|
2463
|
+
transition: opacity ${Us.toString()}ms linear;
|
|
2464
2464
|
width: 100%;
|
|
2465
2465
|
z-index: 2000;
|
|
2466
2466
|
}
|
|
@@ -2468,7 +2468,7 @@
|
|
|
2468
2468
|
:host([visuallyhidden]) div.background {
|
|
2469
2469
|
opacity: 0%;
|
|
2470
2470
|
}
|
|
2471
|
-
`,
|
|
2471
|
+
`,Vs=e=>l.html`
|
|
2472
2472
|
<div ?closed=${e=>e.closed} ?visuallyhidden=${e=>e.visuallyhidden}>
|
|
2473
2473
|
<div class="container">
|
|
2474
2474
|
<div class="background" part="background" @click=${e=>e.closeFlyout()}></div>
|
|
@@ -2492,10 +2492,10 @@
|
|
|
2492
2492
|
</div>
|
|
2493
2493
|
</div>
|
|
2494
2494
|
</div>
|
|
2495
|
-
`,
|
|
2496
|
-
${e=>
|
|
2497
|
-
`;class
|
|
2498
|
-
${t&&`@media only screen and ${
|
|
2495
|
+
`,js=l.html`
|
|
2496
|
+
${e=>Vs(T(e))}
|
|
2497
|
+
`;class Gs extends s.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],Gs.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({attribute:"flyout-width"})],Gs.prototype,"flyoutWidth",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gs.prototype,"displayHeader",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gs.prototype,"closed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gs.prototype,"visuallyhidden",void 0);const Ys=void 0,Ws={},qs=Gs.compose(Object.assign({baseName:"flyout",styles:Bs,template:js,shadowOptions:Ys},Ws));var Ks;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(Ks||(Ks={}));const Xs=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2498
|
+
${t&&`@media only screen and ${Ks[e]} {`}
|
|
2499
2499
|
:host(.spacing${t}-1x) slot {
|
|
2500
2500
|
gap: calc(var(--design-unit) * 2px);
|
|
2501
2501
|
}
|
|
@@ -2580,32 +2580,32 @@
|
|
|
2580
2580
|
place-items: stretch;
|
|
2581
2581
|
}
|
|
2582
2582
|
${t&&"}"}
|
|
2583
|
-
`},
|
|
2583
|
+
`},Js=l.css`
|
|
2584
2584
|
slot {
|
|
2585
2585
|
width: 100%;
|
|
2586
2586
|
height: 100%;
|
|
2587
2587
|
display: grid;
|
|
2588
2588
|
}
|
|
2589
2589
|
|
|
2590
|
-
${
|
|
2591
|
-
${
|
|
2592
|
-
${
|
|
2593
|
-
${
|
|
2594
|
-
`,
|
|
2590
|
+
${Xs()}
|
|
2591
|
+
${Xs("lg")}
|
|
2592
|
+
${Xs("md")}
|
|
2593
|
+
${Xs("sm")}
|
|
2594
|
+
`,Qs=l.html`
|
|
2595
2595
|
<template>
|
|
2596
2596
|
<slot></slot>
|
|
2597
2597
|
</template>
|
|
2598
|
-
`,
|
|
2598
|
+
`,Zs=void 0,er={};class tr{constructor(e,t,i,o="1fr",n="1fr"){this.listenerCache=new WeakMap,this.query=window.matchMedia(e);const a=t&&l.cssPartial`grid-template-columns: repeat(${t}, ${o});`,s=i&&l.cssPartial`grid-template-rows: repeat(${i}, ${n});`;this.styles=l.css`
|
|
2599
2599
|
slot {
|
|
2600
|
-
${a||""}
|
|
2601
2600
|
${s||""}
|
|
2601
|
+
${a||""}
|
|
2602
2602
|
}
|
|
2603
|
-
`}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 ir extends
|
|
2603
|
+
`}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 ir extends s.FoundationElement{constructor(){super(...arguments),this.behaviors=[]}connectedCallback(){super.connectedCallback(),this.behaviors=Object.keys(Ks).map(e=>{if(this[`col-${e}-count`]||this[`row-${e}-count`])return new tr(Ks[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`
|
|
2604
2604
|
slot {
|
|
2605
2605
|
${e||""}
|
|
2606
2606
|
${t||""}
|
|
2607
2607
|
}
|
|
2608
|
-
`,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],ir.prototype,"col-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-width",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-lg-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-lg-width",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-md-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-md-width",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-sm-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-sm-width",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-height",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-lg-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-lg-height",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-md-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-md-height",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-sm-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-sm-height",void 0);const or=ir.compose(Object.assign({baseName:"grid-layout",styles:
|
|
2608
|
+
`,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],ir.prototype,"col-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-width",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-lg-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-lg-width",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-md-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-md-width",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-sm-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"col-sm-width",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-height",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-lg-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-lg-height",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-md-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-md-height",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-sm-count",void 0),(0,C.Cg)([l.attr],ir.prototype,"row-sm-height",void 0);const or=ir.compose(Object.assign({baseName:"grid-layout",styles:Js,template:Qs,shadowOptions:Zs},er)),nr=l.html`
|
|
2609
2609
|
<template>
|
|
2610
2610
|
<style>
|
|
2611
2611
|
:host {
|
|
@@ -2631,9 +2631,9 @@
|
|
|
2631
2631
|
</style>
|
|
2632
2632
|
<slot></slot>
|
|
2633
2633
|
</template>
|
|
2634
|
-
`,
|
|
2634
|
+
`,ar=void 0,sr={};class rr extends s.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"})],rr.prototype,"colNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-sm-number"})],rr.prototype,"colSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-md-number"})],rr.prototype,"colMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-lg-number"})],rr.prototype,"colLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-number"})],rr.prototype,"rowNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-sm-number"})],rr.prototype,"rowSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-md-number"})],rr.prototype,"rowMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-lg-number"})],rr.prototype,"rowLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width"})],rr.prototype,"width",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-sm"})],rr.prototype,"widthSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-md"})],rr.prototype,"widthMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-lg"})],rr.prototype,"widthLg",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height"})],rr.prototype,"height",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-sm"})],rr.prototype,"heightSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-md"})],rr.prototype,"heightMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-lg"})],rr.prototype,"heightLg",void 0);const lr=rr.compose(Object.assign({baseName:"grid-layout-item",template:nr,shadowOptions:ar},sr)),dr=(e,t)=>l.css`
|
|
2635
2635
|
${(0,r.horizontalScrollStyles)(e,t)}
|
|
2636
|
-
`,cr=(e,t)=>(0,
|
|
2636
|
+
`,cr=(e,t)=>(0,s.horizontalScrollTemplate)(e,t);class ur extends r.HorizontalScroll{}const hr={delegatesFocus:!0,mode:"open"},pr={nextFlipper:l.html`
|
|
2637
2637
|
<foundation-flipper
|
|
2638
2638
|
@click="${e=>e.scrollToNext()}"
|
|
2639
2639
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
@@ -2739,7 +2739,7 @@
|
|
|
2739
2739
|
</template>
|
|
2740
2740
|
`,$r=l.html`
|
|
2741
2741
|
${e=>xr(T(e))}
|
|
2742
|
-
`,Sr={mode:"open",delegatesFocus:!0},Er={};var Or;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(Or||(Or={}));const Tr="1x",kr=["2xs","xs","sm","lg","xl","2xl",Tr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class Dr extends
|
|
2742
|
+
`,Sr={mode:"open",delegatesFocus:!0},Er={};var Or;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(Or||(Or={}));const Tr="1x",kr=["2xs","xs","sm","lg","xl","2xl",Tr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class Dr extends s.FoundationElement{constructor(){super(...arguments),this.isError=!1,this.size="sm",this.variant="solid"}nameChanged(e,t){t&&this.loadIcon()}sizeChanged(e,t){t&&this.loadIcon()}variantChanged(e,t){t&&this.loadIcon()}connectedCallback(){super.connectedCallback(),this.loadIcon()}disconnectedCallback(){super.disconnectedCallback(),this.iElement.replaceChildren()}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,vr.wu)({prefix:Or[this.variant],iconName:this.name}),t=(0,vr.Kk)(e);t&&t.node&&(this.iElement.innerHTML="",Array.from(t.node).map(e=>this.iElement.appendChild(e)))}}(0,C.Cg)([l.observable],Dr.prototype,"iElement",void 0),(0,C.Cg)([gr.k],Dr.prototype,"uuid",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tooltip-id"})],Dr.prototype,"tooltipId",void 0),(0,C.Cg)([l.attr],Dr.prototype,"tooltip",void 0),(0,C.Cg)([(0,l.attr)({attribute:"error",mode:"boolean"})],Dr.prototype,"isError",void 0),(0,C.Cg)([l.attr],Dr.prototype,"name",void 0),(0,C.Cg)([l.attr],Dr.prototype,"size",void 0),(0,C.Cg)([l.attr],Dr.prototype,"variant",void 0);const Ir=Dr.compose(Object.assign({baseName:"icon",template:$r,styles:Cr,shadowOptions:Sr},Er)),Rr=(e,t)=>l.css`
|
|
2743
2743
|
${(0,r.listboxStyles)(e,t)}
|
|
2744
2744
|
|
|
2745
2745
|
:host {
|
|
@@ -2750,11 +2750,11 @@
|
|
|
2750
2750
|
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);
|
|
2751
2751
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
2752
2752
|
}
|
|
2753
|
-
`,Ar=(e,t)=>(0,
|
|
2753
|
+
`,Ar=(e,t)=>(0,s.listboxTemplate)(e,t);class Lr extends r.Listbox{}const Nr=void 0,Fr={},Mr=Lr.compose(Object.assign({baseName:"listbox",template:Ar,styles:Rr,shadowOptions:Nr},Fr)),_r=(e,t)=>l.css`
|
|
2754
2754
|
${(0,r.optionStyles)(e,t)}
|
|
2755
|
-
`,Hr=(e,t)=>(0,
|
|
2755
|
+
`,Hr=(e,t)=>(0,s.listboxOptionTemplate)(e,t);class Pr extends r.ListboxOption{}const zr=void 0,Ur={},Br=Pr.compose(Object.assign({baseName:"option",template:Hr,styles:_r,shadowOptions:zr},Ur)),Vr=(e,t)=>l.css`
|
|
2756
2756
|
${(0,r.menuStyles)(e,t)}
|
|
2757
|
-
`,jr=(e,t)=>(0,
|
|
2757
|
+
`,jr=(e,t)=>(0,s.menuTemplate)(e,t);class Gr extends r.Menu{}const Yr=void 0,Wr={},qr=Gr.compose(Object.assign({baseName:"menu",template:jr,styles:Vr,shadowOptions:Yr},Wr)),Kr=(e,t)=>l.css`
|
|
2758
2758
|
${(0,r.menuItemStyles)(e,t)}
|
|
2759
2759
|
|
|
2760
2760
|
:host, :host(.indent-0[aria-haspopup='menu']) {
|
|
@@ -2768,11 +2768,11 @@
|
|
|
2768
2768
|
height: auto;
|
|
2769
2769
|
width: auto;
|
|
2770
2770
|
}
|
|
2771
|
-
`,Xr=(e,t)=>(0,
|
|
2771
|
+
`,Xr=(e,t)=>(0,s.menuItemTemplate)(e,t);class Jr extends r.MenuItem{connectedCallback(){super.connectedCallback(),this.addEventListener("click",()=>this.$emit("onMenuClick"))}}const Qr=void 0,Zr={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 '},el=Jr.compose(Object.assign({baseName:"menu-item",template:Xr,styles:Kr,shadowOptions:Qr},Zr)),tl=l.css`
|
|
2772
2772
|
${Sn}
|
|
2773
2773
|
`,il=l.html`
|
|
2774
2774
|
${kn}
|
|
2775
|
-
`,ol={mode:"open",delegatesFocus:!0},nl={};class
|
|
2775
|
+
`,ol={mode:"open",delegatesFocus:!0},nl={};class al extends Rn{show(){var e,t;null===(e=this.onShowCallback)||void 0===e||e.call(this),null===(t=this.mainElement)||void 0===t||t.showModal()}}const sl=al.compose(Object.assign({baseName:"modal",template:il,styles:tl,shadowOptions:ol},nl)),rl=230,ll=l.css`
|
|
2776
2776
|
:host {
|
|
2777
2777
|
--scrollbar-width: 12px;
|
|
2778
2778
|
--scrollbar-thumb-width: 8px;
|
|
@@ -3021,7 +3021,7 @@
|
|
|
3021
3021
|
>
|
|
3022
3022
|
<slot
|
|
3023
3023
|
name="label"
|
|
3024
|
-
${(0,l.slotted)({property:"defaultSlottedNodes",filter:
|
|
3024
|
+
${(0,l.slotted)({property:"defaultSlottedNodes",filter:s.whitespaceFilter})}
|
|
3025
3025
|
></slot>
|
|
3026
3026
|
</label>
|
|
3027
3027
|
<div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}">
|
|
@@ -3094,7 +3094,7 @@
|
|
|
3094
3094
|
>
|
|
3095
3095
|
<slot
|
|
3096
3096
|
name="options-header"
|
|
3097
|
-
${(0,l.slotted)({property:"optionsHeaderSlottedNodes",filter:
|
|
3097
|
+
${(0,l.slotted)({property:"optionsHeaderSlottedNodes",filter:s.whitespaceFilter})}
|
|
3098
3098
|
></slot>
|
|
3099
3099
|
</li>
|
|
3100
3100
|
${(0,l.repeat)(e=>e.filteredAvailableOptions,l.html`
|
|
@@ -3124,7 +3124,7 @@
|
|
|
3124
3124
|
></slot>
|
|
3125
3125
|
`,ul=l.html`
|
|
3126
3126
|
${cl()}
|
|
3127
|
-
`,hl=void 0,pl={};class ml extends
|
|
3127
|
+
`,hl=void 0,pl={};class ml extends s.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=zt.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=ii()(this.asyncSetFilter,t)}openChanged(e,t){var i,o,n,a;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===(a=this.multiselectDropdown)||void 0===a||a.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===zt.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`
|
|
3128
3128
|
${"string"==typeof e?l.html`
|
|
3129
3129
|
<span part="option-label">${()=>t.getItemLabel(e)}</span>
|
|
3130
3130
|
`:l.html`
|
|
@@ -3240,7 +3240,7 @@
|
|
|
3240
3240
|
<slot ${(0,l.slotted)("defaultSlottedNodes")}></slot>
|
|
3241
3241
|
</label>
|
|
3242
3242
|
<div class="root" part="root">
|
|
3243
|
-
${(0,
|
|
3243
|
+
${(0,s.startSlotTemplate)(e,t)}
|
|
3244
3244
|
<div class="control-field">
|
|
3245
3245
|
${(0,l.when)(e=>e.prefix,l.html`
|
|
3246
3246
|
<span
|
|
@@ -3318,10 +3318,10 @@
|
|
|
3318
3318
|
</div>
|
|
3319
3319
|
</div>
|
|
3320
3320
|
`)}
|
|
3321
|
-
${(0,
|
|
3321
|
+
${(0,s.endSlotTemplate)(e,t)}
|
|
3322
3322
|
</div>
|
|
3323
3323
|
</template>
|
|
3324
|
-
`,$l=12345.6,Sl=9,El=(e,t)=>{var i;return{decimalSeparator:(null===(i=new Intl.NumberFormat(t).formatToParts($l).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)||"."}},Ol=(e,t)=>{var i,o,n;const s=new Intl.NumberFormat(t).formatToParts($l),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},Tl=(e,t)=>{var i,o;const n=null!==(o=null===(i=new Intl.NumberFormat(t).formatToParts($l).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},kl=(e,t)=>Tl(e,t)>1,Dl=(e,t,i,o)=>((e,t,i)=>{const o=Ol(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&Tl(t,i)>0,Il=(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}=El(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},Rl=(e,t)=>{const{decimalSeparator:i}=El(0,t);return"."===i?e:e.replace(/\./g,i)},Al=(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)?Il(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),Ll=(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(kl(n,t))return"";let a;if(i)a=((e,t)=>{const i=Ol(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}=El(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},Fl=(e,t,i,o)=>{if(void 0!==i&&Tl(e,t)>0){const n=Ol(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Dl(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=El(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)},Ml=(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)},_l=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 Hl extends(yl(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?_l(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<=Sl){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<=Sl?(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=Ml(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?_l(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=Sl.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=Ml(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?Al(e,this.locale,this.options):Rl(String(e),this.locale),this.isUserInput=!1}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(kl(this.control.value,this.locale)||Dl(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=Fl(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?Al(t,this.locale,this.options):Rl(t,this.locale);this.control.value=Ll(e,this.options)}this.value=Ll(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=Ml(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?Al(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=Ml(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?Ll(e,this.options):e),this.control.value=this.withFormatting&&this.value?Al(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],Hl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Hl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Hl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Hl.prototype,"maximumInputPrecision",void 0);const Pl={delegatesFocus:!0,mode:"open"},zl={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 '},Ul=Hl.compose(Object.assign({baseName:"number-field",template:xl,styles:Cl,shadowOptions:Pl},zl)),Bl=(e,t)=>l.css`
|
|
3324
|
+
`,$l=12345.6,Sl=9,El=(e,t)=>{var i;return{decimalSeparator:(null===(i=new Intl.NumberFormat(t).formatToParts($l).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)||"."}},Ol=(e,t)=>{var i,o,n;const a=new Intl.NumberFormat(t).formatToParts($l),s=null===(i=a.find(e=>"group"===e.type))||void 0===i?void 0:i.value,r=null!==(n=null===(o=a.find(e=>"decimal"===e.type))||void 0===o?void 0:o.value)&&void 0!==n?n:".";let l=e.trim();return s&&(l=l.split(s).join("")),"."!==r&&(l=l.replace(r,".")),l},Tl=(e,t)=>{var i,o;const n=null!==(o=null===(i=new Intl.NumberFormat(t).formatToParts($l).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)&&void 0!==o?o:".";let a=0;for(const t of e)t===n&&(a+=1);return a},kl=(e,t)=>Tl(e,t)>1,Dl=(e,t,i,o)=>((e,t,i)=>{const o=Ol(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&Tl(t,i)>0,Il=(e,t,i)=>{const o=e.startsWith("-"),n=o?e.slice(1):e,a=n.indexOf("."),s=-1===a?n:n.slice(0,a);let r=-1===a?"":n.slice(a+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("-"),a=n?e.slice(1):e,s=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=a;for(;l.length>3;)r.unshift(l.slice(-3)),l=l.slice(0,-3);r.unshift(l);const d=r.join(s);return n?`-${d}`:d})(o?`-${s}`:s,t),{decimalSeparator:u}=El(0,t);return-1===a?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},Rl=(e,t)=>{const{decimalSeparator:i}=El(0,t);return"."===i?e:e.replace(/\./g,i)},Al=(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)?Il(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),Ll=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,a=n?e.length-o-1:0,s=t.minimumFractionDigits,r=t.maximumFractionDigits;if(a>=s&&a<=r)return e;let l=e;if(a<s){n||(l=e+".");l+="0".repeat(s-a)}if(a>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,a=null!=o?o:12;if(kl(n,t))return"";let s;if(i)s=((e,t)=>{const i=Ol(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}=El(0,t);if("."!==e){s=n.replace(new RegExp(`\\${e}`,"g"),".");const t=s.indexOf(".");-1!==t&&(s=s.substring(0,t))}else s=n}s=String(s);if(!/^-?\d*\.?\d+$/.test(s))return"";if(void 0!==a){if(s.replace(".","").replace(/^0+/,"").length>a){const e=s.indexOf(".");if(-1!==e){const t=s.substring(0,e),i=t.length;if(i>=a)return s.substring(0,a);{const o=a-i;return`${t}.${s.substring(e+1).substring(0,o)}`}}return s.substring(0,a)}}return s},Fl=(e,t,i,o)=>{if(void 0!==i&&Tl(e,t)>0){const n=Ol(e,t),a=n.indexOf("."),s=-1===a?n:n.slice(0,a);if(Dl(void 0!==o?o:s,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=El(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`${n}(\\d*?)(0+)$`),s=e.match(a);if(s){const e=s[1],i=s[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)},Ml=(e,t,i=!0,o,n,a)=>{const s=Nl(e,t,i,a);if(!s)return"";const r=s.replace(/^-/,"").replace(".","").length;if(/^-?\d+$/.test(s)&&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()})(s,o,n)}catch(e){return s}let l=parseFloat(s);return isNaN(l)?l="":(l=Math.min(l,null!=n?n:l),l=Math.max(l,null!=o?o:l)),String(l)},_l=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 a=Math.pow(10,-n);return parseFloat(a.toFixed(n))}};class Hl extends(yl(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?_l(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),a=n.length-1,s=parseInt(n.charAt(a))+1;if(s<=Sl){const e=n.substring(0,a)+s;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=a;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=Sl?(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=Ml(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?_l(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),a=n.length-1,s=parseInt(n.charAt(a))-1;if(s>=0){const e=n.substring(0,a)+s;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=a;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=Sl.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=Ml(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?Al(e,this.locale,this.options):Rl(String(e),this.locale),this.isUserInput=!1}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(kl(this.control.value,this.locale)||Dl(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=Fl(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?Al(t,this.locale,this.options):Rl(t,this.locale);this.control.value=Ll(e,this.options)}this.value=Ll(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=Ml(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?Al(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=Ml(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?Ll(e,this.options):e),this.control.value=this.withFormatting&&this.value?Al(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],Hl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Hl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Hl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Hl.prototype,"maximumInputPrecision",void 0);const Pl={delegatesFocus:!0,mode:"open"},zl={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 '},Ul=Hl.compose(Object.assign({baseName:"number-field",template:xl,styles:Cl,shadowOptions:Pl},zl)),Bl=(e,t)=>l.css`
|
|
3325
3325
|
:host {
|
|
3326
3326
|
display: block;
|
|
3327
3327
|
}
|
|
@@ -3352,19 +3352,19 @@
|
|
|
3352
3352
|
<slot></slot>
|
|
3353
3353
|
</div>
|
|
3354
3354
|
</template>
|
|
3355
|
-
`;class jl extends
|
|
3355
|
+
`;class jl extends s.ListboxOption{connectedCallback(){super.connectedCallback(),this.disabled=!0}}(0,C.Cg)([(0,l.attr)({attribute:"label"})],jl.prototype,"groupLabel",void 0);const Gl=jl.compose({baseName:"optgroup",template:Vl,styles:Bl});var Yl=i(92277);var Wl=i(72154),ql=i.n(Wl),Kl=i(57565),Xl=i.n(Kl),Jl=i(13160),Ql=i(24669),Zl=i(5709),ed=i(45230);const td={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,ui.tn)(),i=yield t.getMoreColumns(e),o=Date.now(),n=i;return{isConnected:i.MESSAGE_TYPE===li.Go.MORE_COLUMNS_ACK,lastUpdated:o,lastMessage:n}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:o}=t;(0,ed.Ol)().sendForStream(e,i,o)}},id=s.DI.createInterface(e=>e.instance(td)),od="system-health-changed";var nd;const ad=(0,it.createLogger)("network-monitor",{level:it.LogLevels.info}),sd=Date.now(),rd=(null===(nd=window.navigator)||void 0===nd?void 0:nd.userAgent)?ql().parse(window.navigator.userAgent):void 0,ld=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:Xl()(e,void 0,2,t);class dd{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>(0,C.sH)(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;ad.info("Run health checks, triggered by",ld(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const o=yield this.isOnlineCheck();o?ad.debug(`Network connected at ${i}`):ad.warn(`Network disconnected at ${i}`);const n=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),o),a=this.preFlightSocketChecks(n);if(a||ad.debug("Socket pre-flight checks failed"),!o||!a){ad.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 s=!0;const r=[];this.resources.forEach((e,t)=>{const{resourceName:o,message:n,functions:a}=e,{resourceChecks:l=this.config.resourceChecks,resourceDataLogon:d=this.config.resourceDataLogon}=a,{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,a,r;try{ad.debug(`Running health check against ${o}`);const e=yield Promise.race([l(c,t),(a=this.config.checkTimeout,r=()=>({isConnected:!1,lastUpdated:this.getNowTimestamp(),timeout:!0}),new Promise(e=>{setTimeout(()=>{e(r())},a)}))]);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)===li.Go.MSG_NACK||(0,li.z2)(h,Jl.v.NOT_FOUND),i=this.getFormattedTimestamp(null!=u?u:this.getNowTimestamp()),g?ad.debug(`${o} is healthy at ${i}`):ad.warn(`${o} is not healthy at ${i}`),h&&ad.debug(`${o} messaged at ${i}`,ld(h)),p&&ad.error(`${o} errored at ${i}`,ld(p)),m&&ad.warn(`${o} timed out at ${i}`),v&&(ad.error(`${o} issue, re-attempting data logon at ${i}`),d(e)),s&&(s=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 ad.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});ad.debug("Health checks complete"),this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:l,resourcesAllConnected:s,socket:n}),this.isRunningChecks=!1}),void 0!==this.config.logLevel&&(ad.level=this.config.logLevel)}create(){this.resources?ad.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,a=null!==(t=n.receivedMessage)&&void 0!==t?t:n;let s="";(0,li.z2)(a,Jl.v.NOT_FOUND)?s="Please check the resource is running.":(0,li.z2)(a,Jl.v.FORBIDDEN)&&(s="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(o)),ad.error(`${i} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,s,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&&ad.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?ad.debug:ad.warn)("Emitting 'system-health-changed' event",ld(this.status)),null==i||i.dispatchEvent(new CustomEvent(od,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(ad.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 ad.debug("User requested report stability to Genesis."),ad.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 a=!!((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),s=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:rd,username:l,isHealthy:a,lastUpdated:s,nextUpdate:r,firstUpdated:sd,runAllChecks:()=>{ad.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(d)});return d}preFlightSocketChecks(e){if(!e.isConfigured)return ad.debug("Socket not configured"),!1;if(e.isReconnecting)return ad.debug("Socket reconnecting"),!1;if(e.isConnecting)return ad.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return ad.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&ad.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return ad.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return(0,pi.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)([id],dd.prototype,"config",void 0),(0,C.Cg)([Zl.S5],dd.prototype,"socketStatus",void 0),(0,C.Cg)([Ql.a4],dd.prototype,"connectEvents",void 0),(0,C.Cg)([Yl.KJ],dd.prototype,"user",void 0),(0,C.Cg)([l.observable],dd.prototype,"status",void 0);const cd=s.DI.createInterface(e=>e.singleton(dd));var ud=i(6526);const hd=(e,t)=>l.css`
|
|
3356
3356
|
${(0,r.progressStyles)(e,t)}
|
|
3357
3357
|
:host {
|
|
3358
3358
|
height: calc(var(--design-unit) * 2px);
|
|
3359
3359
|
}
|
|
3360
|
-
`,pd=(e,t)=>(0,
|
|
3360
|
+
`,pd=(e,t)=>(0,s.progressTemplate)(e,t);class md extends r.Progress{}const vd=void 0,gd={indeterminateIndicator1:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>',indeterminateIndicator2:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>'},fd=md.compose(Object.assign({baseName:"progress",template:pd,styles:hd,shadowOptions:vd},gd));function bd(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 yd=(e,t="foundation",i,a)=>{e&&Jo(null!=i?i:o,null!=a?a:n,e);return bd(s.DesignSystem.getOrCreate(e).withPrefix(t))},wd="app",Cd="component";yd().register(fd({prefix:"next-update"}));class xd extends s.FoundationElement{constructor(){super(...arguments),this.timeTillNextUpdate={totalMs:1e4,remainMs:1e4,remainPercent:100},this.mode=wd,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 ud.Is.ArrowUp:e.ctrlKey&&e.altKey&&!this.isOpen&&(this.onOpen(!0),e.preventDefault());break;case ud.Is.ArrowDown:e.ctrlKey&&e.altKey&&this.isOpen&&(this.onClose(),e.preventDefault());break;case ud.F9:this.isOpen&&(this.onDismiss(),e.preventDefault())}}}isOpenChanged(){this.updateTemplateClassNames()}isDismissedChanged(){this.updateTemplateClassNames()}modeChanged(){this.$fastController.isConnected&&this.mode===Cd&&ot.warn("SystemHealthOverlay has support for app overlays only right now.")}logLevelChanged(){ad.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(od,this.onSystemHealthChanged,!0),document.addEventListener("keydown",this.onDocumentKeydown)}removeEventListeners(){this.eventBridge().removeEventListener(od,this.onSystemHealthChanged,!0),document.removeEventListener("keydown",this.onDocumentKeydown)}static getCheckmarkTemplate(e){return e?l.html`
|
|
3361
3361
|
<span class="checkmark">✔</span>
|
|
3362
3362
|
`:l.html`
|
|
3363
3363
|
<span class="checkmark">✘</span>
|
|
3364
3364
|
`}}(0,C.Cg)([id],xd.prototype,"config",void 0),(0,C.Cg)([cd],xd.prototype,"networkMonitor",void 0),(0,C.Cg)([l.observable],xd.prototype,"resourceList",void 0),(0,C.Cg)([l.observable],xd.prototype,"isOpen",void 0),(0,C.Cg)([l.observable],xd.prototype,"wasOpenedByUser",void 0),(0,C.Cg)([l.observable],xd.prototype,"isDismissed",void 0),(0,C.Cg)([l.observable],xd.prototype,"templateClassNames",void 0),(0,C.Cg)([l.observable],xd.prototype,"containerClassNames",void 0),(0,C.Cg)([l.observable],xd.prototype,"isOnlineClassNames",void 0),(0,C.Cg)([l.observable],xd.prototype,"isHealthyClassNames",void 0),(0,C.Cg)([l.observable],xd.prototype,"isSocketHealthyClassNames",void 0),(0,C.Cg)([l.observable],xd.prototype,"resourcesAllConnectedClassNames",void 0),(0,C.Cg)([l.observable],xd.prototype,"timeTillNextUpdate",void 0),(0,C.Cg)([l.observable],xd.prototype,"saveDataCallback",void 0),(0,C.Cg)([l.attr],xd.prototype,"mode",void 0),(0,C.Cg)([(0,l.attr)({attribute:"log-level",converter:l.nullableNumberConverter})],xd.prototype,"logLevel",void 0),(0,C.Cg)([l.observable],xd.prototype,"status",void 0);const $d=(e,t)=>l.html`
|
|
3365
3365
|
<template class="${e=>e.templateClassNames}">
|
|
3366
3366
|
<header class="${e=>e.isHealthyClassNames}" part="header">
|
|
3367
|
-
<h1>System ${e=>(0,
|
|
3367
|
+
<h1>System ${e=>(0,bs.fL)(e.isHealthyClassNames)}</h1>
|
|
3368
3368
|
${(0,l.when)(e=>!e.status.isHealthy,l.html`
|
|
3369
3369
|
<span class="data-warning">Data Validity Unknown</span>
|
|
3370
3370
|
`)}
|
|
@@ -3393,7 +3393,7 @@
|
|
|
3393
3393
|
</header>
|
|
3394
3394
|
<div class="container ${e=>e.containerClassNames}" part="container">
|
|
3395
3395
|
<section class="network-section ${e=>e.isOnlineClassNames}" part="network-section">
|
|
3396
|
-
<h2>Network ${e=>(0,
|
|
3396
|
+
<h2>Network ${e=>(0,bs.fL)(e.status.isOnline?"online":"offline")}</h2>
|
|
3397
3397
|
<dl class="resource-list">
|
|
3398
3398
|
<div class="resource ${e=>e.isOnlineClassNames}">
|
|
3399
3399
|
<div class="attributes">
|
|
@@ -3413,11 +3413,11 @@
|
|
|
3413
3413
|
`)}
|
|
3414
3414
|
<div class="platform-type">
|
|
3415
3415
|
<dt>Platform Type</dt>
|
|
3416
|
-
<dd>${e=>{var t;return(0,
|
|
3416
|
+
<dd>${e=>{var t;return(0,bs.fL)(null===(t=e.status.browserInformation.platform)||void 0===t?void 0:t.type)}}</dd>
|
|
3417
3417
|
</div>
|
|
3418
3418
|
<div class="os-name">
|
|
3419
3419
|
<dt>OS Name</dt>
|
|
3420
|
-
<dd>${e=>{var t;return(0,
|
|
3420
|
+
<dd>${e=>{var t;return(0,bs.fL)(null===(t=e.status.browserInformation.os)||void 0===t?void 0:t.name)}}</dd>
|
|
3421
3421
|
</div>
|
|
3422
3422
|
<div class="os-version">
|
|
3423
3423
|
<dt>OS Version</dt>
|
|
@@ -3427,7 +3427,7 @@
|
|
|
3427
3427
|
<div class="attributes">
|
|
3428
3428
|
<div class="browser-name">
|
|
3429
3429
|
<dt>Browser Name</dt>
|
|
3430
|
-
<dd>${e=>{var t;return(0,
|
|
3430
|
+
<dd>${e=>{var t;return(0,bs.fL)(null===(t=e.status.browserInformation.browser)||void 0===t?void 0:t.name)}}</dd>
|
|
3431
3431
|
</div>
|
|
3432
3432
|
<div class="browser-version">
|
|
3433
3433
|
<dt>Browser Version</dt>
|
|
@@ -3463,7 +3463,7 @@
|
|
|
3463
3463
|
</dl>
|
|
3464
3464
|
</section>
|
|
3465
3465
|
<section class="socket-section ${e=>e.isSocketHealthyClassNames}" part="socket-section">
|
|
3466
|
-
<h2>WebSocket ${e=>(0,
|
|
3466
|
+
<h2>WebSocket ${e=>(0,bs.fL)(e.isSocketHealthyClassNames)}</h2>
|
|
3467
3467
|
<dl class="resource-list">
|
|
3468
3468
|
<div class="resource ${e=>e.isSocketHealthyClassNames}">
|
|
3469
3469
|
<div class="attributes">
|
|
@@ -3512,7 +3512,7 @@
|
|
|
3512
3512
|
class="resource-section ${e=>e.resourcesAllConnectedClassNames}"
|
|
3513
3513
|
part="resource-section"
|
|
3514
3514
|
>
|
|
3515
|
-
<h2>Resources ${e=>(0,
|
|
3515
|
+
<h2>Resources ${e=>(0,bs.fL)(e.resourcesAllConnectedClassNames)}</h2>
|
|
3516
3516
|
<dl class="resource-list">
|
|
3517
3517
|
${(0,l.repeat)(e=>e.resourceList,l.html`
|
|
3518
3518
|
<div class="resource ${e=>e.isConnected?"healthy":"unhealthy"}">
|
|
@@ -3932,7 +3932,7 @@
|
|
|
3932
3932
|
</div>
|
|
3933
3933
|
`,Id=l.html`
|
|
3934
3934
|
${e=>Dd(T(e))}
|
|
3935
|
-
`,Rd=void 0,Ad={};class Ld extends
|
|
3935
|
+
`,Rd=void 0,Ad={};class Ld extends s.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],Ld.prototype,"label",void 0),(0,C.Cg)([l.attr],Ld.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ld.prototype,"removable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ld.prototype,"disabled",void 0);const Nd=Ld.compose(Object.assign({baseName:"pill",template:Id,styles:kd,shadowOptions:Rd},Ad));var Fd=i(4934);const Md={toView:e=>JSON.stringify(e),fromView:e=>null==e?e:JSON.parse(e)};class _d extends s.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,Fd.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],_d.prototype,"selector",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],_d.prototype,"show",void 0),(0,C.Cg)([l.attr],_d.prototype,"event",void 0),(0,C.Cg)([l.attr],_d.prototype,"placement",void 0),(0,C.Cg)([(0,l.attr)({converter:Md})],_d.prototype,"offset",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],_d.prototype,"flip",void 0);const Hd=l.css`
|
|
3936
3936
|
:host {
|
|
3937
3937
|
display: none;
|
|
3938
3938
|
inset: unset !important;
|
|
@@ -3948,18 +3948,18 @@
|
|
|
3948
3948
|
</template>
|
|
3949
3949
|
`,zd=_d.compose({baseName:"popper",styles:Hd,template:Pd}),Ud=(e,t)=>l.css`
|
|
3950
3950
|
${(0,r.progressRingStyles)(e,t)}
|
|
3951
|
-
`,Bd=(e,t)=>(0,
|
|
3951
|
+
`,Bd=(e,t)=>(0,s.progressRingTemplate)(e,t);class Vd extends r.Progress{}const jd=void 0,Gd={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 '},Yd=Vd.compose(Object.assign({baseName:"progress-ring",template:Bd,styles:Ud,shadowOptions:jd},Gd)),Wd=(e,t)=>l.css`
|
|
3952
3952
|
${(0,r.radioStyles)(e,t)}
|
|
3953
|
-
`,qd=(e,t)=>(0,
|
|
3953
|
+
`,qd=(e,t)=>(0,s.radioTemplate)(e,t);class Kd extends r.Radio{}const Xd=void 0,Jd={checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '},Qd=Kd.compose(Object.assign({baseName:"radio",template:qd,styles:Wd,shadowOptions:Xd},Jd)),Zd=(e,t)=>l.css`
|
|
3954
3954
|
${(0,r.radioGroupStyles)(e,t)}
|
|
3955
|
-
`,ec=(e,t)=>(0,
|
|
3955
|
+
`,ec=(e,t)=>(0,s.radioGroupTemplate)(e,t);class tc extends r.RadioGroup{}const ic=void 0,oc={},nc=tc.compose(Object.assign({baseName:"radio-group",template:ec,styles:Zd,shadowOptions:ic},oc)),ac=l.css`
|
|
3956
3956
|
/* Host */
|
|
3957
3957
|
:host {
|
|
3958
3958
|
display: flex;
|
|
3959
3959
|
flex-direction: column;
|
|
3960
3960
|
width: 100%;
|
|
3961
3961
|
}
|
|
3962
|
-
`,
|
|
3962
|
+
`,sc=e=>l.html`
|
|
3963
3963
|
<template>
|
|
3964
3964
|
<${e}-scheduler-timezone
|
|
3965
3965
|
:timezone=${(0,U.O)(e=>e.timezone)}
|
|
@@ -3973,8 +3973,8 @@
|
|
|
3973
3973
|
></${e}-scheduler-cron-builder>
|
|
3974
3974
|
</template>
|
|
3975
3975
|
`,rc=l.html`
|
|
3976
|
-
${e=>
|
|
3977
|
-
`;class lc extends
|
|
3976
|
+
${e=>sc(T(e))}
|
|
3977
|
+
`;class lc extends s.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"})],lc.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],lc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],lc.prototype,"timezone",void 0),(0,C.Cg)([l.observable],lc.prototype,"cron",void 0),(0,C.Cg)([l.observable],lc.prototype,"cronConfig",void 0);const dc=void 0,cc={},uc=lc.compose(Object.assign({baseName:"scheduler",styles:ac,template:rc,shadowOptions:dc},cc)),hc=(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)),ye(o,t,i)};var pc,mc,vc;!function(e){e.MINUTES="Minutes",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e.MONTHLY="Monthly",e.YEARLY="Yearly"}(pc||(pc={})),function(e){e.WEEK="Week",e.WORK_WEEK="Work week"}(mc||(mc={})),function(e){e.DATE="Date",e.DAY_OF_MONTH="Day of month"}(vc||(vc={}));const gc=[{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"}],fc=[{value:"1",label:"First"},{value:"2",label:"Second"},{value:"3",label:"Third"},{value:"4",label:"Fourth"},{value:"-1",label:"Last"}],bc=[{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"}],yc=12,wc=31,Cc=6,xc=7,$c=24,Sc=60,Ec=4,Oc=30;var Tc;!function(e){e.updateCronConfig="update-cron-config"}(Tc||(Tc={}));const kc=e=>Number(e)>1?`/${e}`:"";const Dc=(e,t,i)=>{const o=Number(e);return!isNaN(o)&&o<=i&&o>=t};function Ic(e,t,i,o=!1,n=Dc){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,a]=e.split("#");return n(o,t,i)&&n(a,1,Ec)}if(n(e,t,i))return!0;if(e.includes("-")){const[o,a]=e.split("-");return n(o,t,i)&&n(a,t,i)}return!!e.includes(",")&&e.split(",").every(e=>Ic(e,t,i,o,n))}function Rc(e,t){return{type:pc.DAILY,frequency:e.startsWith("*/")?e.split("*/")[1]:"1",weekType:"?"===t?mc.WEEK:mc.WORK_WEEK}}function Ac(e){const t=e.includes("/");return{type:pc.HOURLY,frequency:t?e.split("/")[1]:"1",during:t?"every_hour":"specific_hours",hours:t?void 0:e}}function Lc(e,t="*"){const i="*"!==t&&"0/1"!==t;return{type:pc.MINUTES,frequency:e.includes("/")?e.split("/")[1]:"1",during:i?"specific_hours":"every_hour",hours:i?t:void 0}}function Nc(e){return{type:pc.WEEKLY,selectedDays:"*"!==e?new Set(e.split(",")):new Set}}const Fc=(e,t,i,o)=>{let n;return n="?"===t?{type:vc.DAY_OF_MONTH,day:o.split(/[L#]/)[0],weekNumber:o.includes("#")?o.split("#")[1]:"-1"}:{type:vc.DATE,dayDate:t},e===pc.YEARLY&&(n.month=i),n};function Mc(e,t,i,o=Fc){return{type:pc.YEARLY,frequency:2===i.split("/").length?i.split("/")[1]:"1",dateOrDay:o(pc.YEARLY,e,t,i.split("/")[0])}}function _c(e,t,i,o=Fc){return{type:pc.MONTHLY,frequency:t.startsWith("*/")?t.split("*/")[1]:"1",dateOrDay:o(pc.MONTHLY,e,t,i.split("/")[0])}}const Hc=l.css`
|
|
3978
3978
|
.input-container {
|
|
3979
3979
|
display: flex;
|
|
3980
3980
|
flex-direction: column;
|
|
@@ -4073,7 +4073,7 @@
|
|
|
4073
4073
|
}
|
|
4074
4074
|
`;var zc=i(20633);const Uc=(e,t,i)=>l.html`
|
|
4075
4075
|
<${t}-icon tooltip="${()=>e}" name="${()=>i}"></${t}-icon>
|
|
4076
|
-
`,Bc=e=>class extends e{$emit(...e){const[t,i,o]=((...e)=>{let[t,i,o]=e,n=i;var
|
|
4076
|
+
`,Bc=e=>class extends e{$emit(...e){const[t,i,o]=((...e)=>{let[t,i,o]=e,n=i;var a;if(((null==(a=i)?void 0:a.hasOwnProperty("bubbles"))||(null==a?void 0:a.hasOwnProperty("cancelable"))||(null==a?void 0:a.hasOwnProperty("composed"))||(null==a?void 0:a.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)}},Vc=l.css`
|
|
4077
4077
|
${Hc}
|
|
4078
4078
|
`,jc="\n <p>Select one or more hours.</p>\n",Gc=l.html`
|
|
4079
4079
|
${e=>{return t=e.prefix,l.html`
|
|
@@ -4095,7 +4095,7 @@
|
|
|
4095
4095
|
</div>
|
|
4096
4096
|
</template>
|
|
4097
4097
|
`;var t}}
|
|
4098
|
-
`;let Yc=class extends(Bc(
|
|
4098
|
+
`;let Yc=class extends(Bc(s.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)||mc.WORK_WEEK}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{weekType:this.weekType}),this.$emit(Tc.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Yc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],Yc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],Yc.prototype,"config",void 0),(0,C.Cg)([l.observable],Yc.prototype,"weekType",void 0),Yc=(0,C.Cg)([(0,l.customElement)({name:"daily-recurrence",template:Gc,styles:Vc})],Yc);const Wc=l.css`
|
|
4099
4099
|
${Hc}
|
|
4100
4100
|
:host {
|
|
4101
4101
|
display: flex;
|
|
@@ -4200,7 +4200,7 @@
|
|
|
4200
4200
|
`)(e))}
|
|
4201
4201
|
`,Xc=l.html`
|
|
4202
4202
|
${e=>Kc(e.prefix)}
|
|
4203
|
-
`;let Jc=class extends(Bc(
|
|
4203
|
+
`;let Jc=class extends(Bc(s.FoundationElement)){constructor(){super(...arguments),this.prefix="",this.dayOrDate=vc.DATE,this.weekNumber="1",this.day="1",this.selectedMonth="1"}configChanged(){this.config.type!==pc.YEARLY&&this.config.type!==pc.MONTHLY||(this.dayOrDate=this.config.dateOrDay.type||vc.DATE,this.setFieldsFromConfig())}setFieldsFromConfig(){this.config.type===pc.YEARLY&&(this.selectedMonth=this.config.dateOrDay.month),this.config.dateOrDay.type===vc.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===vc.DATE?{type:vc.DATE,dayDate:this.dayDate||"1"}:{type:vc.DAY_OF_MONTH,day:this.day||"1",weekNumber:this.weekNumber||"1"},e}updateCronConfig(){this.config.type===pc.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(Tc.updateCronConfig,this.config)}};(0,C.Cg)([l.observable],Jc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],Jc.prototype,"config",void 0),(0,C.Cg)([l.observable],Jc.prototype,"dayOrDate",void 0),(0,C.Cg)([l.observable],Jc.prototype,"dayDate",void 0),(0,C.Cg)([l.observable],Jc.prototype,"weekNumber",void 0),(0,C.Cg)([l.observable],Jc.prototype,"day",void 0),(0,C.Cg)([l.observable],Jc.prototype,"selectedMonth",void 0),Jc=(0,C.Cg)([(0,l.customElement)({name:"monthly-yearly-recurrence",template:Xc,styles:Wc})],Jc);const Qc=l.css`
|
|
4204
4204
|
${Hc}
|
|
4205
4205
|
.weekdays-row {
|
|
4206
4206
|
display: flex;
|
|
@@ -4231,7 +4231,7 @@
|
|
|
4231
4231
|
</div>
|
|
4232
4232
|
</template>
|
|
4233
4233
|
`;var t}}
|
|
4234
|
-
`;let eu=class extends(Bc(
|
|
4234
|
+
`;let eu=class extends(Bc(s.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(Tc.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],eu.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],eu.prototype,"prefix",void 0),(0,C.Cg)([l.observable],eu.prototype,"config",void 0),(0,C.Cg)([l.observable],eu.prototype,"selectedDays",void 0),eu=(0,C.Cg)([(0,l.customElement)({name:"weekly-recurrence",template:Zc,styles:Qc})],eu),(0,zc.N)(Yc,eu,Jc);const tu=(e,t)=>l.html`
|
|
4235
4235
|
<monthly-yearly-recurrence
|
|
4236
4236
|
:prefix=${()=>e}
|
|
4237
4237
|
:config=${()=>t.cronConfig}
|
|
@@ -4389,7 +4389,7 @@
|
|
|
4389
4389
|
`;case pc.YEARLY:return l.html`
|
|
4390
4390
|
<div class="row">${ou(t,i,!0,!0)}</div>
|
|
4391
4391
|
${tu(t,i)}
|
|
4392
|
-
`;default:return l.html``}},
|
|
4392
|
+
`;default:return l.html``}},au=e=>l.html`
|
|
4393
4393
|
<template>
|
|
4394
4394
|
<div class="container">
|
|
4395
4395
|
<div class="input-container">
|
|
@@ -4432,9 +4432,9 @@
|
|
|
4432
4432
|
`,{recycle:!1})}
|
|
4433
4433
|
</div>
|
|
4434
4434
|
</template>
|
|
4435
|
-
`,
|
|
4436
|
-
${e=>
|
|
4437
|
-
`;class ru extends a.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Lc,buildConfigForHourlyRecurrence:Ac,buildConfigForDailyRecurrence:Rc,buildConfigForWeeklyRecurrence:Nc,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`
|
|
4435
|
+
`,su=l.html`
|
|
4436
|
+
${e=>au(T(e))}
|
|
4437
|
+
`;class ru extends s.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Lc,buildConfigForHourlyRecurrence:Ac,buildConfigForDailyRecurrence:Rc,buildConfigForWeeklyRecurrence:Nc,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,a,s,r,l]=i;return t(o,0,Sc-1)&&t(n,0,Sc-1)&&t(a,0,$c-1)&&t(s,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,a=o.find(e=>e>=n)||1;this.cronConfig=Object.assign(Object.assign({type:pc.MINUTES},i),{frequency:a.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case pc.HOURLY:const s=this.getBaseConfigFields(),{hours:r}=s,l=(0,C.Tt)(s,["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:a,frequency:s}=e,r=t(s);return i.type===vc.DATE?`${a} ${o} ${n} ${i.dayDate} *${r} ?`:"-1"===i.weekNumber?`${a} ${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,a,s,r,l]=i;if("?"!==l&&"?"!==s)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,a));if(/^(0|\*)\/\d+$/.test(a))return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(a));if("?"===s&&"*"===l)return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(a));if("2-6"===l||"?"===l&&("*"===s||s.startsWith("*")))return Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForDailyRecurrence(s,l));if(/^([1-7](,[1-7])*)$/.test(l)||"*"===l)return Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForWeeklyRecurrence(l));if(l.includes("L")||l.includes("#")||/^([1-9]|[12]\d|3[01])$/.test(s)&&"?"===l)return"*"==r||r.startsWith("*/")?Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForMonthlyRecurrence(s,r,l)):Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForYearlyRecurrence(s,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:su,shadowOptions:lu},du)),uu=l.css`
|
|
4438
4438
|
/* Host */
|
|
4439
4439
|
:host {
|
|
4440
4440
|
display: flex;
|
|
@@ -4479,7 +4479,7 @@
|
|
|
4479
4479
|
</template>
|
|
4480
4480
|
`,pu=l.html`
|
|
4481
4481
|
${e=>hu(T(e))}
|
|
4482
|
-
`;class mu extends
|
|
4482
|
+
`;class mu extends s.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){hc({title:"Cron Scheduler",body:"Unable to fetch timezones data.",toast:{type:"critical"}},"rapid"),Ga.v.error(e)}})}}(0,C.Cg)([l.observable],mu.prototype,"timezone",void 0),(0,C.Cg)([ui.dm],mu.prototype,"connect",void 0),(0,C.Cg)([l.observable],mu.prototype,"timeZones",void 0);const vu=void 0,gu={},fu=mu.compose(Object.assign({baseName:"scheduler-timezone",styles:uu,template:pu,shadowOptions:vu},gu)),bu=l.css`
|
|
4483
4483
|
.search-bar-combobox {
|
|
4484
4484
|
width: 100%;
|
|
4485
4485
|
min-width: auto;
|
|
@@ -4560,7 +4560,7 @@
|
|
|
4560
4560
|
<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)])}}
|
|
4561
4561
|
>
|
|
4562
4562
|
<slot
|
|
4563
|
-
${(0,l.slotted)({property:"defaultSlottedNodes",filter:
|
|
4563
|
+
${(0,l.slotted)({property:"defaultSlottedNodes",filter:s.whitespaceFilter})}
|
|
4564
4564
|
></slot>
|
|
4565
4565
|
</label>
|
|
4566
4566
|
|
|
@@ -4637,7 +4637,7 @@
|
|
|
4637
4637
|
</${e}-search-bar-combobox>
|
|
4638
4638
|
`,xu=l.html`
|
|
4639
4639
|
${e=>Cu(T(e))}
|
|
4640
|
-
`,$u=10,Su=3,Eu=1,Ou=(e,t)=>(new G.b).withExpression((new j.K).withField(e).withValue(t).withSerialiser(V.n.containsIgnoreCase).build()).build();class Tu extends
|
|
4640
|
+
`,$u=10,Su=3,Eu=1,Ou=(e,t)=>(new G.b).withExpression((new j.K).withField(e).withValue(t).withSerialiser(V.n.containsIgnoreCase).build()).build();class Tu extends s.FoundationElement{constructor(){super(...arguments),this.searchTerm="",this.appearance="neutral",this.minlength=Su,this.position=zt.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 a=t.value,s=this.searchTerm.trim();e.push({field:a,term:s,label:(null===(i=this.options.find(e=>e.field===a))||void 0===i?void 0:i.label(s))||t.text,createCriteria:null===(o=this.options.find(e=>e.field===a))||void 0===o?void 0:o.createCriteria,resourceType:null===(n=this.options.find(e=>e.field===a))||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)},$u)})}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(),a=this.addOrReplaceSelectedText(this.combobox.value,n,o);(null==a?void 0:a.length)>=this.minlength&&(this.combobox.value=a,this.searchTerm=a,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],Tu.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Tu.prototype,"options",void 0),(0,C.Cg)([l.observable],Tu.prototype,"searchTerm",void 0),(0,C.Cg)([l.attr],Tu.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Tu.prototype,"minlength",void 0),(0,C.Cg)([l.attr],Tu.prototype,"position",void 0),(0,C.Cg)([l.attr],Tu.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Tu.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"clear-button",mode:"boolean"})],Tu.prototype,"clearButton",void 0),(0,C.Cg)([l.observable],Tu.prototype,"loading",void 0),(0,C.Cg)([l.observable],Tu.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Tu.prototype,"filteredOptions",void 0);const ku=void 0,Du={},Iu=Tu.compose(Object.assign({baseName:"search-bar",template:xu,styles:bu,shadowOptions:ku},Du)),Ru=(e,t)=>l.css`
|
|
4641
4641
|
${yi(e,t)}
|
|
4642
4642
|
.control {
|
|
4643
4643
|
width: auto;
|
|
@@ -4710,7 +4710,7 @@
|
|
|
4710
4710
|
/>
|
|
4711
4711
|
</slot>
|
|
4712
4712
|
</div>
|
|
4713
|
-
${(0,
|
|
4713
|
+
${(0,s.endSlotTemplate)(e,t)}
|
|
4714
4714
|
<div
|
|
4715
4715
|
class="listbox"
|
|
4716
4716
|
id="${e=>e.listboxId}"
|
|
@@ -4722,7 +4722,7 @@
|
|
|
4722
4722
|
data-test-id="listbox"
|
|
4723
4723
|
>
|
|
4724
4724
|
<slot
|
|
4725
|
-
${(0,l.slotted)({filter:
|
|
4725
|
+
${(0,l.slotted)({filter:s.Listbox.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
|
|
4726
4726
|
></slot>
|
|
4727
4727
|
</div>
|
|
4728
4728
|
</template>
|
|
@@ -4964,7 +4964,7 @@
|
|
|
4964
4964
|
</div>
|
|
4965
4965
|
</template>
|
|
4966
4966
|
`;var t}}
|
|
4967
|
-
`,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"},ju={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 Gu extends a.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=Vu,this.stateIcons=ju,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()},Gu.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,Gu.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]||ju[e]:(zu.warn("State name is required"),ju.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}}Gu.SCROLL_END_TIMEOUT=150,Gu.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],Gu.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],Gu.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],Gu.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],Gu.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],Gu.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],Gu.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],Gu.prototype,"activeSection",void 0);const Yu={mode:"open"},Wu={},qu=Gu.compose(Object.assign({baseName:"foundation-section-navigator",template:Pu,styles:Hu,shadowOptions:Yu},Wu)),Ku=(e,t)=>l.css`
|
|
4967
|
+
`,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"},ju={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 Gu extends s.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=Vu,this.stateIcons=ju,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()},Gu.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,Gu.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 a=n.offsetTop+n.clientHeight/2,s=Math.abs(a-e);s<i&&(i=s,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 a=Object.assign(Object.assign({},i),{sectionName:n}),s=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0});this.dispatchEvent(s)}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]||ju[e]:(zu.warn("State name is required"),ju.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}}Gu.SCROLL_END_TIMEOUT=150,Gu.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],Gu.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],Gu.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],Gu.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],Gu.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],Gu.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],Gu.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],Gu.prototype,"activeSection",void 0);const Yu={mode:"open"},Wu={},qu=Gu.compose(Object.assign({baseName:"foundation-section-navigator",template:Pu,styles:Hu,shadowOptions:Yu},Wu)),Ku=(e,t)=>l.css`
|
|
4968
4968
|
${(0,r.radioGroupStyles)(e,t)}
|
|
4969
4969
|
::slotted(foundation-segmented-item:first-of-type) {
|
|
4970
4970
|
border-radius: calc(var(--control-corner-radius) * 1px) 0 0
|
|
@@ -4977,7 +4977,7 @@
|
|
|
4977
4977
|
calc(var(--control-corner-radius) * 1px) 0;
|
|
4978
4978
|
border-left-width: 0;
|
|
4979
4979
|
}
|
|
4980
|
-
`,Xu=(e,t)=>(0,
|
|
4980
|
+
`,Xu=(e,t)=>(0,s.radioGroupTemplate)(e,t);class Ju extends s.RadioGroup{valueChanged(){void 0===this.value&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}}const Qu=void 0,Zu={},eh=Ju.compose(Object.assign({baseName:"segmented-control",template:Xu,styles:Ku,shadowOptions:Qu},Zu)),th=(e,t)=>l.css`
|
|
4981
4981
|
${(0,r.radioStyles)(e,t)}
|
|
4982
4982
|
:host {
|
|
4983
4983
|
padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
|
|
@@ -5002,7 +5002,7 @@
|
|
|
5002
5002
|
<slot></slot>
|
|
5003
5003
|
</span>
|
|
5004
5004
|
</template>
|
|
5005
|
-
`;class oh extends r.Radio{}const nh=void 0,
|
|
5005
|
+
`;class oh extends r.Radio{}const nh=void 0,ah={},sh=oh.compose(Object.assign({baseName:"segmented-item",template:ih,styles:th,shadowOptions:nh},ah)),rh=(e,t)=>l.css`
|
|
5006
5006
|
${(0,r.selectStyles)(e,t)}
|
|
5007
5007
|
|
|
5008
5008
|
:host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible),
|
|
@@ -5010,9 +5010,9 @@
|
|
|
5010
5010
|
box-shadow: none;
|
|
5011
5011
|
outline: none;
|
|
5012
5012
|
}
|
|
5013
|
-
`,lh=(e,t)=>(0,
|
|
5013
|
+
`,lh=(e,t)=>(0,s.selectTemplate)(e,t);class dh extends r.Select{get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}slottedOptionsChanged(e,t){const i=this.value;super.slottedOptionsChanged(e,t),this.selectedIndex=-1;const o=[];this.slottedOptions&&this.slottedOptions.forEach(e=>{const t=e.nodeName.toLowerCase();if(t.endsWith("-optgroup")){const t=Array.from(e.children).filter(e=>{const t=e.nodeName.toLowerCase();return"option"===e.getAttribute("role")||t.endsWith("-option")});o.push(...t)}else("option"===e.getAttribute("role")||t.endsWith("-option"))&&o.push(e)}),this.options=o,i&&(this.value=i),-1===this.selectedIndex&&this.options.length>0&&(this.selectedIndex=0)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(function(e){const t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement:document.activeElement}(this))&&null!==e&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest"})}))}openChanged(e,t){if(this.collapsible){if(this.$emit("open-change",{open:this.open}),this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void l.DOM.queueUpdate(()=>this.focus());this.ariaControls="",this.ariaExpanded="false"}}keydownHandler(e){switch(e.key){case"ArrowDown":case"ArrowUp":if(this.open){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView({block:"center",behavior:"auto"})}else this.open=!0}return super.keydownHandler(e)}}const ch=void 0,uh={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 '},hh=dh.compose(Object.assign({baseName:"select",template:lh,styles:rh,shadowOptions:ch},uh)),ph=(e,t)=>l.css`
|
|
5014
5014
|
${(0,r.skeletonStyles)(e,t)}
|
|
5015
|
-
`,mh=(e,t)=>(0,
|
|
5015
|
+
`,mh=(e,t)=>(0,s.skeletonTemplate)(e,t);class vh extends r.Skeleton{}const gh=void 0,fh={},bh=vh.compose(Object.assign({baseName:"skeleton",template:mh,styles:ph,shadowOptions:gh},fh)),yh=(e,t)=>l.css`
|
|
5016
5016
|
${(0,r.sliderStyles)(e,t)}
|
|
5017
5017
|
.track-progress {
|
|
5018
5018
|
background-color: var(--accent-fill-rest);
|
|
@@ -5053,7 +5053,7 @@
|
|
|
5053
5053
|
</template>
|
|
5054
5054
|
`;class $h extends r.Slider{}const Sh=void 0,Eh={thumb:'\n <div class="thumb-cursor"></div>\n '},Oh=$h.compose(Object.assign({baseName:"slider",template:xh,styles:yh,shadowOptions:Sh},Eh)),Th=(e,t)=>l.css`
|
|
5055
5055
|
${(0,r.sliderLabelStyles)(e,t)}
|
|
5056
|
-
`,kh=(e,t)=>(0,
|
|
5056
|
+
`,kh=(e,t)=>(0,s.sliderLabelTemplate)(e,t);class Dh extends r.SliderLabel{}const Ih=void 0,Rh={},Ah=Dh.compose(Object.assign({baseName:"slider-label",template:kh,styles:Th,shadowOptions:Ih},Rh)),Lh="default",Nh={DEFAULT:Lh,ERROR:"error",SUCCESS:"success"},Fh=1e4,Mh={DISMISS:"dismiss",AUTO_DISMISS:"autoDismiss"},_h=l.css`
|
|
5057
5057
|
@keyframes append-from-left-animate {
|
|
5058
5058
|
from {
|
|
5059
5059
|
transform: translateX(100%);
|
|
@@ -5187,10 +5187,10 @@
|
|
|
5187
5187
|
${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"}}
|
|
5188
5188
|
</slot>
|
|
5189
5189
|
</div>
|
|
5190
|
-
${(0,l.when)(e=>{var t,i,o,n,s,
|
|
5190
|
+
${(0,l.when)(e=>{var t,i,o,n,a,s,r,l;return(null===(n=null===(o=null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.confirmingActions)||void 0===n?void 0:n.length)||(null===(l=null===(r=null===(s=null===(a=e.notification)||void 0===a?void 0:a.config)||void 0===s?void 0:s.snackbar)||void 0===r?void 0:r.confirmingActions)||void 0===l?void 0:l.length)},l.html`
|
|
5191
5191
|
<div part="action" class="action">
|
|
5192
5192
|
<slot name="action">
|
|
5193
|
-
${(0,l.repeat)(e=>{var t,i,o,n,s
|
|
5193
|
+
${(0,l.repeat)(e=>{var t,i,o,n,a,s;return(null===(o=null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.confirmingActions)||(null===(s=null===(a=null===(n=e.notification)||void 0===n?void 0:n.config)||void 0===a?void 0:a.snackbar)||void 0===s?void 0:s.confirmingActions)},l.html`
|
|
5194
5194
|
<${e}-button
|
|
5195
5195
|
slot="action"
|
|
5196
5196
|
appearance="lightweight"
|
|
@@ -5205,7 +5205,7 @@
|
|
|
5205
5205
|
</div>
|
|
5206
5206
|
`,Ph=l.html`
|
|
5207
5207
|
${e=>Hh(T(e))}
|
|
5208
|
-
`,zh={mode:"open",delegatesFocus:!0};class Uh extends
|
|
5208
|
+
`,zh={mode:"open",delegatesFocus:!0};class Uh extends s.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=Fh,this.autoClose=!0,this.type=Lh,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(Mh.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:Lh}notificationChanged(e,t){var i,o,n,a,s,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:Lh,this.autoClose=null===(r=null===(s=null===(a=null==t?void 0:t.config)||void 0===a?void 0:a.snackbar)||void 0===s?void 0:s.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:Fh}handleDissmis(e=!1){this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(Mh.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Mh.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}}(0,C.Cg)([l.observable],Uh.prototype,"error",void 0),(0,C.Cg)([l.observable],Uh.prototype,"notification",void 0),(0,C.Cg)([l.observable],Uh.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"identifier"})],Uh.prototype,"identifier",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],Uh.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Uh.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],Uh.prototype,"type",void 0);const Bh=Uh.compose({baseName:"snackbar",styles:_h,template:Ph,shadowOptions:zh}),Vh=(e,t)=>l.css`
|
|
5209
5209
|
${wr()}
|
|
5210
5210
|
|
|
5211
5211
|
.fa-stack {
|
|
@@ -5238,7 +5238,7 @@
|
|
|
5238
5238
|
>
|
|
5239
5239
|
<slot></slot>
|
|
5240
5240
|
</span>
|
|
5241
|
-
`;class Gh extends
|
|
5241
|
+
`;class Gh extends s.FoundationElement{constructor(){super(...arguments),this.size=Tr,this["vertical-align"]="baseline"}}(0,C.Cg)([l.attr],Gh.prototype,"size",void 0),(0,C.Cg)([l.attr],Gh.prototype,"vertical-align",void 0);const Yh=Gh.compose({baseName:"stacking-icons",template:jh,styles:Vh}),Wh=l.css`
|
|
5242
5242
|
.status-pill {
|
|
5243
5243
|
font-size: var(--ag-data-font-size);
|
|
5244
5244
|
display: inline-flex;
|
|
@@ -5304,7 +5304,7 @@
|
|
|
5304
5304
|
</div>
|
|
5305
5305
|
`)}
|
|
5306
5306
|
`;var t}}
|
|
5307
|
-
`,Kh=(e,t="second")=>{let i=e/1e3;const o=Math.floor(i/86400);i%=86400;const n=Math.floor(i/3600);i%=3600;const
|
|
5307
|
+
`,Kh=(e,t="second")=>{let i=e/1e3;const o=Math.floor(i/86400);i%=86400;const n=Math.floor(i/3600);i%=3600;const a=Math.floor(i/60),s=Math.floor(i%60),r=[];switch(o&&r.push(`${o}d`),t){case"minute":n&&r.push(`${n}h`),a&&r.push(`${a}m`),!a&&s&&r.push("< 1m");break;case"hour":n&&r.push(`${n}h`),n||!a&&!s||r.push("< 1h");break;default:n&&r.push(`${n}h`),a&&r.push(`${a}m`),s&&r.push(`${s}s`)}return r.length?r.join(" "):"0s"};class Xh extends s.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)))ot.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=Kh(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"})],Xh.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],Xh.prototype,"iconName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-src"})],Xh.prototype,"iconSrc",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial"})],Xh.prototype,"iconInitial",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial-background-color"})],Xh.prototype,"iconInitialBackgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],Xh.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],Xh.prototype,"textColor",void 0),(0,C.Cg)([l.attr],Xh.prototype,"text",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown"})],Xh.prototype,"dateCountdown",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-completed-message"})],Xh.prototype,"dateCountdownCompletedMessage",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-unit"})],Xh.prototype,"dateCountdownUnit",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-visible-after"})],Xh.prototype,"dateCountdownVisibleAfter",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"hide-when-countdown-completed"})],Xh.prototype,"hideWhenCountdownCompleted",void 0),(0,C.Cg)([l.observable],Xh.prototype,"countdown",void 0),(0,C.Cg)([l.observable],Xh.prototype,"isCountdownExpired",void 0),(0,C.Cg)([l.observable],Xh.prototype,"isCountdownVisible",void 0);const Jh=Xh.compose({baseName:"status-pill",styles:Wh,template:qh}),Qh=(e,t)=>l.css`
|
|
5308
5308
|
.tree-item {
|
|
5309
5309
|
cursor: default;
|
|
5310
5310
|
}
|
|
@@ -5415,7 +5415,7 @@
|
|
|
5415
5415
|
background-color: var(--accent-fill-rest); /* Choose a color */
|
|
5416
5416
|
}
|
|
5417
5417
|
`,Zh=e=>l.html`
|
|
5418
|
-
${(0,En.q)(e=>e.orientation===
|
|
5418
|
+
${(0,En.q)(e=>e.orientation===s.TabsOrientation.vertical,l.html`
|
|
5419
5419
|
<${e}-tree-item ${(0,l.ref)("treeItem")}
|
|
5420
5420
|
class=${e=>(0,x.x)("tree-item",["cursor-pointer",e.showCursorPointer])}
|
|
5421
5421
|
@click="${(e,t)=>e.$emit("tab-clicked",e.tabPosition-1)}">
|
|
@@ -5460,11 +5460,11 @@
|
|
|
5460
5460
|
`)}
|
|
5461
5461
|
`,ep=l.html`
|
|
5462
5462
|
${e=>Zh(T(e))}
|
|
5463
|
-
`;class tp extends
|
|
5463
|
+
`;class tp extends s.FoundationElement{constructor(){super(...arguments),this.slot="tab",this.orientation=s.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],tp.prototype,"slot",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tp.prototype,"selected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tp.prototype,"completed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tp.prototype,"error",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tp.prototype,"isLast",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tp.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tp.prototype,"showCursorPointer",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tab-position"})],tp.prototype,"tabPosition",void 0),(0,C.Cg)([l.attr],tp.prototype,"orientation",void 0);const ip=void 0,op={},np=tp.compose(Object.assign({baseName:"stepper-tab",template:ep,styles:Qh,shadowOptions:ip},op)),ap=()=>l.html`
|
|
5464
5464
|
<template slot="tab-panel" role="stepper-tab-panel">
|
|
5465
5465
|
<slot></slot>
|
|
5466
5466
|
</template>
|
|
5467
|
-
`;class
|
|
5467
|
+
`;class sp extends s.FoundationElement{}const rp=void 0,lp={},dp=sp.compose(Object.assign({baseName:"stepper-tab-panel",template:ap,shadowOptions:rp},lp)),cp=(e,t)=>l.css`
|
|
5468
5468
|
${(0,r.switchStyles)(e,t)}
|
|
5469
5469
|
.checked-indicator {
|
|
5470
5470
|
transform: scale(1.3);
|
|
@@ -5477,20 +5477,20 @@
|
|
|
5477
5477
|
.checked-indicator {
|
|
5478
5478
|
border-radius: calc(var(--control-corner-radius) * 2px);
|
|
5479
5479
|
}
|
|
5480
|
-
`,up=(e,t)=>(0,
|
|
5480
|
+
`,up=(e,t)=>(0,s.switchTemplate)(e,t);class hp extends r.Switch{}const pp=void 0,mp={switch:'<div class="checked-indicator" part="checked-indicator"></div>'},vp=hp.compose(Object.assign({baseName:"switch",template:up,styles:cp,shadowOptions:pp},mp)),gp=(e,t)=>l.css`
|
|
5481
5481
|
${(0,r.tabStyles)(e,t)}
|
|
5482
5482
|
|
|
5483
5483
|
:host {
|
|
5484
5484
|
user-select: none;
|
|
5485
5485
|
}
|
|
5486
|
-
`,fp=(e,t)=>(0,
|
|
5486
|
+
`,fp=(e,t)=>(0,s.tabTemplate)(e,t);class bp extends r.Tab{}const yp=void 0,wp={},Cp=bp.compose(Object.assign({baseName:"tab",template:fp,styles:gp,shadowOptions:yp},wp)),xp=(e,t)=>l.css`
|
|
5487
5487
|
${(0,r.tabPanelStyles)(e,t)}
|
|
5488
5488
|
|
|
5489
5489
|
:host {
|
|
5490
5490
|
height: 100%;
|
|
5491
5491
|
padding: 0;
|
|
5492
5492
|
}
|
|
5493
|
-
`,$p=(e,t)=>(0,
|
|
5493
|
+
`,$p=(e,t)=>(0,s.tabPanelTemplate)(e,t);class Sp extends r.TabPanel{}const Ep=void 0,Op={},Tp=Sp.compose(Object.assign({baseName:"tab-panel",template:$p,styles:xp,shadowOptions:Ep},Op)),kp=(e,t)=>l.css`
|
|
5494
5494
|
${(0,r.tabsStyles)(e,t)}
|
|
5495
5495
|
|
|
5496
5496
|
:host {
|
|
@@ -5507,12 +5507,12 @@
|
|
|
5507
5507
|
:host([scrollable]) ::slotted([role='tab']) {
|
|
5508
5508
|
flex: 0 0 auto;
|
|
5509
5509
|
}
|
|
5510
|
-
`,Dp=(e,t)=>(0,
|
|
5510
|
+
`,Dp=(e,t)=>(0,s.tabsTemplate)(e,t);class Ip extends r.Tabs{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ip.prototype,"scrollable",void 0);const Rp=void 0,Ap={},Lp=Ip.compose(Object.assign({baseName:"tabs",template:Dp,styles:kp,shadowOptions:Rp},Ap)),Np=(e,t)=>l.css`
|
|
5511
5511
|
${(0,r.textAreaStyles)(e,t)}
|
|
5512
5512
|
:host .control {
|
|
5513
5513
|
padding: calc(var(--design-unit) * 3px);
|
|
5514
5514
|
}
|
|
5515
|
-
`,Fp=(e,t)=>(0,
|
|
5515
|
+
`,Fp=(e,t)=>(0,s.textAreaTemplate)(e,t);class Mp extends r.TextArea{}const _p=void 0,Hp={},Pp=Mp.compose(Object.assign({baseName:"text-area",template:Fp,styles:Np,shadowOptions:_p},Hp)),{create:zp}=s.DesignToken,Up=zp("active-color-scheme").withDefault(e=>r.baseLayerLuminance.getValueFor(e)===r.StandardLuminance.LightMode?"light":"dark"),Bp=(e,t)=>l.css`
|
|
5516
5516
|
${(0,r.textFieldStyles)(e,t)}
|
|
5517
5517
|
/* Override FAST .root align-items: baseline for this flex child so it still fills the row. */
|
|
5518
5518
|
${wl}
|
|
@@ -5529,10 +5529,10 @@
|
|
|
5529
5529
|
for="${e=>e.id?e.id:"control"}"
|
|
5530
5530
|
class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label-hidden"}"
|
|
5531
5531
|
>
|
|
5532
|
-
<slot ${(0,l.slotted)({property:"defaultSlottedNodes",filter:
|
|
5532
|
+
<slot ${(0,l.slotted)({property:"defaultSlottedNodes",filter:s.whitespaceFilter})}></slot>
|
|
5533
5533
|
</label>
|
|
5534
5534
|
<div class="root" part="root">
|
|
5535
|
-
${(0,
|
|
5535
|
+
${(0,s.startSlotTemplate)(e,t)}
|
|
5536
5536
|
<div class="control-field">
|
|
5537
5537
|
${(0,l.when)(e=>e.prefix,l.html`
|
|
5538
5538
|
<span
|
|
@@ -5599,7 +5599,7 @@
|
|
|
5599
5599
|
</span>
|
|
5600
5600
|
`)}
|
|
5601
5601
|
</div>
|
|
5602
|
-
${(0,
|
|
5602
|
+
${(0,s.endSlotTemplate)(e,t)}
|
|
5603
5603
|
</div>
|
|
5604
5604
|
</template>
|
|
5605
5605
|
`;class jp extends(yl(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],jp.prototype,"autocomplete",void 0),(0,C.Cg)([l.attr],jp.prototype,"autocapitalize",void 0),(0,C.Cg)([l.attr],jp.prototype,"step",void 0);const Gp={mode:"open",delegatesFocus:!0},Yp={},Wp=jp.compose(Object.assign({baseName:"text-field",template:Vp,styles:Bp,shadowOptions:Gp},Yp)),qp=l.css`
|
|
@@ -5742,11 +5742,11 @@
|
|
|
5742
5742
|
</div>
|
|
5743
5743
|
`,Xp=l.html`
|
|
5744
5744
|
${e=>Kp(T(e))}
|
|
5745
|
-
`,Jp={mode:"open",delegatesFocus:!0},Qp={};class Zp extends
|
|
5745
|
+
`,Jp={mode:"open",delegatesFocus:!0},Qp={};class Zp extends s.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],Zp.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],Zp.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close"})],Zp.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"notification-icon"})],Zp.prototype,"notificationIcon",void 0);const em=Zp.compose(Object.assign({baseName:"toast",styles:qp,template:Xp,shadowOptions:Jp},Qp)),tm=(e,t)=>l.css`
|
|
5746
5746
|
${(0,r.toolbarStyles)(e,t)}
|
|
5747
|
-
`,im=(e,t)=>(0,
|
|
5747
|
+
`,im=(e,t)=>(0,s.toolbarTemplate)(e,t);class om extends r.Toolbar{}const nm=void 0,am={},sm=om.compose(Object.assign({baseName:"toolbar",template:im,styles:tm,shadowOptions:nm},am)),rm=(e,t)=>l.css`
|
|
5748
5748
|
${(0,r.tooltipStyles)(e,t)}
|
|
5749
|
-
`,lm=(e,t)=>(0,
|
|
5749
|
+
`,lm=(e,t)=>(0,s.tooltipTemplate)(e,t);class dm extends r.Tooltip{}const cm=void 0,um={},hm=dm.compose(Object.assign({baseName:"tooltip",template:lm,styles:rm,shadowOptions:cm},um)),pm=(e,t)=>l.css`
|
|
5750
5750
|
${(0,r.treeItemStyles)(e,t)}
|
|
5751
5751
|
:host {
|
|
5752
5752
|
--focus-stroke-width: 0;
|
|
@@ -5763,9 +5763,9 @@
|
|
|
5763
5763
|
.positioning-region {
|
|
5764
5764
|
height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);
|
|
5765
5765
|
}
|
|
5766
|
-
`,mm=(e,t)=>(0,
|
|
5766
|
+
`,mm=(e,t)=>(0,s.treeItemTemplate)(e,t);class vm extends r.TreeItem{}const gm=void 0,fm={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>'},bm=vm.compose(Object.assign({baseName:"tree-item",template:mm,styles:pm,shadowOptions:gm},fm)),ym=(e,t)=>l.css`
|
|
5767
5767
|
${(0,r.treeViewStyles)(e,t)}
|
|
5768
|
-
`,wm=(e,t)=>(0,
|
|
5768
|
+
`,wm=(e,t)=>(0,s.treeViewTemplate)(e,t);class Cm extends s.TreeView{}const xm=void 0,$m={},Sm=Cm.compose(Object.assign({baseName:"tree-view",template:wm,styles:ym,shadowOptions:xm},$m)),Em=(e,t)=>l.css`
|
|
5769
5769
|
.container {
|
|
5770
5770
|
position: relative;
|
|
5771
5771
|
width: 100%;
|
|
@@ -5914,7 +5914,7 @@
|
|
|
5914
5914
|
class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label-hidden"}"
|
|
5915
5915
|
>
|
|
5916
5916
|
<slot
|
|
5917
|
-
${(0,l.slotted)({property:"defaultSlottedNodes",filter:
|
|
5917
|
+
${(0,l.slotted)({property:"defaultSlottedNodes",filter:s.whitespaceFilter})}
|
|
5918
5918
|
></slot>
|
|
5919
5919
|
</label>
|
|
5920
5920
|
<div
|
|
@@ -5954,7 +5954,7 @@
|
|
|
5954
5954
|
</div>
|
|
5955
5955
|
`)}
|
|
5956
5956
|
</div>
|
|
5957
|
-
`,Nm={mode:"open",delegatesFocus:!0},Fm={},Mm=/^\d$/;class _m extends a.FoundationElement{}class Hm extends((0,a.FormAssociated)(_m)){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(Mm.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&&!Mm.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=>Mm.test(e))}emitChange(){this.$emit("change",{value:this.value})}}(0,C.Cg)([l.observable],Hm.prototype,"values",void 0),(0,C.Cg)([l.observable],Hm.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.attr],Hm.prototype,"id",void 0),(0,C.Cg)([l.attr],Hm.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Hm.prototype,"digits",void 0),(0,C.Cg)([(0,l.attr)({attribute:"readonly",mode:"boolean"})],Hm.prototype,"readOnly",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hm.prototype,"autofocus",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hm.prototype,"error",void 0);const Pm=Hm.compose(Object.assign({baseName:"verification-code-input",template:Lm,styles:Am,shadowOptions:Nm},Fm)),zm={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:Gn,foundationDropdownMenu:Qn,foundationErrorBanner:fs,foundationErrorBoundary:Rs,foundationErrorDialog:_s,foundationFileReader:js,foundationFileUpload:aa,foundationFilter:fa,foundationFilterBar:Oa,foundationFlexLayout:Na,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:Ul,foundationOptgroup:Gl,foundationPill:Nd,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:Cp,foundationTabPanel:Tp,foundationTabs:Lp,foundationTextArea:Pp,foundationTextField:Wp,foundationToast:em,foundationToolbar:am,foundationTooltip:hm,foundationTreeItem:bm,foundationTreeView:Sm,foundationUrlInput:Rm,foundationVerificationCodeInput:Pm,foundationSectionNavigator:qu,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Um 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 Bm=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.")}};Bm=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],Bm);const Vm=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],jm=[...Vm,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],Gm={type:"NULL",maxRules:1,invisible:!0},Ym=["int","short","long","bigdecimal","double"],Wm=["date","date-time"],qm=["enum",...Ym,"string",...Wm,"boolean"],Km=[{type:"equal",nbInputs:1,applyTo:qm,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:qm,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...Ym,...Wm],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...Ym,...Wm],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:[...qm].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...qm].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...Ym,...Wm],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...Ym,...Wm],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...qm],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...qm],optgroup:"Null"}];var Xm=i(93678);const Jm=i.n(Xm)()();function Qm(e,t,i){const o=function e(o){const n=Jm(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 Zm(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 ev(e,t){const i=Zm(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 tv(e,t){const i=Zm(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 iv(e,t,i){return Qm(e,t,e=>[...e,i])}const ov="group-root";function nv(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:ov,children:e.children.map(e=>i(e,2))})}function sv(e){const t=e.children.map(e=>"children"in e?sv(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 av=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,rv=e=>`${av(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,lv=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},dv=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},cv=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 uv(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 hv;!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"}(hv||(hv={}));const pv=l.css`
|
|
5957
|
+
`,Nm={mode:"open",delegatesFocus:!0},Fm={},Mm=/^\d$/;class _m extends s.FoundationElement{}class Hm extends((0,s.FormAssociated)(_m)){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(Mm.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&&!Mm.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:""}),a=null!==(t=this.values)&&void 0!==t?t:[];n.length===a.length&&n.every((e,t)=>e===a[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=>Mm.test(e))}emitChange(){this.$emit("change",{value:this.value})}}(0,C.Cg)([l.observable],Hm.prototype,"values",void 0),(0,C.Cg)([l.observable],Hm.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.attr],Hm.prototype,"id",void 0),(0,C.Cg)([l.attr],Hm.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Hm.prototype,"digits",void 0),(0,C.Cg)([(0,l.attr)({attribute:"readonly",mode:"boolean"})],Hm.prototype,"readOnly",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hm.prototype,"autofocus",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hm.prototype,"error",void 0);const Pm=Hm.compose(Object.assign({baseName:"verification-code-input",template:Lm,styles:Am,shadowOptions:Nm},Fm)),zm={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:Gn,foundationDropdownMenu:Qn,foundationErrorBanner:fa,foundationErrorBoundary:Ra,foundationErrorDialog:_a,foundationFileReader:ja,foundationFileUpload:ss,foundationFilter:fs,foundationFilterBar:Os,foundationFlexLayout:Ns,foundationFlipper:zs,foundationFlyout:qs,foundationGridLayout:or,foundationGridLayoutItem:lr,foundationHorizontalScroll:mr,foundationIcon:Ir,foundationListbox:Mr,foundationListboxOption:Br,foundationMenu:qr,foundationMenuItem:el,foundationModal:sl,foundationMultiselect:vl,foundationNumberField:Ul,foundationOptgroup:Gl,foundationPill:Nd,foundationPopper:zd,foundationProgress:fd,foundationProgressRing:Yd,foundationRadio:Qd,foundationRadioGroup:nc,foundationScheduler:uc,foundationSchedulerCronBuilder:cu,foundationSchedulerTimezone:fu,foundationSearchBar:Iu,foundationSearchBarCombobox:_u,foundationSegmentedControl:eh,foundationSegmentedItem:sh,foundationSelect:hh,foundationSkeleton:bh,foundationSlider:Oh,foundationSliderLabel:Ah,foundationSnackbar:Bh,foundationStackingIcons:Yh,foundationStatusPill:Jh,foundationEnvironmentIndicator:ha,foundationStepperTab:np,foundationStepperTabPanel:dp,foundationSwitch:vp,foundationSystemHealthOverlay:Td,foundationTab:Cp,foundationTabPanel:Tp,foundationTabs:Lp,foundationTextArea:Pp,foundationTextField:Wp,foundationToast:em,foundationToolbar:sm,foundationTooltip:hm,foundationTreeItem:bm,foundationTreeView:Sm,foundationUrlInput:Rm,foundationVerificationCodeInput:Pm,foundationSectionNavigator:qu,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Um 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 Bm=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.")}};Bm=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],Bm);const Vm=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],jm=[...Vm,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],Gm={type:"NULL",maxRules:1,invisible:!0},Ym=["int","short","long","bigdecimal","double"],Wm=["date","date-time"],qm=["enum",...Ym,"string",...Wm,"boolean"],Km=[{type:"equal",nbInputs:1,applyTo:qm,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:qm,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...Ym,...Wm],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...Ym,...Wm],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:[...qm].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...qm].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...Ym,...Wm],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...Ym,...Wm],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...qm],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...qm],optgroup:"Null"}];var Xm=i(93678);const Jm=i.n(Xm)()();function Qm(e,t,i){const o=function e(o){const n=Jm(o);if(n.groupId===t)return n.children=i(n.children),n;const a=[];let s=!1;for(const t of n.children)if("children"in t){const i=e(t);i?(a.push(i),s=!0):a.push(t)}else a.push(t);return n.children=a,s?n:null}(e);if(!o)throw new Error(`Unable to find group with groupId ${t}`);return o}function Zm(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 ev(e,t){const i=Zm(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 tv(e,t){const i=Zm(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 iv(e,t,i){return Qm(e,t,e=>[...e,i])}const ov="group-root";function nv(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:ov,children:e.children.map(e=>i(e,2))})}function av(e){const t=e.children.map(e=>"children"in e?av(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 sv=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,rv=e=>`${sv(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,lv=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},dv=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},cv=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 uv(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 hv;!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"}(hv||(hv={}));const pv=l.css`
|
|
5958
5958
|
:host {
|
|
5959
5959
|
--item-vertical-spacing: 4px;
|
|
5960
5960
|
--item-border-radius: 5px;
|
|
@@ -6171,11 +6171,11 @@
|
|
|
6171
6171
|
list-style: none;
|
|
6172
6172
|
padding-left: 0;
|
|
6173
6173
|
}
|
|
6174
|
-
`;function vv(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),
|
|
6175
|
-
${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:
|
|
6174
|
+
`;function vv(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),a=o(i);return(t,i)=>e(t,i)?n(t,i):a(t,i)}const gv=l.html`
|
|
6175
|
+
${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:a}=o?{radioTag:o.input,radioGroupTag:o.group}:{radioTag:"input",radioGroupTag:"div"};return l.html`
|
|
6176
6176
|
<div class="btn-group group-conditions">
|
|
6177
6177
|
${vv(e=>"input"!==n,l.html`
|
|
6178
|
-
<${
|
|
6178
|
+
<${a}
|
|
6179
6179
|
class="radio-group-container"
|
|
6180
6180
|
name="combinator"
|
|
6181
6181
|
@change="${(e,t)=>e.handleCombinatorChange(t.event)}"
|
|
@@ -6191,7 +6191,7 @@
|
|
|
6191
6191
|
</${n}>
|
|
6192
6192
|
`)}
|
|
6193
6193
|
`)}
|
|
6194
|
-
</${
|
|
6194
|
+
</${a}>
|
|
6195
6195
|
`,l.html`
|
|
6196
6196
|
<div class="radio-group-container">
|
|
6197
6197
|
${(0,l.repeat)(e=>e.config.combinators,l.html`
|
|
@@ -6213,7 +6213,7 @@
|
|
|
6213
6213
|
</div>
|
|
6214
6214
|
`}}
|
|
6215
6215
|
`,fv=l.html`
|
|
6216
|
-
${e=>{var t,i,o,n,s,
|
|
6216
|
+
${e=>{var t,i,o,n,a,s,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===(a=null===(n=null===(o=e.config)||void 0===o?void 0:o.combinators)||void 0===n?void 0:n[0])||void 0===a?void 0:a.type})`,h=`Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${null===(d=null===(r=null===(s=e.config)||void 0===s?void 0:s.combinators)||void 0===r?void 0:r[0])||void 0===d?void 0:d.type})`;return l.html`
|
|
6217
6217
|
<div class="btn-group float-end group-actions">
|
|
6218
6218
|
${(0,l.when)(e=>e.allowAddRule,l.html`
|
|
6219
6219
|
<${c}
|
|
@@ -6290,7 +6290,7 @@
|
|
|
6290
6290
|
`)}
|
|
6291
6291
|
</div>
|
|
6292
6292
|
`,Cv=l.html`
|
|
6293
|
-
${e=>{var t,i,o,n,s
|
|
6293
|
+
${e=>{var t,i,o,n,a,s;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===(s=null===(a=e.styles)||void 0===a?void 0:a.customElements)||void 0===s?void 0:s.optgroup)||"optgroup";return l.html`
|
|
6294
6294
|
<${r}
|
|
6295
6295
|
class="form-select"
|
|
6296
6296
|
@change=${(e,t)=>e.dispatchFieldsChanged(t.event)}
|
|
@@ -6321,7 +6321,7 @@
|
|
|
6321
6321
|
</${r}>
|
|
6322
6322
|
`}}
|
|
6323
6323
|
`;let xv=class extends l.FASTElement{constructor(){super(...arguments),this.fields=[]}connectedCallback(){super.connectedCallback(),uv(this,this.styles,"field")}get groupedFieldss(){return cv(this.fields)}dispatchFieldsChanged(e){e.stopPropagation();const t={fieldId:e.target.value};this.dispatchEvent(new CustomEvent(hv.FieldSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],xv.prototype,"fields",void 0),(0,C.Cg)([l.observable],xv.prototype,"field",void 0),(0,C.Cg)([l.observable],xv.prototype,"config",void 0),(0,C.Cg)([l.observable],xv.prototype,"styles",void 0),(0,C.Cg)([l.volatile],xv.prototype,"groupedFieldss",null),xv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-field",template:Cv})],xv);const $v=l.html`
|
|
6324
|
-
${e=>{var t,i,o,n,s
|
|
6324
|
+
${e=>{var t,i,o,n,a,s;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===(s=null===(a=e.styles)||void 0===a?void 0:a.customElements)||void 0===s?void 0:s.optgroup)||"optgroup";return l.html`
|
|
6325
6325
|
<${r}
|
|
6326
6326
|
class="form-select"
|
|
6327
6327
|
@change=${(e,t)=>e.handleOperatorChange(t.event)}
|
|
@@ -6363,8 +6363,8 @@
|
|
|
6363
6363
|
align-items: center;
|
|
6364
6364
|
}
|
|
6365
6365
|
`,Dv=l.html`
|
|
6366
|
-
${e=>{var t,i;const o=lv(e),n="datetime-local"===o?"datetimeLocal":o,
|
|
6367
|
-
<${
|
|
6366
|
+
${e=>{var t,i;const o=lv(e),n="datetime-local"===o?"datetimeLocal":o,a=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i[n])||"input";return l.html`
|
|
6367
|
+
<${a}
|
|
6368
6368
|
type="${o}"
|
|
6369
6369
|
class="text-input ${e=>(0,x.x)(["error",e.validationError])}"
|
|
6370
6370
|
value=${e=>e.value}
|
|
@@ -6372,22 +6372,22 @@
|
|
|
6372
6372
|
/>
|
|
6373
6373
|
`}}
|
|
6374
6374
|
`,Iv=l.html`
|
|
6375
|
-
${e=>{var t,i,o,n;const
|
|
6376
|
-
<${
|
|
6375
|
+
${e=>{var t,i,o,n;const a=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",s=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option";return l.html`
|
|
6376
|
+
<${a}
|
|
6377
6377
|
class="form-select"
|
|
6378
6378
|
@change=${(e,t)=>e.handleInputChange(t.event)}
|
|
6379
6379
|
value=${e=>e.value}
|
|
6380
6380
|
>
|
|
6381
|
-
${(0,l.repeat)(e=>{var t,i,o,n;const
|
|
6382
|
-
<${
|
|
6381
|
+
${(0,l.repeat)(e=>{var t,i,o,n;const a="enum"===(null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&(null===(n=null===(o=null==e?void 0:e.operator)||void 0===o?void 0:o.valueType)||void 0===n?void 0:n.values)?e.operator.valueType.values:"enum"===e.field.type&&e.field.values?e.field.values:{};return Object.entries(a)},()=>l.html`
|
|
6382
|
+
<${s}
|
|
6383
6383
|
value="${e=>e[0]}"
|
|
6384
6384
|
?selected=${(e,t)=>e[0]===t.parent.value}
|
|
6385
6385
|
title="${e=>"object"==typeof e[1]?e[1].tooltip:""}"
|
|
6386
6386
|
>
|
|
6387
6387
|
${e=>"object"==typeof e[1]?e[1].label:e[1]}
|
|
6388
|
-
</${
|
|
6388
|
+
</${s}>
|
|
6389
6389
|
`)}
|
|
6390
|
-
</${
|
|
6390
|
+
</${a}>
|
|
6391
6391
|
`}}
|
|
6392
6392
|
`,Rv=l.html`
|
|
6393
6393
|
${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`
|
|
@@ -6430,7 +6430,7 @@
|
|
|
6430
6430
|
${vv(e=>e.field,Lv,l.html`
|
|
6431
6431
|
<div>Select a field to set value</div>
|
|
6432
6432
|
`)}
|
|
6433
|
-
`;let Fv=class extends l.FASTElement{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),uv(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,Tv(dv(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&&Ev(dv(this))?parseInt(t.value):this.field&&Ov(dv(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(hv.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(hv.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};(0,C.Cg)([(0,l.attr)({attribute:"value-index"})],Fv.prototype,"valueIndex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Fv.prototype,"variadic",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"validation-error"})],Fv.prototype,"validationError",void 0),(0,C.Cg)([(0,l.attr)({attribute:"validation-msg"})],Fv.prototype,"validationMsg",void 0),(0,C.Cg)([l.observable],Fv.prototype,"field",void 0),(0,C.Cg)([l.observable],Fv.prototype,"operator",void 0),(0,C.Cg)([l.observable],Fv.prototype,"value",void 0),(0,C.Cg)([l.observable],Fv.prototype,"config",void 0),(0,C.Cg)([l.observable],Fv.prototype,"styles",void 0),Fv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-value",template:Nv,styles:kv,shadowOptions:{delegatesFocus:!0}})],Fv);const Mv=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:_v(e,t),_v=(e,t)=>{var i,o;switch(dv(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return
|
|
6433
|
+
`;let Fv=class extends l.FASTElement{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),uv(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,Tv(dv(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&&Ev(dv(this))?parseInt(t.value):this.field&&Ov(dv(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(hv.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(hv.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};(0,C.Cg)([(0,l.attr)({attribute:"value-index"})],Fv.prototype,"valueIndex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Fv.prototype,"variadic",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"validation-error"})],Fv.prototype,"validationError",void 0),(0,C.Cg)([(0,l.attr)({attribute:"validation-msg"})],Fv.prototype,"validationMsg",void 0),(0,C.Cg)([l.observable],Fv.prototype,"field",void 0),(0,C.Cg)([l.observable],Fv.prototype,"operator",void 0),(0,C.Cg)([l.observable],Fv.prototype,"value",void 0),(0,C.Cg)([l.observable],Fv.prototype,"config",void 0),(0,C.Cg)([l.observable],Fv.prototype,"styles",void 0),Fv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-value",template:Nv,styles:kv,shadowOptions:{delegatesFocus:!0}})],Fv);const Mv=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:_v(e,t),_v=(e,t)=>{var i,o;switch(dv(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return sv(new Date);case"date-time":return rv(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]}}},Hv=(e,t)=>{var i,o,n,a;const s=(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=s(0))&&void 0!==i?i:Mv(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(o=s(0))&&void 0!==o?o:Mv(e,t),null!==(n=s(1))&&void 0!==n?n:Mv(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(a=s(0))&&void 0!==a?a:Mv(e,t)]}}},Pv=(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)}}},zv=e=>!e&&0!==e,Uv=l.css`
|
|
6434
6434
|
.rule-container {
|
|
6435
6435
|
border: 1px solid #eee;
|
|
6436
6436
|
margin-bottom: 5px;
|
|
@@ -6549,17 +6549,17 @@ class="margin"
|
|
|
6549
6549
|
</div>
|
|
6550
6550
|
</div>
|
|
6551
6551
|
`}}
|
|
6552
|
-
`;let Vv=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),uv(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"!==dv(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(zv)})(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,Mv(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(hv.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(hv.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(hv.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(hv.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Pv(this.model,t,i)};this.dispatchEvent(new CustomEvent(hv.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(hv.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Hv(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Vv.prototype,"config",void 0),(0,C.Cg)([l.observable],Vv.prototype,"styles",void 0),(0,C.Cg)([l.observable],Vv.prototype,"model",void 0),(0,C.Cg)([l.observable],Vv.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vv.prototype,"error",void 0),(0,C.Cg)([l.volatile],Vv.prototype,"operandIterator",null),Vv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Bv,styles:Uv,shadowOptions:{delegatesFocus:!0}})],Vv);let jv=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=nv(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=sv(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(hv.AddGroup,this.handleAddGroup),this.addEventListener(hv.DelGroup,this.handleDeleteGroup),this.addEventListener(hv.AddRule,this.handleAddRule),this.addEventListener(hv.DelRule,this.handleDeleteRule),this.addEventListener(hv.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(hv.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(hv.AddGroup,this.handleAddGroup),this.removeEventListener(hv.DelGroup,this.handleDeleteGroup),this.removeEventListener(hv.AddRule,this.handleAddRule),this.removeEventListener(hv.DelRule,this.handleDeleteRule),this.removeEventListener(hv.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(hv.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:ov,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=iv(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=iv(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=Qm(i=this.model,ev(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=Qm(i=this.model,tv(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===ov?Object.assign(Object.assign({},e),i):Qm(e,ev(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 Qm(e,tv(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],jv.prototype,"config",void 0),(0,C.Cg)([l.observable],jv.prototype,"styles",void 0),(0,C.Cg)([l.observable],jv.prototype,"model",void 0),jv=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:wv,styles:pv})],jv);let Gv=class extends jv{};Gv=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:pv,template:wv})],Gv);const Yv=["int","short","long"],Wv=["double","bigdecimal"],qv=[...Yv,...Wv],Kv=["date","date-time"],Xv=["string","enum"],Jv=["boolean"],Qv=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 Zv(e){switch(Qv(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 eg(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 tg(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function ig(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function og(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=Qv(e);if(Xv.includes(i))return t;if(qv.includes(i))return t.toString();if(Jv.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(Kv.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function ng(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?ng(e,t):t(e)).filter(Boolean)}}function sg(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=Qv(e);if(Xv.includes(i))return t;if(Yv.includes(i))return parseInt(t);if(Wv.includes(i))return parseFloat(t);if(Jv.includes(i))return t;if(Kv.includes(i)){const e=new Date(parseInt(t));return"date"===i?av(e):rv(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const ag={template:wv,styles:pv};var rg;!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"})}(rg||(rg={}));const lg=[{type:rg.logicalOperations.AND,maxRules:"many"},{type:rg.logicalOperations.OR,maxRules:"many"}],dg={EQUALS:rg.operations.EQUALS,NOT_EQUALS:rg.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:rg.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:rg.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:rg.operations.LESS_THAN,LESS_THAN_OR_EQUAL:rg.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:rg.operations.IS_CURRENT,IS_PREVIOUS:rg.operations.IS_PREVIOUS},cg=e=>({type:"enum",input:"select",values:e}),ug=cg({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."}}),hg=cg({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."}}),pg=[{type:dg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...Xv,...Jv,...qv,...Kv],tooltip:"Check the equality of the field compared to a set value"},{type:dg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...Xv,...Jv,...qv,...Kv],tooltip:"Check that the field is different from a set value"},{type:dg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...Jv,...qv,...Kv],tooltip:"Check if the field value is null"},{type:dg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...Jv,...qv,...Kv],tooltip:"Check if the field value is not null"},{type:dg.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:dg.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:dg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:dg.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:dg.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:dg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...qv],tooltip:"Check if the field value is greater than a specified number"},{type:dg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...qv],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:dg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...qv],tooltip:"Check if the field value is less than a specified number"},{type:dg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...qv],tooltip:"Check if the field value is less than or equal to a specified number"},{type:dg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...Kv],tooltip:"Check if the field is before a specified date/time"},{type:dg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...Kv],tooltip:"Check if the field is after a specified date/time"},{type:dg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...Kv],tooltip:"Check if the field is on or before a specified date/time"},{type:dg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...Kv],tooltip:"Check if the field is on or after a specified date/time"},{type:dg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...Kv],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:hg,optgroup:"Relative Period"},{type:dg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...Kv],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:ug,optgroup:"Relative Period"}];function mg(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 vg(e,t){switch(t){case dg.IS_NULL_OR_BLANK:return ig(e,rg.methodCall.IS_NULL_OR_BLANK,[]);case dg.NOT_NULL_OR_BLANK:return ig(e,rg.methodCall.NOT_NULL_OR_BLANK,[]);case dg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return ig(e,rg.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case dg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return ig(e,rg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case dg.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 ig(e,rg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case dg.IS_CURRENT:case dg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return ig(e,rg.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===dg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function gg(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=og(e),n=Zv(o),s=mg(o.operator.type);switch(s){case dg.EQUALS:case dg.NOT_EQUALS:case dg.GREATER_THAN:case dg.GREATER_THAN_OR_EQUAL:case dg.LESS_THAN:case dg.LESS_THAN_OR_EQUAL:return eg(o,s,n);case dg.IS_NULL:return tg(o,rg.operations.EQUALS,{TYPE:"NULL"});case dg.NOT_NULL:return tg(o,rg.operations.NOT_EQUALS,{TYPE:"NULL"});case dg.IS_NULL_OR_BLANK:case dg.NOT_NULL_OR_BLANK:case dg.CONTAINS:case dg.CONTAINS_WORDS_STARTING_WITH:case dg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case dg.IS_CURRENT:case dg.IS_PREVIOUS:return vg(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function fg(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 bg(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?dg[dg.IS_NULL]:dg[dg.NOT_NULL];return pg.find(t=>t.type===e)}const i=fg(t.OPERATION,e);return pg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function yg(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 sg(bg({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function wg(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[dg[dg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[dg[dg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[dg[dg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[dg[dg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[dg[dg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===rg.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[dg["CURRENT"===t.PARAMETERS[2].VALUE?dg.IS_CURRENT:dg.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:pg.find(e=>e.type===i),value:o}}function Cg(e,t){return{combinator:lg.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 Cg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return yg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return wg(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let xg=class extends jv{ruleConfigChanged(e,t){this.config=Object.assign({combinators:lg,operators:pg,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Cg(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=ng(e,gg);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],xg.prototype,"ruleConfig",void 0),xg=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:pv,template:wv})],xg);const $g={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Sg=[{type:$g.PLUS,label:"Add (+)",applyTo:[...qv],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:$g.MINUS,label:"Subtract (-)",applyTo:[...qv],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:$g.MULTIPLY,label:"Multiply (*)",applyTo:[...qv],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:$g.DIVIDE,label:"Divide (/)",applyTo:[...qv],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:$g.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:$g.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 Eg(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=og(e),n=Zv(o),s=o.operator.type;switch(s){case $g.TRIM:case $g.CONVERT_TO_DATE:case $g.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case $g.TRIM:return ig(e,rg.methodCall.TRIM,[]);case $g.CONVERT_TO_DATE:return ig(e,rg.methodCall.LONG_TO_DATE,[]);case $g.CONVERT_TO_DATE_TIME:return ig(e,rg.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case $g.PLUS:case $g.MINUS:case $g.DIVIDE:case $g.MULTIPLY:return eg(o,s,n);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Og(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 sg(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Sg.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 Tg(e,t){return{combinator:Gm,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 Tg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Og(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[$g[$g.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[$g[$g.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[$g[$g.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:Sg.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let kg=class extends jv{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Tg(t.fields,i);this.config={combinators:[Gm],operators:Sg,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:Eg(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],kg.prototype,"valueConfig",void 0),kg=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:pv,template:wv})],kg);const Dg=l.html`
|
|
6552
|
+
`;let Vv=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),uv(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"!==dv(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(zv)})(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,Mv(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(hv.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(hv.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(hv.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(hv.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Pv(this.model,t,i)};this.dispatchEvent(new CustomEvent(hv.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(hv.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Hv(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Vv.prototype,"config",void 0),(0,C.Cg)([l.observable],Vv.prototype,"styles",void 0),(0,C.Cg)([l.observable],Vv.prototype,"model",void 0),(0,C.Cg)([l.observable],Vv.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vv.prototype,"error",void 0),(0,C.Cg)([l.volatile],Vv.prototype,"operandIterator",null),Vv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Bv,styles:Uv,shadowOptions:{delegatesFocus:!0}})],Vv);let jv=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=nv(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=av(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(hv.AddGroup,this.handleAddGroup),this.addEventListener(hv.DelGroup,this.handleDeleteGroup),this.addEventListener(hv.AddRule,this.handleAddRule),this.addEventListener(hv.DelRule,this.handleDeleteRule),this.addEventListener(hv.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(hv.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(hv.AddGroup,this.handleAddGroup),this.removeEventListener(hv.DelGroup,this.handleDeleteGroup),this.removeEventListener(hv.AddRule,this.handleAddRule),this.removeEventListener(hv.DelRule,this.handleDeleteRule),this.removeEventListener(hv.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(hv.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:ov,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=iv(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=iv(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=Qm(i=this.model,ev(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=Qm(i=this.model,tv(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===ov?Object.assign(Object.assign({},e),i):Qm(e,ev(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 Qm(e,tv(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],jv.prototype,"config",void 0),(0,C.Cg)([l.observable],jv.prototype,"styles",void 0),(0,C.Cg)([l.observable],jv.prototype,"model",void 0),jv=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:wv,styles:pv})],jv);let Gv=class extends jv{};Gv=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:pv,template:wv})],Gv);const Yv=["int","short","long"],Wv=["double","bigdecimal"],qv=[...Yv,...Wv],Kv=["date","date-time"],Xv=["string","enum"],Jv=["boolean"],Qv=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 Zv(e){switch(Qv(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 eg(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 tg(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function ig(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function og(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=Qv(e);if(Xv.includes(i))return t;if(qv.includes(i))return t.toString();if(Jv.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(Kv.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function ng(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?ng(e,t):t(e)).filter(Boolean)}}function ag(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=Qv(e);if(Xv.includes(i))return t;if(Yv.includes(i))return parseInt(t);if(Wv.includes(i))return parseFloat(t);if(Jv.includes(i))return t;if(Kv.includes(i)){const e=new Date(parseInt(t));return"date"===i?sv(e):rv(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const sg={template:wv,styles:pv};var rg;!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"})}(rg||(rg={}));const lg=[{type:rg.logicalOperations.AND,maxRules:"many"},{type:rg.logicalOperations.OR,maxRules:"many"}],dg={EQUALS:rg.operations.EQUALS,NOT_EQUALS:rg.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:rg.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:rg.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:rg.operations.LESS_THAN,LESS_THAN_OR_EQUAL:rg.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:rg.operations.IS_CURRENT,IS_PREVIOUS:rg.operations.IS_PREVIOUS},cg=e=>({type:"enum",input:"select",values:e}),ug=cg({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."}}),hg=cg({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."}}),pg=[{type:dg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...Xv,...Jv,...qv,...Kv],tooltip:"Check the equality of the field compared to a set value"},{type:dg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...Xv,...Jv,...qv,...Kv],tooltip:"Check that the field is different from a set value"},{type:dg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...Jv,...qv,...Kv],tooltip:"Check if the field value is null"},{type:dg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...Jv,...qv,...Kv],tooltip:"Check if the field value is not null"},{type:dg.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:dg.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:dg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:dg.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:dg.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:dg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...qv],tooltip:"Check if the field value is greater than a specified number"},{type:dg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...qv],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:dg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...qv],tooltip:"Check if the field value is less than a specified number"},{type:dg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...qv],tooltip:"Check if the field value is less than or equal to a specified number"},{type:dg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...Kv],tooltip:"Check if the field is before a specified date/time"},{type:dg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...Kv],tooltip:"Check if the field is after a specified date/time"},{type:dg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...Kv],tooltip:"Check if the field is on or before a specified date/time"},{type:dg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...Kv],tooltip:"Check if the field is on or after a specified date/time"},{type:dg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...Kv],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:hg,optgroup:"Relative Period"},{type:dg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...Kv],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:ug,optgroup:"Relative Period"}];function mg(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 vg(e,t){switch(t){case dg.IS_NULL_OR_BLANK:return ig(e,rg.methodCall.IS_NULL_OR_BLANK,[]);case dg.NOT_NULL_OR_BLANK:return ig(e,rg.methodCall.NOT_NULL_OR_BLANK,[]);case dg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return ig(e,rg.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case dg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return ig(e,rg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case dg.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 ig(e,rg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case dg.IS_CURRENT:case dg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return ig(e,rg.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===dg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function gg(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=og(e),n=Zv(o),a=mg(o.operator.type);switch(a){case dg.EQUALS:case dg.NOT_EQUALS:case dg.GREATER_THAN:case dg.GREATER_THAN_OR_EQUAL:case dg.LESS_THAN:case dg.LESS_THAN_OR_EQUAL:return eg(o,a,n);case dg.IS_NULL:return tg(o,rg.operations.EQUALS,{TYPE:"NULL"});case dg.NOT_NULL:return tg(o,rg.operations.NOT_EQUALS,{TYPE:"NULL"});case dg.IS_NULL_OR_BLANK:case dg.NOT_NULL_OR_BLANK:case dg.CONTAINS:case dg.CONTAINS_WORDS_STARTING_WITH:case dg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case dg.IS_CURRENT:case dg.IS_PREVIOUS:return vg(o,a);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function fg(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 bg(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?dg[dg.IS_NULL]:dg[dg.NOT_NULL];return pg.find(t=>t.type===e)}const i=fg(t.OPERATION,e);return pg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function yg(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 ag(bg({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function wg(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[dg[dg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[dg[dg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[dg[dg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[dg[dg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[dg[dg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===rg.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[dg["CURRENT"===t.PARAMETERS[2].VALUE?dg.IS_CURRENT:dg.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:pg.find(e=>e.type===i),value:o}}function Cg(e,t){return{combinator:lg.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 Cg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return yg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return wg(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let xg=class extends jv{ruleConfigChanged(e,t){this.config=Object.assign({combinators:lg,operators:pg,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Cg(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=ng(e,gg);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],xg.prototype,"ruleConfig",void 0),xg=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:pv,template:wv})],xg);const $g={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Sg=[{type:$g.PLUS,label:"Add (+)",applyTo:[...qv],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:$g.MINUS,label:"Subtract (-)",applyTo:[...qv],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:$g.MULTIPLY,label:"Multiply (*)",applyTo:[...qv],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:$g.DIVIDE,label:"Divide (/)",applyTo:[...qv],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:$g.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:$g.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 Eg(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=og(e),n=Zv(o),a=o.operator.type;switch(a){case $g.TRIM:case $g.CONVERT_TO_DATE:case $g.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case $g.TRIM:return ig(e,rg.methodCall.TRIM,[]);case $g.CONVERT_TO_DATE:return ig(e,rg.methodCall.LONG_TO_DATE,[]);case $g.CONVERT_TO_DATE_TIME:return ig(e,rg.methodCall.LONG_TO_DATE_TIME,[])}}(o,a);case $g.PLUS:case $g.MINUS:case $g.DIVIDE:case $g.MULTIPLY:return eg(o,a,n);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function Og(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 ag(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Sg.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 Tg(e,t){return{combinator:Gm,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 Tg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Og(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[$g[$g.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[$g[$g.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[$g[$g.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:Sg.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let kg=class extends jv{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Tg(t.fields,i);this.config={combinators:[Gm],operators:Sg,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:Eg(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],kg.prototype,"valueConfig",void 0),kg=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:pv,template:wv})],kg);const Dg=l.html`
|
|
6553
6553
|
<template ${(0,l.ref)("notificationListener")}>
|
|
6554
6554
|
<slot></slot>
|
|
6555
6555
|
</template>
|
|
6556
|
-
`,Ig={mode:"open",delegatesFocus:!0};class Rg 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],Rg.prototype,"notificationListener",void 0),(0,C.Cg)([ui.dm],Rg.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Rg.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Rg.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Rg.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Rg.prototype,"toastPosition",void 0),(0,C.Cg)([hi.yW],Rg.prototype,"datasource",void 0);const Ag=Rg.compose({baseName:"notification-listener",template:Dg,shadowOptions:Ig}),Lg=(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 Ng(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 Fg;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Fg||(Fg={}));class Mg{trackEvent(e,t){Gs.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const _g=a.DI.createInterface(e=>e.singleton(Mg));var Hg=i(98647),Pg=i(35044);const zg=(0,it.createLogger)("foundation-router");var Ug=i(36132),Bg=i(80751),Vg=i(3479);const jg="$router",Gg=Object.freeze({getOrCreateFor:e=>{const t=e[jg];return void 0!==t?t:e[jg]=new Yg(e)},find:e=>Vg.Ix.find(e),from:e=>Vg.Ix.from(e)});class Yg extends Vg.LK{}const Wg=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function qg(e){return Wg.test(e)}function Kg(e){return e.config instanceof Hg.Y?e:Gg.find(e)}function Xg(e){return Kg(e).parent}function Jg(e){let t=Kg(e);for(;t&&t.level>0;)t=t.parent;return t}function Qg(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 Zg(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 ef(e){return e.replace(`/*${Bg.N}`,"")}function tf(){null===document.querySelector("foundation-router, fast-router")&&window.dispatchEvent(new PopStateEvent("popstate"))}const of=Object.freeze({path:Object.freeze({get current(){return Ug.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=Kg(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&&qg(e)?location.href=e:(history.pushState({},document.title,e),tf(),t&&of.path.trigger(e))},replace:(e,t=!0)=>{e&&qg(e)?location.href=e:(history.replaceState({},document.title,e),tf(),t&&of.path.trigger(e))},trigger:e=>{Ug.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=Kg(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 of.name.generateRoute(e,t,i);null!==n&&of.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 of.name.generateRoute(e,t,i);null!==n&&of.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 of.name.generateRoute(e,t,i);null!==o&&of.path.trigger(o)})})}),nf=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,sf=10;function af(e,t=nf,i=sf){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 rf extends Bg.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(zg.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 zg.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return zg.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],rf.prototype,"definitions",void 0);class lf extends Hg.Y{constructor(){super(),this.logger=zg,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new rf(this),this.basename=Zn.OB,this.routes=new rf(this)}getNavItems(e=nf){return af(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Fg.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}.`),of.name.replace(e.router,n)}else this.user.trackPath(),of.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(),of.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 of.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&of.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Pg.C.build(t);let n=i&&!e.startsWith(i)?Qg([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?ef(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([a.Container],lf.prototype,"container",void 0),(0,C.Cg)([_g],lf.prototype,"analytics",void 0),(0,C.Cg)([Yl.KJ],lf.prototype,"user",void 0),(0,C.Cg)([Ti.N],lf.prototype,"_session",void 0);const df="navigate-to",cf="generate-navigation-path";let uf=class extends(Gg.from(l.FASTElement)){constructor(){super(...arguments),this.logger=zg,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[jg]}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(df,this.onNavigateTo),this.addEventListener(cf,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(df,this.onNavigateTo),this.removeEventListener(cf,this.onGenerateNavigationPath)}};uf=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],uf);const hf=e=>l.html`
|
|
6556
|
+
`,Ig={mode:"open",delegatesFocus:!0};class Rg extends s.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,a=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let s=[];this.toastButtons&&this.toastButtons.length>0&&(s=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:s,autoClose:void 0!==a?!!a:!!this.closeTimeout,closeTimeout:null!=a?a:this.closeTimeout,position:this.toastPosition}};hc(r,this.tagName)}}(0,C.Cg)([l.observable],Rg.prototype,"notificationListener",void 0),(0,C.Cg)([ui.dm],Rg.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Rg.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Rg.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Rg.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Rg.prototype,"toastPosition",void 0),(0,C.Cg)([hi.yW],Rg.prototype,"datasource",void 0);const Ag=Rg.compose({baseName:"notification-listener",template:Dg,shadowOptions:Ig}),Lg=(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 Ng(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 Fg;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Fg||(Fg={}));class Mg{trackEvent(e,t){Ga.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const _g=s.DI.createInterface(e=>e.singleton(Mg));var Hg=i(98647),Pg=i(35044);const zg=(0,it.createLogger)("foundation-router");var Ug=i(36132),Bg=i(80751),Vg=i(3479);const jg="$router",Gg=Object.freeze({getOrCreateFor:e=>{const t=e[jg];return void 0!==t?t:e[jg]=new Yg(e)},find:e=>Vg.Ix.find(e),from:e=>Vg.Ix.from(e)});class Yg extends Vg.LK{}const Wg=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function qg(e){return Wg.test(e)}function Kg(e){return e.config instanceof Hg.Y?e:Gg.find(e)}function Xg(e){return Kg(e).parent}function Jg(e){let t=Kg(e);for(;t&&t.level>0;)t=t.parent;return t}function Qg(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 Zg(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 ef(e){return e.replace(`/*${Bg.N}`,"")}function tf(){null===document.querySelector("foundation-router, fast-router")&&window.dispatchEvent(new PopStateEvent("popstate"))}const of=Object.freeze({path:Object.freeze({get current(){return Ug.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=Kg(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&&qg(e)?location.href=e:(history.pushState({},document.title,e),tf(),t&&of.path.trigger(e))},replace:(e,t=!0)=>{e&&qg(e)?location.href=e:(history.replaceState({},document.title,e),tf(),t&&of.path.trigger(e))},trigger:e=>{Ug.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=Kg(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 of.name.generateRoute(e,t,i);null!==n&&of.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 of.name.generateRoute(e,t,i);null!==n&&of.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 of.name.generateRoute(e,t,i);null!==o&&of.path.trigger(o)})})}),nf=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,af=10;function sf(e,t=nf,i=af){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,n)=>{e.navItems.filter(t).map((t,o)=>{var a,s,r,l;const d=null!==(a=t.placementIndex)&&void 0!==a?a:n*i+o;return Object.assign(Object.assign({},t),{navId:null!==(s=t.navId)&&void 0!==s?s:"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 rf extends Bg.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(zg.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 zg.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return zg.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],rf.prototype,"definitions",void 0);class lf extends Hg.Y{constructor(){super(),this.logger=zg,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new rf(this),this.basename=Zn.OB,this.routes=new rf(this)}getNavItems(e=nf){return sf(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Fg.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}.`),of.name.replace(e.router,n)}else this.user.trackPath(),of.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(),of.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 of.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&of.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Pg.C.build(t);let n=i&&!e.startsWith(i)?Qg([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?ef(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([s.Container],lf.prototype,"container",void 0),(0,C.Cg)([_g],lf.prototype,"analytics",void 0),(0,C.Cg)([Yl.KJ],lf.prototype,"user",void 0),(0,C.Cg)([Ti.N],lf.prototype,"_session",void 0);const df="navigate-to",cf="generate-navigation-path";let uf=class extends(Gg.from(l.FASTElement)){constructor(){super(...arguments),this.logger=zg,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[jg]}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(df,this.onNavigateTo),this.addEventListener(cf,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(df,this.onNavigateTo),this.removeEventListener(cf,this.onGenerateNavigationPath)}};uf=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],uf);const hf=e=>l.html`
|
|
6557
6557
|
|
|
6558
6558
|
<${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">
|
|
6559
6559
|
<div class=${e=>(0,x.x)("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])} part="stepper-tab-menu">
|
|
6560
6560
|
<slot name="tab" ${(0,l.slotted)("tabs")} ></slot>
|
|
6561
6561
|
</div>
|
|
6562
|
-
${(0,l.when)(e=>e.orientation===
|
|
6562
|
+
${(0,l.when)(e=>e.orientation===s.TabsOrientation.vertical,l.html`
|
|
6563
6563
|
<div class="stepper-tab-progress" part="stepper-tab-progress">
|
|
6564
6564
|
<${e}-progress-ring class="progress-ring" part="progress-ring" value=${e=>e.progressValue}></${e}-progress-ring>
|
|
6565
6565
|
<label>You have completed ${e=>e.progressValue}% of the fields required to create a project</label>
|
|
@@ -6687,5 +6687,5 @@ class="margin"
|
|
|
6687
6687
|
max-height: 70px;
|
|
6688
6688
|
height: 70px;
|
|
6689
6689
|
}
|
|
6690
|
-
`;class vf extends
|
|
6691
|
-
//# sourceMappingURL=75.
|
|
6690
|
+
`;class vf extends s.FoundationElement{constructor(){super(...arguments),this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=s.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],a=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),a&&e.setAttribute("aria-controls",a),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 ot.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):(ot.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,bs.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,bs.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],vf.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],vf.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],vf.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],vf.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],vf.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],vf.prototype,"hideTabs",void 0),(0,C.Cg)([(0,l.attr)({attribute:"indicator-only",mode:"boolean"})],vf.prototype,"indicatorOnly",void 0),(0,C.Cg)([l.attr],vf.prototype,"orientation",void 0),(0,C.Cg)([l.attr],vf.prototype,"activeid",void 0),(0,C.Cg)([l.observable],vf.prototype,"tabs",void 0),(0,C.Cg)([l.observable],vf.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],vf.prototype,"validation",void 0),(0,C.Cg)([l.observable],vf.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],vf.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],vf.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],vf.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],vf.prototype,"islastStepValid",null);const gf=void 0,ff={},bf=vf.compose(Object.assign({baseName:"stepper",template:pf,styles:mf,shadowOptions:gf},ff)),yf=["text-field","text-area","combobox"],wf=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],Cf=e=>yf.map(t=>`${e}-${t}`),xf={rapid:Cf("rapid"),zero:Cf("zero")};function $f(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=xf[e])&&void 0!==t?t:[]}),o=t.filter(Boolean);return Array.from(new Set([...wf,...i,...o])).join(",")}const Sf=()=>yd().register(zm)},70997(e,t,i){"use strict";function o(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),a=o(i);return(t,i)=>e(t,i)?n(t,i):a(t,i)}i.d(t,{q:()=>o})},80273(e,t,i){"use strict";i.d(t,{Du:()=>l,IT:()=>s,WP:()=>n,f4:()=>r,zz:()=>a});var o=i(52945);const n=(e,t)=>{(0,o.O5)(e,t)};var a,s;!function(e){e.Italic="italic",e.Normal="normal"}(a||(a={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(s||(s={}));const r=(e,t=a.Normal,i=s.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}}}]);
|
|
6691
|
+
//# sourceMappingURL=75.7c629e995ed6f04a91b33b6a628127cd.js.map
|