@genesislcap/design-system-configurator 14.444.1 → 14.445.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{106.106.4f2d6f0dd203a2028374.js → 106.106.0fde9d17119c99a48516.js} +1 -1
- package/dist/151.151.158e6e1e571751c32524.js +2 -0
- package/dist/{151.68605fb2475becdbde3e7b42592f70ae.js.map → 151.bf0f55a4e61c4d3cd4b3bf6c54d42de0.js.map} +1 -1
- package/dist/{163.163.695671b09b302fbbd1ff.js → 163.163.b2c71011e830d725fa0e.js} +2 -2
- package/dist/{163.5f365d01ca3c4630ffd87716f1cdc930.js.map → 163.e262cd57c2c694b0c45ce00ae1439c4f.js.map} +1 -1
- package/dist/{182.182.11c953a92e91bb7f5a4b.js → 182.182.b9b76eaa2e3a2624c69f.js} +4 -4
- package/dist/{182.897d107c81f3a9732f6ef8e2da74a80a.js.map → 182.8d44f32b12b62d884d44d909fdb0aea4.js.map} +1 -1
- package/dist/210.1ee31ef5dbf3196b9b4079b11a623858.js.map +1 -0
- package/dist/{210.210.7e154bee0893a8e9840d.js → 210.210.5c17882531cee97d8c34.js} +397 -397
- package/dist/{3.3.d6b873fb2a8141ad0151.js → 3.3.74b93d2003f3106b2ba1.js} +3 -3
- package/dist/{3.d835bbe497884df12c3d982410d54666.js.map → 3.73a59874d7cb3388041bf3760b60dac5.js.map} +1 -1
- package/dist/{445.49781d45d0d31a0972ef5b0cba3b64cf.js.map → 445.0fe08c58c16d4e690426c320580329af.js.map} +1 -1
- package/dist/{445.445.56cb0d46746efc8e86f8.js → 445.445.fb2e63287c8a0a61276a.js} +3 -3
- package/dist/{627.461943e11e0ac5c589ffc72510ed44be.js.map → 627.41da944f962bf927a71f9964c50a0366.js.map} +1 -1
- package/dist/{627.627.2c9e77308580a86d1ca4.js → 627.627.28c7dd7d96c492d767c3.js} +4 -4
- package/dist/{72.3027c7a9ce2aca8c7e34630d9937c7a9.js.map → 72.49c400624bd7ec5a251fa2882f16a4bc.js.map} +1 -1
- package/dist/{72.72.aca70c1a6c24d1533b5b.js → 72.72.8bb8a090c442256d75da.js} +2 -2
- package/dist/{designSystemConfigurator.cd2ce9d2e57cc2389c3d3047956885e8.js.map → designSystemConfigurator.2bc31021efc65621a8d6067199f11ffb.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/main.ae0fdbebd2103bfe6cf9.js +2 -0
- package/dist/{main.1d4296ead56fb659197221bd3fbc0443.js.map → main.ba769115d6b4f59d009a944a74eedc44.js.map} +1 -1
- package/dist/remoteEntry.js +2 -2
- package/package.json +13 -13
- package/dist/151.151.3f957f7e35e771862a17.js +0 -2
- package/dist/210.bbcccce1662810aa3dd3f19bab82a796.js.map +0 -1
- package/dist/main.eb1089d563d84f5a2853.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[210],{14609(e,t,i){i.d(t,{b:()=>s});const o=(0,i(4153).createLogger)("foundation-criteria");var n=i(86636);const a="default";class s{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,n.r.And()),this.Or=(e,t={})=>this.withExpression(e,t,n.r.Or()),this.Not=(e,t={})=>this.withExpression(e,t,n.r.Not())}withExpression(e,t={},i=n.r.And()){const{condition:s,join:r,groupName:l}=t,d=(e,t=a)=>{var o;const n=null!==(o=this.expressions[t])&&void 0!==o?o:[];this.expressions[t]=[...n,{join:i||r,condition:s,expression:e}]};if(Array.isArray(e))if(r){const t=e.filter(e=>{const t=e instanceof n.r;return t&&o.warn("Inline joins will be discarded when join is defined in ExpressionOptions"),!t});if(l)t.forEach(e=>{d(e,l)});else{const e=(c=r,t.flat().flatMap((e,t,i)=>i.length-1!==t?[e,c]:e));d(e,a)}}else d(e,a);else d(e,"string"==typeof e?a:e.group);var c;return this}build(e){const t=Object.entries(this.expressions).reduce((e,[t,i])=>Object.assign(Object.assign({},e),{[t]:`(${i.filter(({condition:e})=>!e||e()).map(({expression:e,join:t},i,o)=>this.parseExpression(e,o[i-1],t)).join("")})`}),{});return e?e(t):`(${Object.values(t).join(" && ")})`}reset(){this.expressions={}}parseExpression(e,t,i){const o=[];return i&&t&&o.push(` ${i.operator} `),"string"==typeof e?o.push(e):Array.isArray(e)?(e.forEach((e,t,i)=>{if(e instanceof n.r){if(i[t-1]instanceof n.r)throw new Error("Adjacent Join operations detected")}}),o.push(`(${e.map(e=>this.parseExpression(e,void 0)).join("")})`)):e instanceof n.r?o.push(` ${e.operator} `):e&&o.push(e.serialiser(e)),o.join("")}}},58749(e,t,i){i.d(t,{K:()=>n});var o=i(95553);class n{constructor(e){this.serialiser=o.n.EQ,this.build=()=>{if(!this.field)throw new Error("Missing required param 'field'");if(void 0===this.value)throw new Error("Missing required param 'value'");if(!this.serialiser)throw new Error("Missing required param 'serialise'");return{field:this.field,value:this.value,serialiser:this.serialiser,params:this.params,valueGetter:this.valueGetter,group:this.group}},e&&(this.field=e.field,this.value=e.value,this.serialiser=e.serialiser,this.params=e.params,this.valueGetter=e.valueGetter,this.group=e.group)}withField(e){return this.field=e,this}withValue(e){return this.value=e,this}withSerialiser(e){return this.serialiser=e,this}withParams(e){return this.params=e,this}withValueGetter(e){return this.valueGetter=e,this}withGroup(e){return this.group=e,this}}},95553(e,t,i){i.d(t,{n:()=>s});var o=i(86636);const n=e=>{const{value:t}=e;return e.valueGetter?e.valueGetter(t):"function"==typeof t?t(e):Array.isArray(t)?t.join(","):"string"==typeof t?`"${t}"`:t},a=e=>t=>`${t.field} ${e} ${n(t)}`,s={AND:e=>a(o.X.AND)(e),OR:e=>a(o.X.OR)(e),NOT:e=>a(o.X.NOT)(e),GT:e=>a(o.X.GT)(e),GE:e=>a(o.X.GE)(e),LT:e=>a(o.X.LT)(e),LE:e=>a(o.X.LE)(e),NE:e=>a(o.X.NE)(e),EQ:e=>a(o.X.EQ)(e),equals:e=>`${e.field}.equals(${n(e)})`,equalsIgnoreCase:e=>`${e.field}.equalsIgnoreCase(${n(e)})`,contains:e=>`Expr.contains(${e.field}, ${n(e)})`,fieldContains:e=>`${e.field}.contains(${n(e)})`,containsIgnoreCase:e=>`Expr.containsIgnoreCase(${e.field}, ${n(e)})`,startsWith:e=>`${e.field}.startsWith(${n(e)})`,endsWith:e=>`${e.field}.endsWith(${n(e)})`,dateIsToday:e=>`Expr.dateIsToday(${e.field})`,dateIsEqual:e=>`Expr.dateIsEqual(${e.field}, ${n(e)})`,dateIsGreaterEqual:e=>`Expr.dateIsGreaterEqual(${e.field}, ${n(e)})`,dateIsLessEqual:e=>`Expr.dateIsLessEqual(${e.field}, ${n(e)})`,dateTimeIsGreaterEqual:e=>`Expr.dateTimeIsGreaterEqual(${e.field}, ${n(e)})`,dateTimeIsLessEqual:e=>`Expr.dateTimeIsLessEqual(${e.field}, ${n(e)})`}},86636(e,t,i){var o;i.d(t,{X:()=>o,r:()=>n}),function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(o||(o={}));class n{constructor(e){this.$$operator=e}static And(){return new n(o.AND)}static Or(){return new n(o.OR)}static Not(){return new n(o.NOT)}static GreaterThan(){return new n(o.GT)}static GreaterThanOrEqual(){return new n(o.GE)}static LessThan(){return new n(o.LT)}static LessThanOrEqual(){return new n(o.LE)}static NotEqual(){return new n(o.NE)}static Equal(){return new n(o.EQ)}get operator(){return this.$$operator}}},31274(e,t,i){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){i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(4153),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.LogLevel.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}},28210(e,t,i){i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AffixMixin:()=>al,AiCriteriaSearch:()=>be,AiIndicator:()=>Se,Anchor:()=>ke,AnchoredRegion:()=>Le,Avatar:()=>Ue,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Dv,Badge:()=>Ye,Banner:()=>ot,BaseDatasource:()=>li,BaseFileComponent:()=>Sa,Breadcrumb:()=>rt,BreadcrumbItem:()=>pt,Button:()=>yt,COMBO_INPUT_MIN_LENGTH:()=>jc,CSSVarsTokenMapper:()=>Qp,Calendar:()=>Et,Card:()=>Rt,CategorizedMultiselect:()=>Bt,Checkbox:()=>Wt,Combobox:()=>vi,ConnectionIndicator:()=>$i,DATETIME_OPERATORS:()=>Z,DATE_OPERATORS:()=>J,DEFUALT_FILTER_BAR_COLUMNS:()=>cs,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Av,DataGrid:()=>Oi,DataGridCell:()=>Ai,DataGridDatasource:()=>Jp,DataGridRow:()=>_i,DatePicker:()=>co,DefaultRouter:()=>nv,DesignTokensObservable:()=>Fo,Dialog:()=>bn,DialogElement:()=>fn,Disclosure:()=>xn,Divider:()=>kn,DropdownMenu:()=>_n,EnvironmentIndicator:()=>Qn,ErrorBanner:()=>ia,ErrorBoundary:()=>va,ErrorBoundaryEvent:()=>na,ErrorDialog:()=>xa,ExpressionBuilderConfig:()=>a,ExpressionBuilderCore:()=>vg,FaPrefixFromStyle:()=>hr,FileReader:()=>Ia,FileUpload:()=>Ga,Filter:()=>is,FilterBar:()=>us,FilterEvents:()=>ts,FlexLayout:()=>ys,FlexMediaQueriesEnum:()=>ps,Flipper:()=>$s,Flyout:()=>Rs,FoundationDesignSystemProvider:()=>rn,FoundationExpressionBuilder:()=>tg,FoundationRouteCollection:()=>fv,FoundationRouteNav:()=>pv,FoundationRouter:()=>Cv,FoundationRouterConfiguration:()=>bv,FoundationRuleExpressionBuilder:()=>Ag,FoundationValueExpressionBuilder:()=>Hg,GenerateNavigationPathEventType:()=>wv,GridLayout:()=>Bs,GridLayoutItem:()=>Ys,GridMediaQueriesEnum:()=>Fs,HorizontalScroll:()=>Qs,INPUT_MIN_LENGTH:()=>Gc,Icon:()=>gr,Listbox:()=>yr,ListboxOption:()=>Er,Menu:()=>Rr,MenuItem:()=>_r,Modal:()=>Vr,Multiselect:()=>el,MultiselectDatasource:()=>Kr,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>yv,NotificationListener:()=>Bg,NumberField:()=>bl,OPERATOR_DISPLAY_LABEL:()=>ee,Optgroup:()=>Sl,OptionsDatasource:()=>ui,Popper:()=>cd,Position:()=>Ft,Progress:()=>ql,ProgressRing:()=>vd,Radio:()=>xd,RadioGroup:()=>kd,Router:()=>ov,RuleExpression:()=>fg,SCROLL_TIMEOUT:()=>Bc,SECTION_NAVIGATOR_EVENTS:()=>su,SNACKBAR_CLOSE_TIMEOUT:()=>Zu,SNACKBAR_EVENTS_NAMES:()=>eh,SNACKBAR_TYPES:()=>Ju,SNACKBAR_TYPE_DEFAULT:()=>Qu,STRING_OPERATORS:()=>X,Scheduler:()=>Fd,SchedulerCronBuilder:()=>Tc,SchedulerTimezone:()=>Nc,SearchBar:()=>Wc,SearchBarCombobox:()=>Jc,SectionNavigator:()=>du,SegmentedControl:()=>gu,SegmentedItem:()=>Cu,Select:()=>Ou,Skeleton:()=>Nu,Slider:()=>Uu,SliderLabel:()=>Yu,Snackbar:()=>ah,StackingIcons:()=>dh,StatusPill:()=>mh,Stepper:()=>Ev,StepperTab:()=>yh,StepperTabPanel:()=>Sh,Switch:()=>Dh,SystemHealthOverlay:()=>id,Tab:()=>Mh,TabPanel:()=>Bh,Tabs:()=>qh,TextArea:()=>ep,TextField:()=>lp,Toast:()=>fp,Toolbar:()=>Cp,Tooltip:()=>Op,TreeItem:()=>Np,TreeView:()=>zp,UrlInput:()=>qp,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:()=>Ko,actionsMenuBaseStyles:()=>$,applyCustomTokens:()=>Uo,baseComponents:()=>Xp,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>Qo,black:()=>mo,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>Nv,categorizedMultiselectStyles:()=>_t,categorizedMultiselectTemplate:()=>zt,clientOperators:()=>yg,closeIcon:()=>qa,configureDesignSystem:()=>qo,configureEnvironmentIndicator:()=>Kn,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>Zo,createDesignSystemProxy:()=>Jl,createFormData:()=>Ma,crossIcon:()=>Hc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>we,defaultAnchorConfig:()=>De,defaultAnchoredRegionConfig:()=>Me,defaultAvatarConfig:()=>Ge,defaultBadgeConfig:()=>Ke,defaultBreadcrumbConfig:()=>dt,defaultBreadcrumbItemConfig:()=>gt,defaultButtonConfig:()=>Ct,defaultCalendarConfig:()=>Ot,defaultCardConfig:()=>Nt,defaultCategorizedMultiselectConfig:()=>Ut,defaultCheckboxConfig:()=>qt,defaultComboboxConfig:()=>bi,defaultConfig:()=>_d,defaultCronBuilderConfig:()=>kc,defaultDataGridCellConfig:()=>Li,defaultDataGridConfig:()=>Ii,defaultDataGridRowConfig:()=>zi,defaultDatePickerConfig:()=>lo,defaultDialogConfig:()=>vn,defaultDisclosureConfig:()=>Sn,defaultDividerConfig:()=>Dn,defaultFileUploadConfig:()=>Va,defaultFillColor:()=>vo,defaultFlexLayoutConfig:()=>bs,defaultFlipperConfig:()=>Es,defaultFlyoutConfig:()=>Ns,defaultGridLayoutConfig:()=>Ps,defaultGridLayoutItemConfig:()=>Ws,defaultHorizontalScrollConfig:()=>Zs,defaultIconConfig:()=>ur,defaultListboxConfig:()=>Cr,defaultListboxOptionConfig:()=>Or,defaultMenuConfig:()=>Nr,defaultMenuItemConfig:()=>zr,defaultModalConfig:()=>jr,defaultMultiselectConfig:()=>Zr,defaultNavItemPredicate:()=>mv,defaultNeutralForegroundContrast:()=>Io,defaultNumberFieldConfig:()=>wl,defaultPlacementIndexPadding:()=>gv,defaultProgressConfig:()=>Xl,defaultProgressRingConfig:()=>bd,defaultRadioConfig:()=>Sd,defaultRadioGroupConfig:()=>Dd,defaultSearchBarComboboxConfig:()=>eu,defaultSearchBarConfig:()=>qc,defaultSectionNavigatorConfig:()=>uu,defaultSegmentedControlConfig:()=>fu,defaultSegmentedItemConfig:()=>$u,defaultSelectConfig:()=>Iu,defaultSkeletonConfig:()=>Fu,defaultSliderConfig:()=>Gu,defaultSliderLabelConfig:()=>Ku,defaultStepperConfig:()=>Ov,defaultStepperTabConfig:()=>Ch,defaultStepperTabPanelConfig:()=>Th,defaultSwitchConfig:()=>Ah,defaultSystemHealthOverlayConfig:()=>sd,defaultTabConfig:()=>Hh,defaultTabPanelConfig:()=>jh,defaultTabsConfig:()=>Xh,defaultTextAreaConfig:()=>ip,defaultTextFieldConfig:()=>cp,defaultTimezoneConfig:()=>Fc,defaultToastConfig:()=>vp,defaultToolbarConfig:()=>$p,defaultTooltipConfig:()=>Ip,defaultTreeItemConfig:()=>Fp,defaultTreeViewConfig:()=>Up,defaultUrlInputConfig:()=>Yp,defineFactory:()=>jg,density:()=>r.density,designToken:()=>Ho,designTokensMap:()=>Wo,designUnit:()=>r.designUnit,designUnitValue:()=>en,direction:()=>r.direction,directionValue:()=>Jo,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>Ha,dropdownMenuBaseStyles:()=>An,environmentIndicatorStyles:()=>Pn,errorDialogTemplate:()=>wa,extractMenuItems:()=>Ln,faSizeValueDefault:()=>pr,faSizeValues:()=>mr,fileReaderStyles:()=>Ea,fileReaderTemplate:()=>ka,fillColor:()=>r.fillColor,filterBarTemplate:()=>ls,findParentRouter:()=>lv,findRouter:()=>rv,findTopLevelRouter:()=>dv,flyoutAnimationTime:()=>Os,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:()=>ph,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>A,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>D,foundationAiCriteriaSearch:()=>Ce,foundationAiCriteriaSearchShadowOptions:()=>ye,foundationAiCriteriaSearchStyles:()=>M,foundationAiCriteriaSearchTemplate:()=>U,foundationAiIndicator:()=>Ee,foundationAiIndicatorStyles:()=>xe,foundationAiIndicatorTemplate:()=>$e,foundationAnchor:()=>Re,foundationAnchorShadowOptions:()=>Ie,foundationAnchorStyles:()=>Te,foundationAnchorTemplate:()=>Oe,foundationAnchoredRegion:()=>_e,foundationAnchoredRegionShadowOptions:()=>Fe,foundationAnchoredRegionStyles:()=>Ne,foundationAnchoredRegionTemplate:()=>Ae,foundationAvatar:()=>je,foundationAvatarShadowOptions:()=>Be,foundationAvatarStyles:()=>He,foundationAvatarTemplate:()=>ze,foundationBadge:()=>Xe,foundationBadgeShadowOptions:()=>qe,foundationBadgeStyles:()=>Ve,foundationBadgeTemplate:()=>We,foundationBanner:()=>nt,foundationBannerShadowOptions:()=>it,foundationBannerStyles:()=>Ze,foundationBannerTemplate:()=>tt,foundationBreadcrumb:()=>ct,foundationBreadcrumbItem:()=>vt,foundationBreadcrumbItemShadowOptions:()=>mt,foundationBreadcrumbItemStyles:()=>ut,foundationBreadcrumbItemTemplate:()=>ht,foundationBreadcrumbShadowOptions:()=>lt,foundationBreadcrumbStyles:()=>at,foundationBreadcrumbTemplate:()=>st,foundationButton:()=>xt,foundationButtonShadowOptions:()=>wt,foundationButtonStyles:()=>ft,foundationButtonTemplate:()=>bt,foundationCalendar:()=>kt,foundationCalendarShadowOptions:()=>Tt,foundationCalendarStyles:()=>$t,foundationCalendarTemplate:()=>St,foundationCard:()=>Lt,foundationCardShadowOptions:()=>At,foundationCardStyles:()=>It,foundationCardTemplate:()=>Dt,foundationCategorizedMultiselect:()=>Gt,foundationCategorizedMultiselectShadowOptions:()=>Pt,foundationCheckbox:()=>Kt,foundationCheckboxShadowOptions:()=>Yt,foundationCheckboxStyles:()=>jt,foundationCheckboxTemplate:()=>Vt,foundationCombobox:()=>yi,foundationComboboxShadowOptions:()=>fi,foundationComboboxStyles:()=>hi,foundationComboboxTemplate:()=>pi,foundationConnectionIndicator:()=>Si,foundationConnectionIndicatorStyles:()=>Ci,foundationConnectionIndicatorTemplate:()=>xi,foundationDataGrid:()=>Di,foundationDataGridCell:()=>Fi,foundationDataGridCellShadowOptions:()=>Ni,foundationDataGridCellStyles:()=>Ri,foundationDataGridCellTemplate:()=>s.dataGridCellTemplate,foundationDataGridRow:()=>Pi,foundationDataGridRowShadowOptions:()=>Hi,foundationDataGridRowStyles:()=>Mi,foundationDataGridRowTemplate:()=>s.dataGridRowTemplate,foundationDataGridShadowOptions:()=>ki,foundationDataGridStyles:()=>Ei,foundationDataGridTemplate:()=>Ti,foundationDatePicker:()=>uo,foundationDatePickerShadowOptions:()=>ro,foundationDatePickerStyles:()=>eo,foundationDatePickerTemplate:()=>oo,foundationDesignSystemProvider:()=>ln,foundationDialog:()=>yn,foundationDialogShadowOptions:()=>gn,foundationDialogStyles:()=>cn,foundationDialogTemplate:()=>mn,foundationDisclosure:()=>En,foundationDisclosureShadowOptions:()=>$n,foundationDisclosureStyles:()=>wn,foundationDisclosureTemplate:()=>Cn,foundationDivider:()=>Rn,foundationDividerShadowOptions:()=>In,foundationDividerStyles:()=>Tn,foundationDividerTemplate:()=>On,foundationDropdownMenu:()=>Hn,foundationDropdownMenuStyles:()=>Nn,foundationDropdownMenuTemplate:()=>Mn,foundationEnvironmentIndicator:()=>Jn,foundationEnvironmentIndicatorTemplate:()=>Un,foundationErrorBanner:()=>oa,foundationErrorBannerShadowOptions:()=>ta,foundationErrorBannerTemplate:()=>ea,foundationErrorBoundary:()=>fa,foundationErrorBoundaryShadowOptions:()=>ga,foundationErrorBoundaryTemplate:()=>ma,foundationErrorDialog:()=>$a,foundationErrorDialogShadowOptions:()=>Ca,foundationErrorDialogStyles:()=>ba,foundationFileReader:()=>Da,foundationFileReaderStyles:()=>Ta,foundationFileUpload:()=>Wa,foundationFileUploadShadowOptions:()=>ja,foundationFileUploadStyles:()=>Na,foundationFileUploadTemplate:()=>Fa,foundationFilter:()=>os,foundationFilterBar:()=>hs,foundationFilterBarStyles:()=>as,foundationFilterBarTemplate:()=>ds,foundationFilterStyles:()=>Ya,foundationFilterTemplate:()=>es,foundationFlexLayout:()=>ws,foundationFlexLayoutShadowOptions:()=>fs,foundationFlexLayoutStyles:()=>gs,foundationFlexLayoutTemplate:()=>vs,foundationFlipper:()=>Ts,foundationFlipperShadowOptions:()=>Ss,foundationFlipperStyles:()=>Cs,foundationFlipperTemplate:()=>xs,foundationFlyout:()=>Ls,foundationFlyoutShadowOptions:()=>As,foundationFlyoutStyles:()=>ks,foundationFlyoutTemplate:()=>Ds,foundationGridLayout:()=>Gs,foundationGridLayoutItem:()=>qs,foundationGridLayoutItemShadowOptions:()=>Vs,foundationGridLayoutItemTemplate:()=>js,foundationGridLayoutShadowOptions:()=>zs,foundationGridLayoutStyles:()=>_s,foundationGridLayoutTemplate:()=>Hs,foundationHorizontalScroll:()=>er,foundationHorizontalScrollShadowOptions:()=>Js,foundationHorizontalScrollStyles:()=>Ks,foundationHorizontalScrollTemplate:()=>Xs,foundationIcon:()=>vr,foundationIconShadowOptions:()=>cr,foundationIconStyles:()=>rr,foundationIconTemplate:()=>dr,foundationListbox:()=>xr,foundationListboxOption:()=>kr,foundationListboxOptionShadowOptions:()=>Tr,foundationListboxOptionStyles:()=>$r,foundationListboxOptionTemplate:()=>Sr,foundationListboxShadowOptions:()=>wr,foundationListboxStyles:()=>fr,foundationListboxTemplate:()=>br,foundationMenu:()=>Lr,foundationMenuItem:()=>Pr,foundationMenuItemShadowOptions:()=>Hr,foundationMenuItemStyles:()=>Fr,foundationMenuItemTemplate:()=>Mr,foundationMenuShadowOptions:()=>Ar,foundationMenuStyles:()=>Ir,foundationMenuTemplate:()=>Dr,foundationModal:()=>Wr,foundationModalShadowOptions:()=>Gr,foundationModalStyles:()=>Ur,foundationModalTemplate:()=>Br,foundationMultiselect:()=>tl,foundationMultiselectShadowOptions:()=>Jr,foundationNotificationListener:()=>Gg,foundationNotificationListenerShadowOptions:()=>Ug,foundationNotificationListenerTemplate:()=>zg,foundationNumberField:()=>Cl,foundationNumberFieldShadowOptions:()=>yl,foundationNumberFieldStyles:()=>rl,foundationNumberFieldTemplate:()=>ll,foundationOptgroup:()=>El,foundationOptgroupStyles:()=>xl,foundationOptgroupTemplate:()=>$l,foundationPopper:()=>pd,foundationProgress:()=>Ql,foundationProgressRing:()=>yd,foundationProgressRingShadowOptions:()=>fd,foundationProgressRingStyles:()=>md,foundationProgressRingTemplate:()=>gd,foundationProgressShadowOptions:()=>Kl,foundationProgressStyles:()=>Wl,foundationProgressTemplate:()=>Yl,foundationRadio:()=>Ed,foundationRadioGroup:()=>Rd,foundationRadioGroupShadowOptions:()=>Id,foundationRadioGroupStyles:()=>Td,foundationRadioGroupTemplate:()=>Od,foundationRadioShadowOptions:()=>$d,foundationRadioStyles:()=>wd,foundationRadioTemplate:()=>Cd,foundationScheduler:()=>Hd,foundationSchedulerCronBuilder:()=>Ic,foundationSchedulerCronBuilderShadowOptions:()=>Oc,foundationSchedulerCronBuilderTemplate:()=>Ec,foundationSchedulerShadowOptions:()=>Md,foundationSchedulerTemplate:()=>Ld,foundationSchedulerTimezone:()=>Mc,foundationSchedulerTimezoneShadowOptions:()=>Lc,foundationSchedulerTimezoneTemplate:()=>Ac,foundationSearchBar:()=>Kc,foundationSearchBarCombobox:()=>tu,foundationSearchBarComboboxShadowOptions:()=>Zc,foundationSearchBarComboboxStyles:()=>Xc,foundationSearchBarComboboxTemplate:()=>Qc,foundationSearchBarShadowOptions:()=>Yc,foundationSearchBarStyles:()=>_c,foundationSearchBarTemplate:()=>Uc,foundationSectionNavigator:()=>hu,foundationSectionNavigatorShadowOptions:()=>cu,foundationSectionNavigatorStyles:()=>iu,foundationSectionNavigatorTemplate:()=>ou,foundationSegmentedControl:()=>bu,foundationSegmentedControlShadowOptions:()=>vu,foundationSegmentedControlStyles:()=>pu,foundationSegmentedControlTemplate:()=>mu,foundationSegmentedItem:()=>Su,foundationSegmentedItemShadowOptions:()=>xu,foundationSegmentedItemStyles:()=>yu,foundationSegmentedItemTemplate:()=>wu,foundationSelect:()=>Du,foundationSelectShadowOptions:()=>ku,foundationSelectStyles:()=>Eu,foundationSelectTemplate:()=>Tu,foundationSkeleton:()=>Mu,foundationSkeletonShadowOptions:()=>Lu,foundationSkeletonStyles:()=>Ru,foundationSkeletonTemplate:()=>Au,foundationSlider:()=>ju,foundationSliderLabel:()=>Xu,foundationSliderLabelShadowOptions:()=>qu,foundationSliderLabelStyles:()=>Vu,foundationSliderLabelTemplate:()=>Wu,foundationSliderShadowOptions:()=>Bu,foundationSliderStyles:()=>_u,foundationSliderTemplate:()=>Pu,foundationSnackbar:()=>sh,foundationSnackbarShadowOptions:()=>nh,foundationSnackbarStyles:()=>th,foundationSnackbarTemplate:()=>oh,foundationStackingIcons:()=>ch,foundationStackingIconsStyles:()=>rh,foundationStackingIconsTemplate:()=>lh,foundationStatusPill:()=>gh,foundationStatusPillTemplate:()=>hh,foundationStepper:()=>kv,foundationStepperShadowOptions:()=>Tv,foundationStepperStyles:()=>Sv,foundationStepperTab:()=>xh,foundationStepperTabPanel:()=>Oh,foundationStepperTabPanelShadowOptions:()=>Eh,foundationStepperTabPanelTemplate:()=>$h,foundationStepperTabShadowOptions:()=>wh,foundationStepperTabStyles:()=>vh,foundationStepperTabTemplate:()=>bh,foundationStepperTemplate:()=>$v,foundationSwitch:()=>Nh,foundationSwitchShadowOptions:()=>Rh,foundationSwitchStyles:()=>kh,foundationSwitchTemplate:()=>Ih,foundationSystemHealthOverlay:()=>rd,foundationSystemHealthOverlayShadowOptions:()=>ad,foundationSystemHealthOverlayStyles:()=>nd,foundationSystemHealthOverlayTemplate:()=>od,foundationTab:()=>zh,foundationTabPanel:()=>Vh,foundationTabPanelShadowOptions:()=>Gh,foundationTabPanelStyles:()=>Ph,foundationTabPanelTemplate:()=>Uh,foundationTabShadowOptions:()=>_h,foundationTabStyles:()=>Lh,foundationTabTemplate:()=>Fh,foundationTabs:()=>Qh,foundationTabsShadowOptions:()=>Kh,foundationTabsStyles:()=>Wh,foundationTabsTemplate:()=>Yh,foundationTextArea:()=>op,foundationTextAreaShadowOptions:()=>tp,foundationTextAreaStyles:()=>Jh,foundationTextAreaTemplate:()=>Zh,foundationTextField:()=>up,foundationTextFieldShadowOptions:()=>dp,foundationTextFieldStyles:()=>sp,foundationTextFieldTemplate:()=>rp,foundationToast:()=>bp,foundationToastShadowOptions:()=>gp,foundationToastStyles:()=>hp,foundationToastTemplate:()=>mp,foundationToolbar:()=>Sp,foundationToolbarShadowOptions:()=>xp,foundationToolbarStyles:()=>yp,foundationToolbarTemplate:()=>wp,foundationTooltip:()=>Dp,foundationTooltipShadowOptions:()=>kp,foundationTooltipStyles:()=>Ep,foundationTooltipTemplate:()=>Tp,foundationTreeItem:()=>Mp,foundationTreeItemShadowOptions:()=>Lp,foundationTreeItemStyles:()=>Rp,foundationTreeItemTemplate:()=>Ap,foundationTreeView:()=>Bp,foundationTreeViewShadowOptions:()=>Pp,foundationTreeViewStyles:()=>_p,foundationTreeViewTemplate:()=>Hp,foundationUrlInput:()=>Kp,foundationUrlInputShadowOptions:()=>Wp,foundationUrlInputStyles:()=>Gp,foundationUrlInputTemplate:()=>Vp,fromBinaryExpression:()=>Ig,fromMethodExpression:()=>Dg,fuiAccentPalette:()=>Eo,fuiAccentSwatch:()=>So,fuiCardFillColor:()=>ko,fuiCardForegroundColor:()=>Ro,fuiDefaultCardFillColor:()=>bo,fuiDefaultCardPalette:()=>yo,fuiFillColor:()=>Oo,fuiNeutralPalette:()=>xo,fuiNeutralSwatch:()=>Co,getBannerTemplate:()=>et,getCriteriaBuilder:()=>Vc,getDefaultConfig:()=>Go,getDesignSystemPrefix:()=>O,getDialogTemplate:()=>pn,getDropdownMenuTemplate:()=>Fn,getErrorDialogTemplate:()=>ya,getExports:()=>jo,getFontawesomeIconsCss:()=>sr,getNavItems:()=>vv,getPrefixedCategorizedMultiselect:()=>Ht,getPrefixedCronBuilder:()=>Sc,getPrefixedDatePicker:()=>io,getPrefixedErrorBanner:()=>Zn,getPrefixedFileReader:()=>Oa,getPrefixedFileUpload:()=>La,getPrefixedFilterTemplate:()=>Za,getPrefixedFlyout:()=>Is,getPrefixedIcon:()=>lr,getPrefixedMultiselect:()=>Xr,getPrefixedScheduler:()=>Nd,getPrefixedSchedulerTimezone:()=>Rc,getPrefixedSearchBar:()=>Pc,getPrefixedSnackbar:()=>ih,getPrefixedStepper:()=>xv,getPrefixedStepperTab:()=>fh,getPrefixedToast:()=>pp,getPrefixedUrlInput:()=>jp,getTypeRampValue:()=>Vo,groupsToCriteria:()=>K,inputControls:()=>oc,isAbsoluteUrl:()=>sv,jsonConverter:()=>dd,mapType:()=>ss,maxheight:()=>Yr,media:()=>Pe,menuTemplate:()=>k,mixinFoundationFontFamily:()=>on,multiselectStyles:()=>qr,multiselectTemplate:()=>Qr,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:()=>Do,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:()=>Xo,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:()=>Mt,paletteFromHex:()=>Po,pathJoin:()=>cv,plusIcon:()=>zc,provideDesignSystem:()=>Zl,provideTokens:()=>_o,rebuildOperator:()=>kg,registerFoundationDesignSystem:()=>Lv,removeChildRouteParameter:()=>hv,removeLastPathSegment:()=>uv,routerLogger:()=>Jg,routerProperty:()=>iv,ruleExpressionToGroup:()=>Rg,ruleToRuleExpression:()=>Tg,ruleToRuleMethodExpression:()=>Eg,schedulerCronBuilderStyles:()=>nc,schedulerStyles:()=>Ad,schedulerTimezoneStyles:()=>Dc,selectCustomToken:()=>Yo,sharedFieldStyles:()=>sl,singleOptionTemplate:()=>I,statusPillStyles:()=>uh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>zo,tagFor:()=>Vg,transformOperatorNameToServerName:()=>Sg,transformServerNameToOperatorName:()=>Og,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:()=>_a,validateClauses:()=>de,validateGroups:()=>ce,white:()=>po});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:()=>Io,density:()=>r.density,designUnit:()=>r.designUnit,direction:()=>r.direction,disabledOpacity:()=>r.disabledOpacity,fillColor:()=>r.fillColor,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,fuiCardFillColor:()=>ko,fuiCardForegroundColor:()=>Ro,fuiFillColor:()=>Oo,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:()=>Do,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:()=>Ko,baseLayerLuminanceValue:()=>Qo,controlCornerRadiusValue:()=>Zo,designUnitValue:()=>en,directionValue:()=>Jo,neutralPaletteValue:()=>Xo});var a={};i.r(a),i.d(a,{BASE_LOGICAL_COMBINATORS:()=>Zp,BASE_OPERATORS:()=>am,LOGICAL_COMBINATORS:()=>em,NULL_COMBINATOR:()=>tm});var s=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
1
|
+
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[210],{14609(e,t,i){i.d(t,{b:()=>s});const o=(0,i(36304).createLogger)("foundation-criteria");var n=i(86636);const a="default";class s{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,n.r.And()),this.Or=(e,t={})=>this.withExpression(e,t,n.r.Or()),this.Not=(e,t={})=>this.withExpression(e,t,n.r.Not())}withExpression(e,t={},i=n.r.And()){const{condition:s,join:r,groupName:l}=t,d=(e,t=a)=>{var o;const n=null!==(o=this.expressions[t])&&void 0!==o?o:[];this.expressions[t]=[...n,{join:i||r,condition:s,expression:e}]};if(Array.isArray(e))if(r){const t=e.filter(e=>{const t=e instanceof n.r;return t&&o.warn("Inline joins will be discarded when join is defined in ExpressionOptions"),!t});if(l)t.forEach(e=>{d(e,l)});else{const e=(c=r,t.flat().flatMap((e,t,i)=>i.length-1!==t?[e,c]:e));d(e,a)}}else d(e,a);else d(e,"string"==typeof e?a:e.group);var c;return this}build(e){const t=Object.entries(this.expressions).reduce((e,[t,i])=>Object.assign(Object.assign({},e),{[t]:`(${i.filter(({condition:e})=>!e||e()).map(({expression:e,join:t},i,o)=>this.parseExpression(e,o[i-1],t)).join("")})`}),{});return e?e(t):`(${Object.values(t).join(" && ")})`}reset(){this.expressions={}}parseExpression(e,t,i){const o=[];return i&&t&&o.push(` ${i.operator} `),"string"==typeof e?o.push(e):Array.isArray(e)?(e.forEach((e,t,i)=>{if(e instanceof n.r){if(i[t-1]instanceof n.r)throw new Error("Adjacent Join operations detected")}}),o.push(`(${e.map(e=>this.parseExpression(e,void 0)).join("")})`)):e instanceof n.r?o.push(` ${e.operator} `):e&&o.push(e.serialiser(e)),o.join("")}}},58749(e,t,i){i.d(t,{K:()=>n});var o=i(95553);class n{constructor(e){this.serialiser=o.n.EQ,this.build=()=>{if(!this.field)throw new Error("Missing required param 'field'");if(void 0===this.value)throw new Error("Missing required param 'value'");if(!this.serialiser)throw new Error("Missing required param 'serialise'");return{field:this.field,value:this.value,serialiser:this.serialiser,params:this.params,valueGetter:this.valueGetter,group:this.group}},e&&(this.field=e.field,this.value=e.value,this.serialiser=e.serialiser,this.params=e.params,this.valueGetter=e.valueGetter,this.group=e.group)}withField(e){return this.field=e,this}withValue(e){return this.value=e,this}withSerialiser(e){return this.serialiser=e,this}withParams(e){return this.params=e,this}withValueGetter(e){return this.valueGetter=e,this}withGroup(e){return this.group=e,this}}},95553(e,t,i){i.d(t,{n:()=>s});var o=i(86636);const n=e=>{const{value:t}=e;return e.valueGetter?e.valueGetter(t):"function"==typeof t?t(e):Array.isArray(t)?t.join(","):"string"==typeof t?`"${t}"`:t},a=e=>t=>`${t.field} ${e} ${n(t)}`,s={AND:e=>a(o.X.AND)(e),OR:e=>a(o.X.OR)(e),NOT:e=>a(o.X.NOT)(e),GT:e=>a(o.X.GT)(e),GE:e=>a(o.X.GE)(e),LT:e=>a(o.X.LT)(e),LE:e=>a(o.X.LE)(e),NE:e=>a(o.X.NE)(e),EQ:e=>a(o.X.EQ)(e),equals:e=>`${e.field}.equals(${n(e)})`,equalsIgnoreCase:e=>`${e.field}.equalsIgnoreCase(${n(e)})`,contains:e=>`Expr.contains(${e.field}, ${n(e)})`,fieldContains:e=>`${e.field}.contains(${n(e)})`,containsIgnoreCase:e=>`Expr.containsIgnoreCase(${e.field}, ${n(e)})`,startsWith:e=>`${e.field}.startsWith(${n(e)})`,endsWith:e=>`${e.field}.endsWith(${n(e)})`,dateIsToday:e=>`Expr.dateIsToday(${e.field})`,dateIsEqual:e=>`Expr.dateIsEqual(${e.field}, ${n(e)})`,dateIsGreaterEqual:e=>`Expr.dateIsGreaterEqual(${e.field}, ${n(e)})`,dateIsLessEqual:e=>`Expr.dateIsLessEqual(${e.field}, ${n(e)})`,dateTimeIsGreaterEqual:e=>`Expr.dateTimeIsGreaterEqual(${e.field}, ${n(e)})`,dateTimeIsLessEqual:e=>`Expr.dateTimeIsLessEqual(${e.field}, ${n(e)})`}},86636(e,t,i){var o;i.d(t,{X:()=>o,r:()=>n}),function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(o||(o={}));class n{constructor(e){this.$$operator=e}static And(){return new n(o.AND)}static Or(){return new n(o.OR)}static Not(){return new n(o.NOT)}static GreaterThan(){return new n(o.GT)}static GreaterThanOrEqual(){return new n(o.GE)}static LessThan(){return new n(o.LT)}static LessThanOrEqual(){return new n(o.LE)}static NotEqual(){return new n(o.NE)}static Equal(){return new n(o.EQ)}get operator(){return this.$$operator}}},31274(e,t,i){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){i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(36304),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.LogLevel.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}},28210(e,t,i){i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AffixMixin:()=>sl,AiCriteriaSearch:()=>ye,AiIndicator:()=>Ee,Anchor:()=>Ie,AnchoredRegion:()=>Fe,Avatar:()=>Be,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Rv,Badge:()=>qe,Banner:()=>nt,BaseDatasource:()=>di,BaseFileComponent:()=>Ea,Breadcrumb:()=>lt,BreadcrumbItem:()=>mt,Button:()=>wt,COMBO_INPUT_MIN_LENGTH:()=>Vc,CSSVarsTokenMapper:()=>Jp,Calendar:()=>Tt,Card:()=>At,CategorizedMultiselect:()=>Gt,Checkbox:()=>Yt,Combobox:()=>fi,ConnectionIndicator:()=>Si,DATETIME_OPERATORS:()=>ee,DATE_OPERATORS:()=>Z,DEFUALT_FILTER_BAR_COLUMNS:()=>us,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Nv,DataGrid:()=>ki,DataGridCell:()=>Ni,DataGridDatasource:()=>Zp,DataGridRow:()=>Hi,DatePicker:()=>uo,DefaultRouter:()=>av,DesignTokensObservable:()=>Mo,Dialog:()=>yn,DialogElement:()=>bn,Disclosure:()=>$n,Divider:()=>In,DropdownMenu:()=>Hn,EnvironmentIndicator:()=>Jn,ErrorBanner:()=>oa,ErrorBoundary:()=>fa,ErrorBoundaryEvent:()=>aa,ErrorDialog:()=>$a,ExpressionBuilderConfig:()=>a,ExpressionBuilderCore:()=>fg,FaPrefixFromStyle:()=>pr,FileReader:()=>Da,FileUpload:()=>ja,Filter:()=>os,FilterBar:()=>hs,FilterEvents:()=>is,FlexLayout:()=>ws,FlexMediaQueriesEnum:()=>ms,Flipper:()=>Ss,Flyout:()=>As,FoundationDesignSystemProvider:()=>ln,FoundationExpressionBuilder:()=>ig,FoundationRouteCollection:()=>bv,FoundationRouteNav:()=>mv,FoundationRouter:()=>xv,FoundationRouterConfiguration:()=>yv,FoundationRuleExpressionBuilder:()=>Ng,FoundationValueExpressionBuilder:()=>zg,GenerateNavigationPathEventType:()=>Cv,GridLayout:()=>Gs,GridLayoutItem:()=>qs,GridMediaQueriesEnum:()=>Ms,HorizontalScroll:()=>Js,INPUT_MIN_LENGTH:()=>jc,Icon:()=>vr,Listbox:()=>wr,ListboxOption:()=>Tr,Menu:()=>Ar,MenuItem:()=>Hr,Modal:()=>Wr,Multiselect:()=>tl,MultiselectDatasource:()=>Xr,NUMERIC_OPERATORS:()=>J,NavigateToEventType:()=>wv,NotificationListener:()=>Gg,NumberField:()=>yl,OPERATOR_DISPLAY_LABEL:()=>te,Optgroup:()=>El,OptionsDatasource:()=>hi,Popper:()=>ud,Position:()=>Mt,Progress:()=>Kl,ProgressRing:()=>fd,Radio:()=>$d,RadioGroup:()=>Id,Router:()=>nv,RuleExpression:()=>bg,SCROLL_TIMEOUT:()=>Gc,SECTION_NAVIGATOR_EVENTS:()=>ru,SNACKBAR_CLOSE_TIMEOUT:()=>eh,SNACKBAR_EVENTS_NAMES:()=>th,SNACKBAR_TYPES:()=>Zu,SNACKBAR_TYPE_DEFAULT:()=>Ju,STRING_OPERATORS:()=>Q,Scheduler:()=>Md,SchedulerCronBuilder:()=>Oc,SchedulerTimezone:()=>Lc,SearchBar:()=>Yc,SearchBarCombobox:()=>Zc,SectionNavigator:()=>cu,SegmentedControl:()=>vu,SegmentedItem:()=>xu,Select:()=>ku,Skeleton:()=>Lu,Slider:()=>Bu,SliderLabel:()=>qu,Snackbar:()=>sh,StackingIcons:()=>ch,StatusPill:()=>gh,Stepper:()=>Tv,StepperTab:()=>wh,StepperTabPanel:()=>Eh,Switch:()=>Rh,SystemHealthOverlay:()=>od,Tab:()=>_h,TabPanel:()=>Gh,Tabs:()=>Kh,TextArea:()=>tp,TextField:()=>dp,Toast:()=>bp,Toolbar:()=>xp,Tooltip:()=>kp,TreeItem:()=>Lp,TreeView:()=>Pp,UrlInput:()=>Kp,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:()=>Xo,actionsMenuBaseStyles:()=>$,applyCustomTokens:()=>Bo,baseComponents:()=>Qp,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>Jo,black:()=>go,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>Lv,categorizedMultiselectStyles:()=>Ht,categorizedMultiselectTemplate:()=>Pt,clientOperators:()=>wg,closeIcon:()=>Ka,configureDesignSystem:()=>Ko,configureEnvironmentIndicator:()=>Xn,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>en,createDesignSystemProxy:()=>Zl,createFormData:()=>_a,crossIcon:()=>zc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>Ce,defaultAnchorConfig:()=>Re,defaultAnchoredRegionConfig:()=>_e,defaultAvatarConfig:()=>je,defaultBadgeConfig:()=>Xe,defaultBreadcrumbConfig:()=>ct,defaultBreadcrumbItemConfig:()=>vt,defaultButtonConfig:()=>xt,defaultCalendarConfig:()=>kt,defaultCardConfig:()=>Lt,defaultCategorizedMultiselectConfig:()=>Bt,defaultCheckboxConfig:()=>Kt,defaultComboboxConfig:()=>yi,defaultConfig:()=>Hd,defaultCronBuilderConfig:()=>Ic,defaultDataGridCellConfig:()=>Fi,defaultDataGridConfig:()=>Di,defaultDataGridRowConfig:()=>Pi,defaultDatePickerConfig:()=>co,defaultDialogConfig:()=>fn,defaultDisclosureConfig:()=>En,defaultDividerConfig:()=>Rn,defaultFileUploadConfig:()=>Wa,defaultFillColor:()=>fo,defaultFlexLayoutConfig:()=>ys,defaultFlipperConfig:()=>Ts,defaultFlyoutConfig:()=>Ls,defaultGridLayoutConfig:()=>Us,defaultGridLayoutItemConfig:()=>Ys,defaultHorizontalScrollConfig:()=>er,defaultIconConfig:()=>hr,defaultListboxConfig:()=>xr,defaultListboxOptionConfig:()=>kr,defaultMenuConfig:()=>Lr,defaultMenuItemConfig:()=>Pr,defaultModalConfig:()=>Vr,defaultMultiselectConfig:()=>el,defaultNavItemPredicate:()=>gv,defaultNeutralForegroundContrast:()=>Do,defaultNumberFieldConfig:()=>Cl,defaultPlacementIndexPadding:()=>vv,defaultProgressConfig:()=>Ql,defaultProgressRingConfig:()=>yd,defaultRadioConfig:()=>Ed,defaultRadioGroupConfig:()=>Rd,defaultSearchBarComboboxConfig:()=>tu,defaultSearchBarConfig:()=>Kc,defaultSectionNavigatorConfig:()=>hu,defaultSegmentedControlConfig:()=>bu,defaultSegmentedItemConfig:()=>Su,defaultSelectConfig:()=>Du,defaultSkeletonConfig:()=>Mu,defaultSliderConfig:()=>ju,defaultSliderLabelConfig:()=>Xu,defaultStepperConfig:()=>kv,defaultStepperTabConfig:()=>xh,defaultStepperTabPanelConfig:()=>Oh,defaultSwitchConfig:()=>Nh,defaultSystemHealthOverlayConfig:()=>rd,defaultTabConfig:()=>zh,defaultTabPanelConfig:()=>Vh,defaultTabsConfig:()=>Qh,defaultTextAreaConfig:()=>op,defaultTextFieldConfig:()=>up,defaultTimezoneConfig:()=>Mc,defaultToastConfig:()=>fp,defaultToolbarConfig:()=>Sp,defaultTooltipConfig:()=>Dp,defaultTreeItemConfig:()=>Mp,defaultTreeViewConfig:()=>Bp,defaultUrlInputConfig:()=>qp,defineFactory:()=>Vg,density:()=>r.density,designToken:()=>zo,designTokensMap:()=>Yo,designUnit:()=>r.designUnit,designUnitValue:()=>tn,direction:()=>r.direction,directionValue:()=>Zo,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>za,dropdownMenuBaseStyles:()=>Nn,environmentIndicatorStyles:()=>Un,errorDialogTemplate:()=>Ca,extractMenuItems:()=>Fn,faSizeValueDefault:()=>mr,faSizeValues:()=>gr,fileReaderStyles:()=>Ta,fileReaderTemplate:()=>Ia,fillColor:()=>r.fillColor,filterBarTemplate:()=>ds,findParentRouter:()=>dv,findRouter:()=>lv,findTopLevelRouter:()=>cv,flyoutAnimationTime:()=>ks,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:()=>mh,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>A,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>D,foundationAiCriteriaSearch:()=>xe,foundationAiCriteriaSearchShadowOptions:()=>we,foundationAiCriteriaSearchStyles:()=>_,foundationAiCriteriaSearchTemplate:()=>B,foundationAiIndicator:()=>Te,foundationAiIndicatorStyles:()=>$e,foundationAiIndicatorTemplate:()=>Se,foundationAnchor:()=>Ae,foundationAnchorShadowOptions:()=>De,foundationAnchorStyles:()=>Oe,foundationAnchorTemplate:()=>ke,foundationAnchoredRegion:()=>He,foundationAnchoredRegionShadowOptions:()=>Me,foundationAnchoredRegionStyles:()=>Le,foundationAnchoredRegionTemplate:()=>Ne,foundationAvatar:()=>Ve,foundationAvatarShadowOptions:()=>Ge,foundationAvatarStyles:()=>ze,foundationAvatarTemplate:()=>Pe,foundationBadge:()=>Qe,foundationBadgeShadowOptions:()=>Ke,foundationBadgeStyles:()=>We,foundationBadgeTemplate:()=>Ye,foundationBanner:()=>at,foundationBannerShadowOptions:()=>ot,foundationBannerStyles:()=>et,foundationBannerTemplate:()=>it,foundationBreadcrumb:()=>ut,foundationBreadcrumbItem:()=>ft,foundationBreadcrumbItemShadowOptions:()=>gt,foundationBreadcrumbItemStyles:()=>ht,foundationBreadcrumbItemTemplate:()=>pt,foundationBreadcrumbShadowOptions:()=>dt,foundationBreadcrumbStyles:()=>st,foundationBreadcrumbTemplate:()=>rt,foundationButton:()=>$t,foundationButtonShadowOptions:()=>Ct,foundationButtonStyles:()=>bt,foundationButtonTemplate:()=>yt,foundationCalendar:()=>It,foundationCalendarShadowOptions:()=>Ot,foundationCalendarStyles:()=>St,foundationCalendarTemplate:()=>Et,foundationCard:()=>Ft,foundationCardShadowOptions:()=>Nt,foundationCardStyles:()=>Dt,foundationCardTemplate:()=>Rt,foundationCategorizedMultiselect:()=>jt,foundationCategorizedMultiselectShadowOptions:()=>Ut,foundationCheckbox:()=>Xt,foundationCheckboxShadowOptions:()=>qt,foundationCheckboxStyles:()=>Vt,foundationCheckboxTemplate:()=>Wt,foundationCombobox:()=>wi,foundationComboboxShadowOptions:()=>bi,foundationComboboxStyles:()=>pi,foundationComboboxTemplate:()=>mi,foundationConnectionIndicator:()=>Ei,foundationConnectionIndicatorStyles:()=>xi,foundationConnectionIndicatorTemplate:()=>$i,foundationDataGrid:()=>Ri,foundationDataGridCell:()=>Mi,foundationDataGridCellShadowOptions:()=>Li,foundationDataGridCellStyles:()=>Ai,foundationDataGridCellTemplate:()=>s.dataGridCellTemplate,foundationDataGridRow:()=>Ui,foundationDataGridRowShadowOptions:()=>zi,foundationDataGridRowStyles:()=>_i,foundationDataGridRowTemplate:()=>s.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Ii,foundationDataGridStyles:()=>Ti,foundationDataGridTemplate:()=>Oi,foundationDatePicker:()=>ho,foundationDatePickerShadowOptions:()=>lo,foundationDatePickerStyles:()=>to,foundationDatePickerTemplate:()=>no,foundationDesignSystemProvider:()=>dn,foundationDialog:()=>wn,foundationDialogShadowOptions:()=>vn,foundationDialogStyles:()=>un,foundationDialogTemplate:()=>gn,foundationDisclosure:()=>Tn,foundationDisclosureShadowOptions:()=>Sn,foundationDisclosureStyles:()=>Cn,foundationDisclosureTemplate:()=>xn,foundationDivider:()=>An,foundationDividerShadowOptions:()=>Dn,foundationDividerStyles:()=>On,foundationDividerTemplate:()=>kn,foundationDropdownMenu:()=>zn,foundationDropdownMenuStyles:()=>Ln,foundationDropdownMenuTemplate:()=>_n,foundationEnvironmentIndicator:()=>Zn,foundationEnvironmentIndicatorTemplate:()=>Bn,foundationErrorBanner:()=>na,foundationErrorBannerShadowOptions:()=>ia,foundationErrorBannerTemplate:()=>ta,foundationErrorBoundary:()=>ba,foundationErrorBoundaryShadowOptions:()=>va,foundationErrorBoundaryTemplate:()=>ga,foundationErrorDialog:()=>Sa,foundationErrorDialogShadowOptions:()=>xa,foundationErrorDialogStyles:()=>ya,foundationFileReader:()=>Ra,foundationFileReaderStyles:()=>Oa,foundationFileUpload:()=>Ya,foundationFileUploadShadowOptions:()=>Va,foundationFileUploadStyles:()=>La,foundationFileUploadTemplate:()=>Ma,foundationFilter:()=>ns,foundationFilterBar:()=>ps,foundationFilterBarStyles:()=>ss,foundationFilterBarTemplate:()=>cs,foundationFilterStyles:()=>qa,foundationFilterTemplate:()=>ts,foundationFlexLayout:()=>Cs,foundationFlexLayoutShadowOptions:()=>bs,foundationFlexLayoutStyles:()=>vs,foundationFlexLayoutTemplate:()=>fs,foundationFlipper:()=>Os,foundationFlipperShadowOptions:()=>Es,foundationFlipperStyles:()=>xs,foundationFlipperTemplate:()=>$s,foundationFlyout:()=>Fs,foundationFlyoutShadowOptions:()=>Ns,foundationFlyoutStyles:()=>Is,foundationFlyoutTemplate:()=>Rs,foundationGridLayout:()=>js,foundationGridLayoutItem:()=>Ks,foundationGridLayoutItemShadowOptions:()=>Ws,foundationGridLayoutItemTemplate:()=>Vs,foundationGridLayoutShadowOptions:()=>Ps,foundationGridLayoutStyles:()=>Hs,foundationGridLayoutTemplate:()=>zs,foundationHorizontalScroll:()=>tr,foundationHorizontalScrollShadowOptions:()=>Zs,foundationHorizontalScrollStyles:()=>Xs,foundationHorizontalScrollTemplate:()=>Qs,foundationIcon:()=>fr,foundationIconShadowOptions:()=>ur,foundationIconStyles:()=>lr,foundationIconTemplate:()=>cr,foundationListbox:()=>$r,foundationListboxOption:()=>Ir,foundationListboxOptionShadowOptions:()=>Or,foundationListboxOptionStyles:()=>Sr,foundationListboxOptionTemplate:()=>Er,foundationListboxShadowOptions:()=>Cr,foundationListboxStyles:()=>br,foundationListboxTemplate:()=>yr,foundationMenu:()=>Fr,foundationMenuItem:()=>Ur,foundationMenuItemShadowOptions:()=>zr,foundationMenuItemStyles:()=>Mr,foundationMenuItemTemplate:()=>_r,foundationMenuShadowOptions:()=>Nr,foundationMenuStyles:()=>Dr,foundationMenuTemplate:()=>Rr,foundationModal:()=>Yr,foundationModalShadowOptions:()=>jr,foundationModalStyles:()=>Br,foundationModalTemplate:()=>Gr,foundationMultiselect:()=>il,foundationMultiselectShadowOptions:()=>Zr,foundationNotificationListener:()=>jg,foundationNotificationListenerShadowOptions:()=>Bg,foundationNotificationListenerTemplate:()=>Pg,foundationNumberField:()=>xl,foundationNumberFieldShadowOptions:()=>wl,foundationNumberFieldStyles:()=>ll,foundationNumberFieldTemplate:()=>dl,foundationOptgroup:()=>Tl,foundationOptgroupStyles:()=>$l,foundationOptgroupTemplate:()=>Sl,foundationPopper:()=>md,foundationProgress:()=>Jl,foundationProgressRing:()=>wd,foundationProgressRingShadowOptions:()=>bd,foundationProgressRingStyles:()=>gd,foundationProgressRingTemplate:()=>vd,foundationProgressShadowOptions:()=>Xl,foundationProgressStyles:()=>Yl,foundationProgressTemplate:()=>ql,foundationRadio:()=>Td,foundationRadioGroup:()=>Ad,foundationRadioGroupShadowOptions:()=>Dd,foundationRadioGroupStyles:()=>Od,foundationRadioGroupTemplate:()=>kd,foundationRadioShadowOptions:()=>Sd,foundationRadioStyles:()=>Cd,foundationRadioTemplate:()=>xd,foundationScheduler:()=>zd,foundationSchedulerCronBuilder:()=>Dc,foundationSchedulerCronBuilderShadowOptions:()=>kc,foundationSchedulerCronBuilderTemplate:()=>Tc,foundationSchedulerShadowOptions:()=>_d,foundationSchedulerTemplate:()=>Fd,foundationSchedulerTimezone:()=>_c,foundationSchedulerTimezoneShadowOptions:()=>Fc,foundationSchedulerTimezoneTemplate:()=>Nc,foundationSearchBar:()=>Xc,foundationSearchBarCombobox:()=>iu,foundationSearchBarComboboxShadowOptions:()=>eu,foundationSearchBarComboboxStyles:()=>Qc,foundationSearchBarComboboxTemplate:()=>Jc,foundationSearchBarShadowOptions:()=>qc,foundationSearchBarStyles:()=>Hc,foundationSearchBarTemplate:()=>Bc,foundationSectionNavigator:()=>pu,foundationSectionNavigatorShadowOptions:()=>uu,foundationSectionNavigatorStyles:()=>ou,foundationSectionNavigatorTemplate:()=>nu,foundationSegmentedControl:()=>yu,foundationSegmentedControlShadowOptions:()=>fu,foundationSegmentedControlStyles:()=>mu,foundationSegmentedControlTemplate:()=>gu,foundationSegmentedItem:()=>Eu,foundationSegmentedItemShadowOptions:()=>$u,foundationSegmentedItemStyles:()=>wu,foundationSegmentedItemTemplate:()=>Cu,foundationSelect:()=>Ru,foundationSelectShadowOptions:()=>Iu,foundationSelectStyles:()=>Tu,foundationSelectTemplate:()=>Ou,foundationSkeleton:()=>_u,foundationSkeletonShadowOptions:()=>Fu,foundationSkeletonStyles:()=>Au,foundationSkeletonTemplate:()=>Nu,foundationSlider:()=>Vu,foundationSliderLabel:()=>Qu,foundationSliderLabelShadowOptions:()=>Ku,foundationSliderLabelStyles:()=>Wu,foundationSliderLabelTemplate:()=>Yu,foundationSliderShadowOptions:()=>Gu,foundationSliderStyles:()=>Hu,foundationSliderTemplate:()=>Uu,foundationSnackbar:()=>rh,foundationSnackbarShadowOptions:()=>ah,foundationSnackbarStyles:()=>ih,foundationSnackbarTemplate:()=>nh,foundationStackingIcons:()=>uh,foundationStackingIconsStyles:()=>lh,foundationStackingIconsTemplate:()=>dh,foundationStatusPill:()=>vh,foundationStatusPillTemplate:()=>ph,foundationStepper:()=>Iv,foundationStepperShadowOptions:()=>Ov,foundationStepperStyles:()=>Ev,foundationStepperTab:()=>$h,foundationStepperTabPanel:()=>kh,foundationStepperTabPanelShadowOptions:()=>Th,foundationStepperTabPanelTemplate:()=>Sh,foundationStepperTabShadowOptions:()=>Ch,foundationStepperTabStyles:()=>fh,foundationStepperTabTemplate:()=>yh,foundationStepperTemplate:()=>Sv,foundationSwitch:()=>Lh,foundationSwitchShadowOptions:()=>Ah,foundationSwitchStyles:()=>Ih,foundationSwitchTemplate:()=>Dh,foundationSystemHealthOverlay:()=>ld,foundationSystemHealthOverlayShadowOptions:()=>sd,foundationSystemHealthOverlayStyles:()=>ad,foundationSystemHealthOverlayTemplate:()=>nd,foundationTab:()=>Ph,foundationTabPanel:()=>Wh,foundationTabPanelShadowOptions:()=>jh,foundationTabPanelStyles:()=>Uh,foundationTabPanelTemplate:()=>Bh,foundationTabShadowOptions:()=>Hh,foundationTabStyles:()=>Fh,foundationTabTemplate:()=>Mh,foundationTabs:()=>Jh,foundationTabsShadowOptions:()=>Xh,foundationTabsStyles:()=>Yh,foundationTabsTemplate:()=>qh,foundationTextArea:()=>np,foundationTextAreaShadowOptions:()=>ip,foundationTextAreaStyles:()=>Zh,foundationTextAreaTemplate:()=>ep,foundationTextField:()=>hp,foundationTextFieldShadowOptions:()=>cp,foundationTextFieldStyles:()=>rp,foundationTextFieldTemplate:()=>lp,foundationToast:()=>yp,foundationToastShadowOptions:()=>vp,foundationToastStyles:()=>pp,foundationToastTemplate:()=>gp,foundationToolbar:()=>Ep,foundationToolbarShadowOptions:()=>$p,foundationToolbarStyles:()=>wp,foundationToolbarTemplate:()=>Cp,foundationTooltip:()=>Rp,foundationTooltipShadowOptions:()=>Ip,foundationTooltipStyles:()=>Tp,foundationTooltipTemplate:()=>Op,foundationTreeItem:()=>_p,foundationTreeItemShadowOptions:()=>Fp,foundationTreeItemStyles:()=>Ap,foundationTreeItemTemplate:()=>Np,foundationTreeView:()=>Gp,foundationTreeViewShadowOptions:()=>Up,foundationTreeViewStyles:()=>Hp,foundationTreeViewTemplate:()=>zp,foundationUrlInput:()=>Xp,foundationUrlInputShadowOptions:()=>Yp,foundationUrlInputStyles:()=>jp,foundationUrlInputTemplate:()=>Wp,fromBinaryExpression:()=>Dg,fromMethodExpression:()=>Rg,fuiAccentPalette:()=>To,fuiAccentSwatch:()=>Eo,fuiCardFillColor:()=>Io,fuiCardForegroundColor:()=>Ao,fuiDefaultCardFillColor:()=>yo,fuiDefaultCardPalette:()=>wo,fuiFillColor:()=>ko,fuiNeutralPalette:()=>$o,fuiNeutralSwatch:()=>xo,getBannerTemplate:()=>tt,getCriteriaBuilder:()=>Wc,getDefaultConfig:()=>jo,getDesignSystemPrefix:()=>O,getDialogTemplate:()=>mn,getDropdownMenuTemplate:()=>Mn,getErrorDialogTemplate:()=>wa,getExports:()=>Vo,getFontawesomeIconsCss:()=>rr,getNavItems:()=>fv,getPrefixedCategorizedMultiselect:()=>zt,getPrefixedCronBuilder:()=>Ec,getPrefixedDatePicker:()=>oo,getPrefixedErrorBanner:()=>ea,getPrefixedFileReader:()=>ka,getPrefixedFileUpload:()=>Fa,getPrefixedFilterTemplate:()=>es,getPrefixedFlyout:()=>Ds,getPrefixedIcon:()=>dr,getPrefixedMultiselect:()=>Qr,getPrefixedScheduler:()=>Ld,getPrefixedSchedulerTimezone:()=>Ac,getPrefixedSearchBar:()=>Uc,getPrefixedSnackbar:()=>oh,getPrefixedStepper:()=>$v,getPrefixedStepperTab:()=>bh,getPrefixedToast:()=>mp,getPrefixedUrlInput:()=>Vp,getTypeRampValue:()=>Wo,groupsToCriteria:()=>X,inputControls:()=>nc,isAbsoluteUrl:()=>rv,jsonConverter:()=>cd,mapType:()=>rs,maxheight:()=>qr,media:()=>Ue,menuTemplate:()=>k,mixinFoundationFontFamily:()=>nn,multiselectStyles:()=>Kr,multiselectTemplate:()=>Jr,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:()=>Ro,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:()=>Qo,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:()=>_t,paletteFromHex:()=>Uo,pathJoin:()=>uv,plusIcon:()=>Pc,provideDesignSystem:()=>ed,provideTokens:()=>Ho,rebuildOperator:()=>Ig,registerFoundationDesignSystem:()=>Fv,removeChildRouteParameter:()=>pv,removeLastPathSegment:()=>hv,routerLogger:()=>Zg,routerProperty:()=>ov,ruleExpressionToGroup:()=>Ag,ruleToRuleExpression:()=>Og,ruleToRuleMethodExpression:()=>Tg,schedulerCronBuilderStyles:()=>ac,schedulerStyles:()=>Nd,schedulerTimezoneStyles:()=>Rc,selectCustomToken:()=>qo,sharedFieldStyles:()=>rl,singleOptionTemplate:()=>I,statusPillStyles:()=>hh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>Po,tagFor:()=>Wg,transformOperatorNameToServerName:()=>Eg,transformServerNameToOperatorName:()=>kg,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:()=>Ha,validateClauses:()=>ce,validateGroups:()=>ue,white:()=>mo});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:()=>Do,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:()=>Io,fuiCardForegroundColor:()=>Ao,fuiFillColor:()=>ko,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:()=>Ro,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:()=>Xo,baseLayerLuminanceValue:()=>Jo,controlCornerRadiusValue:()=>en,designUnitValue:()=>tn,directionValue:()=>Zo,neutralPaletteValue:()=>Qo});var a={};i.r(a),i.d(a,{BASE_LOGICAL_COMBINATORS:()=>em,BASE_OPERATORS:()=>sm,LOGICAL_COMBINATORS:()=>tm,NULL_COMBINATOR:()=>im});var s=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
2
2
|
${(0,r.accordionStyles)(e,t)}
|
|
3
3
|
`,c=(e,t)=>(0,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)),g=(e,t)=>l.css`
|
|
4
4
|
${(0,r.accordionItemStyles)(e,t)}
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
>
|
|
161
161
|
${e=>e.getTemplate(O(e))}
|
|
162
162
|
</div>
|
|
163
|
-
`;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}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(){this.classNames=(0,x.x)(["visible",this.open],["hidden",!this.open])}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],I(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:D});function N(){return"undefined"!=typeof window&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)}class L{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})}}const F=s.DI.createInterface(e=>e.singleton(
|
|
163
|
+
`;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}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(){this.classNames=(0,x.x)(["visible",this.open],["hidden",!this.open])}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],I(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:D});function N(){return"undefined"!=typeof window&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)}class L{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 L}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`
|
|
164
164
|
:host {
|
|
165
165
|
display: block;
|
|
166
166
|
width: 800px;
|
|
@@ -258,9 +258,9 @@
|
|
|
258
258
|
background: var(--neutral-fill-hover);
|
|
259
259
|
color: var(--neutral-foreground-rest);
|
|
260
260
|
}
|
|
261
|
-
`;var
|
|
261
|
+
`;var H=i(77679);let z=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(z="true"===GENX_ENABLE_AI)}catch(zl){}const P=()=>z||(0,H.m)("ai");var U=i(40729);const B=l.html`
|
|
262
262
|
${e=>{return t=O(e),l.html`
|
|
263
|
-
${(0,l.when)(()=>
|
|
263
|
+
${(0,l.when)(()=>P(),l.html`
|
|
264
264
|
<div class="ai-criteria-search">
|
|
265
265
|
<div class="ai-criteria-search-row">
|
|
266
266
|
${(0,l.when)(e=>!e.showingChips,l.html`
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
class="criteria-input"
|
|
270
270
|
placeholder="${e=>e.placeholder}"
|
|
271
271
|
?disabled=${e=>e.disabled||e.isInterpreting}
|
|
272
|
-
:value=${(0,
|
|
272
|
+
:value=${(0,U.O)(e=>e.inputValue,"string","input")}
|
|
273
273
|
@blur=${e=>e.handleBlur()}
|
|
274
274
|
rows="1"
|
|
275
275
|
></${t}-text-area>
|
|
@@ -332,7 +332,7 @@
|
|
|
332
332
|
</div>
|
|
333
333
|
`)}
|
|
334
334
|
`;var t}}
|
|
335
|
-
`;var B=i(95553),G=i(58749),j=i(14609),V=i(86636);const W={contains:B.n.containsIgnoreCase,equals:B.n.EQ,startsWith:B.n.startsWith,endsWith:B.n.endsWith,greaterThan:B.n.GT,lessThan:B.n.LT,greaterThanOrEqual:B.n.GE,lessThanOrEqual:B.n.LE,notEqual:B.n.NE,dateIsToday:B.n.dateIsToday,dateIsAfter:B.n.dateIsGreaterEqual,dateIsGreaterEqual:B.n.dateIsGreaterEqual,dateIsBefore:B.n.dateIsLessEqual,dateIsLessEqual:B.n.dateIsLessEqual,dateIsEqual:B.n.dateIsEqual,dateTimeIsAfter:B.n.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:B.n.dateTimeIsGreaterEqual,dateTimeIsBefore:B.n.dateTimeIsLessEqual,dateTimeIsLessEqual:B.n.dateTimeIsLessEqual};function Y(e){var t,i;const o=null!==(t=W[e.operator])&&void 0!==t?t:B.n.containsIgnoreCase;return(new G.K).withField(e.field).withValue(null!==(i=e.value)&&void 0!==i?i:null).withSerialiser(o).withGroup("default").build()}function q(e,t){return 1===e.length?e[0]:e.reduce((e,i,o)=>0===o?[i]:[...e,t,i],[])}function K(e){var t;const i=new j.b;let o=!1;for(const n of e){if(!(null===(t=n.clauses)||void 0===t?void 0:t.length))continue;const e=n.clauses.map(Y),a="or"===n.logic?V.r.Or():V.r.And(),s=q(e,a),r=e.length>1?{join:a}:{};n.negated?i.And([V.r.Not(),s]):i.And(1===e.length?e[0]:e,r),o=!0}return o?i.build():""}const X=["contains","equals","startsWith","endsWith","notEqual"],Q=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],J=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],Z=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],ee={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:"≤"},te=new Set(["DATE","LOCALDATE"]),ie=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),oe=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function ne(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function ae(e){const t=ne(e);return te.has(t)?J:ie.has(t)?Z:oe.has(t)?Q:X}function se(e){return oe.has(ne(e))}function re(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 le(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function de(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";ae(l).includes(a)?!J.includes(a)&&!Z.includes(a)||"dateIsToday"===a||re(s)?se(l)&&Q.includes(a)&&!le(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 ce(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}=de(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 ue=i(60416);var he=i(31274);var pe=i(52945);const me=(e,t,i)=>{var o,n,a,s,r,l,d,c,u,h,p,m,g,v,f,b,y,w,C;(0,ue.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,pe.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==a?a:(0,ue.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`),T=document.createElement("div");T.setAttribute("slot","top"),T.textContent=e.title;const O=document.createElement("div");O.setAttribute("slot","content"),O.textContent=(null==e?void 0:e.body)||"";const k=document.createElement("div");let I;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)&&(I=document.createElement("div"),I.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),I.appendChild(i)})),E.setAttribute("notify",(null===(p=null===(h=null==e?void 0:e.config)||void 0===h?void 0:h.toast)||void 0===p?void 0:p.type)||""),e.iconName&&E.setAttribute("notification-icon",e.iconName),(null===(g=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===g?void 0:g.autoClose)&&E.setAttribute("auto-close",`${null===(f=null===(v=null==e?void 0:e.config)||void 0===v?void 0:v.toast)||void 0===f?void 0:f.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&E.setAttribute("close-timeout",`${null===(C=null===(w=null==e?void 0:e.config)||void 0===w?void 0:w.toast)||void 0===C?void 0:C.closeTimeout}`),E.appendChild(T),E.appendChild(O),E.appendChild(k),I&&E.appendChild(I),S.prepend(E)},ge={alert:e=>{(0,ue.u_)(e),alert((0,ue.uP)(e))},toast:me,dialog:he.u,snackbar:(e,t)=>{(0,ue.u_)(e);const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`),n=(0,ue.jE)("snack-container",t);n&&(n.style.position="fixed",n.style.bottom="0",n.style.left="0"),n.appendChild(o),o.notification=e},banner:(e,t,i)=>{var o;(0,ue.u_)(e);const n=t.split("-")[0],a=document.createElement(`${n}-banner`),s=(0,ue.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}},ve=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{ge[o]&&ge[o](e,t,i)})};function fe(e,t,i){(null==t?void 0:t.trim())&&ve({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class be 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 N()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,i)=>{var o,n;return{groupIndex:t,clauseIndex:i,fieldLabel:this.getFieldLabel(e.field),operatorLabel:null!==(o=ee[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=K(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)if(null===(t=this.aiProvider)||void 0===t?void 0:t.interpretCriteria){this.isInterpreting=!0;try{const e=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],t=yield this.aiProvider.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 fe("AI criteria search","AI could not interpret the criteria",O(this)),void(this.isInterpreting=!1);const{valid:a,invalid:s}=ce(t.groups,this.fieldMetadata);if(s.length>0&&(fe("Criteria validation error",0===(n=s).length?"":1===n.length?n[0].message:n.map(e=>e.message).join("; "),O(this)),this.$emit("validation-errors",s)),a.length>0){const e=[...this.activeGroups,...a],t=K(e);this.lastValidCriteria=t,this.activeGroups=e,this.inputValue="",this.showingChips=!0,this.$emit("criteria-changed",t)}}catch(e){fe("AI criteria search",e instanceof Error?e.message:"Interpretation failed",O(this))}finally{this.isInterpreting=!1}var n}else fe("AI criteria search","AI provider not configured",O(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0)}clear(){this.inputValue="",this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit("criteria-changed",null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,void(this.isRecording=!1);this.inputValue="",this.showingChips=!1,this.stopRecording=function(e,t){if(!N())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let o="";return i.onresult=t=>{let i="",n="";for(let e=t.resultIndex;e<t.results.length;e+=1){const o=t.results[e][0].transcript;t.results[e].isFinal?n+=o:i+=o}n?(o+=n,e(o,!0)):i&&e(o+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}(0,C.Cg)([F],be.prototype,"aiProvider",void 0),(0,C.Cg)([l.attr],be.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],be.prototype,"disabled",void 0),(0,C.Cg)([l.observable],be.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],be.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],be.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],be.prototype,"activeGroups",void 0),(0,C.Cg)([l.observable],be.prototype,"showingChips",void 0),(0,C.Cg)([l.observable],be.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],be.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],be.prototype,"speechAvailable",null),(0,C.Cg)([l.volatile],be.prototype,"criteriaChips",null);const ye=void 0,we={},Ce=be.compose(Object.assign({baseName:"ai-criteria-search",template:U,styles:M,shadowOptions:ye},we)),xe=(e,t)=>l.css`
|
|
335
|
+
`;var G=i(95553),j=i(58749),V=i(14609),W=i(86636);const Y={contains:G.n.containsIgnoreCase,equals:G.n.EQ,startsWith:G.n.startsWith,endsWith:G.n.endsWith,greaterThan:G.n.GT,lessThan:G.n.LT,greaterThanOrEqual:G.n.GE,lessThanOrEqual:G.n.LE,notEqual:G.n.NE,dateIsToday:G.n.dateIsToday,dateIsAfter:G.n.dateIsGreaterEqual,dateIsGreaterEqual:G.n.dateIsGreaterEqual,dateIsBefore:G.n.dateIsLessEqual,dateIsLessEqual:G.n.dateIsLessEqual,dateIsEqual:G.n.dateIsEqual,dateTimeIsAfter:G.n.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:G.n.dateTimeIsGreaterEqual,dateTimeIsBefore:G.n.dateTimeIsLessEqual,dateTimeIsLessEqual:G.n.dateTimeIsLessEqual};function q(e){var t,i;const o=null!==(t=Y[e.operator])&&void 0!==t?t:G.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 V.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?W.r.Or():W.r.And(),s=K(e,a),r=e.length>1?{join:a}:{};n.negated?i.And([W.r.Not(),s]):i.And(1===e.length?e[0]:e,r),o=!0}return o?i.build():""}const Q=["contains","equals","startsWith","endsWith","notEqual"],J=["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)?J:Q}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)&&J.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=i(31274);var me=i(52945);const ge=(e,t,i)=>{var o,n,a,s,r,l,d,c,u,h,p,m,g,v,f,b,y,w,C;(0,he.u_)(e);const x=t.split("-")[0],$=(null===(n=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.toast)||void 0===n?void 0:n.position)||"top-right",S=null!==(a=null!=i?i:(e=>(0,me.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`),T=document.createElement("div");T.setAttribute("slot","top"),T.textContent=e.title;const O=document.createElement("div");O.setAttribute("slot","content"),O.textContent=(null==e?void 0:e.body)||"";const k=document.createElement("div");let I;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)&&(I=document.createElement("div"),I.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),I.appendChild(i)})),E.setAttribute("notify",(null===(p=null===(h=null==e?void 0:e.config)||void 0===h?void 0:h.toast)||void 0===p?void 0:p.type)||""),e.iconName&&E.setAttribute("notification-icon",e.iconName),(null===(g=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===g?void 0:g.autoClose)&&E.setAttribute("auto-close",`${null===(f=null===(v=null==e?void 0:e.config)||void 0===v?void 0:v.toast)||void 0===f?void 0:f.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&E.setAttribute("close-timeout",`${null===(C=null===(w=null==e?void 0:e.config)||void 0===w?void 0:w.toast)||void 0===C?void 0:C.closeTimeout}`),E.appendChild(T),E.appendChild(O),E.appendChild(k),I&&E.appendChild(I),S.prepend(E)},ve={alert:e=>{(0,he.u_)(e),alert((0,he.uP)(e))},toast:ge,dialog:pe.u,snackbar:(e,t)=>{(0,he.u_)(e);const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`),n=(0,he.jE)("snack-container",t);n&&(n.style.position="fixed",n.style.bottom="0",n.style.left="0"),n.appendChild(o),o.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}},fe=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{ve[o]&&ve[o](e,t,i)})};function be(e,t,i){(null==t?void 0:t.trim())&&fe({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class ye 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 N()}get criteriaChips(){return this.activeGroups.flatMap((e,t)=>e.clauses.map((e,i)=>{var o,n;return{groupIndex:t,clauseIndex:i,fieldLabel:this.getFieldLabel(e.field),operatorLabel:null!==(o=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 be("AI criteria search","AI could not interpret the criteria",O(this)),void(this.isInterpreting=!1);const{valid:s,invalid:r}=ue(t.groups,this.fieldMetadata);if(r.length>0&&(be("Criteria validation error",0===(a=r).length?"":1===a.length?a[0].message:a.map(e=>e.message).join("; "),O(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){be("AI criteria search",e instanceof Error?e.message:"Interpretation failed",O(this))}finally{this.isInterpreting=!1}var a}else be("AI criteria search","AI provider not configured",O(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.activeGroups.length>0&&(this.showingChips=!0)}clear(){this.inputValue="",this.lastValidCriteria=null,this.activeGroups=[],this.showingChips=!1,this.$emit("criteria-changed",null)}toggleSpeechInput(){if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,void(this.isRecording=!1);this.inputValue="",this.showingChips=!1,this.stopRecording=function(e,t){if(!N())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let o="";return i.onresult=t=>{let i="",n="";for(let e=t.resultIndex;e<t.results.length;e+=1){const o=t.results[e][0].transcript;t.results[e].isFinal?n+=o:i+=o}n?(o+=n,e(o,!0)):i&&e(o+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}(0,C.Cg)([M],ye.prototype,"providerRegistry",void 0),(0,C.Cg)([l.attr],ye.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ye.prototype,"disabled",void 0),(0,C.Cg)([l.observable],ye.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],ye.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],ye.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],ye.prototype,"activeGroups",void 0),(0,C.Cg)([l.observable],ye.prototype,"showingChips",void 0),(0,C.Cg)([l.observable],ye.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],ye.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],ye.prototype,"speechAvailable",null),(0,C.Cg)([l.volatile],ye.prototype,"criteriaChips",null);const we=void 0,Ce={},xe=ye.compose(Object.assign({baseName:"ai-criteria-search",template:B,styles:_,shadowOptions:we},Ce)),$e=(e,t)=>l.css`
|
|
336
336
|
:host {
|
|
337
337
|
display: flex;
|
|
338
338
|
justify-content: center;
|
|
@@ -462,9 +462,9 @@
|
|
|
462
462
|
margin-top: calc(var(--design-unit) * 3px);
|
|
463
463
|
width: 100%;
|
|
464
464
|
}
|
|
465
|
-
|
|
465
|
+
`,Se=l.html`
|
|
466
466
|
${e=>{return t=O(e),l.html`
|
|
467
|
-
${(0,l.when)(()=>
|
|
467
|
+
${(0,l.when)(()=>P(),l.html`
|
|
468
468
|
<div class="ai-indicator-container" part="ai-indicator-container">
|
|
469
469
|
<div
|
|
470
470
|
class=${e=>(0,x.x)("ai-indicator-badge",["green","available"===e.state||"server"===e.state],["amber","downloading"===e.state||"downloadable"===e.state],["red","unavailable"===e.state||"none"===e.state],["pulsing","downloading"===e.state||e.isInstalling])}
|
|
@@ -519,19 +519,19 @@
|
|
|
519
519
|
</div>
|
|
520
520
|
`)}
|
|
521
521
|
`;var t}}
|
|
522
|
-
`;class
|
|
522
|
+
`;class Ee 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],Ee.prototype,"providerRegistry",void 0),(0,C.Cg)([l.observable],Ee.prototype,"status",void 0),(0,C.Cg)([l.observable],Ee.prototype,"open",void 0),(0,C.Cg)([l.observable],Ee.prototype,"state",void 0),(0,C.Cg)([l.observable],Ee.prototype,"isInstalling",void 0),(0,C.Cg)([l.volatile],Ee.prototype,"chromeStatusLabel",null),(0,C.Cg)([l.volatile],Ee.prototype,"canInstall",null),(0,C.Cg)([l.volatile],Ee.prototype,"isDownloading",null);const Te=Ee.compose({baseName:"ai-indicator",template:Se,styles:$e}),Oe=(e,t)=>l.css`
|
|
523
523
|
${(0,r.anchorStyles)(e,t)}
|
|
524
|
-
`,
|
|
524
|
+
`,ke=(e,t)=>(0,s.anchorTemplate)(e,t);class Ie extends r.Anchor{}const De={delegatesFocus:!0,mode:"open"},Re={},Ae=Ie.compose(Object.assign({baseName:"anchor",template:ke,styles:Oe,shadowOptions:De},Re)),Ne=(e,t)=>(0,s.anchoredRegionTemplate)(e,t),Le=(e,t)=>l.css`
|
|
525
525
|
${(0,r.anchoredRegionStyles)(e,t)}
|
|
526
|
-
`;class
|
|
526
|
+
`;class Fe extends r.AnchoredRegion{}const Me={delegatesFocus:!0,mode:"open"},_e={},He=Fe.compose(Object.assign({baseName:"anchored-region",template:Ne,styles:Le,shadowOptions:Me},_e)),ze=(e,t)=>l.css`
|
|
527
527
|
${(0,r.avatarStyles)(e,t)}
|
|
528
|
-
`,
|
|
528
|
+
`,Pe=(e,t)=>(0,s.avatarTemplate)(e,t),Ue=l.html`
|
|
529
529
|
${(0,l.when)(e=>e.imgSrc,l.html`
|
|
530
530
|
<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />
|
|
531
531
|
`)}
|
|
532
|
-
`;class
|
|
532
|
+
`;class Be extends r.Avatar{}const Ge={delegatesFocus:!0,mode:"open"},je={media:Ue},Ve=Be.compose(Object.assign({baseName:"avatar",template:Pe,styles:ze,shadowOptions:Ge},je)),We=(e,t)=>l.css`
|
|
533
533
|
${(0,r.badgeStyles)(e,t)}
|
|
534
|
-
`,
|
|
534
|
+
`,Ye=(e,t)=>(0,s.badgeTemplate)(e,t);class qe extends r.Badge{}const Ke=void 0,Xe={},Qe=qe.compose(Object.assign({baseName:"badge",template:Ye,styles:We,shadowOptions:Ke},Xe));var Je=i(36304);const Ze=(0,Je.createLogger)("foundation-ui"),et=l.css`
|
|
535
535
|
@keyframes delete-animate {
|
|
536
536
|
from {
|
|
537
537
|
height: 100px;
|
|
@@ -603,7 +603,7 @@
|
|
|
603
603
|
flex: 1;
|
|
604
604
|
overflow: hidden;
|
|
605
605
|
}
|
|
606
|
-
`,
|
|
606
|
+
`,tt=e=>l.html`
|
|
607
607
|
<div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${(0,l.ref)("banner")}>
|
|
608
608
|
<div part="content" class="content">
|
|
609
609
|
<slot name="content">
|
|
@@ -632,23 +632,23 @@
|
|
|
632
632
|
</slot>
|
|
633
633
|
</div>
|
|
634
634
|
</div>
|
|
635
|
-
`,
|
|
636
|
-
${e=>
|
|
637
|
-
`,
|
|
635
|
+
`,it=l.html`
|
|
636
|
+
${e=>tt(O(e))}
|
|
637
|
+
`,ot={mode:"open",delegatesFocus:!0};class nt 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){Ze.error(e)}})}}(0,C.Cg)([l.observable],nt.prototype,"dismissAnimation",void 0),(0,C.Cg)([l.observable],nt.prototype,"notification",void 0);const at=nt.compose({baseName:"banner",styles:et,template:it,shadowOptions:ot}),st=(e,t)=>l.css`
|
|
638
638
|
${(0,r.breadcrumbStyles)(e,t)}
|
|
639
|
-
`,
|
|
639
|
+
`,rt=(e,t)=>(0,s.breadcrumbTemplate)(e,t);class lt extends r.Breadcrumb{}const dt=void 0,ct={},ut=lt.compose(Object.assign({baseName:"breadcrumb",template:rt,styles:st,shadowOptions:dt},ct)),ht=(e,t)=>l.css`
|
|
640
640
|
${(0,r.breadcrumbItemStyles)(e,t)}
|
|
641
|
-
`,
|
|
641
|
+
`,pt=(e,t)=>(0,s.breadcrumbItemTemplate)(e,t);class mt extends r.BreadcrumbItem{}const gt=void 0,vt={separator:"/"},ft=mt.compose(Object.assign({baseName:"breadcrumb-item",template:pt,styles:ht,shadowOptions:gt},vt)),bt=(e,t)=>l.css`
|
|
642
642
|
${(0,r.buttonStyles)(e,t)}
|
|
643
|
-
`,
|
|
643
|
+
`,yt=(e,t)=>(0,s.buttonTemplate)(e,t);class wt extends r.Button{}const Ct={delegatesFocus:!0,mode:"open"},xt={},$t=wt.compose(Object.assign({baseName:"button",template:yt,styles:bt,shadowOptions:Ct},xt)),St=()=>l.css`
|
|
644
644
|
${r.CalendarStyles}
|
|
645
|
-
`,
|
|
645
|
+
`,Et=(e,t)=>(0,s.calendarTemplate)(e,t);class Tt extends r.Calendar{}const Ot={delegatesFocus:!0,mode:"open"},kt={},It=Tt.compose(Object.assign({baseName:"calendar",template:Et,styles:St,shadowOptions:Ot},kt)),Dt=(e,t)=>l.css`
|
|
646
646
|
${(0,r.cardStyles)(e,t)}
|
|
647
647
|
:host {
|
|
648
648
|
background-color: var(--fui-card-fill-color);
|
|
649
649
|
color: var(--fui-card-foreground-color);
|
|
650
650
|
}
|
|
651
|
-
`,
|
|
651
|
+
`,Rt=(e,t)=>(0,s.cardTemplate)(e,t);class At extends r.Card{}const Nt=void 0,Lt={},Ft=At.compose(Object.assign({baseName:"card",template:Rt,styles:Dt,shadowOptions:Nt},Lt));var Mt;!function(e){e.BELOW="below",e.ABOVE="above"}(Mt||(Mt={}));const _t=450,Ht=l.css`
|
|
652
652
|
.root {
|
|
653
653
|
position: relative;
|
|
654
654
|
width: 100%;
|
|
@@ -836,9 +836,9 @@
|
|
|
836
836
|
|
|
837
837
|
.visible {
|
|
838
838
|
visibility: visible;
|
|
839
|
-
max-height: ${
|
|
839
|
+
max-height: ${_t.toString()}px;
|
|
840
840
|
}
|
|
841
|
-
`,
|
|
841
|
+
`,zt=(e="foundation")=>l.html`
|
|
842
842
|
<div class="root" part="root">
|
|
843
843
|
<div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}>
|
|
844
844
|
<label
|
|
@@ -861,7 +861,7 @@
|
|
|
861
861
|
<${e}-text-field
|
|
862
862
|
id="filter-search"
|
|
863
863
|
part="filter-search"
|
|
864
|
-
value=${(0,
|
|
864
|
+
value=${(0,U.O)(e=>e.filterSearchValue,"string","input")}
|
|
865
865
|
placeholder="${e=>e.getPlaceholder}"
|
|
866
866
|
@input=${(e,t)=>e.setFilter()}
|
|
867
867
|
@change=${(e,t)=>e.changeHandler(t.event)}
|
|
@@ -907,11 +907,11 @@
|
|
|
907
907
|
</div>
|
|
908
908
|
</div>
|
|
909
909
|
</div>
|
|
910
|
-
`,
|
|
911
|
-
${
|
|
912
|
-
`,
|
|
910
|
+
`,Pt=l.html`
|
|
911
|
+
${zt()}
|
|
912
|
+
`,Ut=void 0,Bt={};class Gt 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=Mt.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===Mt.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?Mt.BELOW:Mt.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<t.height&&o>n?Mt.ABOVE:Mt.BELOW}}e===Mt.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===Mt.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],Gt.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Gt.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gt.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gt.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Gt.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Gt.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Gt.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Gt.prototype,"open",void 0),(0,C.Cg)([l.observable],Gt.prototype,"options",void 0),(0,C.Cg)([l.observable],Gt.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Gt.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Gt.prototype,"position",void 0),(0,C.Cg)([l.volatile],Gt.prototype,"getPlaceholder",null);const jt=Gt.compose(Object.assign({baseName:"categorized-multiselect",template:Pt,styles:Ht,shadowOptions:Ut},Bt)),Vt=(e,t)=>l.css`
|
|
913
913
|
${(0,r.checkboxStyles)(e,t)}
|
|
914
|
-
`,Vt=(e,t)=>(0,s.checkboxTemplate)(e,t);class Wt extends r.Checkbox{}const Yt=void 0,qt={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 '},Kt=Wt.compose(Object.assign({baseName:"checkbox",template:Vt,styles:jt,shadowOptions:Yt},qt));var Xt=i(62051),Qt=i.n(Xt),Jt=i(40370),Zt=i(6884),ei=i(96730),ti=i(21281),ii=i(34193),oi=i(41119),ni=i(26347),ai=i(9033),si=i(12066),ri=i(97156);class li extends((0,Jt.C)(s.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=Zt.OD.MAX_ROWS_250,this.maxView=Zt.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.rowId="ROW_REF",this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new ri.t(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==(0,ei.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}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return(0,C.sH)(this,arguments,void 0,function*(e=!0){var t;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0,this.fetchGeneration+=1;const i=this.fetchGeneration,o=()=>i!==this.fetchGeneration;if(this.data)return void this.syncComponentData(this.data);const n=e||!this.datasource.initialized;n||(this.connect.dataLogoff(this.sourceRef),this.clearData());const a=yield this.datasource.init(this.datasourceOptions(),n);if(!o())if(a){if(this.isSnapshot){const e=yield this.datasource.snapshotFiltered();if(o())return;return void this.syncComponentData(e)}Je.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(o())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF;const t=e.MESSAGE_TYPE;if(t&&t===ti.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,ii.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)})}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){"ROW_REF"!==this.rowId&&(null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.rowId],e)}));const t=this.rowsSyncedWithStream.size>0?Array.from(this.rowsSyncedWithStream.values()):e.REPLY;return void this.syncComponentData(t)}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.rowId],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,ei.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&&Je[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===oi.w.DATE||t===oi.w.DATETIME?(0,si.Ey)(e,t===oi.w.DATETIME):e}}function di(e,t){var i;const o=new j.b;o.withExpression((new G.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(B.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var ci;(0,C.Cg)([ni.dm],li.prototype,"connect",void 0),(0,C.Cg)([ai.yW],li.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],li.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],li.prototype,"criteria",void 0),(0,C.Cg)([l.observable],li.prototype,"data",void 0),(0,C.Cg)([l.attr],li.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],li.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],li.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],li.prototype,"maxView",void 0),(0,C.Cg)([l.attr],li.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],li.prototype,"request",void 0),(0,C.Cg)([l.attr],li.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],li.prototype,"reverse",void 0),(0,C.Cg)([l.attr],li.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],li.prototype,"withTimestampFormatting",void 0);let ui=ci=class extends li{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",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;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:`${O(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.fetchData(),this.valueField||Je.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),this.select.removeEventListener("change",this.selectChangeHandler)}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))?di(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof ci||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"))}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.options=t.map(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)}});if(this.options.map(({value:e,label:t})=>{const i=document.createElement(this.optionElement);return i.textContent=t||e,i.value=e,i}).forEach(e=>{this.select.appendChild(e),this.resizeObserver.observe(e)}),!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async){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{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);const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(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){Je.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Je.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Je.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],ui.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],ui.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],ui.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],ui.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],ui.prototype,"allowCustomOptions",void 0),(0,C.Cg)([l.observable],ui.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],ui.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],ui.prototype,"initialSelectedValue",void 0),ui=ci=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],ui);const hi=(e,t)=>l.css`
|
|
914
|
+
`,Wt=(e,t)=>(0,s.checkboxTemplate)(e,t);class Yt extends r.Checkbox{}const qt=void 0,Kt={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 '},Xt=Yt.compose(Object.assign({baseName:"checkbox",template:Wt,styles:Vt,shadowOptions:qt},Kt));var Qt=i(62051),Jt=i.n(Qt),Zt=i(40370),ei=i(6884),ti=i(96730),ii=i(21281),oi=i(34193),ni=i(41119),ai=i(26347),si=i(9033),ri=i(12066),li=i(97156);class di extends((0,Zt.C)(s.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=ei.OD.MAX_ROWS_250,this.maxView=ei.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.rowId="ROW_REF",this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new li.t(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==(0,ti.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}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return(0,C.sH)(this,arguments,void 0,function*(e=!0){var t;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0,this.fetchGeneration+=1;const i=this.fetchGeneration,o=()=>i!==this.fetchGeneration;if(this.data)return void this.syncComponentData(this.data);const n=e||!this.datasource.initialized;n||(this.connect.dataLogoff(this.sourceRef),this.clearData());const a=yield this.datasource.init(this.datasourceOptions(),n);if(!o())if(a){if(this.isSnapshot){const e=yield this.datasource.snapshotFiltered();if(o())return;return void this.syncComponentData(e)}Ze.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(o())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF;const t=e.MESSAGE_TYPE;if(t&&t===ii.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,oi.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)})}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){"ROW_REF"!==this.rowId&&(null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.rowId],e)}));const t=this.rowsSyncedWithStream.size>0?Array.from(this.rowsSyncedWithStream.values()):e.REPLY;return void this.syncComponentData(t)}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.rowId],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,ti.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&&Ze[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===ni.w.DATE||t===ni.w.DATETIME?(0,ri.Ey)(e,t===ni.w.DATETIME):e}}function ci(e,t){var i;const o=new V.b;o.withExpression((new j.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(G.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var ui;(0,C.Cg)([ai.dm],di.prototype,"connect",void 0),(0,C.Cg)([si.yW],di.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],di.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],di.prototype,"criteria",void 0),(0,C.Cg)([l.observable],di.prototype,"data",void 0),(0,C.Cg)([l.attr],di.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],di.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],di.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],di.prototype,"maxView",void 0),(0,C.Cg)([l.attr],di.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],di.prototype,"request",void 0),(0,C.Cg)([l.attr],di.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],di.prototype,"reverse",void 0),(0,C.Cg)([l.attr],di.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],di.prototype,"withTimestampFormatting",void 0);let hi=ui=class extends di{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",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;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:`${O(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.fetchData(),this.valueField||Ze.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),this.select.removeEventListener("change",this.selectChangeHandler)}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))?ci(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof ui||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"))}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.options=t.map(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)}});if(this.options.map(({value:e,label:t})=>{const i=document.createElement(this.optionElement);return i.textContent=t||e,i.value=e,i}).forEach(e=>{this.select.appendChild(e),this.resizeObserver.observe(e)}),!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async){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{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);const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(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){Ze.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Ze.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Ze.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],hi.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],hi.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],hi.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],hi.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],hi.prototype,"allowCustomOptions",void 0),(0,C.Cg)([l.observable],hi.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],hi.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],hi.prototype,"initialSelectedValue",void 0),hi=ui=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],hi);const pi=(e,t)=>l.css`
|
|
915
915
|
.combo-box-indicator {
|
|
916
916
|
transition-property: transform;
|
|
917
917
|
transition-duration: 0.2s;
|
|
@@ -923,7 +923,7 @@
|
|
|
923
923
|
}
|
|
924
924
|
|
|
925
925
|
${(0,r.comboboxStyles)(e,t)}
|
|
926
|
-
`,
|
|
926
|
+
`,mi=(e,t)=>l.html`
|
|
927
927
|
<template
|
|
928
928
|
aria-activedescendant="${e=>e.activeDescendant}"
|
|
929
929
|
class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}"
|
|
@@ -977,7 +977,7 @@
|
|
|
977
977
|
></slot>
|
|
978
978
|
</div>
|
|
979
979
|
</template>
|
|
980
|
-
`;var
|
|
980
|
+
`;var gi,vi;class fi extends r.Combobox{constructor(){super(...arguments),gi.set(this,void 0),vi.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=Jt()(this.asyncSetFilter,t)}openChanged(){super.openChanged(),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){const i=!!this.async;super.slottedOptionsChanged(e,t),this.updateValue(i)}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(T(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!T(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if((0,C.GG)(this,vi,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,vi,"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,gi,"f")||(0,C.GG)(this,gi,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,C.gn)(this,gi,"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 hi);t.length>0?(ci(t[0],this.control.value),l.DOM.queueUpdate(()=>{this.control.value=e})):Ze.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)}}gi=new WeakMap,vi=new WeakMap,(0,C.Cg)([l.observable],fi.prototype,"activeDescendant",null),(0,C.Cg)([l.observable],fi.prototype,"slottedDatasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],fi.prototype,"async",void 0),(0,C.Cg)([l.attr],fi.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"case-sensitive"})],fi.prototype,"caseSensitive",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"ignore-input-click"})],fi.prototype,"ignoreInputClick",void 0),(0,C.Cg)([(0,l.attr)({attribute:"filter-mode"})],fi.prototype,"filterMode",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],fi.prototype,"scrollToSelectedWhenOpening",void 0),(0,C.Cg)([l.observable],fi.prototype,"scrollToSelectedWhenOpeningOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-when-selection-changes"})],fi.prototype,"scrollWhenSelectionChanges",void 0),(0,C.Cg)([l.observable],fi.prototype,"scrollWhenSelectionChangesOptions",void 0);const bi={delegatesFocus:!0,mode:"open"},yi={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 '},wi=fi.compose(Object.assign({baseName:"combobox",template:mi,styles:pi,shadowOptions:bi},yi));var Ci=i(98316);const xi=(e,t)=>l.css`
|
|
981
981
|
:host {
|
|
982
982
|
--light-size: 12px;
|
|
983
983
|
--height: calc(var(--design-unit) * 2px + var(--light-size));
|
|
@@ -1025,18 +1025,18 @@
|
|
|
1025
1025
|
text-overflow: ellipsis;
|
|
1026
1026
|
white-space: nowrap;
|
|
1027
1027
|
}
|
|
1028
|
-
|
|
1028
|
+
`,$i=l.html`
|
|
1029
1029
|
<div class=${e=>(0,x.x)(["light",!0],[e.colour,!0])}></div>
|
|
1030
1030
|
${(0,l.when)(e=>e.showLabel,l.html`
|
|
1031
1031
|
<div class="label">${e=>e.label}</div>
|
|
1032
1032
|
`)}
|
|
1033
|
-
`;class
|
|
1033
|
+
`;class Si 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)([ai.dm],Si.prototype,"connect",void 0),(0,C.Cg)([Ci.N],Si.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-label"})],Si.prototype,"showLabel",void 0),(0,C.Cg)([l.observable],Si.prototype,"label",void 0),(0,C.Cg)([l.observable],Si.prototype,"colour",void 0);const Ei=Si.compose({baseName:"connection-indicator",template:$i,styles:xi}),Ti=(e,t)=>l.css`
|
|
1034
1034
|
${(0,r.dataGridStyles)(e,t)}
|
|
1035
|
-
`,
|
|
1035
|
+
`,Oi=(e,t)=>(0,s.dataGridTemplate)(e,t);class ki extends r.DataGrid{}const Ii=void 0,Di={},Ri=ki.compose(Object.assign({baseName:"data-grid",template:Oi,styles:Ti,shadowOptions:Ii},Di)),Ai=(e,t)=>l.css`
|
|
1036
1036
|
${(0,r.dataGridCellStyles)(e,t)}
|
|
1037
|
-
`;class
|
|
1037
|
+
`;class Ni extends r.DataGridCell{}const Li=void 0,Fi={},Mi=Ni.compose(Object.assign({baseName:"data-grid-cell",template:s.dataGridCellTemplate,styles:Ai,shadowOptions:Li},Fi)),_i=(e,t)=>l.css`
|
|
1038
1038
|
${(0,r.dataGridRowStyles)(e,t)}
|
|
1039
|
-
`;class
|
|
1039
|
+
`;class Hi extends r.DataGridRow{}const zi=void 0,Pi={},Ui=Hi.compose(Object.assign({baseName:"data-grid-row",template:s.dataGridRowTemplate,styles:_i,shadowOptions:zi},Pi));var Bi=i(94343),Gi=i.n(Bi),ji=i(58915),Vi=i.n(ji),Wi=i(7554),Yi=i.n(Wi),qi=i(49916),Ki=i.n(qi),Xi=i(33839),Qi=i.n(Xi);class Ji{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()}}Gi().extend(Qi());class Zi{constructor(e=null,t="default"){const i=new Ji(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+=Gi()(i.date).isLeapYear()?1:0)}getDay(e){return new Ji(new Date(this.year,this.number-1,e),this.lang)}}Gi().extend(Qi());class eo{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new Ji(null,i),this.year=null!=e?e:this.today.year,this.month=new Zi(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 Zi(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new Zi(new Date(this.year-1,11),this.lang):new Zi(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new Zi(new Date(this.year+1,0),this.lang):new Zi(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new Zi(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new Zi(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new Zi(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new Zi(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new Zi(new Date(this.year,this.month.number-1-1),this.lang)}}const to=l.css`
|
|
1040
1040
|
:host {
|
|
1041
1041
|
position: relative;
|
|
1042
1042
|
}
|
|
@@ -1192,7 +1192,7 @@
|
|
|
1192
1192
|
.date-toggle[readonly] .label {
|
|
1193
1193
|
cursor: pointer;
|
|
1194
1194
|
}
|
|
1195
|
-
`,
|
|
1195
|
+
`,io=[1,7],oo=e=>l.html`
|
|
1196
1196
|
<${e}-text-field data-test-id="date-picker" readonly :value="${e=>e.formatDate}" part="date-toggle" class="date-toggle" @click="${e=>e.toggleCalendar()}">
|
|
1197
1197
|
${e=>e.label}
|
|
1198
1198
|
<div class="input-icon-container" part="input-icon-container" slot="end"><${e}-icon variant="regular" name="calendar-alt" size="sm"></${e}-icon></div>
|
|
@@ -1211,7 +1211,7 @@
|
|
|
1211
1211
|
</div>
|
|
1212
1212
|
<div class="week-days ${e=>(0,x.x)(["hide-weekends",e.hideWeekends])}">
|
|
1213
1213
|
${(0,l.repeat)(e=>{var t;return null===(t=e.calendar)||void 0===t?void 0:t.weekDays},l.html`
|
|
1214
|
-
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===
|
|
1214
|
+
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===io.indexOf(t.index+1),l.html`
|
|
1215
1215
|
<span
|
|
1216
1216
|
class="${(e,t)=>(0,x.x)(["disabled",-1!==t.parent.disabledDaysOfWeek.indexOf(t.index+1)])}"
|
|
1217
1217
|
>
|
|
@@ -1222,7 +1222,7 @@
|
|
|
1222
1222
|
</div>
|
|
1223
1223
|
<div class="month-days ${e=>(0,x.x)(["hide-weekends",e.hideWeekends])}">
|
|
1224
1224
|
${(0,l.repeat)(e=>e.monthList,l.html`
|
|
1225
|
-
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===
|
|
1225
|
+
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===io.indexOf(e.dayNumber),l.html`
|
|
1226
1226
|
<button
|
|
1227
1227
|
?disabled="${(e,t)=>-1!==t.parent.disabledDaysOfWeek.indexOf(e.dayNumber)}"
|
|
1228
1228
|
class="month-day
|
|
@@ -1237,44 +1237,44 @@
|
|
|
1237
1237
|
</div>
|
|
1238
1238
|
<slot name="bottom"></slot>
|
|
1239
1239
|
</div>
|
|
1240
|
-
`,
|
|
1241
|
-
${e=>
|
|
1242
|
-
`;var
|
|
1240
|
+
`,no=l.html`
|
|
1241
|
+
${e=>oo(O(e))}
|
|
1242
|
+
`;var ao=i(28745);const so=[1,2,3,4,5,6,7],ro=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=so.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 Ji(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,s),i):(ao.v.warn("Date picker disabled days - all days of week have been disabled"),t)},lo=void 0,co={};class uo extends s.FoundationElement{constructor(){super(...arguments),this.format="MM-DD-YYYY",this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[]}formatChanged(e,t){t&&this.calendar&&(this.formatDate=Gi()(this.currentDate.Date).format(t))}inlineCalendarChanged(){this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){if(t&&this.calendar){const e=Gi()().localeData().longDateFormat("L");this.currentDate=new Ji(Gi()(t,e).toDate(),this.lang),this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=Gi()(this.currentDate.Date).format(this.format),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}}connectedCallback(){var e;super.connectedCallback(),Gi().extend(Vi()),Gi().extend(Ki()),Gi().extend(Yi()),this.substringNumber=3;const t=this.value,i=t?Gi()(t,"MM-DD-YYYY"):Gi()();let o=new Ji(i.toDate(),this.lang);(null===(e=this.disabledDaysOfWeek)||void 0===e?void 0:e.length)&&(o=ro(this.disabledDaysOfWeek,o,this.lang)),this.currentDate=o,this.calendar=new eo(this.currentDate.year,this.currentDate.monthNumber,this.lang),this.value=Gi()(this.currentDate.Date).format("MM-DD-YYYY"),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.formatDate=Gi()(this.currentDate.Date).format(this.format),this.monthList=this.getMonthDaysGrid()}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}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 Gi()(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){Gi()(e.Date).isSame(this.currentDate.Date)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=Gi()(this.currentDate.Date).format(this.format),this.value=Gi()(e.Date).format("MM-DD-YYYY"),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],uo.prototype,"format",void 0),(0,C.Cg)([l.attr],uo.prototype,"lang",void 0),(0,C.Cg)([l.attr],uo.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],uo.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],uo.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],uo.prototype,"position",void 0),(0,C.Cg)([l.attr],uo.prototype,"label",void 0),(0,C.Cg)([l.attr],uo.prototype,"value",void 0),(0,C.Cg)([l.observable],uo.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],uo.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],uo.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],uo.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],uo.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],uo.prototype,"monthList",void 0),(0,C.Cg)([l.observable],uo.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],uo.prototype,"calendar",void 0);const ho=uo.compose(Object.assign({baseName:"date-picker",styles:to,template:no,shadowOptions:lo},co));var po=i(83912);const mo=r.SwatchRGB.create(1,1,1),go=r.SwatchRGB.create(0,0,0),vo=(0,po.parseColorHexRGB)("#585858"),fo=r.SwatchRGB.create(vo.r,vo.g,vo.b),bo=(0,po.parseColorHexRGB)("#ffffff"),yo=r.SwatchRGB.create(bo.r,bo.g,bo.b),wo=r.PaletteRGB.from(yo),Co=(0,po.parseColorHexRGB)("#eeeeee"),xo=r.SwatchRGB.create(Co.r,Co.g,Co.b),$o=r.PaletteRGB.from(xo),So=(0,po.parseColorHexRGB)("#08c3a5"),Eo=r.SwatchRGB.create(So.r,So.g,So.b),To=r.PaletteRGB.from(Eo),{create:Oo}=s.DesignToken,ko=Oo("fui-fill-color").withDefault(fo),Io=Oo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(yo),Do=14;function Ro(e,t){return e.colorContrast(t,Do)}const Ao=Oo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>Ro(Oo("fui-card-palette").withDefault(wo).getValueFor(e),Io.getValueFor(e))),No=(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]=No(n,o)}),i)};var Lo=i(80273);const Fo={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 Mo{constructor(){this.value=null}}(0,C.Cg)([l.observable],Mo.prototype,"value",void 0);const _o=new Mo,Ho=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const n=`${i}Value`;t[n]&&o(e[i],t[n])})};function zo(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const Po={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,po.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},Uo=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,po.parseColorHexRGB)(e))),Bo=(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)):Bo(e,o,n))})},Go=["baseClass","baseName","shadowOptions","styles","template"],jo=(e,t=Go)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),Vo=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:jo(t)}},Wo=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},Yo=()=>_o,qo=(...e)=>{const t=_o.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)},Ko=(e,t)=>{const i=No(Fo,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,Uo(o.color.accent.$value)),r.neutralPalette.setValueFor(e,Uo(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,Wo(n,Lo.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,Wo(a,Lo.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,Wo(n,Lo.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,Wo(a,Lo.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,Wo(n,Lo.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,Wo(a,Lo.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,Wo(n,Lo.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,Wo(a,Lo.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,Wo(n,Lo.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,Wo(a,Lo.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,Wo(n,Lo.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,Wo(a,Lo.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,Wo(n,Lo.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,Wo(a,Lo.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,Wo(n,Lo.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,Wo(a,Lo.Du.plusSix)),i.customTokens&&Bo(e,i.customTokens),_o.value=structuredClone(i)},Xo=Uo("#08c3a5"),Qo=Uo("#eeeeee"),Jo=r.StandardLuminance.DarkMode;const Zo=i(85109).O.ltr,en=4,tn=4;var on=i(85090);const nn=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,an=l.css`
|
|
1243
1243
|
${(0,s.display)("flex")}
|
|
1244
1244
|
:host {
|
|
1245
1245
|
flex: 1;
|
|
1246
1246
|
}
|
|
1247
|
-
`,
|
|
1247
|
+
`,sn=l.css`
|
|
1248
1248
|
:host {
|
|
1249
|
-
background-color: ${
|
|
1249
|
+
background-color: ${ko};
|
|
1250
1250
|
}
|
|
1251
1251
|
`.withBehaviors((0,s.forcedColorsStylesheetBehavior)(l.css`
|
|
1252
1252
|
:host {
|
|
1253
|
-
background-color: ${
|
|
1254
|
-
box-shadow: 0 0 0 1px ${
|
|
1255
|
-
color: ${
|
|
1253
|
+
background-color: ${on.A.ButtonFace};
|
|
1254
|
+
box-shadow: 0 0 0 1px ${on.A.CanvasText};
|
|
1255
|
+
color: ${on.A.ButtonText};
|
|
1256
1256
|
}
|
|
1257
|
-
`)),
|
|
1257
|
+
`)),rn=(e,t)=>l.css`
|
|
1258
1258
|
${e.name} ${"h"+t} {
|
|
1259
1259
|
margin: 0;
|
|
1260
1260
|
}
|
|
1261
|
-
`;class
|
|
1261
|
+
`;class ln extends r.DesignSystemProvider{constructor(){super(),Ho(o,n,this)}}(0,C.Cg)([(0,l.attr)({attribute:"card-fill-color",converter:Po}),zo(Io)],ln.prototype,"cardFillColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"card-foreground-color",converter:Po}),zo(Ao)],ln.prototype,"cardForegroundColor",void 0);const dn=ln.compose({baseName:"design-system-provider",template:l.html`
|
|
1262
1262
|
<slot></slot>
|
|
1263
1263
|
`,styles:e=>{const t=(e=>l.css`
|
|
1264
|
-
${
|
|
1265
|
-
${
|
|
1266
|
-
${
|
|
1267
|
-
${
|
|
1268
|
-
${
|
|
1269
|
-
${
|
|
1264
|
+
${rn(e,"1")}
|
|
1265
|
+
${rn(e,"2")}
|
|
1266
|
+
${rn(e,"3")}
|
|
1267
|
+
${rn(e,"4")}
|
|
1268
|
+
${rn(e,"5")}
|
|
1269
|
+
${rn(e,"6")}
|
|
1270
1270
|
`)(e);return t.addStylesTo(document),l.css`
|
|
1271
|
-
${nn}
|
|
1272
1271
|
${an}
|
|
1272
|
+
${sn}
|
|
1273
1273
|
${t}
|
|
1274
1274
|
:host * {
|
|
1275
|
-
${
|
|
1275
|
+
${nn()}
|
|
1276
1276
|
}
|
|
1277
|
-
`}});var
|
|
1277
|
+
`}});var cn=i(40543);const un=l.css`
|
|
1278
1278
|
:host {
|
|
1279
1279
|
--dialog-close-icon-display: flex;
|
|
1280
1280
|
--dialog-min-width: 358px;
|
|
@@ -1547,7 +1547,7 @@
|
|
|
1547
1547
|
dialog[style*='position: fixed'] {
|
|
1548
1548
|
margin: 0;
|
|
1549
1549
|
}
|
|
1550
|
-
`;var
|
|
1550
|
+
`;var hn=i(70997);const pn=l.html`
|
|
1551
1551
|
<slot>
|
|
1552
1552
|
${(0,l.when)(e=>e.notification,l.html`
|
|
1553
1553
|
<div class="details">
|
|
@@ -1555,7 +1555,7 @@
|
|
|
1555
1555
|
</div>
|
|
1556
1556
|
`)}
|
|
1557
1557
|
</slot>
|
|
1558
|
-
`,
|
|
1558
|
+
`,mn=e=>l.html`
|
|
1559
1559
|
<dialog ${(0,l.ref)("mainElement")} part="dialog" type=${e=>e.type}>
|
|
1560
1560
|
<div class="content-wrapper" part="content">
|
|
1561
1561
|
<div part="top" class="top" ${(0,l.ref)("topElement")}>
|
|
@@ -1575,9 +1575,9 @@
|
|
|
1575
1575
|
`)}
|
|
1576
1576
|
</div>
|
|
1577
1577
|
</div>
|
|
1578
|
-
${(0,
|
|
1579
|
-
<div class="content-container" part="content-container">${
|
|
1580
|
-
`,
|
|
1578
|
+
${(0,hn.q)(e=>e.resizable,l.html`
|
|
1579
|
+
<div class="content-container" part="content-container">${pn}</div>
|
|
1580
|
+
`,pn)}
|
|
1581
1581
|
<div part="bottom" class="bottom">
|
|
1582
1582
|
<slot name="bottom">
|
|
1583
1583
|
${(0,l.when)(e=>e.notification,l.html`
|
|
@@ -1607,13 +1607,13 @@
|
|
|
1607
1607
|
<div class="resize-handle resize-handle-sw" data-direction="sw"></div>
|
|
1608
1608
|
`)}
|
|
1609
1609
|
</dialog>
|
|
1610
|
-
`,
|
|
1611
|
-
${e=>
|
|
1612
|
-
`,gn={mode:"open",delegatesFocus:!0},vn={};class fn 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||dn.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){Je.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],fn.prototype,"notification",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],fn.prototype,"type",void 0),(0,C.Cg)([l.attr],fn.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-close-icon"})],fn.prototype,"showCloseIcon",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"resizable"})],fn.prototype,"resizable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],fn.prototype,"draggable",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-width"})],fn.prototype,"minWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-height"})],fn.prototype,"minHeight",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-width"})],fn.prototype,"initialWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-height"})],fn.prototype,"initialHeight",void 0),(0,C.Cg)([l.observable],fn.prototype,"onShowCallback",void 0),(0,C.Cg)([l.observable],fn.prototype,"onCloseCallback",void 0),(0,C.Cg)([l.observable],fn.prototype,"isMaximized",void 0),(0,C.Cg)([l.observable],fn.prototype,"hasBeenResized",void 0),(0,C.Cg)([l.volatile],fn.prototype,"open",null),(0,C.Cg)([l.volatile],fn.prototype,"resizeIconName",null);class bn extends fn{show(){this.onShowCallback&&this.onShowCallback(),this.mainElement.show()}}const yn=bn.compose(Object.assign({baseName:"dialog",styles:cn,template:mn,shadowOptions:gn},vn)),wn=(e,t)=>l.css`
|
|
1610
|
+
`,gn=l.html`
|
|
1611
|
+
${e=>mn(O(e))}
|
|
1612
|
+
`,vn={mode:"open",delegatesFocus:!0},fn={};class bn 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||cn.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){Ze.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],bn.prototype,"notification",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],bn.prototype,"type",void 0),(0,C.Cg)([l.attr],bn.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-close-icon"})],bn.prototype,"showCloseIcon",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"resizable"})],bn.prototype,"resizable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],bn.prototype,"draggable",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-width"})],bn.prototype,"minWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-height"})],bn.prototype,"minHeight",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-width"})],bn.prototype,"initialWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-height"})],bn.prototype,"initialHeight",void 0),(0,C.Cg)([l.observable],bn.prototype,"onShowCallback",void 0),(0,C.Cg)([l.observable],bn.prototype,"onCloseCallback",void 0),(0,C.Cg)([l.observable],bn.prototype,"isMaximized",void 0),(0,C.Cg)([l.observable],bn.prototype,"hasBeenResized",void 0),(0,C.Cg)([l.volatile],bn.prototype,"open",null),(0,C.Cg)([l.volatile],bn.prototype,"resizeIconName",null);class yn extends bn{show(){this.onShowCallback&&this.onShowCallback(),this.mainElement.show()}}const wn=yn.compose(Object.assign({baseName:"dialog",styles:un,template:gn,shadowOptions:vn},fn)),Cn=(e,t)=>l.css`
|
|
1613
1613
|
${(0,r.disclosureStyles)(e,t)}
|
|
1614
|
-
`,
|
|
1614
|
+
`,xn=(e,t)=>(0,s.disclosureTemplate)(e,t);class $n extends s.Disclosure{}const Sn=void 0,En={},Tn=$n.compose(Object.assign({baseName:"disclosure",template:xn,styles:Cn,shadowOptions:Sn},En)),On=(e,t)=>l.css`
|
|
1615
1615
|
${(0,r.dividerStyles)(e,t)}
|
|
1616
|
-
`,
|
|
1616
|
+
`,kn=(e,t)=>(0,s.dividerTemplate)(e,t);class In extends s.Divider{}const Dn=void 0,Rn={},An=In.compose(Object.assign({baseName:"divider",template:kn,styles:On,shadowOptions:Dn},Rn)),Nn=(e,t,i)=>l.css`
|
|
1617
1617
|
:host {
|
|
1618
1618
|
--dropdown-opener-height-multiplier: 0.7px;
|
|
1619
1619
|
--menu-item-height-multiplier: 0.7px;
|
|
@@ -1676,9 +1676,9 @@
|
|
|
1676
1676
|
var(--menu-item-height-multiplier)
|
|
1677
1677
|
);
|
|
1678
1678
|
}
|
|
1679
|
-
`,
|
|
1680
|
-
${
|
|
1681
|
-
`,
|
|
1679
|
+
`,Ln=(e,t)=>l.css`
|
|
1680
|
+
${Nn("foundation",e,t)}
|
|
1681
|
+
`,Fn=(e,t)=>l.html`
|
|
1682
1682
|
${(0,l.repeat)(()=>e,l.html`
|
|
1683
1683
|
${(0,l.when)(e=>e.isDisabled&&e.isDisabled(),l.html`
|
|
1684
1684
|
<${t}-menu-item class="menu-item" disabled>${e=>e.name}</${t}-menu-item>
|
|
@@ -1699,12 +1699,12 @@
|
|
|
1699
1699
|
`)}
|
|
1700
1700
|
${e=>e.name}
|
|
1701
1701
|
${(0,l.when)(e=>e.submenu,l.html`
|
|
1702
|
-
<${t}-menu>${e=>
|
|
1702
|
+
<${t}-menu>${e=>Fn(e.submenu,t)}</${t}-menu>
|
|
1703
1703
|
`)}
|
|
1704
1704
|
</${t}-menu-item>
|
|
1705
1705
|
`)}
|
|
1706
1706
|
`)}
|
|
1707
|
-
`,
|
|
1707
|
+
`,Mn=e=>l.html`
|
|
1708
1708
|
<div class="actions-container" part="actions-container">
|
|
1709
1709
|
<${e}-button
|
|
1710
1710
|
id="actiosnMenuTrigger"
|
|
@@ -1721,12 +1721,12 @@
|
|
|
1721
1721
|
class="actions-menu ${e=>e.classNames}"
|
|
1722
1722
|
part="actions-menu"
|
|
1723
1723
|
>
|
|
1724
|
-
${t=>
|
|
1724
|
+
${t=>Fn(t.allItems,e)}
|
|
1725
1725
|
</${e}-menu>
|
|
1726
1726
|
</div>
|
|
1727
|
-
`,
|
|
1728
|
-
${e=>
|
|
1729
|
-
`;class
|
|
1727
|
+
`,_n=l.html`
|
|
1728
|
+
${e=>Mn(O(e))}
|
|
1729
|
+
`;class Hn 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],Hn.prototype,"items",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Hn.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],Hn.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Hn.prototype,"classNames",void 0),(0,C.Cg)([l.attr],Hn.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],Hn.prototype,"open",void 0),(0,C.Cg)([l.attr],Hn.prototype,"buttonAppearance",void 0);const zn=Hn.compose({baseName:"dropdown-menu",styles:Ln,template:_n});var Pn=i(84686);const Un=l.css`
|
|
1730
1730
|
.environment-indicator {
|
|
1731
1731
|
font-size: 12px;
|
|
1732
1732
|
display: inline-flex;
|
|
@@ -1753,7 +1753,7 @@
|
|
|
1753
1753
|
.environment-indicator.lg .icon {
|
|
1754
1754
|
font-size: calc(var(--design-unit) * 3.5px);
|
|
1755
1755
|
}
|
|
1756
|
-
`,
|
|
1756
|
+
`,Bn=l.html`
|
|
1757
1757
|
${e=>{return t=O(e),l.html`
|
|
1758
1758
|
${(0,l.when)(e=>e.config,l.html`
|
|
1759
1759
|
<div
|
|
@@ -1778,7 +1778,7 @@
|
|
|
1778
1778
|
</div>
|
|
1779
1779
|
`)}
|
|
1780
1780
|
`;var t}}
|
|
1781
|
-
`;var
|
|
1781
|
+
`;var Gn=i(17190);const jn="default",Vn={level:jn,showIcon:!1,iconSize:"sm",backgroundColor:"#2222ff",textColor:"#ffffff",label:"DEFAULT"},Wn=[Vn,{level:"dev",showIcon:!1,icon:"code",backgroundColor:"#ff6b35",label:"DEV"},{level:"prod",showIcon:!1,icon:"check-circle",backgroundColor:"#28a745",label:"PROD"}],Yn=(0,Gn.r)(),qn=s.DI.createInterface(e=>e.instance(Yn),e=>e.instance(Yn)),Kn=s.DI.createInterface("EnvironmentIndicatorConfig");function Xn(){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:[Vn]};s.DI.getOrCreateDOMContainer().register(s.Registration.instance(qn,Yn),s.Registration.instance(Kn,o)),Yn.publish(o)})}const Qn=(0,Je.createLogger)("EnvironmentIndicator");class Jn extends s.FoundationElement{constructor(){super(...arguments),this.size="sm",this.textColor="#ffffff",this.icon="check-circle",this.iconSize="sm",this.useDefaultConfig=!1,this.config=Vn,this.envConfigs=Wn}envConfigsChanged(){this.config=this.getEnvConfigByLevel()}diConfigChanged(){this.config=this.getEnvConfigByLevel()}subscribeToDiConfig(){const e=s.DI.getOrCreateDOMContainer().get(qn);e&&"function"==typeof e.subscribe?this.unsubscribeConfig=e.subscribe(e=>{this.diConfig=e}):Qn.error("Observer not found or invalid in DI container")}connectedCallback(){super.connectedCallback(),this.diConfig=function(){try{const e=s.DI.getOrCreateDOMContainer().get(Kn);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){Qn.error(e)}return Pn.H6!==jn?Pn.H6:this.useDefaultConfig?jn:void 0}getEnvConfigByLevel(){const e=this.getAttributesConfig(),t=this.getCurrentEnvironmentLevel();if(!t)return this.useDefaultConfig?Vn:void 0;if(this.label)return Object.assign(Object.assign(Object.assign({},Vn),{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],Jn.prototype,"level",void 0),(0,C.Cg)([l.attr],Jn.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-icon"})],Jn.prototype,"showIcon",void 0),(0,C.Cg)([l.attr],Jn.prototype,"size",void 0),(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],Jn.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],Jn.prototype,"textColor",void 0),(0,C.Cg)([l.attr],Jn.prototype,"icon",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],Jn.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"use-default-config"})],Jn.prototype,"useDefaultConfig",void 0),(0,C.Cg)([l.observable],Jn.prototype,"config",void 0),(0,C.Cg)([l.observable],Jn.prototype,"envConfigs",void 0),(0,C.Cg)([l.observable],Jn.prototype,"diConfig",void 0);const Zn=Jn.compose({baseName:"environment-indicator",template:Bn,styles:Un}),ea=e=>l.html`
|
|
1782
1782
|
<${e}-banner ${(0,l.ref)("banner")}>
|
|
1783
1783
|
<div slot="content">
|
|
1784
1784
|
<div>
|
|
@@ -1799,13 +1799,13 @@
|
|
|
1799
1799
|
</${e}-button>
|
|
1800
1800
|
`)}
|
|
1801
1801
|
</${e}-banner>
|
|
1802
|
-
`,
|
|
1803
|
-
${e=>
|
|
1804
|
-
`,
|
|
1802
|
+
`,ta=l.html`
|
|
1803
|
+
${e=>ea(O(e))}
|
|
1804
|
+
`,ia={mode:"open",delegatesFocus:!0};class oa extends s.FoundationElement{connectedCallback(){super.connectedCallback(),Ze.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){Ze.error(e)}})}}(0,C.Cg)([l.observable],oa.prototype,"error",void 0),(0,C.Cg)([l.observable],oa.prototype,"notification",void 0);const na=oa.compose({baseName:"error-banner",template:ta,shadowOptions:ia});var aa;!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(aa||(aa={}));const sa=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"}`},ra=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)||Je.LogLevel.Error},la=(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},da=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},ca=(0,Je.createLogger)("foundation-error"),ua={alert:e=>{alert(sa(e))},notification:(e,t)=>{var i,o,n,a,s,r,l,d,c,u,h,p,m;const g=t.split("-")[0],v=la("notify-container",t);if(v)switch(v.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.notification)||void 0===o?void 0:o.position){case"top-left":v.style.top="0",v.style.left="0";break;case"bottom-left":v.style.bottom="0",v.style.left="0";break;case"bottom-right":v.style.bottom="0",v.style.right="0";break;default:v.style.top="0",v.style.right="0"}const f=document.createElement(`${g}-toast`),b=document.createElement("div");b.setAttribute("slot","top"),b.textContent=null!==(n=e.title)&&void 0!==n?n:"Error";const y=document.createElement("div");y.setAttribute("slot","content"),y.textContent=(null==e?void 0:e.errorDetails)||"";const w=document.createElement("div");w.setAttribute("slot","date"),w.textContent=(new Date).toLocaleTimeString(),f.setAttribute("notify",(null===(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),v.appendChild(f)},dialog:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-error-dialog`);la("dialog-container",t).appendChild(o),o.error=e,o.show()},snackbar:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`);la("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 da()})(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}},ha=(e,t,i)=>{ca.log({message:sa(e),level:ra(e)});Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{ua[o]&&ua[o](e,t,i)})};class pa{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 this.logLevel in Je.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 ma{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 ga=l.html`
|
|
1805
1805
|
<template ${(0,l.ref)("errorBoundary")}>
|
|
1806
1806
|
<slot></slot>
|
|
1807
1807
|
</template>
|
|
1808
|
-
`,
|
|
1808
|
+
`,va={mode:"open",delegatesFocus:!0};class fa extends s.FoundationElement{constructor(){super(...arguments),this.logger=(0,Je.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(aa.ERROR_BOUNDARY_EVENT,e=>{e.stopImmediatePropagation(),ha(e.detail,this.tagName,this.errorBoundary)}),this.resourceName){if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))return void Ze.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;ha((new pa).withTitle(e).withErrorDetails(i).withNotification((new ma).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],fa.prototype,"errorBoundary",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],fa.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],fa.prototype,"closeTimeout",void 0),(0,C.Cg)([si.yW],fa.prototype,"datasource",void 0);const ba=fa.compose({baseName:"error-boundary",template:ga,shadowOptions:va}),ya=l.css`
|
|
1809
1809
|
:host {
|
|
1810
1810
|
--design-unit: 3;
|
|
1811
1811
|
--dialog-max-width: 358px;
|
|
@@ -1824,7 +1824,7 @@
|
|
|
1824
1824
|
overflow: hidden;
|
|
1825
1825
|
min-height: var(--error-details-min-height);
|
|
1826
1826
|
}
|
|
1827
|
-
`,
|
|
1827
|
+
`,wa=e=>l.html`
|
|
1828
1828
|
<${e}-dialog show-close-icon="false" ${(0,l.ref)("dialog")}>
|
|
1829
1829
|
<h2 slot="top" class="title">${e=>{var t;return null===(t=e.error)||void 0===t?void 0:t.title}}</h2>
|
|
1830
1830
|
<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,9 +1841,9 @@
|
|
|
1841
1841
|
</${e}-button>
|
|
1842
1842
|
`)}
|
|
1843
1843
|
</${e}-dialog>
|
|
1844
|
-
`,
|
|
1845
|
-
${e=>
|
|
1846
|
-
`,
|
|
1844
|
+
`,Ca=l.html`
|
|
1845
|
+
${e=>wa(O(e))}
|
|
1846
|
+
`,xa={mode:"open",delegatesFocus:!0};class $a extends s.FoundationElement{connectedCallback(){super.connectedCallback(),Ze.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){Ze.error(e)}}}(0,C.Cg)([l.observable],$a.prototype,"error",void 0),(0,C.Cg)([l.observable],$a.prototype,"notification",void 0);const Sa=$a.compose({baseName:"error-dialog",template:Ca,styles:ya,shadowOptions:xa});class Ea 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){fe({title:e,body:t,config:{toast:{type:"warning",autoClose:!0,closeTimeout:5e3}}},this.tagName)}}(0,C.Cg)([l.attr],Ea.prototype,"label",void 0),(0,C.Cg)([l.attr],Ea.prototype,"accept",void 0),(0,C.Cg)([(0,l.attr)({attribute:"file-size-limit-bytes"})],Ea.prototype,"fileSizeLimitBytes",void 0),(0,C.Cg)([l.observable],Ea.prototype,"fileName",void 0),(0,C.Cg)([l.observable],Ea.prototype,"isProcessing",void 0);const Ta=(e,t,i)=>l.css`
|
|
1847
1847
|
/* Host */
|
|
1848
1848
|
:host {
|
|
1849
1849
|
display: flex;
|
|
@@ -1893,9 +1893,9 @@
|
|
|
1893
1893
|
justify-content: center;
|
|
1894
1894
|
z-index: 2;
|
|
1895
1895
|
}
|
|
1896
|
-
`,
|
|
1897
|
-
${
|
|
1898
|
-
`,
|
|
1896
|
+
`,Oa=(e,t)=>l.css`
|
|
1897
|
+
${Ta("foundation",e,t)}
|
|
1898
|
+
`,ka=e=>l.html`
|
|
1899
1899
|
<template>
|
|
1900
1900
|
<div class="file-reader">
|
|
1901
1901
|
${(0,l.when)(e=>e.isProcessing,l.html`
|
|
@@ -1931,9 +1931,9 @@
|
|
|
1931
1931
|
`)}
|
|
1932
1932
|
</div>
|
|
1933
1933
|
</template>
|
|
1934
|
-
`,
|
|
1935
|
-
${e=>
|
|
1936
|
-
`;class
|
|
1934
|
+
`,Ia=l.html`
|
|
1935
|
+
${e=>ka(O(e))}
|
|
1936
|
+
`;class Da extends Ea{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"})],Da.prototype,"autoProcess",void 0),(0,C.Cg)([(0,l.attr)({attribute:"processing-delay-ms"})],Da.prototype,"processingDelayMs",void 0),(0,C.Cg)([l.observable],Da.prototype,"fileContent",void 0),(0,C.Cg)([l.observable],Da.prototype,"onFileRead",void 0);const Ra=Da.compose({baseName:"file-reader",styles:Oa,template:Ia});var Aa=i(17465),Na=i(32748);const La=l.css`
|
|
1937
1937
|
/* Host */
|
|
1938
1938
|
:host {
|
|
1939
1939
|
display: flex;
|
|
@@ -1981,7 +1981,7 @@
|
|
|
1981
1981
|
fast-data-grid-row {
|
|
1982
1982
|
align-items: center;
|
|
1983
1983
|
}
|
|
1984
|
-
`,
|
|
1984
|
+
`,Fa=e=>l.html`
|
|
1985
1985
|
<template>
|
|
1986
1986
|
<div class="file-selection">
|
|
1987
1987
|
<input type="file" multiple ${(0,l.ref)("fileInput")}
|
|
@@ -2007,13 +2007,13 @@
|
|
|
2007
2007
|
</${e}-data-grid>
|
|
2008
2008
|
</div>
|
|
2009
2009
|
</template>
|
|
2010
|
-
`,
|
|
2011
|
-
${e=>
|
|
2012
|
-
`,
|
|
2010
|
+
`,Ma=l.html`
|
|
2011
|
+
${e=>Fa(O(e))}
|
|
2012
|
+
`,_a=e=>{const t=new FormData;return e.forEach(e=>{t.append(e.name,e)}),t},Ha=(e,t,i,o)=>{const n=new Headers;return n.append("SESSION_AUTH_TOKEN",i),o.post(e,{body:t,headers:n})},za=(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&&fe({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),Ze.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&&fe({title:"Success",body:"File downloaded successfully",config:{toast:{autoClose:!0,closeTimeout:5e3,type:"success"}}},s),Ze.info("File downloaded successfully")}}).catch(e=>{Ze.error(e)})},Pa=["image/png","image/bmp","image/gif","image/jpeg","image/jpg"],Ua=["text/plain","text/csv"],Ba=["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"],Ga=l.html`
|
|
2013
2013
|
${(0,l.when)(e=>e.rowData,l.html`
|
|
2014
|
-
${e=>"DATETIME"===e.columnDefinition.type?(0,
|
|
2014
|
+
${e=>"DATETIME"===e.columnDefinition.type?(0,ri.zT)(e.rowData[e.columnDefinition.columnDataKey]):e.rowData[e.columnDefinition.columnDataKey]}
|
|
2015
2015
|
`)}
|
|
2016
|
-
`;class
|
|
2016
|
+
`;class ja extends Ea{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,...Pa]:"office/*"===t?e=[...e,...Ba]:"text/*"===t?e=[...e,...Ua]: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 V.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:Aa.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=>{Aa.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`
|
|
2017
2017
|
<template>
|
|
2018
2018
|
<div class="download-button-container">
|
|
2019
2019
|
<${e}-button
|
|
@@ -2024,7 +2024,7 @@
|
|
|
2024
2024
|
</${e}-button>
|
|
2025
2025
|
</div>
|
|
2026
2026
|
</template>
|
|
2027
|
-
`}}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:
|
|
2027
|
+
`}}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:Ga}}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=_a(this.selectedFiles);e.append(this.uploadKey,this.entityId);const t=yield Ha(this.uploadEventName,e,this.session.getItem("authToken","session"),this.http);if(t.ERROR)return Aa.v.error(t.ERROR),void this.$emit("errorOut",t.ERROR);Aa.v.info(t),this.$emit("success",t),this.clearSelection()}catch(e){this.$emit("errorOut",e),Aa.v.error(e)}})}handleFileDownload(e){const t=this.tagName.toLowerCase().split("-")[0];za(this.downloadEventName(e),e.FILE_NAME,this.session.getItem("authToken","session"),"GET",!0,void 0,t)}}(0,C.Cg)([l.observable],ja.prototype,"gridCriteria",void 0),(0,C.Cg)([ai.dm],ja.prototype,"connect",void 0),(0,C.Cg)([Na.l],ja.prototype,"http",void 0),(0,C.Cg)([Ci.N],ja.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({attribute:"uploaded-files-resource-name"})],ja.prototype,"uploadedFilesResourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-event-name"})],ja.prototype,"uploadEventName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"field-name"})],ja.prototype,"fieldName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"entity-id"})],ja.prototype,"entityId",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-key"})],ja.prototype,"uploadKey",void 0),(0,C.Cg)([(0,l.attr)({attribute:"grid-fields"})],ja.prototype,"gridFields",void 0),(0,C.Cg)([l.observable],ja.prototype,"fileName",void 0),(0,C.Cg)([l.observable],ja.prototype,"uploadedFilesList",void 0),(0,C.Cg)([l.observable],ja.prototype,"filesGridColumnDefinitions",void 0);const Va=void 0,Wa={},Ya=ja.compose(Object.assign({baseName:"file-upload",styles:La,template:Ma,shadowOptions:Va},Wa)),qa=l.css`
|
|
2028
2028
|
.filter-wrapper {
|
|
2029
2029
|
border: 1px solid gray;
|
|
2030
2030
|
border-radius: calc(var(--design-unit) * 2px);
|
|
@@ -2075,52 +2075,52 @@
|
|
|
2075
2075
|
.flex-row foundation-select {
|
|
2076
2076
|
flex: 1;
|
|
2077
2077
|
}
|
|
2078
|
-
`,
|
|
2079
|
-
<div class="close-icon" @click=${e=>e.clear()}>${
|
|
2080
|
-
`;function
|
|
2078
|
+
`,Ka=(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`,Xa=l.html`
|
|
2079
|
+
<div class="close-icon" @click=${e=>e.clear()}>${Ka()}</div>
|
|
2080
|
+
`;function Qa(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 Ja=[{name:"All",value:"all",selected:!0},{name:"True",value:"true"},{name:"False",value:"false"},{name:"N/A",value:"null"}],Za=(e,t)=>{switch(e.type){case"number":return(e=>l.html`
|
|
2081
2081
|
<div class="flex-row">
|
|
2082
2082
|
<div>${e=>e.label}</div>
|
|
2083
|
-
${
|
|
2083
|
+
${Xa}
|
|
2084
2084
|
</div>
|
|
2085
2085
|
<div class="flex-row">
|
|
2086
2086
|
<${e}-text-field
|
|
2087
2087
|
${(0,l.ref)("numFilterFieldMin")}
|
|
2088
2088
|
type="number"
|
|
2089
|
-
:value=${(0,
|
|
2089
|
+
:value=${(0,U.O)(e=>e.numFilterMin)}
|
|
2090
2090
|
placeholder="min"
|
|
2091
2091
|
></${e}-text-field>
|
|
2092
2092
|
<${e}-text-field
|
|
2093
2093
|
${(0,l.ref)("numFilterFieldMax")}
|
|
2094
2094
|
type="number"
|
|
2095
|
-
:value=${(0,
|
|
2095
|
+
:value=${(0,U.O)(e=>e.numFilterMax)}
|
|
2096
2096
|
placeholder="max"
|
|
2097
2097
|
></${e}-text-field>
|
|
2098
2098
|
</div>
|
|
2099
2099
|
`)(t);case"date":return(e=>l.html`
|
|
2100
2100
|
<div class="flex-row">
|
|
2101
2101
|
<div>${e=>e.label}</div>
|
|
2102
|
-
${
|
|
2102
|
+
${Xa}
|
|
2103
2103
|
</div>
|
|
2104
2104
|
<div class="flex-row">
|
|
2105
2105
|
<${e}-text-field
|
|
2106
2106
|
${(0,l.ref)("dateFilterFieldMin")}
|
|
2107
2107
|
type="date"
|
|
2108
|
-
:value=${(0,
|
|
2108
|
+
:value=${(0,U.O)(e=>e.dateFilterMin)}
|
|
2109
2109
|
></${e}-text-field>
|
|
2110
2110
|
<${e}-text-field
|
|
2111
2111
|
${(0,l.ref)("dateFilterFieldMax")}
|
|
2112
2112
|
type="date"
|
|
2113
|
-
:value=${(0,
|
|
2113
|
+
:value=${(0,U.O)(e=>e.dateFilterMax)}
|
|
2114
2114
|
></${e}-text-field>
|
|
2115
2115
|
</div>
|
|
2116
2116
|
`)(t);case"boolean":return(e=>l.html`
|
|
2117
2117
|
<div class="flex-row">
|
|
2118
2118
|
<div>${e=>e.label}</div>
|
|
2119
|
-
${
|
|
2119
|
+
${Xa}
|
|
2120
2120
|
</div>
|
|
2121
2121
|
<div class="flex-row">
|
|
2122
|
-
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(
|
|
2123
|
-
${(0,l.repeat)(()=>
|
|
2122
|
+
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(Qa(t))}}">
|
|
2123
|
+
${(0,l.repeat)(()=>Ja,l.html`
|
|
2124
2124
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2125
2125
|
${e=>e.name}
|
|
2126
2126
|
</${e}-option>
|
|
@@ -2130,10 +2130,10 @@
|
|
|
2130
2130
|
`)(t);case"enum":return(e=>l.html`
|
|
2131
2131
|
<div class="flex-row">
|
|
2132
2132
|
<div>${e=>e.label}</div>
|
|
2133
|
-
${
|
|
2133
|
+
${Xa}
|
|
2134
2134
|
</div>
|
|
2135
2135
|
<div class="flex-row">
|
|
2136
|
-
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(
|
|
2136
|
+
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(Qa(t))}}">
|
|
2137
2137
|
${(0,l.repeat)(e=>e.enumFilterOptions,l.html`
|
|
2138
2138
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2139
2139
|
${e=>e.name}
|
|
@@ -2144,20 +2144,20 @@
|
|
|
2144
2144
|
`)(t);default:return(e=>l.html`
|
|
2145
2145
|
<div class="flex-row">
|
|
2146
2146
|
<div>${e=>e.label}</div>
|
|
2147
|
-
${
|
|
2147
|
+
${Xa}
|
|
2148
2148
|
</div>
|
|
2149
2149
|
<div class="flex-row">
|
|
2150
2150
|
<${e}-text-field
|
|
2151
2151
|
${(0,l.ref)("textFilterField")}
|
|
2152
2152
|
type="text"
|
|
2153
|
-
:value=${(0,
|
|
2153
|
+
:value=${(0,U.O)(e=>e.textFilter)}
|
|
2154
2154
|
/>
|
|
2155
2155
|
</div>
|
|
2156
|
-
`)(t)}},
|
|
2157
|
-
<div class="filter-wrapper">${t=>
|
|
2158
|
-
`,
|
|
2159
|
-
${e=>
|
|
2160
|
-
`;var
|
|
2156
|
+
`)(t)}},es=e=>l.html`
|
|
2157
|
+
<div class="filter-wrapper">${t=>Za(t,e)}</div>
|
|
2158
|
+
`,ts=l.html`
|
|
2159
|
+
${e=>es(O(e))}</div>
|
|
2160
|
+
`;var is;!function(e){e.change="filter-changed",e.clear="filter-cleared"}(is||(is={}));class os 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(is.clear,{fieldName:this.fieldName,target:this.target});const i=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(is.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(is.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(is.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(is.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(is.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(is.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){e&&"all"!==e?this.$emit(is.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target}):this.$emit(is.clear,{fieldName:this.fieldName,target:this.target})}onEnumFilterSelection(e){e&&"all"!==e?this.$emit(is.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target}):this.$emit(is.clear,{fieldName:this.fieldName,target:this.target})}}(0,C.Cg)([l.attr],os.prototype,"fieldName",void 0),(0,C.Cg)([l.attr],os.prototype,"type",void 0),(0,C.Cg)([l.attr],os.prototype,"label",void 0),(0,C.Cg)([l.attr],os.prototype,"target",void 0),(0,C.Cg)([l.observable],os.prototype,"textFilter",void 0),(0,C.Cg)([l.observable],os.prototype,"numFilterMin",void 0),(0,C.Cg)([l.observable],os.prototype,"numFilterMax",void 0),(0,C.Cg)([l.observable],os.prototype,"dateFilterMin",void 0),(0,C.Cg)([l.observable],os.prototype,"dateFilterMax",void 0),(0,C.Cg)([l.attr],os.prototype,"enumOptions",void 0),(0,C.Cg)([l.observable],os.prototype,"enumFilterOptions",void 0);const ns=os.compose({baseName:"filter",template:ts,styles:qa});var as=i(64324);const ss=(e,t)=>l.css`
|
|
2161
2161
|
.filter-bar {
|
|
2162
2162
|
background-color: #2c2f33;
|
|
2163
2163
|
padding: calc(var(--design-unit) * 2px);
|
|
@@ -2193,9 +2193,9 @@
|
|
|
2193
2193
|
.toggle-collapsed {
|
|
2194
2194
|
color: #48ed9c;
|
|
2195
2195
|
}
|
|
2196
|
-
`,
|
|
2196
|
+
`,rs=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"}},ls=l.html`
|
|
2197
2197
|
<p>Fetching metadata for ${e=>e.resource}...</p>
|
|
2198
|
-
`,
|
|
2198
|
+
`,ds=e=>l.html`
|
|
2199
2199
|
<div
|
|
2200
2200
|
class=${e=>(0,x.x)(["toggle",!0],["toggle-collapsed",e.collapsed])}
|
|
2201
2201
|
@click="${e=>e.toggle()}"
|
|
@@ -2215,17 +2215,17 @@
|
|
|
2215
2215
|
<${e}-filter
|
|
2216
2216
|
label="${e=>e.UI_LABEL}"
|
|
2217
2217
|
target="${(e,t)=>{var i;return null===(i=t.parent)||void 0===i?void 0:i.target}}"
|
|
2218
|
-
type="${e=>
|
|
2218
|
+
type="${e=>rs(e.TYPE)}"
|
|
2219
2219
|
fieldName="${e=>e.NAME}"
|
|
2220
2220
|
enumOptions="${e=>e.VALID_VALUES}"
|
|
2221
2221
|
></${e}-filter>
|
|
2222
2222
|
`)}
|
|
2223
2223
|
</div>
|
|
2224
2224
|
</div>
|
|
2225
|
-
`,
|
|
2226
|
-
${e=>e.ready?
|
|
2227
|
-
`,
|
|
2228
|
-
${t&&`@media only screen and ${
|
|
2225
|
+
`,cs=l.html`
|
|
2226
|
+
${e=>e.ready?ds(O(e)):ls}
|
|
2227
|
+
`,us=5;class hs extends s.FoundationElement{constructor(){super(...arguments),this.columns=us,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,as.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=>Ze.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],hs.prototype,"resource",void 0),(0,C.Cg)([l.attr],hs.prototype,"only",void 0),(0,C.Cg)([l.attr],hs.prototype,"labels",void 0),(0,C.Cg)([l.attr],hs.prototype,"target",void 0),(0,C.Cg)([l.attr],hs.prototype,"columns",void 0),(0,C.Cg)([l.observable],hs.prototype,"ready",void 0),(0,C.Cg)([l.observable],hs.prototype,"fields",void 0),(0,C.Cg)([ai.dm],hs.prototype,"connect",void 0),(0,C.Cg)([l.observable],hs.prototype,"collapsed",void 0);const ps=hs.compose({baseName:"filter-bar",template:cs,styles:ss});var ms;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(ms||(ms={}));const gs=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2228
|
+
${t&&`@media only screen and ${ms[e]} {`}
|
|
2229
2229
|
:host(.spacing${t}-1x) slot {
|
|
2230
2230
|
gap: calc(var(--design-unit) * 2px);
|
|
2231
2231
|
}
|
|
@@ -2342,7 +2342,7 @@
|
|
|
2342
2342
|
align-content: space-evenly;
|
|
2343
2343
|
}
|
|
2344
2344
|
${t&&"}"}
|
|
2345
|
-
`},
|
|
2345
|
+
`},vs=l.css`
|
|
2346
2346
|
:host {
|
|
2347
2347
|
width: 100%;
|
|
2348
2348
|
height: 100%;
|
|
@@ -2354,17 +2354,17 @@
|
|
|
2354
2354
|
display: flex;
|
|
2355
2355
|
}
|
|
2356
2356
|
|
|
2357
|
-
${
|
|
2358
|
-
${
|
|
2359
|
-
${
|
|
2360
|
-
${
|
|
2361
|
-
`,
|
|
2357
|
+
${gs()}
|
|
2358
|
+
${gs("lg")}
|
|
2359
|
+
${gs("md")}
|
|
2360
|
+
${gs("sm")}
|
|
2361
|
+
`,fs=l.html`
|
|
2362
2362
|
<template>
|
|
2363
2363
|
<slot></slot>
|
|
2364
2364
|
</template>
|
|
2365
|
-
`,
|
|
2365
|
+
`,bs=void 0,ys={};class ws extends s.FoundationElement{}const Cs=ws.compose(Object.assign({baseName:"flex-layout",styles:vs,template:fs,shadowOptions:bs},ys)),xs=(e,t)=>l.css`
|
|
2366
2366
|
${(0,r.flipperStyles)(e,t)}
|
|
2367
|
-
|
|
2367
|
+
`,$s=(e,t)=>(0,s.flipperTemplate)(e,t);class Ss extends r.Flipper{}const Es=void 0,Ts={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 '},Os=Ss.compose(Object.assign({baseName:"flipper",template:$s,styles:xs,shadowOptions:Es},Ts)),ks=225,Is=l.css`
|
|
2368
2368
|
/* Host */
|
|
2369
2369
|
:host {
|
|
2370
2370
|
display: inline-block;
|
|
@@ -2390,8 +2390,8 @@
|
|
|
2390
2390
|
position: absolute;
|
|
2391
2391
|
/* stylelint-disable-next-line function-name-case */
|
|
2392
2392
|
transition:
|
|
2393
|
-
transform ${
|
|
2394
|
-
width ${
|
|
2393
|
+
transform ${ks.toString()}ms ease-in,
|
|
2394
|
+
width ${ks.toString()}ms ease-in-out;
|
|
2395
2395
|
width: var(--flyout-width, 20%);
|
|
2396
2396
|
z-index: 2001;
|
|
2397
2397
|
}
|
|
@@ -2450,7 +2450,7 @@
|
|
|
2450
2450
|
opacity: 50%;
|
|
2451
2451
|
position: absolute;
|
|
2452
2452
|
/* stylelint-disable-next-line function-name-case */
|
|
2453
|
-
transition: opacity ${
|
|
2453
|
+
transition: opacity ${ks.toString()}ms linear;
|
|
2454
2454
|
width: 100%;
|
|
2455
2455
|
z-index: 2000;
|
|
2456
2456
|
}
|
|
@@ -2458,7 +2458,7 @@
|
|
|
2458
2458
|
:host([visuallyhidden]) div.background {
|
|
2459
2459
|
opacity: 0%;
|
|
2460
2460
|
}
|
|
2461
|
-
`,
|
|
2461
|
+
`,Ds=e=>l.html`
|
|
2462
2462
|
<div ?closed=${e=>e.closed} ?visuallyhidden=${e=>e.visuallyhidden}>
|
|
2463
2463
|
<div class="container">
|
|
2464
2464
|
<div class="background" part="background" @click=${e=>e.closeFlyout()}></div>
|
|
@@ -2482,10 +2482,10 @@
|
|
|
2482
2482
|
</div>
|
|
2483
2483
|
</div>
|
|
2484
2484
|
</div>
|
|
2485
|
-
`,
|
|
2486
|
-
${e=>
|
|
2487
|
-
`;class
|
|
2488
|
-
${t&&`@media only screen and ${
|
|
2485
|
+
`,Rs=l.html`
|
|
2486
|
+
${e=>Ds(O(e))}
|
|
2487
|
+
`;class As 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],As.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({attribute:"flyout-width"})],As.prototype,"flyoutWidth",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],As.prototype,"displayHeader",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],As.prototype,"closed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],As.prototype,"visuallyhidden",void 0);const Ns=void 0,Ls={},Fs=As.compose(Object.assign({baseName:"flyout",styles:Is,template:Rs,shadowOptions:Ns},Ls));var Ms;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(Ms||(Ms={}));const _s=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2488
|
+
${t&&`@media only screen and ${Ms[e]} {`}
|
|
2489
2489
|
:host(.spacing${t}-1x) slot {
|
|
2490
2490
|
gap: calc(var(--design-unit) * 2px);
|
|
2491
2491
|
}
|
|
@@ -2570,32 +2570,32 @@
|
|
|
2570
2570
|
place-items: stretch;
|
|
2571
2571
|
}
|
|
2572
2572
|
${t&&"}"}
|
|
2573
|
-
`},
|
|
2573
|
+
`},Hs=l.css`
|
|
2574
2574
|
slot {
|
|
2575
2575
|
width: 100%;
|
|
2576
2576
|
height: 100%;
|
|
2577
2577
|
display: grid;
|
|
2578
2578
|
}
|
|
2579
2579
|
|
|
2580
|
-
${
|
|
2581
|
-
${
|
|
2582
|
-
${
|
|
2583
|
-
${
|
|
2584
|
-
`,
|
|
2580
|
+
${_s()}
|
|
2581
|
+
${_s("lg")}
|
|
2582
|
+
${_s("md")}
|
|
2583
|
+
${_s("sm")}
|
|
2584
|
+
`,zs=l.html`
|
|
2585
2585
|
<template>
|
|
2586
2586
|
<slot></slot>
|
|
2587
2587
|
</template>
|
|
2588
|
-
`,
|
|
2588
|
+
`,Ps=void 0,Us={};class Bs{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`
|
|
2589
2589
|
slot {
|
|
2590
2590
|
${s||""}
|
|
2591
2591
|
${a||""}
|
|
2592
2592
|
}
|
|
2593
|
-
`}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
|
|
2593
|
+
`}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 Gs extends s.FoundationElement{constructor(){super(...arguments),this.behaviors=[]}connectedCallback(){super.connectedCallback(),this.behaviors=Object.keys(Ms).map(e=>{if(this[`col-${e}-count`]||this[`row-${e}-count`])return new Bs(Ms[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`
|
|
2594
2594
|
slot {
|
|
2595
2595
|
${e||""}
|
|
2596
2596
|
${t||""}
|
|
2597
2597
|
}
|
|
2598
|
-
`,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],
|
|
2598
|
+
`,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],Gs.prototype,"col-count",void 0),(0,C.Cg)([l.attr],Gs.prototype,"col-width",void 0),(0,C.Cg)([l.attr],Gs.prototype,"col-lg-count",void 0),(0,C.Cg)([l.attr],Gs.prototype,"col-lg-width",void 0),(0,C.Cg)([l.attr],Gs.prototype,"col-md-count",void 0),(0,C.Cg)([l.attr],Gs.prototype,"col-md-width",void 0),(0,C.Cg)([l.attr],Gs.prototype,"col-sm-count",void 0),(0,C.Cg)([l.attr],Gs.prototype,"col-sm-width",void 0),(0,C.Cg)([l.attr],Gs.prototype,"row-count",void 0),(0,C.Cg)([l.attr],Gs.prototype,"row-height",void 0),(0,C.Cg)([l.attr],Gs.prototype,"row-lg-count",void 0),(0,C.Cg)([l.attr],Gs.prototype,"row-lg-height",void 0),(0,C.Cg)([l.attr],Gs.prototype,"row-md-count",void 0),(0,C.Cg)([l.attr],Gs.prototype,"row-md-height",void 0),(0,C.Cg)([l.attr],Gs.prototype,"row-sm-count",void 0),(0,C.Cg)([l.attr],Gs.prototype,"row-sm-height",void 0);const js=Gs.compose(Object.assign({baseName:"grid-layout",styles:Hs,template:zs,shadowOptions:Ps},Us)),Vs=l.html`
|
|
2599
2599
|
<template>
|
|
2600
2600
|
<style>
|
|
2601
2601
|
:host {
|
|
@@ -2621,9 +2621,9 @@
|
|
|
2621
2621
|
</style>
|
|
2622
2622
|
<slot></slot>
|
|
2623
2623
|
</template>
|
|
2624
|
-
`,
|
|
2624
|
+
`,Ws=void 0,Ys={};class qs 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"})],qs.prototype,"colNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-sm-number"})],qs.prototype,"colSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-md-number"})],qs.prototype,"colMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-lg-number"})],qs.prototype,"colLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-number"})],qs.prototype,"rowNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-sm-number"})],qs.prototype,"rowSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-md-number"})],qs.prototype,"rowMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-lg-number"})],qs.prototype,"rowLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width"})],qs.prototype,"width",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-sm"})],qs.prototype,"widthSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-md"})],qs.prototype,"widthMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-lg"})],qs.prototype,"widthLg",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height"})],qs.prototype,"height",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-sm"})],qs.prototype,"heightSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-md"})],qs.prototype,"heightMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-lg"})],qs.prototype,"heightLg",void 0);const Ks=qs.compose(Object.assign({baseName:"grid-layout-item",template:Vs,shadowOptions:Ws},Ys)),Xs=(e,t)=>l.css`
|
|
2625
2625
|
${(0,r.horizontalScrollStyles)(e,t)}
|
|
2626
|
-
`,
|
|
2626
|
+
`,Qs=(e,t)=>(0,s.horizontalScrollTemplate)(e,t);class Js extends r.HorizontalScroll{}const Zs={delegatesFocus:!0,mode:"open"},er={nextFlipper:l.html`
|
|
2627
2627
|
<foundation-flipper
|
|
2628
2628
|
@click="${e=>e.scrollToNext()}"
|
|
2629
2629
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
@@ -2634,8 +2634,8 @@
|
|
|
2634
2634
|
direction="previous"
|
|
2635
2635
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
2636
2636
|
></foundation-flipper>
|
|
2637
|
-
`},
|
|
2638
|
-
${
|
|
2637
|
+
`},tr=Js.compose(Object.assign({baseName:"horizontal-scroll",template:Qs,styles:Xs,shadowOptions:Zs},er));var ir=i(70623),or=i(32808),nr=i(10463),ar=i(19037),sr=i(22984);const rr=()=>(ir.Yv.add(sr.X7I,ar.C91,nr.Cvc),ir.tT.css()),lr=(e,t)=>l.css`
|
|
2638
|
+
${rr()}
|
|
2639
2639
|
|
|
2640
2640
|
.fa-stack-1x {
|
|
2641
2641
|
font-size: 1em;
|
|
@@ -2709,7 +2709,7 @@
|
|
|
2709
2709
|
height: auto;
|
|
2710
2710
|
box-sizing: border-box;
|
|
2711
2711
|
}
|
|
2712
|
-
`,
|
|
2712
|
+
`,dr=e=>l.html`
|
|
2713
2713
|
<template>
|
|
2714
2714
|
<i
|
|
2715
2715
|
${(0,l.ref)("iElement")}
|
|
@@ -2727,9 +2727,9 @@
|
|
|
2727
2727
|
</${e}-tooltip>
|
|
2728
2728
|
`)}
|
|
2729
2729
|
</template>
|
|
2730
|
-
`,
|
|
2731
|
-
${e=>
|
|
2732
|
-
`,
|
|
2730
|
+
`,cr=l.html`
|
|
2731
|
+
${e=>dr(O(e))}
|
|
2732
|
+
`,ur={mode:"open",delegatesFocus:!0},hr={};var pr;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(pr||(pr={}));const mr="1x",gr=["2xs","xs","sm","lg","xl","2xl",mr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class vr 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,ir.wu)({prefix:pr[this.variant],iconName:this.name}),t=(0,ir.Kk)(e);t&&t.node&&(this.iElement.innerHTML="",Array.from(t.node).map(e=>this.iElement.appendChild(e)))}}(0,C.Cg)([l.observable],vr.prototype,"iElement",void 0),(0,C.Cg)([or.k],vr.prototype,"uuid",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tooltip-id"})],vr.prototype,"tooltipId",void 0),(0,C.Cg)([l.attr],vr.prototype,"tooltip",void 0),(0,C.Cg)([(0,l.attr)({attribute:"error",mode:"boolean"})],vr.prototype,"isError",void 0),(0,C.Cg)([l.attr],vr.prototype,"name",void 0),(0,C.Cg)([l.attr],vr.prototype,"size",void 0),(0,C.Cg)([l.attr],vr.prototype,"variant",void 0);const fr=vr.compose(Object.assign({baseName:"icon",template:cr,styles:lr,shadowOptions:ur},hr)),br=(e,t)=>l.css`
|
|
2733
2733
|
${(0,r.listboxStyles)(e,t)}
|
|
2734
2734
|
|
|
2735
2735
|
:host {
|
|
@@ -2740,11 +2740,11 @@
|
|
|
2740
2740
|
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);
|
|
2741
2741
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
2742
2742
|
}
|
|
2743
|
-
`,
|
|
2743
|
+
`,yr=(e,t)=>(0,s.listboxTemplate)(e,t);class wr extends r.Listbox{}const Cr=void 0,xr={},$r=wr.compose(Object.assign({baseName:"listbox",template:yr,styles:br,shadowOptions:Cr},xr)),Sr=(e,t)=>l.css`
|
|
2744
2744
|
${(0,r.optionStyles)(e,t)}
|
|
2745
|
-
`,
|
|
2745
|
+
`,Er=(e,t)=>(0,s.listboxOptionTemplate)(e,t);class Tr extends r.ListboxOption{}const Or=void 0,kr={},Ir=Tr.compose(Object.assign({baseName:"option",template:Er,styles:Sr,shadowOptions:Or},kr)),Dr=(e,t)=>l.css`
|
|
2746
2746
|
${(0,r.menuStyles)(e,t)}
|
|
2747
|
-
`,
|
|
2747
|
+
`,Rr=(e,t)=>(0,s.menuTemplate)(e,t);class Ar extends r.Menu{}const Nr=void 0,Lr={},Fr=Ar.compose(Object.assign({baseName:"menu",template:Rr,styles:Dr,shadowOptions:Nr},Lr)),Mr=(e,t)=>l.css`
|
|
2748
2748
|
${(0,r.menuItemStyles)(e,t)}
|
|
2749
2749
|
|
|
2750
2750
|
:host, :host(.indent-0[aria-haspopup='menu']) {
|
|
@@ -2758,11 +2758,11 @@
|
|
|
2758
2758
|
height: auto;
|
|
2759
2759
|
width: auto;
|
|
2760
2760
|
}
|
|
2761
|
-
`,
|
|
2762
|
-
${
|
|
2763
|
-
`,
|
|
2764
|
-
${
|
|
2765
|
-
`,
|
|
2761
|
+
`,_r=(e,t)=>(0,s.menuItemTemplate)(e,t);class Hr extends r.MenuItem{connectedCallback(){super.connectedCallback(),this.addEventListener("click",()=>this.$emit("onMenuClick"))}}const zr=void 0,Pr={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 '},Ur=Hr.compose(Object.assign({baseName:"menu-item",template:_r,styles:Mr,shadowOptions:zr},Pr)),Br=l.css`
|
|
2762
|
+
${un}
|
|
2763
|
+
`,Gr=l.html`
|
|
2764
|
+
${gn}
|
|
2765
|
+
`,jr={mode:"open",delegatesFocus:!0},Vr={};class Wr extends bn{show(){var e,t;null===(e=this.onShowCallback)||void 0===e||e.call(this),null===(t=this.mainElement)||void 0===t||t.showModal()}}const Yr=Wr.compose(Object.assign({baseName:"modal",template:Gr,styles:Br,shadowOptions:jr},Vr)),qr=230,Kr=l.css`
|
|
2766
2766
|
:host {
|
|
2767
2767
|
--scrollbar-width: 12px;
|
|
2768
2768
|
--scrollbar-thumb-width: 8px;
|
|
@@ -2906,7 +2906,7 @@
|
|
|
2906
2906
|
|
|
2907
2907
|
.visible {
|
|
2908
2908
|
visibility: visible;
|
|
2909
|
-
max-height: var(--custom-max-height, ${
|
|
2909
|
+
max-height: var(--custom-max-height, ${qr.toString()}px);
|
|
2910
2910
|
overflow: hidden;
|
|
2911
2911
|
}
|
|
2912
2912
|
|
|
@@ -3003,7 +3003,7 @@
|
|
|
3003
3003
|
resize: none;
|
|
3004
3004
|
overflow: hidden;
|
|
3005
3005
|
}
|
|
3006
|
-
`;let
|
|
3006
|
+
`;let Xr=class extends di{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=""}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||Ze.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')})}clearData(){this.select.options=[]}syncComponentData(e){var t;const i=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map(e=>{var t;return{value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=i}handleStreamInserts(e){Ze.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Ze.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Ze.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],Xr.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],Xr.prototype,"labelField",void 0),Xr=(0,C.Cg)([(0,l.customElement)({name:"multiselect-datasource"})],Xr);const Qr=(e="foundation")=>l.html`
|
|
3007
3007
|
<label
|
|
3008
3008
|
part="label"
|
|
3009
3009
|
for="display-field"
|
|
@@ -3028,7 +3028,7 @@
|
|
|
3028
3028
|
@click=${e=>e.toggle()}
|
|
3029
3029
|
?disabled="${e=>e.disabled}"
|
|
3030
3030
|
${(0,l.ref)("filterSearchInput")}
|
|
3031
|
-
value=${(0,
|
|
3031
|
+
value=${(0,U.O)(e=>e.filterSearchValue,"string","input")}
|
|
3032
3032
|
placeholder="${e=>e.getDisplayValue}"
|
|
3033
3033
|
autocomplete="off"
|
|
3034
3034
|
@input=${(e,t)=>e.inputHandler()}
|
|
@@ -3110,11 +3110,11 @@
|
|
|
3110
3110
|
</section>
|
|
3111
3111
|
</div>
|
|
3112
3112
|
<slot
|
|
3113
|
-
${(0,l.slotted)({property:"slottedDatasource",filter:e=>e instanceof
|
|
3113
|
+
${(0,l.slotted)({property:"slottedDatasource",filter:e=>e instanceof Xr})}
|
|
3114
3114
|
></slot>
|
|
3115
|
-
`,
|
|
3116
|
-
${
|
|
3117
|
-
`,
|
|
3115
|
+
`,Jr=l.html`
|
|
3116
|
+
${Qr()}
|
|
3117
|
+
`,Zr=void 0,el={};class tl 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=Mt.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=Jt()(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===Mt.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`
|
|
3118
3118
|
${"string"==typeof e?l.html`
|
|
3119
3119
|
<span part="option-label">${()=>t.getItemLabel(e)}</span>
|
|
3120
3120
|
`:l.html`
|
|
@@ -3126,7 +3126,7 @@
|
|
|
3126
3126
|
${()=>t.getItemLabel(e)}
|
|
3127
3127
|
</span>
|
|
3128
3128
|
`}
|
|
3129
|
-
`}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<
|
|
3129
|
+
`}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<qr&&o>n?Mt.ABOVE:Mt.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===Mt.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===Mt.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const n="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==n?void 0:n.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(n=t.value,Object.values(n).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var n;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?ci(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,Ze.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}(0,C.Cg)([l.attr],tl.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],tl.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tl.prototype,"all",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tl.prototype,"allSelected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tl.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tl.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tl.prototype,"creatable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tl.prototype,"async",void 0),(0,C.Cg)([l.attr],tl.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tl.prototype,"resizable",void 0),(0,C.Cg)([l.attr],tl.prototype,"tabindex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"filter-by-contains"})],tl.prototype,"filterByContains",void 0),(0,C.Cg)([l.observable],tl.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],tl.prototype,"slottedDatasource",void 0),(0,C.Cg)([l.observable],tl.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],tl.prototype,"loading",void 0),(0,C.Cg)([l.observable],tl.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],tl.prototype,"open",void 0),(0,C.Cg)([l.observable],tl.prototype,"options",void 0),(0,C.Cg)([l.observable],tl.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],tl.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],tl.prototype,"scrollContainer",void 0),(0,C.Cg)([l.attr],tl.prototype,"position",void 0),(0,C.Cg)([l.observable],tl.prototype,"onAllSelectedCallback",void 0),(0,C.Cg)([l.observable],tl.prototype,"itemRenderer",void 0),(0,C.Cg)([l.volatile],tl.prototype,"getDisplayValue",null),(0,C.Cg)([l.volatile],tl.prototype,"getPlaceholder",null),(0,C.Cg)([l.volatile],tl.prototype,"isAllOptionsDisabled",null),(0,C.Cg)([l.volatile],tl.prototype,"showCreatable",null),(0,C.Cg)([l.observable],tl.prototype,"optionsHeaderSlottedNodes",void 0);const il=tl.compose(Object.assign({baseName:"multiselect",template:Jr,styles:Kr,shadowOptions:Zr},el)),ol={k:1e3,m:1e6,b:1e9},nl=/^(.*?)([kmb])$/i;class al{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),i=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(i.map((e,t)=>[e,t]));this._group=new RegExp(`[${t.find(e=>"group"===e.type).value}]`,"g"),this._decimal=new RegExp(`[${t.find(e=>"decimal"===e.type).value}]`),this._separator=new RegExp(`[$${t.find(e=>"decimal"===e.type).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._index=e=>o.get(e)}parse(e){const t=e.trim().match(nl),i=t?ol[t[2].toLowerCase()]:1;return(e=(t?t[1]:e).trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e*i:NaN}hasSeparator(e){return this._separator.test(e)}}function sl(e){class t extends e{constructor(){super(...arguments),this.hideAffixFromScreenReader=!1}get controlAriaDescribedby(){var e;const t=null===(e=this.ariaDescribedby)||void 0===e?void 0:e.trim(),i=[];if(t&&i.push(...t.split(/\s+/).filter(Boolean)),!this.hideAffixFromScreenReader){const e=this.id||"control";this.prefix&&i.push(`${e}-prefix`),this.suffix&&i.push(`${e}-suffix`)}const o=new Set,n=[];for(const e of i)o.has(e)||(o.add(e),n.push(e));return n.join(" ")||void 0}}return(0,C.Cg)([l.attr],t.prototype,"prefix",void 0),(0,C.Cg)([l.attr],t.prototype,"suffix",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-affix-from-screen-reader",mode:"boolean"})],t.prototype,"hideAffixFromScreenReader",void 0),t}const rl=l.css`
|
|
3130
3130
|
.label-hidden {
|
|
3131
3131
|
margin: 0;
|
|
3132
3132
|
}
|
|
@@ -3186,7 +3186,7 @@
|
|
|
3186
3186
|
:host(.has-prefix.has-suffix) .control-field .control {
|
|
3187
3187
|
border-radius: 0;
|
|
3188
3188
|
}
|
|
3189
|
-
`,
|
|
3189
|
+
`,ll=(e,t)=>l.css`
|
|
3190
3190
|
${(0,r.numberFieldStyles)(e,t)}
|
|
3191
3191
|
::part(label) {
|
|
3192
3192
|
color: var(--neutral-foreground-rest);
|
|
@@ -3217,8 +3217,8 @@
|
|
|
3217
3217
|
margin-inline-end: unset;
|
|
3218
3218
|
}
|
|
3219
3219
|
|
|
3220
|
-
${
|
|
3221
|
-
`,
|
|
3220
|
+
${rl}
|
|
3221
|
+
`,dl=(e,t)=>l.html`
|
|
3222
3222
|
<template
|
|
3223
3223
|
class="${e=>[e.readOnly?"readonly":"",e.prefix?"has-prefix":"",e.suffix?"has-suffix":""].filter(Boolean).join(" ")}"
|
|
3224
3224
|
>
|
|
@@ -3311,7 +3311,7 @@
|
|
|
3311
3311
|
${(0,s.endSlotTemplate)(e,t)}
|
|
3312
3312
|
</div>
|
|
3313
3313
|
</template>
|
|
3314
|
-
`,
|
|
3314
|
+
`,cl=9,ul=(e,t)=>{var i;return{decimalSeparator:(null===(i=new Intl.NumberFormat(t).formatToParts(12345.6).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)||"."}},hl=(e,t)=>{const{decimalSeparator:i}=ul(0,t);return"."===i?e:e.replace(/\./g,i)},pl=(e,t,i)=>Intl.NumberFormat(t,i).format(Number(e)),ml=(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},gl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,a=null!=o?o:12;let s;if(i)s=((e,t)=>String(new al(t).parse(String(e))))(n,t);else{const{decimalSeparator:e}=ul(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},vl=(e,t,i)=>((e,t,i)=>{const{decimalSeparator:o}=ul(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,gl(e,t,void 0,i),t),fl=(e,t,i=!0,o,n,a)=>{let s=parseFloat(gl(e,t,i,a));return isNaN(s)?s="":(s=Math.min(s,null!=n?n:s),s=Math.max(s,null!=o?o:s)),String(s)},bl=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 yl extends(sl(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?bl(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<=cl){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<=cl?(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=fl(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?bl(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=cl.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=fl(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(this.isUserInput=!0,this.withFormatting&&!new al(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=vl(this.control.value,this.locale,this.maximumInputPrecision);this.value=ml(e,this.options),this.control&&(this.control.value=ml(hl(e,this.locale),this.options)),this.$emit("input")}):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)this.control.value="";else if(null!=t&&t!==e){if(!this.isUserInput)return this.value=fl(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.control&&(this.control.value=this.withFormatting&&this.value?pl(this.value,this.locale,this.options):this.value)});const e=t;l.DOM.queueUpdate(()=>{this.control&&(""!==this.control.value&&""!==this.value?(this.control.value=hl(String(e),this.locale),this.value=this.withFormatting?vl(this.control.value,this.locale,this.maximumInputPrecision):this.control.value):this.control.value=e)})}}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=fl(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?ml(e,this.options):e),this.control.value=this.withFormatting&&this.value?pl(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],yl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],yl.prototype,"hideStep",void 0),(0,C.Cg)([l.attr],yl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],yl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],yl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],yl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],yl.prototype,"maximumInputPrecision",void 0);const wl={delegatesFocus:!0,mode:"open"},Cl={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 '},xl=yl.compose(Object.assign({baseName:"number-field",template:dl,styles:ll,shadowOptions:wl},Cl)),$l=(e,t)=>l.css`
|
|
3315
3315
|
:host {
|
|
3316
3316
|
display: block;
|
|
3317
3317
|
}
|
|
@@ -3334,7 +3334,7 @@
|
|
|
3334
3334
|
::slotted(*) {
|
|
3335
3335
|
padding-left: 20px;
|
|
3336
3336
|
}
|
|
3337
|
-
|
|
3337
|
+
`,Sl=(e,t)=>l.html`
|
|
3338
3338
|
<template role="option">
|
|
3339
3339
|
<div class="label" part="label" role="presentation">${e=>e.groupLabel}</div>
|
|
3340
3340
|
|
|
@@ -3342,19 +3342,19 @@
|
|
|
3342
3342
|
<slot></slot>
|
|
3343
3343
|
</div>
|
|
3344
3344
|
</template>
|
|
3345
|
-
`;class
|
|
3345
|
+
`;class El extends s.ListboxOption{connectedCallback(){super.connectedCallback(),this.disabled=!0}}(0,C.Cg)([(0,l.attr)({attribute:"label"})],El.prototype,"groupLabel",void 0);const Tl=El.compose({baseName:"optgroup",template:Sl,styles:$l});var Ol=i(92277);var kl=i(72154),Il=i.n(kl),Dl=i(57565),Rl=i.n(Dl),Al=i(13160),Nl=i(24669),Ll=i(5709),Fl=i(45230);const Ml={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,ai.tn)(),i=yield t.getMoreColumns(e),o=Date.now(),n=i;return{isConnected:i.MESSAGE_TYPE===ii.Go.MORE_COLUMNS_ACK,lastUpdated:o,lastMessage:n}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:o}=t;(0,Fl.Ol)().sendForStream(e,i,o)}},_l=s.DI.createInterface(e=>e.instance(Ml)),Hl="system-health-changed";var zl;const Pl=(0,Je.createLogger)("network-monitor",{level:Je.LogLevel.Info}),Ul=Date.now(),Bl=(null===(zl=window.navigator)||void 0===zl?void 0:zl.userAgent)?Il().parse(window.navigator.userAgent):void 0,Gl=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:Rl()(e,void 0,2,t);class jl{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>(0,C.sH)(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;Pl.info("Run health checks, triggered by",Gl(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const o=yield this.isOnlineCheck();o?Pl.debug(`Network connected at ${i}`):Pl.warn(`Network disconnected at ${i}`);const n=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),o),a=this.preFlightSocketChecks(n);if(a||Pl.debug("Socket pre-flight checks failed"),!o||!a){Pl.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,g,v=!1;r.push((()=>(0,C.sH)(this,void 0,void 0,function*(){var n,a,r;try{Pl.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)}))]);v=e.isConnected,u=e.lastUpdated,h=e.lastMessage,m=e.timeout}catch(e){v=!1,u=this.getNowTimestamp(),p=e,h=null!==(n=null==e?void 0:e.receivedMessage)&&void 0!==n?n:e}return g=(null==h?void 0:h.MESSAGE_TYPE)===ii.Go.MSG_NACK||(0,ii.z2)(h,Al.v.NOT_FOUND),i=this.getFormattedTimestamp(null!=u?u:this.getNowTimestamp()),v?Pl.debug(`${o} is healthy at ${i}`):Pl.warn(`${o} is not healthy at ${i}`),h&&Pl.debug(`${o} messaged at ${i}`,Gl(h)),p&&Pl.error(`${o} errored at ${i}`,Gl(p)),m&&Pl.warn(`${o} timed out at ${i}`),g&&(Pl.error(`${o} issue, re-attempting data logon at ${i}`),d(e)),s&&(s=v),{name:o,sourceRef:[c],isConnected:v,lastUpdated:u,lastError:p}}))())});const l=(yield Promise.allSettled(r)).reduce((e,t)=>{if("fulfilled"===t.status){const i=e[t.value.name];return i?(i.sourceRef=[...i.sourceRef,...t.value.sourceRef],e):Object.assign(Object.assign({},e),{[t.value.name]:this.normaliseResourceHealth(t.value)})}return Pl.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});Pl.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&&(Pl.level=this.config.logLevel)}create(){this.resources?Pl.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,ii.z2)(a,Al.v.NOT_FOUND)?s="Please check the resource is running.":(0,ii.z2)(a,Al.v.FORBIDDEN)&&(s="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(o)),Pl.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&&Pl.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?Pl.debug:Pl.warn)("Emitting 'system-health-changed' event",Gl(this.status)),null==i||i.dispatchEvent(new CustomEvent(Hl,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(Pl.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 Pl.debug("User requested report stability to Genesis."),Pl.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:Bl,username:l,isHealthy:a,lastUpdated:s,nextUpdate:r,firstUpdated:Ul,runAllChecks:()=>{Pl.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(d)});return d}preFlightSocketChecks(e){if(!e.isConfigured)return Pl.debug("Socket not configured"),!1;if(e.isReconnecting)return Pl.debug("Socket reconnecting"),!1;if(e.isConnecting)return Pl.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return Pl.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&Pl.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return Pl.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return(0,ri.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)([_l],jl.prototype,"config",void 0),(0,C.Cg)([Ll.S5],jl.prototype,"socketStatus",void 0),(0,C.Cg)([Nl.a4],jl.prototype,"connectEvents",void 0),(0,C.Cg)([Ol.KJ],jl.prototype,"user",void 0),(0,C.Cg)([l.observable],jl.prototype,"status",void 0);const Vl=s.DI.createInterface(e=>e.singleton(jl));var Wl=i(6526);const Yl=(e,t)=>l.css`
|
|
3346
3346
|
${(0,r.progressStyles)(e,t)}
|
|
3347
3347
|
:host {
|
|
3348
3348
|
height: calc(var(--design-unit) * 2px);
|
|
3349
3349
|
}
|
|
3350
|
-
`,
|
|
3350
|
+
`,ql=(e,t)=>(0,s.progressTemplate)(e,t);class Kl extends r.Progress{}const Xl=void 0,Ql={indeterminateIndicator1:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>',indeterminateIndicator2:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>'},Jl=Kl.compose(Object.assign({baseName:"progress",template:ql,styles:Yl,shadowOptions:Xl},Ql));function Zl(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 ed=(e,t="foundation",i,a)=>{e&&Ho(null!=i?i:o,null!=a?a:n,e);return Zl(s.DesignSystem.getOrCreate(e).withPrefix(t))},td="app",id="component";ed().register(Jl({prefix:"next-update"}));class od extends s.FoundationElement{constructor(){super(...arguments),this.timeTillNextUpdate={totalMs:1e4,remainMs:1e4,remainPercent:100},this.mode=td,this.status={isOnline:!0,isHealthy:!0,browserInformation:{},socket:{},resources:{}},this.onSystemHealthChanged=e=>{this.status=e.detail,this.resourceList=Object.values(this.status.resources).sort((e,t)=>Number(t.isConnected)-Number(e.isConnected))},this.onOpen=(e=!1)=>{this.isOpen=!0,this.wasOpenedByUser=e,this.isDismissed=!1},this.onClose=()=>{this.isOpen=!1,this.wasOpenedByUser=!1,this.isDismissed=!1},this.onDismiss=()=>{this.isDismissed||this.status.isHealthy?this.onClose():this.isDismissed=!0},this.onUpdateStatus=()=>{this.status.runAllChecks()},this.onReportStatus=()=>{this.status.reportStabilityToGenesis()},this.onReloadWindow=()=>{location.reload()},this.onDocumentKeydown=e=>{if(!e.defaultPrevented)switch(e.key){case Wl.Is.ArrowUp:e.ctrlKey&&e.altKey&&!this.isOpen&&(this.onOpen(!0),e.preventDefault());break;case Wl.Is.ArrowDown:e.ctrlKey&&e.altKey&&this.isOpen&&(this.onClose(),e.preventDefault());break;case Wl.F9:this.isOpen&&(this.onDismiss(),e.preventDefault())}}}isOpenChanged(){this.updateTemplateClassNames()}isDismissedChanged(){this.updateTemplateClassNames()}modeChanged(){this.$fastController.isConnected&&this.mode===id&&Ze.warn("SystemHealthOverlay has support for app overlays only right now.")}logLevelChanged(){Pl.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(Hl,this.onSystemHealthChanged,!0),document.addEventListener("keydown",this.onDocumentKeydown)}removeEventListeners(){this.eventBridge().removeEventListener(Hl,this.onSystemHealthChanged,!0),document.removeEventListener("keydown",this.onDocumentKeydown)}static getCheckmarkTemplate(e){return e?l.html`
|
|
3351
3351
|
<span class="checkmark">✔</span>
|
|
3352
3352
|
`:l.html`
|
|
3353
3353
|
<span class="checkmark">✘</span>
|
|
3354
|
-
`}}(0,C.Cg)([
|
|
3354
|
+
`}}(0,C.Cg)([_l],od.prototype,"config",void 0),(0,C.Cg)([Vl],od.prototype,"networkMonitor",void 0),(0,C.Cg)([l.observable],od.prototype,"resourceList",void 0),(0,C.Cg)([l.observable],od.prototype,"isOpen",void 0),(0,C.Cg)([l.observable],od.prototype,"wasOpenedByUser",void 0),(0,C.Cg)([l.observable],od.prototype,"isDismissed",void 0),(0,C.Cg)([l.observable],od.prototype,"templateClassNames",void 0),(0,C.Cg)([l.observable],od.prototype,"containerClassNames",void 0),(0,C.Cg)([l.observable],od.prototype,"isOnlineClassNames",void 0),(0,C.Cg)([l.observable],od.prototype,"isHealthyClassNames",void 0),(0,C.Cg)([l.observable],od.prototype,"isSocketHealthyClassNames",void 0),(0,C.Cg)([l.observable],od.prototype,"resourcesAllConnectedClassNames",void 0),(0,C.Cg)([l.observable],od.prototype,"timeTillNextUpdate",void 0),(0,C.Cg)([l.observable],od.prototype,"saveDataCallback",void 0),(0,C.Cg)([l.attr],od.prototype,"mode",void 0),(0,C.Cg)([(0,l.attr)({attribute:"log-level",converter:l.nullableNumberConverter})],od.prototype,"logLevel",void 0),(0,C.Cg)([l.observable],od.prototype,"status",void 0);const nd=(e,t)=>l.html`
|
|
3355
3355
|
<template class="${e=>e.templateClassNames}">
|
|
3356
3356
|
<header class="${e=>e.isHealthyClassNames}" part="header">
|
|
3357
|
-
<h1>System ${e=>(0,
|
|
3357
|
+
<h1>System ${e=>(0,as.fL)(e.isHealthyClassNames)}</h1>
|
|
3358
3358
|
${(0,l.when)(e=>!e.status.isHealthy,l.html`
|
|
3359
3359
|
<span class="data-warning">Data Validity Unknown</span>
|
|
3360
3360
|
`)}
|
|
@@ -3383,7 +3383,7 @@
|
|
|
3383
3383
|
</header>
|
|
3384
3384
|
<div class="container ${e=>e.containerClassNames}" part="container">
|
|
3385
3385
|
<section class="network-section ${e=>e.isOnlineClassNames}" part="network-section">
|
|
3386
|
-
<h2>Network ${e=>(0,
|
|
3386
|
+
<h2>Network ${e=>(0,as.fL)(e.status.isOnline?"online":"offline")}</h2>
|
|
3387
3387
|
<dl class="resource-list">
|
|
3388
3388
|
<div class="resource ${e=>e.isOnlineClassNames}">
|
|
3389
3389
|
<div class="attributes">
|
|
@@ -3403,11 +3403,11 @@
|
|
|
3403
3403
|
`)}
|
|
3404
3404
|
<div class="platform-type">
|
|
3405
3405
|
<dt>Platform Type</dt>
|
|
3406
|
-
<dd>${e=>{var t;return(0,
|
|
3406
|
+
<dd>${e=>{var t;return(0,as.fL)(null===(t=e.status.browserInformation.platform)||void 0===t?void 0:t.type)}}</dd>
|
|
3407
3407
|
</div>
|
|
3408
3408
|
<div class="os-name">
|
|
3409
3409
|
<dt>OS Name</dt>
|
|
3410
|
-
<dd>${e=>{var t;return(0,
|
|
3410
|
+
<dd>${e=>{var t;return(0,as.fL)(null===(t=e.status.browserInformation.os)||void 0===t?void 0:t.name)}}</dd>
|
|
3411
3411
|
</div>
|
|
3412
3412
|
<div class="os-version">
|
|
3413
3413
|
<dt>OS Version</dt>
|
|
@@ -3417,7 +3417,7 @@
|
|
|
3417
3417
|
<div class="attributes">
|
|
3418
3418
|
<div class="browser-name">
|
|
3419
3419
|
<dt>Browser Name</dt>
|
|
3420
|
-
<dd>${e=>{var t;return(0,
|
|
3420
|
+
<dd>${e=>{var t;return(0,as.fL)(null===(t=e.status.browserInformation.browser)||void 0===t?void 0:t.name)}}</dd>
|
|
3421
3421
|
</div>
|
|
3422
3422
|
<div class="browser-version">
|
|
3423
3423
|
<dt>Browser Version</dt>
|
|
@@ -3425,16 +3425,16 @@
|
|
|
3425
3425
|
</div>
|
|
3426
3426
|
<div class="first-updated">
|
|
3427
3427
|
<dt>First updated</dt>
|
|
3428
|
-
<dd>${e=>(0,
|
|
3428
|
+
<dd>${e=>(0,ri.zT)(e.status.firstUpdated)}</dd>
|
|
3429
3429
|
</div>
|
|
3430
3430
|
<div class="last-updated">
|
|
3431
3431
|
<dt>Last updated</dt>
|
|
3432
|
-
<dd>${e=>(0,
|
|
3432
|
+
<dd>${e=>(0,ri.zT)(e.status.lastUpdated)}</dd>
|
|
3433
3433
|
</div>
|
|
3434
3434
|
${(0,l.when)(e=>!e.status.socket.reconnectionLimitReached,l.html`
|
|
3435
3435
|
<div class="next-update">
|
|
3436
3436
|
<dt>Next update</dt>
|
|
3437
|
-
<dd>${e=>(0,
|
|
3437
|
+
<dd>${e=>(0,ri.zT)(e.status.nextUpdate)}</dd>
|
|
3438
3438
|
</div>
|
|
3439
3439
|
<div class="next-update-progress">
|
|
3440
3440
|
<dt></dt>
|
|
@@ -3447,13 +3447,13 @@
|
|
|
3447
3447
|
`)}
|
|
3448
3448
|
</div>
|
|
3449
3449
|
<div class="controls">
|
|
3450
|
-
${e=>
|
|
3450
|
+
${e=>od.getCheckmarkTemplate(e.status.isOnline)}
|
|
3451
3451
|
</div>
|
|
3452
3452
|
</div>
|
|
3453
3453
|
</dl>
|
|
3454
3454
|
</section>
|
|
3455
3455
|
<section class="socket-section ${e=>e.isSocketHealthyClassNames}" part="socket-section">
|
|
3456
|
-
<h2>WebSocket ${e=>(0,
|
|
3456
|
+
<h2>WebSocket ${e=>(0,as.fL)(e.isSocketHealthyClassNames)}</h2>
|
|
3457
3457
|
<dl class="resource-list">
|
|
3458
3458
|
<div class="resource ${e=>e.isSocketHealthyClassNames}">
|
|
3459
3459
|
<div class="attributes">
|
|
@@ -3493,7 +3493,7 @@
|
|
|
3493
3493
|
</div>
|
|
3494
3494
|
</div>
|
|
3495
3495
|
<div class="controls">
|
|
3496
|
-
${e=>
|
|
3496
|
+
${e=>od.getCheckmarkTemplate(e.isSocketHealthy)}
|
|
3497
3497
|
</div>
|
|
3498
3498
|
</div>
|
|
3499
3499
|
</dl>
|
|
@@ -3502,7 +3502,7 @@
|
|
|
3502
3502
|
class="resource-section ${e=>e.resourcesAllConnectedClassNames}"
|
|
3503
3503
|
part="resource-section"
|
|
3504
3504
|
>
|
|
3505
|
-
<h2>Resources ${e=>(0,
|
|
3505
|
+
<h2>Resources ${e=>(0,as.fL)(e.resourcesAllConnectedClassNames)}</h2>
|
|
3506
3506
|
<dl class="resource-list">
|
|
3507
3507
|
${(0,l.repeat)(e=>e.resourceList,l.html`
|
|
3508
3508
|
<div class="resource ${e=>e.isConnected?"healthy":"unhealthy"}">
|
|
@@ -3517,7 +3517,7 @@
|
|
|
3517
3517
|
</div>
|
|
3518
3518
|
<div class="last-checked">
|
|
3519
3519
|
<dt>Checked</dt>
|
|
3520
|
-
<dd>${e=>(0,
|
|
3520
|
+
<dd>${e=>(0,ri.zT)(e.lastUpdated)}</dd>
|
|
3521
3521
|
</div>
|
|
3522
3522
|
<div class="subscriptions">
|
|
3523
3523
|
<dt>Subscriptions</dt>
|
|
@@ -3529,7 +3529,7 @@
|
|
|
3529
3529
|
</div>
|
|
3530
3530
|
</div>
|
|
3531
3531
|
<div class="controls">
|
|
3532
|
-
${e=>
|
|
3532
|
+
${e=>od.getCheckmarkTemplate(e.isConnected)}
|
|
3533
3533
|
</div>
|
|
3534
3534
|
</div>
|
|
3535
3535
|
`)}
|
|
@@ -3537,7 +3537,7 @@
|
|
|
3537
3537
|
</section>
|
|
3538
3538
|
</div>
|
|
3539
3539
|
</template>
|
|
3540
|
-
`,
|
|
3540
|
+
`,ad=(e,t)=>l.css`
|
|
3541
3541
|
:host {
|
|
3542
3542
|
--font-family: Menlo, Consolas, monospace;
|
|
3543
3543
|
|
|
@@ -3808,7 +3808,7 @@
|
|
|
3808
3808
|
padding: 0.2em 0.5em;
|
|
3809
3809
|
background-color: var(--color-unhealthy-opacity-20);
|
|
3810
3810
|
}
|
|
3811
|
-
`,
|
|
3811
|
+
`,sd=void 0,rd={},ld=od.compose(Object.assign({baseName:"system-health-overlay",template:nd,styles:ad,shadowOptions:sd},rd));var dd=i(4934);const cd={toView:e=>JSON.stringify(e),fromView:e=>null==e?e:JSON.parse(e)};class ud 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,dd.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],ud.prototype,"selector",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ud.prototype,"show",void 0),(0,C.Cg)([l.attr],ud.prototype,"event",void 0),(0,C.Cg)([l.attr],ud.prototype,"placement",void 0),(0,C.Cg)([(0,l.attr)({converter:cd})],ud.prototype,"offset",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ud.prototype,"flip",void 0);const hd=l.css`
|
|
3812
3812
|
:host {
|
|
3813
3813
|
display: none;
|
|
3814
3814
|
inset: unset !important;
|
|
@@ -3818,39 +3818,39 @@
|
|
|
3818
3818
|
:host([show]) {
|
|
3819
3819
|
display: block;
|
|
3820
3820
|
}
|
|
3821
|
-
`,
|
|
3821
|
+
`,pd=l.html`
|
|
3822
3822
|
<template>
|
|
3823
3823
|
<slot></slot>
|
|
3824
3824
|
</template>
|
|
3825
|
-
`,
|
|
3825
|
+
`,md=ud.compose({baseName:"popper",styles:hd,template:pd}),gd=(e,t)=>l.css`
|
|
3826
3826
|
${(0,r.progressRingStyles)(e,t)}
|
|
3827
|
-
`,
|
|
3827
|
+
`,vd=(e,t)=>(0,s.progressRingTemplate)(e,t);class fd extends r.Progress{}const bd=void 0,yd={indeterminateIndicator:'\n <svg class="progress" part="progress" viewBox="0 0 16 16">\n <circle class="background" part="background" cx="8px" cy="8px" r="7px"></circle>\n <circle class="indeterminate-indicator-1" part="indeterminate-indicator-1" cx="8px" cy="8px" r="7px"></circle>\n </svg>\n '},wd=fd.compose(Object.assign({baseName:"progress-ring",template:vd,styles:gd,shadowOptions:bd},yd)),Cd=(e,t)=>l.css`
|
|
3828
3828
|
${(0,r.radioStyles)(e,t)}
|
|
3829
|
-
`,
|
|
3829
|
+
`,xd=(e,t)=>(0,s.radioTemplate)(e,t);class $d extends r.Radio{}const Sd=void 0,Ed={checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '},Td=$d.compose(Object.assign({baseName:"radio",template:xd,styles:Cd,shadowOptions:Sd},Ed)),Od=(e,t)=>l.css`
|
|
3830
3830
|
${(0,r.radioGroupStyles)(e,t)}
|
|
3831
|
-
`,
|
|
3831
|
+
`,kd=(e,t)=>(0,s.radioGroupTemplate)(e,t);class Id extends r.RadioGroup{}const Dd=void 0,Rd={},Ad=Id.compose(Object.assign({baseName:"radio-group",template:kd,styles:Od,shadowOptions:Dd},Rd)),Nd=l.css`
|
|
3832
3832
|
/* Host */
|
|
3833
3833
|
:host {
|
|
3834
3834
|
display: flex;
|
|
3835
3835
|
flex-direction: column;
|
|
3836
3836
|
width: 100%;
|
|
3837
3837
|
}
|
|
3838
|
-
`,
|
|
3838
|
+
`,Ld=e=>l.html`
|
|
3839
3839
|
<template>
|
|
3840
3840
|
<${e}-scheduler-timezone
|
|
3841
|
-
:timezone=${(0,
|
|
3841
|
+
:timezone=${(0,U.O)(e=>e.timezone)}
|
|
3842
3842
|
@change=${(e,t)=>e.handleChange(t.event,"timezone")}
|
|
3843
3843
|
></${e}-scheduler-timezone>
|
|
3844
3844
|
<${e}-scheduler-cron-builder
|
|
3845
|
-
:cron=${(0,
|
|
3845
|
+
:cron=${(0,U.O)(e=>e.cron)}
|
|
3846
3846
|
@change=${(e,t)=>e.handleChange(t.event,"cronExpression")}
|
|
3847
3847
|
min-minute-interval=${e=>e.minMinuteInterval}
|
|
3848
3848
|
?disable-tooltips=${e=>e.disableTooltips}
|
|
3849
3849
|
></${e}-scheduler-cron-builder>
|
|
3850
3850
|
</template>
|
|
3851
|
-
`,
|
|
3852
|
-
${e=>
|
|
3853
|
-
`;class
|
|
3851
|
+
`,Fd=l.html`
|
|
3852
|
+
${e=>Ld(O(e))}
|
|
3853
|
+
`;class Md 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"})],Md.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Md.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],Md.prototype,"timezone",void 0),(0,C.Cg)([l.observable],Md.prototype,"cron",void 0),(0,C.Cg)([l.observable],Md.prototype,"cronConfig",void 0);const _d=void 0,Hd={},zd=Md.compose(Object.assign({baseName:"scheduler",styles:Nd,template:Fd,shadowOptions:_d},Hd)),Pd=(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)),e.logLevel in Je.LogLevel&&(o=Object.assign({logLevel:e.logLevel},o)),e.toast&&(n=Object.assign({toast:e.toast},n),o=Object.assign({config:n},o)),ge(o,t,i)};var Ud,Bd,Gd;!function(e){e.MINUTES="Minutes",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e.MONTHLY="Monthly",e.YEARLY="Yearly"}(Ud||(Ud={})),function(e){e.WEEK="Week",e.WORK_WEEK="Work week"}(Bd||(Bd={})),function(e){e.DATE="Date",e.DAY_OF_MONTH="Day of month"}(Gd||(Gd={}));const jd=[{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"}],Vd=[{value:"1",label:"First"},{value:"2",label:"Second"},{value:"3",label:"Third"},{value:"4",label:"Fourth"},{value:"-1",label:"Last"}],Wd=[{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"}];var Yd;!function(e){e.updateCronConfig="update-cron-config"}(Yd||(Yd={}));const qd=e=>Number(e)>1?`/${e}`:"";const Kd=(e,t,i)=>{const o=Number(e);return!isNaN(o)&&o<=i&&o>=t};function Xd(e,t,i,o=!1,n=Kd){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,4)}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=>Xd(e,t,i,o,n))}function Qd(e,t){return{type:Ud.DAILY,frequency:e.startsWith("*/")?e.split("*/")[1]:"1",weekType:"?"===t?Bd.WEEK:Bd.WORK_WEEK}}function Jd(e){const t=e.includes("/");return{type:Ud.HOURLY,frequency:t?e.split("/")[1]:"1",during:t?"every_hour":"specific_hours",hours:t?void 0:e}}function Zd(e,t="*"){const i="*"!==t&&"0/1"!==t;return{type:Ud.MINUTES,frequency:e.includes("/")?e.split("/")[1]:"1",during:i?"specific_hours":"every_hour",hours:i?t:void 0}}function ec(e){return{type:Ud.WEEKLY,selectedDays:"*"!==e?new Set(e.split(",")):new Set}}const tc=(e,t,i,o)=>{let n;return n="?"===t?{type:Gd.DAY_OF_MONTH,day:o.split(/[L#]/)[0],weekNumber:o.includes("#")?o.split("#")[1]:"-1"}:{type:Gd.DATE,dayDate:t},e===Ud.YEARLY&&(n.month=i),n};function ic(e,t,i,o=tc){return{type:Ud.YEARLY,frequency:2===i.split("/").length?i.split("/")[1]:"1",dateOrDay:o(Ud.YEARLY,e,t,i.split("/")[0])}}function oc(e,t,i,o=tc){return{type:Ud.MONTHLY,frequency:t.startsWith("*/")?t.split("*/")[1]:"1",dateOrDay:o(Ud.MONTHLY,e,t,i.split("/")[0])}}const nc=l.css`
|
|
3854
3854
|
.input-container {
|
|
3855
3855
|
display: flex;
|
|
3856
3856
|
flex-direction: column;
|
|
@@ -3886,8 +3886,8 @@
|
|
|
3886
3886
|
width: 100%;
|
|
3887
3887
|
height: 0;
|
|
3888
3888
|
}
|
|
3889
|
-
`,
|
|
3890
|
-
${
|
|
3889
|
+
`,ac=l.css`
|
|
3890
|
+
${nc}
|
|
3891
3891
|
/* Host */
|
|
3892
3892
|
:host {
|
|
3893
3893
|
display: flex;
|
|
@@ -3947,32 +3947,32 @@
|
|
|
3947
3947
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
3948
3948
|
white-space: nowrap;
|
|
3949
3949
|
}
|
|
3950
|
-
`;var
|
|
3950
|
+
`;var sc=i(20633);const rc=(e,t,i)=>l.html`
|
|
3951
3951
|
<${t}-icon tooltip="${()=>e}" name="${()=>i}"></${t}-icon>
|
|
3952
|
-
`,
|
|
3953
|
-
${
|
|
3954
|
-
`,
|
|
3952
|
+
`,lc=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)}},dc=l.css`
|
|
3953
|
+
${nc}
|
|
3954
|
+
`,cc="\n <p>Select one or more hours.</p>\n",uc=l.html`
|
|
3955
3955
|
${e=>{return t=e.prefix,l.html`
|
|
3956
3956
|
<template>
|
|
3957
3957
|
<div class="input-container">
|
|
3958
|
-
<label class="label">Of ${e=>e.disableTooltips?"":
|
|
3958
|
+
<label class="label">Of ${e=>e.disableTooltips?"":rc("\n <p>Controls the daily frequency:</p>\n <ul>\n <li><strong>Week:</strong> allows you to configure the frequency of repeating days, including both weekdays and weekends.</li>\n <li><strong>Work week:</strong> runs the schedule at the specified time on every weekday (Monday - Friday). When this option is selected you cannot change the day frequency, it's every weekday.</li>\n </ul>\n",t)}</label>
|
|
3959
3959
|
<${t}-select
|
|
3960
3960
|
data-test-id="select-week-type"
|
|
3961
|
-
:value=${(0,
|
|
3961
|
+
:value=${(0,U.O)(e=>e.weekType)}
|
|
3962
3962
|
@change="${e=>e.updateCronConfig()}"
|
|
3963
3963
|
>
|
|
3964
|
-
<${t}-option data-test-id="${
|
|
3965
|
-
${
|
|
3964
|
+
<${t}-option data-test-id="${Bd.WEEK}">
|
|
3965
|
+
${Bd.WEEK}
|
|
3966
3966
|
</${t}-option>
|
|
3967
|
-
<${t}-option data-test-id="${
|
|
3968
|
-
${
|
|
3967
|
+
<${t}-option data-test-id="${Bd.WORK_WEEK}">
|
|
3968
|
+
${Bd.WORK_WEEK}
|
|
3969
3969
|
</${t}-option>
|
|
3970
3970
|
</${t}-select>
|
|
3971
3971
|
</div>
|
|
3972
3972
|
</template>
|
|
3973
3973
|
`;var t}}
|
|
3974
|
-
`;let
|
|
3975
|
-
${
|
|
3974
|
+
`;let hc=class extends(lc(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)||Bd.WORK_WEEK}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{weekType:this.weekType}),this.$emit(Yd.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],hc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],hc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],hc.prototype,"config",void 0),(0,C.Cg)([l.observable],hc.prototype,"weekType",void 0),hc=(0,C.Cg)([(0,l.customElement)({name:"daily-recurrence",template:uc,styles:dc})],hc);const pc=l.css`
|
|
3975
|
+
${nc}
|
|
3976
3976
|
:host {
|
|
3977
3977
|
display: flex;
|
|
3978
3978
|
flex-direction: column;
|
|
@@ -3993,43 +3993,43 @@
|
|
|
3993
3993
|
.day-date-number-field::part(root) {
|
|
3994
3994
|
width: 40%;
|
|
3995
3995
|
}
|
|
3996
|
-
`,
|
|
3996
|
+
`,mc=e=>l.html`
|
|
3997
3997
|
<div class="input-container">
|
|
3998
3998
|
<label class="label">Month</label>
|
|
3999
|
-
<${e}-select data-test-id="month-dropdown" :value=${(0,
|
|
4000
|
-
${(0,l.repeat)(()=>
|
|
3999
|
+
<${e}-select data-test-id="month-dropdown" :value=${(0,U.O)(e=>e.selectedMonth)} @change="${e=>e.updateCronConfig()}" >
|
|
4000
|
+
${(0,l.repeat)(()=>Wd,l.html`
|
|
4001
4001
|
<${e}-option value="${e=>e.value}">
|
|
4002
4002
|
${e=>e.label}
|
|
4003
4003
|
</${e}-option>
|
|
4004
4004
|
`)}
|
|
4005
4005
|
</${e}-select>
|
|
4006
4006
|
</div>
|
|
4007
|
-
`,
|
|
4007
|
+
`,gc=e=>l.html`
|
|
4008
4008
|
${(e=>l.html`
|
|
4009
4009
|
<div class="input-container">
|
|
4010
4010
|
<label class="label">On</label>
|
|
4011
4011
|
<${e}-select
|
|
4012
4012
|
data-test-id="select-day-or-date"
|
|
4013
|
-
:value=${(0,
|
|
4013
|
+
:value=${(0,U.O)(e=>e.dayOrDate)}
|
|
4014
4014
|
@change="${e=>e.updateCronConfig()}"
|
|
4015
4015
|
>
|
|
4016
|
-
<${e}-option data-test-id="${
|
|
4017
|
-
${
|
|
4016
|
+
<${e}-option data-test-id="${Gd.DATE}">
|
|
4017
|
+
${Gd.DATE}
|
|
4018
4018
|
</${e}-option>
|
|
4019
|
-
<${e}-option data-test-id="${
|
|
4020
|
-
${
|
|
4019
|
+
<${e}-option data-test-id="${Gd.DAY_OF_MONTH}">
|
|
4020
|
+
${Gd.DAY_OF_MONTH}
|
|
4021
4021
|
</${e}-option>
|
|
4022
4022
|
</${e}-select>
|
|
4023
4023
|
</div>
|
|
4024
4024
|
`)(e)}
|
|
4025
|
-
${(0,
|
|
4025
|
+
${(0,hn.q)(e=>e.dayOrDate===Gd.DATE,(e=>l.html`
|
|
4026
4026
|
<div class="row">
|
|
4027
|
-
${(0,l.when)(e=>e.config.type===
|
|
4028
|
-
${
|
|
4027
|
+
${(0,l.when)(e=>e.config.type===Ud.YEARLY,l.html`
|
|
4028
|
+
${mc(e)}
|
|
4029
4029
|
`)}
|
|
4030
4030
|
<div class="input-container">
|
|
4031
|
-
<label class="label"> ${e=>e.config.type===
|
|
4032
|
-
<${e}-select data-test-id="day-date-dropdown" :value=${(0,
|
|
4031
|
+
<label class="label"> ${e=>e.config.type===Ud.MONTHLY?"Day date":"Day"}</label>
|
|
4032
|
+
<${e}-select data-test-id="day-date-dropdown" :value=${(0,U.O)(e=>e.dayDate)} @change="${e=>e.updateCronConfig()}" >
|
|
4033
4033
|
${(0,l.repeat)(()=>Array.from({length:31},(e,t)=>t+1),l.html`
|
|
4034
4034
|
<${e}-option value="${e=>e}">
|
|
4035
4035
|
${e=>e}
|
|
@@ -4041,17 +4041,17 @@
|
|
|
4041
4041
|
|
|
4042
4042
|
`)(e),(e=>l.html`
|
|
4043
4043
|
<div class="day-of-month-row">
|
|
4044
|
-
${(0,l.when)(e=>e.config.type===
|
|
4045
|
-
${
|
|
4044
|
+
${(0,l.when)(e=>e.config.type===Ud.YEARLY,l.html`
|
|
4045
|
+
${mc(e)}
|
|
4046
4046
|
`)}
|
|
4047
4047
|
<div class="input-container">
|
|
4048
4048
|
<label class="label">Day of Month</label>
|
|
4049
4049
|
<${e}-select
|
|
4050
4050
|
data-test-id="select-week-number"
|
|
4051
|
-
:value=${(0,
|
|
4051
|
+
:value=${(0,U.O)(e=>e.weekNumber)}
|
|
4052
4052
|
@change="${e=>e.updateCronConfig()}"
|
|
4053
4053
|
>
|
|
4054
|
-
${(0,l.repeat)(()=>
|
|
4054
|
+
${(0,l.repeat)(()=>Vd,l.html`
|
|
4055
4055
|
<${e}-option value="${e=>e.value}">
|
|
4056
4056
|
${e=>e.label}
|
|
4057
4057
|
</${e}-option>
|
|
@@ -4062,10 +4062,10 @@
|
|
|
4062
4062
|
<label class="label">Day</label>
|
|
4063
4063
|
<${e}-select
|
|
4064
4064
|
data-test-id="select-week-day"
|
|
4065
|
-
:value=${(0,
|
|
4065
|
+
:value=${(0,U.O)(e=>e.day)}
|
|
4066
4066
|
@change="${e=>e.updateCronConfig()}"
|
|
4067
4067
|
>
|
|
4068
|
-
${(0,l.repeat)(()=>
|
|
4068
|
+
${(0,l.repeat)(()=>jd,l.html`
|
|
4069
4069
|
<${e}-option value="${e=>e.value}">
|
|
4070
4070
|
${e=>e.label}
|
|
4071
4071
|
</${e}-option>
|
|
@@ -4074,24 +4074,24 @@
|
|
|
4074
4074
|
</div>
|
|
4075
4075
|
</div>
|
|
4076
4076
|
`)(e))}
|
|
4077
|
-
`,
|
|
4078
|
-
${e=>
|
|
4079
|
-
`;let
|
|
4080
|
-
${
|
|
4077
|
+
`,vc=l.html`
|
|
4078
|
+
${e=>gc(e.prefix)}
|
|
4079
|
+
`;let fc=class extends(lc(s.FoundationElement)){constructor(){super(...arguments),this.prefix="",this.dayOrDate=Gd.DATE,this.weekNumber="1",this.day="1",this.selectedMonth="1"}configChanged(){this.config.type!==Ud.YEARLY&&this.config.type!==Ud.MONTHLY||(this.dayOrDate=this.config.dateOrDay.type||Gd.DATE,this.setFieldsFromConfig())}setFieldsFromConfig(){this.config.type===Ud.YEARLY&&(this.selectedMonth=this.config.dateOrDay.month),this.config.dateOrDay.type===Gd.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===Gd.DATE?{type:Gd.DATE,dayDate:this.dayDate||"1"}:{type:Gd.DAY_OF_MONTH,day:this.day||"1",weekNumber:this.weekNumber||"1"},e}updateCronConfig(){this.config.type===Ud.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(Yd.updateCronConfig,this.config)}};(0,C.Cg)([l.observable],fc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],fc.prototype,"config",void 0),(0,C.Cg)([l.observable],fc.prototype,"dayOrDate",void 0),(0,C.Cg)([l.observable],fc.prototype,"dayDate",void 0),(0,C.Cg)([l.observable],fc.prototype,"weekNumber",void 0),(0,C.Cg)([l.observable],fc.prototype,"day",void 0),(0,C.Cg)([l.observable],fc.prototype,"selectedMonth",void 0),fc=(0,C.Cg)([(0,l.customElement)({name:"monthly-yearly-recurrence",template:vc,styles:pc})],fc);const bc=l.css`
|
|
4080
|
+
${nc}
|
|
4081
4081
|
.weekdays-row {
|
|
4082
4082
|
display: flex;
|
|
4083
4083
|
gap: calc(var(--design-unit) * 3px);
|
|
4084
4084
|
flex-wrap: wrap;
|
|
4085
4085
|
}
|
|
4086
|
-
`,
|
|
4086
|
+
`,yc=l.html`
|
|
4087
4087
|
${e=>{return t=e.prefix,l.html`
|
|
4088
4088
|
<template>
|
|
4089
4089
|
<div class="input-container">
|
|
4090
4090
|
<label class="label">
|
|
4091
|
-
On ${e=>e.disableTooltips?"":
|
|
4091
|
+
On ${e=>e.disableTooltips?"":rc("\n <p>Select which days to run this recurrence on. It's not valid to select no days, so if there is only a single day selected then its checkbox is disabled. </p>\n <p>If you need to change the day you can enable other days which will allow you to disable days until you only have a single day selected again.</p>\n",t)}
|
|
4092
4092
|
</label>
|
|
4093
4093
|
<div class="weekdays-row">
|
|
4094
|
-
${(0,l.repeat)(()=>
|
|
4094
|
+
${(0,l.repeat)(()=>jd,l.html`
|
|
4095
4095
|
<${t}-checkbox
|
|
4096
4096
|
part="weekdays-checkbox"
|
|
4097
4097
|
class="weekdays-checkbox"
|
|
@@ -4107,12 +4107,12 @@
|
|
|
4107
4107
|
</div>
|
|
4108
4108
|
</template>
|
|
4109
4109
|
`;var t}}
|
|
4110
|
-
`;let
|
|
4110
|
+
`;let wc=class extends(lc(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(Yd.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],wc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],wc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],wc.prototype,"config",void 0),(0,C.Cg)([l.observable],wc.prototype,"selectedDays",void 0),wc=(0,C.Cg)([(0,l.customElement)({name:"weekly-recurrence",template:yc,styles:bc})],wc),(0,sc.N)(hc,wc,fc);const Cc=(e,t)=>l.html`
|
|
4111
4111
|
<monthly-yearly-recurrence
|
|
4112
4112
|
:prefix=${()=>e}
|
|
4113
4113
|
:config=${()=>t.cronConfig}
|
|
4114
4114
|
></monthly-yearly-recurrence>
|
|
4115
|
-
`,
|
|
4115
|
+
`,xc=(e,t,i)=>l.html`
|
|
4116
4116
|
<div class="input-container">
|
|
4117
4117
|
${(0,l.when)(()=>i,l.html`
|
|
4118
4118
|
<label class="label">${i}</label>
|
|
@@ -4121,7 +4121,7 @@
|
|
|
4121
4121
|
class="frequency-select"
|
|
4122
4122
|
?disabled=${()=>t.isDailyFrequencyDisabled}
|
|
4123
4123
|
data-test-id="frequency-dropdown"
|
|
4124
|
-
:value=${(0,
|
|
4124
|
+
:value=${(0,U.O)(()=>t.frequency)}
|
|
4125
4125
|
@change="${()=>t.handleChange("frequency")}"
|
|
4126
4126
|
>
|
|
4127
4127
|
${(0,l.repeat)(()=>t.frequencyList,l.html`
|
|
@@ -4130,25 +4130,25 @@
|
|
|
4130
4130
|
<div slot="end" class="suffix-label">${()=>t.frequencySuffix}</div>
|
|
4131
4131
|
</${e}-select>
|
|
4132
4132
|
</div>
|
|
4133
|
-
|
|
4133
|
+
`,$c=(e,t,i,o)=>l.html`
|
|
4134
4134
|
<div class="input-container">
|
|
4135
4135
|
<label class="label">Time </label>
|
|
4136
4136
|
<div class="flex-row">
|
|
4137
4137
|
${(0,l.when)(()=>i,l.html`
|
|
4138
|
-
<${e}-select class="time-select" data-test-id="hours-dropdown" :value=${(0,
|
|
4138
|
+
<${e}-select class="time-select" data-test-id="hours-dropdown" :value=${(0,U.O)(()=>t.hours)} @change="${()=>t.handleChange("hours")}" >
|
|
4139
4139
|
${(0,l.repeat)(()=>Array.from({length:24},(e,t)=>t),l.html`
|
|
4140
4140
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4141
4141
|
`)}
|
|
4142
4142
|
<div slot="end" class="suffix-label">hr</div>
|
|
4143
4143
|
</${e}-select>`)}
|
|
4144
4144
|
${(0,l.when)(()=>o,l.html`
|
|
4145
|
-
<${e}-select class="time-select" data-test-id="mins-dropdown" :value=${(0,
|
|
4145
|
+
<${e}-select class="time-select" data-test-id="mins-dropdown" :value=${(0,U.O)(()=>t.minutes)} @change="${()=>t.handleChange("minutes")}" >
|
|
4146
4146
|
${(0,l.repeat)(()=>Array.from({length:60},(e,t)=>t),l.html`
|
|
4147
4147
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4148
4148
|
`)}
|
|
4149
4149
|
<div slot="end" class="suffix-label">min</div>
|
|
4150
4150
|
</${e}-select>`)}
|
|
4151
|
-
<${e}-select class="time-select" data-test-id="seconds-dropdown" :value=${(0,
|
|
4151
|
+
<${e}-select class="time-select" data-test-id="seconds-dropdown" :value=${(0,U.O)(()=>t.seconds)} @change="${()=>t.handleChange("seconds")}" >
|
|
4152
4152
|
${(0,l.repeat)(()=>Array.from({length:60},(e,t)=>t),l.html`
|
|
4153
4153
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4154
4154
|
`)}
|
|
@@ -4156,16 +4156,16 @@
|
|
|
4156
4156
|
</${e}-select>
|
|
4157
4157
|
</div>
|
|
4158
4158
|
</div>
|
|
4159
|
-
|
|
4159
|
+
`,Sc=(e,t,i)=>{switch(e){case Ud.MINUTES:return l.html`
|
|
4160
4160
|
<div class="minutes-options-row">
|
|
4161
4161
|
<div class="input-container">
|
|
4162
4162
|
<label class="label"
|
|
4163
4163
|
>During
|
|
4164
|
-
${()=>i.disableTooltips?"":
|
|
4164
|
+
${()=>i.disableTooltips?"":rc("\n <p>Which hours in the day to run this schedule for:</p>\n <ul>\n <li><strong>Every hour:</strong> runs the minute schedule during every hour of the day.</li>\n <li><strong>Specific hours:</strong> specify which hours the minute schedule runs for. For example, just trading hours. Selecting every hour will configure the schedule as <strong>Every hour</strong>.</li>\n </ul>\n",t)}</label
|
|
4165
4165
|
>
|
|
4166
4166
|
<${t}-select
|
|
4167
4167
|
data-test-id="during-select"
|
|
4168
|
-
:value=${(0,
|
|
4168
|
+
:value=${(0,U.O)(()=>i.during)}
|
|
4169
4169
|
@change="${()=>i.handleDuringChange()}"
|
|
4170
4170
|
>
|
|
4171
4171
|
${(0,l.repeat)(()=>i.duringOptions,l.html`
|
|
@@ -4181,7 +4181,7 @@
|
|
|
4181
4181
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4182
4182
|
<div class="input-container">
|
|
4183
4183
|
<label class="label"
|
|
4184
|
-
>Hours ${
|
|
4184
|
+
>Hours ${rc(cc,t)}</label
|
|
4185
4185
|
>
|
|
4186
4186
|
<${t}-multiselect
|
|
4187
4187
|
class="time-select"
|
|
@@ -4196,31 +4196,31 @@
|
|
|
4196
4196
|
`)}
|
|
4197
4197
|
</div>
|
|
4198
4198
|
<div class="row">
|
|
4199
|
-
${
|
|
4200
|
-
${
|
|
4199
|
+
${xc(t,i,"Every")}
|
|
4200
|
+
${$c(t,i,!1,!1)}
|
|
4201
4201
|
</div>
|
|
4202
|
-
`;case
|
|
4202
|
+
`;case Ud.HOURLY:return l.html`
|
|
4203
4203
|
<div class="row">
|
|
4204
4204
|
<div class="input-container">
|
|
4205
4205
|
<label class="label"
|
|
4206
4206
|
>Mode
|
|
4207
|
-
${()=>i.disableTooltips?"":
|
|
4207
|
+
${()=>i.disableTooltips?"":rc("\n <p>Select the type of hourly recurrence:</p>\n <ul>\n <li><strong>Interval:</strong> runs at a repeating interval of hours (e.g. every 2 hours).</li>\n <li><strong>Selected Hours:</strong> allows you to choose specific hours of the day (e.g. 9, 10, and 14).</li>\n </ul>\n",t)}</label
|
|
4208
4208
|
>
|
|
4209
4209
|
<${t}-select
|
|
4210
4210
|
data-test-id="hourly-during-select"
|
|
4211
|
-
:value=${(0,
|
|
4211
|
+
:value=${(0,U.O)(()=>i.during)}
|
|
4212
4212
|
@change="${()=>i.handleDuringChange()}"
|
|
4213
4213
|
>
|
|
4214
4214
|
<${t}-option value="every_hour">Interval</${t}-option>
|
|
4215
4215
|
<${t}-option value="specific_hours">Selected Hours</${t}-option>
|
|
4216
4216
|
</${t}-select>
|
|
4217
4217
|
</div>
|
|
4218
|
-
${(0,l.when)(()=>"every_hour"===i.during,
|
|
4218
|
+
${(0,l.when)(()=>"every_hour"===i.during,xc(t,i,"Every"))}
|
|
4219
4219
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4220
4220
|
<div class="break"></div>
|
|
4221
4221
|
<div class="input-container">
|
|
4222
4222
|
<label class="label">
|
|
4223
|
-
Hours ${
|
|
4223
|
+
Hours ${rc(cc,t)}
|
|
4224
4224
|
</label>
|
|
4225
4225
|
<${t}-multiselect
|
|
4226
4226
|
class="time-select"
|
|
@@ -4232,9 +4232,9 @@
|
|
|
4232
4232
|
></${t}-multiselect>
|
|
4233
4233
|
</div>
|
|
4234
4234
|
`)}
|
|
4235
|
-
${
|
|
4235
|
+
${$c(t,i,!1,!0)}
|
|
4236
4236
|
</div>
|
|
4237
|
-
`;case
|
|
4237
|
+
`;case Ud.DAILY:return l.html`
|
|
4238
4238
|
${((e,t)=>l.html`
|
|
4239
4239
|
<daily-recurrence
|
|
4240
4240
|
:prefix=${()=>e}
|
|
@@ -4243,10 +4243,10 @@
|
|
|
4243
4243
|
></daily-recurrence>
|
|
4244
4244
|
`)(t,i)}
|
|
4245
4245
|
<div class="row">
|
|
4246
|
-
${
|
|
4247
|
-
${
|
|
4246
|
+
${xc(t,i,"Every")}
|
|
4247
|
+
${$c(t,i,!0,!0)}
|
|
4248
4248
|
</div>
|
|
4249
|
-
`;case
|
|
4249
|
+
`;case Ud.WEEKLY:return l.html`
|
|
4250
4250
|
<div class="row">
|
|
4251
4251
|
${((e,t)=>l.html`
|
|
4252
4252
|
<weekly-recurrence
|
|
@@ -4254,63 +4254,63 @@
|
|
|
4254
4254
|
:config=${()=>t.cronConfig}
|
|
4255
4255
|
?disable-tooltips=${()=>t.disableTooltips}
|
|
4256
4256
|
></weekly-recurrence>
|
|
4257
|
-
`)(t,i)} ${
|
|
4257
|
+
`)(t,i)} ${$c(t,i,!0,!0)}
|
|
4258
4258
|
</div>
|
|
4259
|
-
`;case
|
|
4259
|
+
`;case Ud.MONTHLY:return l.html`
|
|
4260
4260
|
<div class="row">
|
|
4261
|
-
${
|
|
4262
|
-
${
|
|
4261
|
+
${xc(t,i,"Every")}
|
|
4262
|
+
${$c(t,i,!0,!0)}
|
|
4263
4263
|
</div>
|
|
4264
|
-
${
|
|
4265
|
-
`;case
|
|
4266
|
-
<div class="row">${
|
|
4267
|
-
${
|
|
4268
|
-
`;default:return l.html``}},
|
|
4264
|
+
${Cc(t,i)}
|
|
4265
|
+
`;case Ud.YEARLY:return l.html`
|
|
4266
|
+
<div class="row">${$c(t,i,!0,!0)}</div>
|
|
4267
|
+
${Cc(t,i)}
|
|
4268
|
+
`;default:return l.html``}},Ec=e=>l.html`
|
|
4269
4269
|
<template>
|
|
4270
4270
|
<div class="container">
|
|
4271
4271
|
<div class="input-container">
|
|
4272
4272
|
<label class="label"
|
|
4273
4273
|
>Recurrence
|
|
4274
4274
|
${(0,l.when)(e=>!e.disableTooltips,l.html`
|
|
4275
|
-
${t=>
|
|
4275
|
+
${t=>rc(`\n <p>Select how often the event should occur:</p>\n <ul>\n${!t.minMinuteInterval||t.minMinuteInterval<30?"<li><strong>Minutes:</strong> Runs at every interval of minutes from the hour. Can be for every or specific hours.</li>":""}\n <li><strong>Hourly:</strong> Runs at a specific time in the hour, for one or more hours in the day.</li>\n <li><strong>Daily:</strong> Runs at a specific time of day, for a frequency interval of days per week (or work week).</li>\n <li><strong>Weekly:</strong> Runs at a specific time of day, for specific days of the week.</li>\n <li><strong>Monthly:</strong> Runs at a specific time of day in monthly intervals, on a specific date or day of month .</li>\n <li><strong>Yearly:</strong> Runs at a specific time, every year on a specific date or day of month.</li>\n </ul>\n`,e)}
|
|
4276
4276
|
`)}
|
|
4277
4277
|
</label>
|
|
4278
4278
|
<${e}-select
|
|
4279
4279
|
data-test-id="select-recurrence"
|
|
4280
|
-
:value=${(0,
|
|
4280
|
+
:value=${(0,U.O)(e=>e.recurrence)}
|
|
4281
4281
|
@change="${e=>e.handleRecurrenceChange()}"
|
|
4282
4282
|
>
|
|
4283
4283
|
${(0,l.when)(e=>e.isMinutesRecurrenceEnabled,l.html`
|
|
4284
|
-
<${e}-option data-test-id="${
|
|
4285
|
-
${
|
|
4284
|
+
<${e}-option data-test-id="${Ud.MINUTES}">
|
|
4285
|
+
${Ud.MINUTES}
|
|
4286
4286
|
</${e}-option>
|
|
4287
4287
|
`)}
|
|
4288
|
-
<${e}-option data-test-id="${
|
|
4289
|
-
${
|
|
4288
|
+
<${e}-option data-test-id="${Ud.HOURLY}">
|
|
4289
|
+
${Ud.HOURLY}
|
|
4290
4290
|
</${e}-option>
|
|
4291
|
-
<${e}-option data-test-id="${
|
|
4292
|
-
${
|
|
4291
|
+
<${e}-option data-test-id="${Ud.DAILY}">
|
|
4292
|
+
${Ud.DAILY}
|
|
4293
4293
|
</${e}-option>
|
|
4294
|
-
<${e}-option data-test-id="${
|
|
4295
|
-
${
|
|
4294
|
+
<${e}-option data-test-id="${Ud.WEEKLY}">
|
|
4295
|
+
${Ud.WEEKLY}
|
|
4296
4296
|
</${e}-option>
|
|
4297
|
-
<${e}-option data-test-id="${
|
|
4298
|
-
${
|
|
4297
|
+
<${e}-option data-test-id="${Ud.MONTHLY}">
|
|
4298
|
+
${Ud.MONTHLY}
|
|
4299
4299
|
</${e}-option>
|
|
4300
|
-
<${e}-option data-test-id="${
|
|
4301
|
-
${
|
|
4300
|
+
<${e}-option data-test-id="${Ud.YEARLY}">
|
|
4301
|
+
${Ud.YEARLY}
|
|
4302
4302
|
</${e}-option>
|
|
4303
4303
|
</${e}-select>
|
|
4304
4304
|
</div>
|
|
4305
4305
|
|
|
4306
4306
|
${(0,l.repeat)(e=>[`${e.recurrence}-${e.during}`],l.html`
|
|
4307
|
-
${(t,i)
|
|
4307
|
+
${(t,i)=>Sc(i.parent.recurrence,e,i.parent)}
|
|
4308
4308
|
`,{recycle:!1})}
|
|
4309
4309
|
</div>
|
|
4310
4310
|
</template>
|
|
4311
|
-
`,
|
|
4312
|
-
${e=>
|
|
4313
|
-
`;class Tc extends s.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Jd,buildConfigForHourlyRecurrence:Qd,buildConfigForDailyRecurrence:Xd,buildConfigForWeeklyRecurrence:Zd,buildConfigForMonthlyRecurrence:ic,buildConfigForYearlyRecurrence:tc},this.recurrence=Pd.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:Pd.DAILY,weekType:Ud.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=Kd)=>{const i=e.trim().split(" ");if(6!=i.length)return!1;const[o,n,a,s,r,l]=i;return t(o,0,59)&&t(n,0,59)&&t(a,0,23)&&t(s,1,31,!0)&&t(r,1,12)&&t(l,0,7,!0)})(this.cron))return void zd({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},O(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void zd({title:"Cron Scheduler",body:e,toast:{type:"critical"}},O(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case Pd.MINUTES:return"Minute(s)";case Pd.HOURLY:return"Hour(s)";case Pd.DAILY:return"Day(s)";case Pd.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case Pd.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 Pd.HOURLY:return Array.from({length:23},(e,t)=>t+1);case Pd.DAILY:return Array.from({length:31},(e,t)=>t+1);case Pd.MONTHLY:case Pd.YEARLY:return Array.from({length:12},(e,t)=>t+1);case Pd.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:24},(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;24===t.length?(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===Pd.DAILY&&this.cronConfig.weekType===Ud.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(Wd.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Wd.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case Pd.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:Pd.MINUTES},i),{frequency:a.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Pd.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:Pd.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Pd.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Pd.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:Ud.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Pd.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Pd.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Pd.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Pd.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Bd.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Pd.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Pd.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Bd.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:zd({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},O(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!==Pd.MINUTES&&this.cronConfig.type!==Pd.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 Pd.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 Pd.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 Pd.DAILY:this.cron=function(e,t=Yd){const i=e.weekType===Ud.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===Ud.WORK_WEEK?"2-6":"?"}`}(e,Yd);break;case Pd.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case Pd.MONTHLY:this.cron=function(e,t=Yd){const{dateOrDay:i,minutes:o,hours:n,seconds:a,frequency:s}=e,r=t(s);return i.type===Bd.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,Yd);break;case Pd.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===Bd.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:zd({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},O(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!==Pd.MINUTES&&e.type!==Pd.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==Pd.HOURLY&&e.type!==Pd.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],Tc.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],Tc.prototype,"cron",void 0),(0,C.Cg)([l.observable],Tc.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],Tc.prototype,"frequency",void 0),(0,C.Cg)([l.observable],Tc.prototype,"during",void 0),(0,C.Cg)([l.volatile],Tc.prototype,"duringOptions",null),(0,C.Cg)([l.observable],Tc.prototype,"hours",void 0),(0,C.Cg)([l.observable],Tc.prototype,"minutes",void 0),(0,C.Cg)([l.observable],Tc.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],Tc.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],Tc.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],Tc.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],Tc.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],Tc.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Tc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],Tc.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],Tc.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],Tc.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],Tc.prototype,"timezone",void 0);const Oc=void 0,kc={},Ic=Tc.compose(Object.assign({baseName:"scheduler-cron-builder",styles:nc,template:Ec,shadowOptions:Oc},kc)),Dc=l.css`
|
|
4311
|
+
`,Tc=l.html`
|
|
4312
|
+
${e=>Ec(O(e))}
|
|
4313
|
+
`;class Oc extends s.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Zd,buildConfigForHourlyRecurrence:Jd,buildConfigForDailyRecurrence:Qd,buildConfigForWeeklyRecurrence:ec,buildConfigForMonthlyRecurrence:oc,buildConfigForYearlyRecurrence:ic},this.recurrence=Ud.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:Ud.DAILY,weekType:Bd.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=Xd)=>{const i=e.trim().split(" ");if(6!=i.length)return!1;const[o,n,a,s,r,l]=i;return t(o,0,59)&&t(n,0,59)&&t(a,0,23)&&t(s,1,31,!0)&&t(r,1,12)&&t(l,0,7,!0)})(this.cron))return void Pd({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},O(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void Pd({title:"Cron Scheduler",body:e,toast:{type:"critical"}},O(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case Ud.MINUTES:return"Minute(s)";case Ud.HOURLY:return"Hour(s)";case Ud.DAILY:return"Day(s)";case Ud.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case Ud.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 Ud.HOURLY:return Array.from({length:23},(e,t)=>t+1);case Ud.DAILY:return Array.from({length:31},(e,t)=>t+1);case Ud.MONTHLY:case Ud.YEARLY:return Array.from({length:12},(e,t)=>t+1);case Ud.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:24},(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;24===t.length?(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===Ud.DAILY&&this.cronConfig.weekType===Bd.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(Yd.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Yd.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case Ud.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:Ud.MINUTES},i),{frequency:a.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Ud.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:Ud.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Ud.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Ud.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:Bd.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Ud.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Ud.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Ud.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Ud.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Gd.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Ud.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Ud.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Gd.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:Pd({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},O(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!==Ud.MINUTES&&this.cronConfig.type!==Ud.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 Ud.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 Ud.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 Ud.DAILY:this.cron=function(e,t=qd){const i=e.weekType===Bd.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===Bd.WORK_WEEK?"2-6":"?"}`}(e,qd);break;case Ud.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case Ud.MONTHLY:this.cron=function(e,t=qd){const{dateOrDay:i,minutes:o,hours:n,seconds:a,frequency:s}=e,r=t(s);return i.type===Gd.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,qd);break;case Ud.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===Gd.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:Pd({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},O(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!==Ud.MINUTES&&e.type!==Ud.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==Ud.HOURLY&&e.type!==Ud.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],Oc.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],Oc.prototype,"cron",void 0),(0,C.Cg)([l.observable],Oc.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],Oc.prototype,"frequency",void 0),(0,C.Cg)([l.observable],Oc.prototype,"during",void 0),(0,C.Cg)([l.volatile],Oc.prototype,"duringOptions",null),(0,C.Cg)([l.observable],Oc.prototype,"hours",void 0),(0,C.Cg)([l.observable],Oc.prototype,"minutes",void 0),(0,C.Cg)([l.observable],Oc.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],Oc.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],Oc.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],Oc.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],Oc.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],Oc.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Oc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],Oc.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],Oc.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],Oc.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],Oc.prototype,"timezone",void 0);const kc=void 0,Ic={},Dc=Oc.compose(Object.assign({baseName:"scheduler-cron-builder",styles:ac,template:Tc,shadowOptions:kc},Ic)),Rc=l.css`
|
|
4314
4314
|
/* Host */
|
|
4315
4315
|
:host {
|
|
4316
4316
|
display: flex;
|
|
@@ -4337,7 +4337,7 @@
|
|
|
4337
4337
|
.timezone-combobox::part(listbox) {
|
|
4338
4338
|
max-height: 20vh;
|
|
4339
4339
|
}
|
|
4340
|
-
`,
|
|
4340
|
+
`,Ac=e=>l.html`
|
|
4341
4341
|
<template>
|
|
4342
4342
|
<div class="container">
|
|
4343
4343
|
<label class="label">Time Zone</label>
|
|
@@ -4345,7 +4345,7 @@
|
|
|
4345
4345
|
data-test-id="cron-scheduler-timezone"
|
|
4346
4346
|
autocomplete="both"
|
|
4347
4347
|
class="timezone-combobox"
|
|
4348
|
-
value="${(0,
|
|
4348
|
+
value="${(0,U.O)(e=>e.timezone)}"
|
|
4349
4349
|
>
|
|
4350
4350
|
${(0,l.repeat)(e=>e.timeZones,l.html`
|
|
4351
4351
|
<${e}-option value="${e=>e}">${e=>e}</${e}-option>
|
|
@@ -4353,9 +4353,9 @@
|
|
|
4353
4353
|
</${e}-combobox>
|
|
4354
4354
|
</div>
|
|
4355
4355
|
</template>
|
|
4356
|
-
`,
|
|
4357
|
-
${e=>
|
|
4358
|
-
`;class
|
|
4356
|
+
`,Nc=l.html`
|
|
4357
|
+
${e=>Ac(O(e))}
|
|
4358
|
+
`;class Lc 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){Pd({title:"Cron Scheduler",body:"Unable to fetch timezones data.",toast:{type:"critical"}},"rapid"),Aa.v.error(e)}})}}(0,C.Cg)([l.observable],Lc.prototype,"timezone",void 0),(0,C.Cg)([ai.dm],Lc.prototype,"connect",void 0),(0,C.Cg)([l.observable],Lc.prototype,"timeZones",void 0);const Fc=void 0,Mc={},_c=Lc.compose(Object.assign({baseName:"scheduler-timezone",styles:Rc,template:Nc,shadowOptions:Fc},Mc)),Hc=l.css`
|
|
4359
4359
|
.search-bar-combobox {
|
|
4360
4360
|
width: 100%;
|
|
4361
4361
|
min-width: auto;
|
|
@@ -4448,7 +4448,7 @@
|
|
|
4448
4448
|
.close-icon {
|
|
4449
4449
|
color: var(--accent-fill-rest);
|
|
4450
4450
|
}
|
|
4451
|
-
`,
|
|
4451
|
+
`,zc=(e="start")=>'\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="10px" height="10px">\n <g transform="matrix(1 0 0 1 -256 -14 )">\n <path class="cross-icon" fill="white" d="M 9.9265625 8.865937499999998 L 6.060625000000001 5 L 9.265625 1.795 L 9.9265625 1.1340624999999993 C 10.0240625 1.0365624999999996 10.0240625 0.8781249999999996 9.9265625 0.7806249999999992 L 9.219375 0.07343749999999982 C 9.121875 -0.024062500000000542 8.9634375 -0.024062500000000542 8.8659375 0.07343749999999982 L 5 3.9393750000000005 L 1.1340625 0.073125 C 1.0365625 -0.02437500000000037 0.8781250000000002 -0.02437500000000037 0.7806249999999999 0.073125 L 0.073125 0.7803125 C -0.024375000000000008 0.8778124999999998 -0.024375000000000008 1.0362499999999997 0.073125 1.13375 L 3.9393750000000005 5 L 0.073125 8.865937499999998 C -0.024375000000000008 8.9634375 -0.024375000000000008 9.121875 0.073125 9.219375000000001 L 0.7803125 9.9265625 C 0.8778125000000001 10.0240625 1.03625 10.0240625 1.13375 9.9265625 L 5 6.060625 L 8.205 9.265625 L 8.8659375 9.9265625 C 8.9634375 10.0240625 9.121875 10.0240625 9.219375 9.9265625 L 9.9265625 9.219375000000001 C 10.0240625 9.121875 10.0240625 8.9634375 9.9265625 8.865937499999998 Z " fill-rule="nonzero" fill="#c9c9c9" stroke="none" fill-opacity="0.8" transform="matrix(1 0 0 1 256 14 )"/>\n </g>\n</svg>\n',Pc=()=>'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="30px" height="30px" class="bi bi-plus" viewBox="0 0 16 16">\n <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>\n</svg>',Uc=e=>l.html`
|
|
4452
4452
|
|
|
4453
4453
|
<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)])}}
|
|
4454
4454
|
>
|
|
@@ -4527,10 +4527,10 @@
|
|
|
4527
4527
|
<${e}-tooltip class="tooltip" anchor="search-clear-button">
|
|
4528
4528
|
Clear Search Terms
|
|
4529
4529
|
</${e}-tooltip>
|
|
4530
|
-
`,
|
|
4531
|
-
${e=>
|
|
4532
|
-
`,
|
|
4533
|
-
${
|
|
4530
|
+
`,Bc=l.html`
|
|
4531
|
+
${e=>Uc(O(e))}
|
|
4532
|
+
`,Gc=10,jc=3,Vc=1,Wc=(e,t)=>(new V.b).withExpression((new j.K).withField(e).withValue(t).withSerialiser(G.n.containsIgnoreCase).build()).build();class Yc extends s.FoundationElement{constructor(){super(...arguments),this.searchTerm="",this.appearance="neutral",this.minlength=jc,this.position=Mt.BELOW,this.placeholder="Start typing to search",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.combobox.currentValue="",this.$emit("selectionChange",[])}clearSearch(){this.clear()}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)},Gc)})}pasteHandler(e){var t;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.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],Yc.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Yc.prototype,"options",void 0),(0,C.Cg)([l.observable],Yc.prototype,"searchTerm",void 0),(0,C.Cg)([l.attr],Yc.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Yc.prototype,"minlength",void 0),(0,C.Cg)([l.attr],Yc.prototype,"position",void 0),(0,C.Cg)([l.attr],Yc.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Yc.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Yc.prototype,"loading",void 0),(0,C.Cg)([l.observable],Yc.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Yc.prototype,"filteredOptions",void 0);const qc=void 0,Kc={},Xc=Yc.compose(Object.assign({baseName:"search-bar",template:Bc,styles:Hc,shadowOptions:qc},Kc)),Qc=(e,t)=>l.css`
|
|
4533
|
+
${pi(e,t)}
|
|
4534
4534
|
.control {
|
|
4535
4535
|
width: auto;
|
|
4536
4536
|
padding-left: calc(${r.designUnit} * 1px);
|
|
@@ -4551,7 +4551,7 @@
|
|
|
4551
4551
|
min-width: 150px;
|
|
4552
4552
|
max-width: 169px;
|
|
4553
4553
|
}
|
|
4554
|
-
`,
|
|
4554
|
+
`,Jc=(e,t)=>l.html`
|
|
4555
4555
|
<template
|
|
4556
4556
|
aria-disabled="${e=>e.ariaDisabled}"
|
|
4557
4557
|
autocomplete="${e=>e.autocomplete}"
|
|
@@ -4603,7 +4603,7 @@
|
|
|
4603
4603
|
></slot>
|
|
4604
4604
|
</div>
|
|
4605
4605
|
</template>
|
|
4606
|
-
`;class
|
|
4606
|
+
`;class Zc extends r.Combobox{constructor(){super(...arguments),this.minlength=Vc,this.previousLength=-1,this.changeListener=e=>{this.previousLength=0}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",this.changeListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this.changeListener)}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest("option,[role=option]");if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.value=this.control.value,this.$emit("change")}this.control.focus()}}keyupHandler(e){switch(e.key){case"Backspace":case"Delete":this.previousLength<0?this.$emit("inputdeleted"):this.previousLength=this.previousLength-1;break;case"Enter":if(this.open&&-1!==this.selectedIndex){const e=this.slottedOptions[0];this.selectedOptions=[e],this.control.value=e.text,this.value=this.control.value,this.$emit("change")}}super.keyupHandler(e)}keydownHandler(e){switch(e.key){case"ArrowUp":case"ArrowDown":return this.control.value.length<this.minlength?void 0:super.keydownHandler(e);case"Enter":return-1!==this.selectedIndex&&super.keydownHandler(e);case"Tab":if(!this.open)return!0;e.shiftKey?this.selectPreviousOption():this.selectNextOption();break;default:return super.keydownHandler(e)}}inputHandler(e){this.control.value.length>=this.minlength?this.open=!0:(e.stopImmediatePropagation(),this.open=!1),this.value=this.control.value,this.previousLength=this.control.value.length}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),void this.focusAndScrollOptionIntoView();this.ariaControls="",this.ariaExpanded="false"}}(0,C.Cg)([l.attr],Zc.prototype,"minlength",void 0);const eu={delegatesFocus:!0,mode:"open"},tu={},iu=Zc.compose(Object.assign({baseName:"search-bar-combobox",template:Jc,styles:Qc,shadowOptions:eu},tu)),ou=l.css`
|
|
4607
4607
|
:host {
|
|
4608
4608
|
display: block;
|
|
4609
4609
|
width: 100%;
|
|
@@ -4796,7 +4796,7 @@
|
|
|
4796
4796
|
.section-link.state-none {
|
|
4797
4797
|
color: var(--neutral-foreground-rest);
|
|
4798
4798
|
}
|
|
4799
|
-
`,
|
|
4799
|
+
`,nu=l.html`
|
|
4800
4800
|
${e=>{return t=O(e),l.html`
|
|
4801
4801
|
<template>
|
|
4802
4802
|
<div
|
|
@@ -4841,7 +4841,7 @@
|
|
|
4841
4841
|
</div>
|
|
4842
4842
|
</template>
|
|
4843
4843
|
`;var t}}
|
|
4844
|
-
`,nu=(0,Qe.createLogger)("SectionNavigator"),au="section-navigator",su={setState:`${au}-set-state`,setStates:`${au}-set-states`,clearState:`${au}-clear-state`,clearAllStates:`${au}-clear-all-states`},ru={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},lu={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 du extends s.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=ru,this.stateIcons=lu,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 nu.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){nu.error("Error updating spacer:",e)}}else nu.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void nu.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){nu.error("Error scrolling to section:",e)}else nu.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()},du.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,du.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){nu.error("Error setting up scroll detection:",e)}else nu.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){nu.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){nu.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){nu.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){nu.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){nu.error("Error handling generic state event:",e)}},this.addEventListener(su.setState,this.handleSetStateRef),this.addEventListener(su.setStates,this.handleSetStatesRef),this.addEventListener(su.clearState,this.handleClearStateRef),this.addEventListener(su.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(su.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(su.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(su.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(su.clearAllStates,this.handleGenericStateEventRef,!0)):nu.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 nu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void nu.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 nu.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void nu.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 nu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void nu.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 nu.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):nu.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]||"":(nu.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return nu.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]||lu[e]:(nu.warn("State name is required"),lu.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(su.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(su.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(su.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(su.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(su.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(su.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(su.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(su.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}du.SCROLL_END_TIMEOUT=150,du.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],du.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],du.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],du.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],du.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],du.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],du.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],du.prototype,"activeSection",void 0);const cu={mode:"open"},uu={},hu=du.compose(Object.assign({baseName:"foundation-section-navigator",template:ou,styles:iu,shadowOptions:cu},uu)),pu=(e,t)=>l.css`
|
|
4844
|
+
`,au=(0,Je.createLogger)("SectionNavigator"),su="section-navigator",ru={setState:`${su}-set-state`,setStates:`${su}-set-states`,clearState:`${su}-clear-state`,clearAllStates:`${su}-clear-all-states`},lu={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},du={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 cu extends s.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=lu,this.stateIcons=du,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 au.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){au.error("Error updating spacer:",e)}}else au.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void au.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){au.error("Error scrolling to section:",e)}else au.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()},cu.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,cu.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){au.error("Error setting up scroll detection:",e)}else au.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){au.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){au.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){au.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){au.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){au.error("Error handling generic state event:",e)}},this.addEventListener(ru.setState,this.handleSetStateRef),this.addEventListener(ru.setStates,this.handleSetStatesRef),this.addEventListener(ru.clearState,this.handleClearStateRef),this.addEventListener(ru.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(ru.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(ru.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(ru.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(ru.clearAllStates,this.handleGenericStateEventRef,!0)):au.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 au.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void au.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 au.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void au.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 au.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void au.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 au.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):au.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]||"":(au.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return au.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]||du[e]:(au.warn("State name is required"),du.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(ru.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(ru.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(ru.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(ru.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(ru.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(ru.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(ru.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(ru.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}cu.SCROLL_END_TIMEOUT=150,cu.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],cu.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],cu.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],cu.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],cu.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],cu.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],cu.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],cu.prototype,"activeSection",void 0);const uu={mode:"open"},hu={},pu=cu.compose(Object.assign({baseName:"foundation-section-navigator",template:nu,styles:ou,shadowOptions:uu},hu)),mu=(e,t)=>l.css`
|
|
4845
4845
|
${(0,r.radioGroupStyles)(e,t)}
|
|
4846
4846
|
::slotted(foundation-segmented-item:first-of-type) {
|
|
4847
4847
|
border-radius: calc(var(--control-corner-radius) * 1px) 0 0
|
|
@@ -4854,7 +4854,7 @@
|
|
|
4854
4854
|
calc(var(--control-corner-radius) * 1px) 0;
|
|
4855
4855
|
border-left-width: 0;
|
|
4856
4856
|
}
|
|
4857
|
-
`,
|
|
4857
|
+
`,gu=(e,t)=>(0,s.radioGroupTemplate)(e,t);class vu extends s.RadioGroup{valueChanged(){void 0===this.value&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}}const fu=void 0,bu={},yu=vu.compose(Object.assign({baseName:"segmented-control",template:gu,styles:mu,shadowOptions:fu},bu)),wu=(e,t)=>l.css`
|
|
4858
4858
|
${(0,r.radioStyles)(e,t)}
|
|
4859
4859
|
:host {
|
|
4860
4860
|
padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
|
|
@@ -4865,7 +4865,7 @@
|
|
|
4865
4865
|
:host([aria-checked='true']) {
|
|
4866
4866
|
background: var(--accent-foreground-rest);
|
|
4867
4867
|
}
|
|
4868
|
-
`,
|
|
4868
|
+
`,Cu=(e,t)=>l.html`
|
|
4869
4869
|
<template
|
|
4870
4870
|
role="radio"
|
|
4871
4871
|
aria-checked="${e=>e.checked}"
|
|
@@ -4879,7 +4879,7 @@
|
|
|
4879
4879
|
<slot></slot>
|
|
4880
4880
|
</span>
|
|
4881
4881
|
</template>
|
|
4882
|
-
`;class
|
|
4882
|
+
`;class xu extends r.Radio{}const $u=void 0,Su={},Eu=xu.compose(Object.assign({baseName:"segmented-item",template:Cu,styles:wu,shadowOptions:$u},Su)),Tu=(e,t)=>l.css`
|
|
4883
4883
|
${(0,r.selectStyles)(e,t)}
|
|
4884
4884
|
|
|
4885
4885
|
:host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible),
|
|
@@ -4887,19 +4887,19 @@
|
|
|
4887
4887
|
box-shadow: none;
|
|
4888
4888
|
outline: none;
|
|
4889
4889
|
}
|
|
4890
|
-
`,
|
|
4890
|
+
`,Ou=(e,t)=>(0,s.selectTemplate)(e,t);class ku extends r.Select{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.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 Iu=void 0,Du={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 '},Ru=ku.compose(Object.assign({baseName:"select",template:Ou,styles:Tu,shadowOptions:Iu},Du)),Au=(e,t)=>l.css`
|
|
4891
4891
|
${(0,r.skeletonStyles)(e,t)}
|
|
4892
|
-
`,
|
|
4892
|
+
`,Nu=(e,t)=>(0,s.skeletonTemplate)(e,t);class Lu extends r.Skeleton{}const Fu=void 0,Mu={},_u=Lu.compose(Object.assign({baseName:"skeleton",template:Nu,styles:Au,shadowOptions:Fu},Mu)),Hu=(e,t)=>l.css`
|
|
4893
4893
|
${(0,r.sliderStyles)(e,t)}
|
|
4894
4894
|
.track-progress {
|
|
4895
4895
|
background-color: var(--accent-fill-rest);
|
|
4896
4896
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
4897
4897
|
}
|
|
4898
|
-
`;var
|
|
4898
|
+
`;var zu=i(17733),Pu=i(54120);const Uu=(e,t)=>l.html`
|
|
4899
4899
|
<template
|
|
4900
4900
|
role="slider"
|
|
4901
4901
|
class="${e=>e.readOnly?"readonly":""}
|
|
4902
|
-
${e=>e.orientation||
|
|
4902
|
+
${e=>e.orientation||zu.t.horizontal}"
|
|
4903
4903
|
tabindex="${e=>e.disabled?null:0}"
|
|
4904
4904
|
aria-valuetext="${e=>e.valueTextFormatter(e.value)}"
|
|
4905
4905
|
aria-valuenow="${e=>e.value}"
|
|
@@ -4914,7 +4914,7 @@
|
|
|
4914
4914
|
<div ${(0,l.ref)("track")} part="track-container" class="track">
|
|
4915
4915
|
<div
|
|
4916
4916
|
class="track-progress"
|
|
4917
|
-
style="${e=>{const t=1-(0,
|
|
4917
|
+
style="${e=>{const t=1-(0,Pu.AB)(0,1,(parseInt(e.value)-e.min)/(e.max-e.min)),i=Math.round(100*(1-t));return"horizontal"===e.orientation?e.isDragging?`height: calc(var(--track-width) * 1px); width: ${i}%;`:`height: calc(var(--track-width) * 1px); width: ${i}%; transition: all 0.2s ease;`:e.isDragging?`width: calc(var(--track-width) * 1px); height: ${i}%;`:`width: calc(var(--track-width) * 1px); height: ${i}%; transition: all 0.2s ease;`}}"
|
|
4918
4918
|
></div>
|
|
4919
4919
|
</div>
|
|
4920
4920
|
<slot></slot>
|
|
@@ -4928,9 +4928,9 @@
|
|
|
4928
4928
|
</div>
|
|
4929
4929
|
</div>
|
|
4930
4930
|
</template>
|
|
4931
|
-
`;class
|
|
4931
|
+
`;class Bu extends r.Slider{}const Gu=void 0,ju={thumb:'\n <div class="thumb-cursor"></div>\n '},Vu=Bu.compose(Object.assign({baseName:"slider",template:Uu,styles:Hu,shadowOptions:Gu},ju)),Wu=(e,t)=>l.css`
|
|
4932
4932
|
${(0,r.sliderLabelStyles)(e,t)}
|
|
4933
|
-
`,
|
|
4933
|
+
`,Yu=(e,t)=>(0,s.sliderLabelTemplate)(e,t);class qu extends r.SliderLabel{}const Ku=void 0,Xu={},Qu=qu.compose(Object.assign({baseName:"slider-label",template:Yu,styles:Wu,shadowOptions:Ku},Xu)),Ju="default",Zu={DEFAULT:Ju,ERROR:"error",SUCCESS:"success"},eh=1e4,th={DISMISS:"dismiss",AUTO_DISMISS:"autoDismiss"},ih=l.css`
|
|
4934
4934
|
@keyframes append-from-left-animate {
|
|
4935
4935
|
from {
|
|
4936
4936
|
transform: translateX(100%);
|
|
@@ -5051,7 +5051,7 @@
|
|
|
5051
5051
|
flex: 1;
|
|
5052
5052
|
overflow: hidden;
|
|
5053
5053
|
}
|
|
5054
|
-
`,
|
|
5054
|
+
`,oh=e=>l.html`
|
|
5055
5055
|
<div
|
|
5056
5056
|
role="alert"
|
|
5057
5057
|
aria-live="polite"
|
|
@@ -5080,10 +5080,10 @@
|
|
|
5080
5080
|
</div>
|
|
5081
5081
|
`)}
|
|
5082
5082
|
</div>
|
|
5083
|
-
`,
|
|
5084
|
-
${e=>
|
|
5085
|
-
`,
|
|
5086
|
-
${
|
|
5083
|
+
`,nh=l.html`
|
|
5084
|
+
${e=>oh(O(e))}
|
|
5085
|
+
`,ah={mode:"open",delegatesFocus:!0};class sh extends s.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=eh,this.autoClose=!0,this.type=Ju,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(th.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:Ju}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:Ju,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:eh}handleDissmis(e=!1){this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(th.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(th.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}}(0,C.Cg)([l.observable],sh.prototype,"error",void 0),(0,C.Cg)([l.observable],sh.prototype,"notification",void 0),(0,C.Cg)([l.observable],sh.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"identifier"})],sh.prototype,"identifier",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],sh.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],sh.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],sh.prototype,"type",void 0);const rh=sh.compose({baseName:"snackbar",styles:ih,template:nh,shadowOptions:ah}),lh=(e,t)=>l.css`
|
|
5086
|
+
${rr()}
|
|
5087
5087
|
|
|
5088
5088
|
.fa-stack {
|
|
5089
5089
|
display: inline-block;
|
|
@@ -5108,14 +5108,14 @@
|
|
|
5108
5108
|
.fa-stack-1x {
|
|
5109
5109
|
z-index: 1;
|
|
5110
5110
|
}
|
|
5111
|
-
`,
|
|
5111
|
+
`,dh=l.html`
|
|
5112
5112
|
<span
|
|
5113
5113
|
class=${e=>`fa-stack fa-${e.size}`}
|
|
5114
5114
|
style=${e=>`vertical-align: ${e["vertical-align"]};`}
|
|
5115
5115
|
>
|
|
5116
5116
|
<slot></slot>
|
|
5117
5117
|
</span>
|
|
5118
|
-
`;class
|
|
5118
|
+
`;class ch extends s.FoundationElement{constructor(){super(...arguments),this.size=mr,this["vertical-align"]="baseline"}}(0,C.Cg)([l.attr],ch.prototype,"size",void 0),(0,C.Cg)([l.attr],ch.prototype,"vertical-align",void 0);const uh=ch.compose({baseName:"stacking-icons",template:dh,styles:lh}),hh=l.css`
|
|
5119
5119
|
.status-pill {
|
|
5120
5120
|
font-size: 12px;
|
|
5121
5121
|
display: inline-flex;
|
|
@@ -5149,7 +5149,7 @@
|
|
|
5149
5149
|
.status-pill-image {
|
|
5150
5150
|
height: 14px;
|
|
5151
5151
|
}
|
|
5152
|
-
`,
|
|
5152
|
+
`,ph=l.html`
|
|
5153
5153
|
${e=>{return t=O(e),l.html`
|
|
5154
5154
|
${(0,l.when)(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),l.html`
|
|
5155
5155
|
<div
|
|
@@ -5180,7 +5180,7 @@
|
|
|
5180
5180
|
</div>
|
|
5181
5181
|
`)}
|
|
5182
5182
|
`;var t}}
|
|
5183
|
-
`,
|
|
5183
|
+
`,mh=(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 gh 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)))Ze.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=mh(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"})],gh.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],gh.prototype,"iconName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-src"})],gh.prototype,"iconSrc",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial"})],gh.prototype,"iconInitial",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial-background-color"})],gh.prototype,"iconInitialBackgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],gh.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],gh.prototype,"textColor",void 0),(0,C.Cg)([l.attr],gh.prototype,"text",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown"})],gh.prototype,"dateCountdown",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-completed-message"})],gh.prototype,"dateCountdownCompletedMessage",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-unit"})],gh.prototype,"dateCountdownUnit",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-visible-after"})],gh.prototype,"dateCountdownVisibleAfter",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"hide-when-countdown-completed"})],gh.prototype,"hideWhenCountdownCompleted",void 0),(0,C.Cg)([l.observable],gh.prototype,"countdown",void 0),(0,C.Cg)([l.observable],gh.prototype,"isCountdownExpired",void 0),(0,C.Cg)([l.observable],gh.prototype,"isCountdownVisible",void 0);const vh=gh.compose({baseName:"status-pill",styles:hh,template:ph}),fh=(e,t)=>l.css`
|
|
5184
5184
|
.tree-item {
|
|
5185
5185
|
cursor: default;
|
|
5186
5186
|
}
|
|
@@ -5290,8 +5290,8 @@
|
|
|
5290
5290
|
width: calc(100% - 28px);
|
|
5291
5291
|
background-color: var(--accent-fill-rest); /* Choose a color */
|
|
5292
5292
|
}
|
|
5293
|
-
`,
|
|
5294
|
-
${(0,
|
|
5293
|
+
`,bh=e=>l.html`
|
|
5294
|
+
${(0,hn.q)(e=>e.orientation===s.TabsOrientation.vertical,l.html`
|
|
5295
5295
|
<${e}-tree-item ${(0,l.ref)("treeItem")}
|
|
5296
5296
|
class=${e=>(0,x.x)("tree-item",["cursor-pointer",e.showCursorPointer])}
|
|
5297
5297
|
@click="${(e,t)=>e.$emit("tab-clicked",e.tabPosition-1)}">
|
|
@@ -5334,13 +5334,13 @@
|
|
|
5334
5334
|
`)}
|
|
5335
5335
|
</div>
|
|
5336
5336
|
`)}
|
|
5337
|
-
`,
|
|
5338
|
-
${e=>
|
|
5339
|
-
`;class
|
|
5337
|
+
`,yh=l.html`
|
|
5338
|
+
${e=>bh(O(e))}
|
|
5339
|
+
`;class wh 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],wh.prototype,"slot",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],wh.prototype,"selected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],wh.prototype,"completed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],wh.prototype,"error",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],wh.prototype,"isLast",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],wh.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],wh.prototype,"showCursorPointer",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tab-position"})],wh.prototype,"tabPosition",void 0),(0,C.Cg)([l.attr],wh.prototype,"orientation",void 0);const Ch=void 0,xh={},$h=wh.compose(Object.assign({baseName:"stepper-tab",template:yh,styles:fh,shadowOptions:Ch},xh)),Sh=()=>l.html`
|
|
5340
5340
|
<template slot="tab-panel" role="stepper-tab-panel">
|
|
5341
5341
|
<slot></slot>
|
|
5342
5342
|
</template>
|
|
5343
|
-
`;class
|
|
5343
|
+
`;class Eh extends s.FoundationElement{}const Th=void 0,Oh={},kh=Eh.compose(Object.assign({baseName:"stepper-tab-panel",template:Sh,shadowOptions:Th},Oh)),Ih=(e,t)=>l.css`
|
|
5344
5344
|
${(0,r.switchStyles)(e,t)}
|
|
5345
5345
|
.checked-indicator {
|
|
5346
5346
|
transform: scale(1.3);
|
|
@@ -5353,20 +5353,20 @@
|
|
|
5353
5353
|
.checked-indicator {
|
|
5354
5354
|
border-radius: calc(var(--control-corner-radius) * 2px);
|
|
5355
5355
|
}
|
|
5356
|
-
`,
|
|
5356
|
+
`,Dh=(e,t)=>(0,s.switchTemplate)(e,t);class Rh extends r.Switch{}const Ah=void 0,Nh={switch:'<div class="checked-indicator" part="checked-indicator"></div>'},Lh=Rh.compose(Object.assign({baseName:"switch",template:Dh,styles:Ih,shadowOptions:Ah},Nh)),Fh=(e,t)=>l.css`
|
|
5357
5357
|
${(0,r.tabStyles)(e,t)}
|
|
5358
5358
|
|
|
5359
5359
|
:host {
|
|
5360
5360
|
user-select: none;
|
|
5361
5361
|
}
|
|
5362
|
-
`,
|
|
5362
|
+
`,Mh=(e,t)=>(0,s.tabTemplate)(e,t);class _h extends r.Tab{}const Hh=void 0,zh={},Ph=_h.compose(Object.assign({baseName:"tab",template:Mh,styles:Fh,shadowOptions:Hh},zh)),Uh=(e,t)=>l.css`
|
|
5363
5363
|
${(0,r.tabPanelStyles)(e,t)}
|
|
5364
5364
|
|
|
5365
5365
|
:host {
|
|
5366
5366
|
height: 100%;
|
|
5367
5367
|
padding: 0;
|
|
5368
5368
|
}
|
|
5369
|
-
`,
|
|
5369
|
+
`,Bh=(e,t)=>(0,s.tabPanelTemplate)(e,t);class Gh extends r.TabPanel{}const jh=void 0,Vh={},Wh=Gh.compose(Object.assign({baseName:"tab-panel",template:Bh,styles:Uh,shadowOptions:jh},Vh)),Yh=(e,t)=>l.css`
|
|
5370
5370
|
${(0,r.tabsStyles)(e,t)}
|
|
5371
5371
|
|
|
5372
5372
|
:host {
|
|
@@ -5383,20 +5383,20 @@
|
|
|
5383
5383
|
:host([scrollable]) ::slotted([role='tab']) {
|
|
5384
5384
|
flex: 0 0 auto;
|
|
5385
5385
|
}
|
|
5386
|
-
`,
|
|
5386
|
+
`,qh=(e,t)=>(0,s.tabsTemplate)(e,t);class Kh extends r.Tabs{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Kh.prototype,"scrollable",void 0);const Xh=void 0,Qh={},Jh=Kh.compose(Object.assign({baseName:"tabs",template:qh,styles:Yh,shadowOptions:Xh},Qh)),Zh=(e,t)=>l.css`
|
|
5387
5387
|
${(0,r.textAreaStyles)(e,t)}
|
|
5388
5388
|
:host .control {
|
|
5389
5389
|
padding: calc(var(--design-unit) * 3px);
|
|
5390
5390
|
}
|
|
5391
|
-
`,
|
|
5391
|
+
`,ep=(e,t)=>(0,s.textAreaTemplate)(e,t);class tp extends r.TextArea{}const ip=void 0,op={},np=tp.compose(Object.assign({baseName:"text-area",template:ep,styles:Zh,shadowOptions:ip},op)),{create:ap}=s.DesignToken,sp=ap("active-color-scheme").withDefault(e=>r.baseLayerLuminance.getValueFor(e)===r.StandardLuminance.LightMode?"light":"dark"),rp=(e,t)=>l.css`
|
|
5392
5392
|
${(0,r.textFieldStyles)(e,t)}
|
|
5393
5393
|
/* Override FAST .root align-items: baseline for this flex child so it still fills the row. */
|
|
5394
|
-
${
|
|
5394
|
+
${rl}
|
|
5395
5395
|
|
|
5396
5396
|
input {
|
|
5397
|
-
color-scheme: ${
|
|
5397
|
+
color-scheme: ${sp};
|
|
5398
5398
|
}
|
|
5399
|
-
`,
|
|
5399
|
+
`,lp=(e,t)=>l.html`
|
|
5400
5400
|
<template
|
|
5401
5401
|
class="${e=>(0,x.x)(["readonly",e.readOnly],["has-prefix",!!e.prefix],["has-suffix",!!e.suffix])}"
|
|
5402
5402
|
>
|
|
@@ -5478,7 +5478,7 @@
|
|
|
5478
5478
|
${(0,s.endSlotTemplate)(e,t)}
|
|
5479
5479
|
</div>
|
|
5480
5480
|
</template>
|
|
5481
|
-
`;class
|
|
5481
|
+
`;class dp extends(sl(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],dp.prototype,"autocomplete",void 0),(0,C.Cg)([l.attr],dp.prototype,"autocapitalize",void 0),(0,C.Cg)([l.attr],dp.prototype,"step",void 0);const cp={mode:"open",delegatesFocus:!0},up={},hp=dp.compose(Object.assign({baseName:"text-field",template:lp,styles:rp,shadowOptions:cp},up)),pp=l.css`
|
|
5482
5482
|
@keyframes append-animate {
|
|
5483
5483
|
from {
|
|
5484
5484
|
transform: translateX(100%);
|
|
@@ -5589,7 +5589,7 @@
|
|
|
5589
5589
|
margin-left: auto;
|
|
5590
5590
|
color: #879ba6;
|
|
5591
5591
|
}
|
|
5592
|
-
`,
|
|
5592
|
+
`,mp=(e="zero")=>l.html`
|
|
5593
5593
|
<div
|
|
5594
5594
|
role="alert"
|
|
5595
5595
|
part="root"
|
|
@@ -5616,13 +5616,13 @@
|
|
|
5616
5616
|
</div>
|
|
5617
5617
|
</div>
|
|
5618
5618
|
</div>
|
|
5619
|
-
`,
|
|
5620
|
-
${e=>
|
|
5621
|
-
`,
|
|
5619
|
+
`,gp=l.html`
|
|
5620
|
+
${e=>mp(O(e))}
|
|
5621
|
+
`,vp={mode:"open",delegatesFocus:!0},fp={};class bp 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],bp.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],bp.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close"})],bp.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"notification-icon"})],bp.prototype,"notificationIcon",void 0);const yp=bp.compose(Object.assign({baseName:"toast",styles:pp,template:gp,shadowOptions:vp},fp)),wp=(e,t)=>l.css`
|
|
5622
5622
|
${(0,r.toolbarStyles)(e,t)}
|
|
5623
|
-
`,
|
|
5623
|
+
`,Cp=(e,t)=>(0,s.toolbarTemplate)(e,t);class xp extends r.Toolbar{}const $p=void 0,Sp={},Ep=xp.compose(Object.assign({baseName:"toolbar",template:Cp,styles:wp,shadowOptions:$p},Sp)),Tp=(e,t)=>l.css`
|
|
5624
5624
|
${(0,r.tooltipStyles)(e,t)}
|
|
5625
|
-
`,
|
|
5625
|
+
`,Op=(e,t)=>(0,s.tooltipTemplate)(e,t);class kp extends r.Tooltip{}const Ip=void 0,Dp={},Rp=kp.compose(Object.assign({baseName:"tooltip",template:Op,styles:Tp,shadowOptions:Ip},Dp)),Ap=(e,t)=>l.css`
|
|
5626
5626
|
${(0,r.treeItemStyles)(e,t)}
|
|
5627
5627
|
:host {
|
|
5628
5628
|
--focus-stroke-width: 0;
|
|
@@ -5639,9 +5639,9 @@
|
|
|
5639
5639
|
.positioning-region {
|
|
5640
5640
|
height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);
|
|
5641
5641
|
}
|
|
5642
|
-
`,
|
|
5642
|
+
`,Np=(e,t)=>(0,s.treeItemTemplate)(e,t);class Lp extends r.TreeItem{}const Fp=void 0,Mp={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>'},_p=Lp.compose(Object.assign({baseName:"tree-item",template:Np,styles:Ap,shadowOptions:Fp},Mp)),Hp=(e,t)=>l.css`
|
|
5643
5643
|
${(0,r.treeViewStyles)(e,t)}
|
|
5644
|
-
`,
|
|
5644
|
+
`,zp=(e,t)=>(0,s.treeViewTemplate)(e,t);class Pp extends s.TreeView{}const Up=void 0,Bp={},Gp=Pp.compose(Object.assign({baseName:"tree-view",template:zp,styles:Hp,shadowOptions:Up},Bp)),jp=(e,t)=>l.css`
|
|
5645
5645
|
.container {
|
|
5646
5646
|
position: relative;
|
|
5647
5647
|
width: 100%;
|
|
@@ -5661,7 +5661,7 @@
|
|
|
5661
5661
|
overflow: hidden;
|
|
5662
5662
|
text-overflow: ellipsis;
|
|
5663
5663
|
}
|
|
5664
|
-
`,
|
|
5664
|
+
`,Vp=e=>l.html`
|
|
5665
5665
|
<div class="container" value=${e=>e.value}>
|
|
5666
5666
|
<${e}-text-field
|
|
5667
5667
|
class="url-input"
|
|
@@ -5676,9 +5676,9 @@
|
|
|
5676
5676
|
<a class="url-input-link" href=${e=>e.value} target="_blank">${e=>e.value}</a>
|
|
5677
5677
|
`)}
|
|
5678
5678
|
</div>
|
|
5679
|
-
`,
|
|
5680
|
-
${e=>
|
|
5681
|
-
`,
|
|
5679
|
+
`,Wp=l.html`
|
|
5680
|
+
${e=>Vp(O(e))}
|
|
5681
|
+
`,Yp=void 0,qp={};class Kp extends r.TextField{constructor(){super(...arguments),this.value=""}saveUrl(e){this.value=e.startsWith("http")?e:"https://"+e,this.focused=!1}focus(){this.focused=!0}}(0,C.Cg)([l.observable],Kp.prototype,"value",void 0),(0,C.Cg)([l.observable],Kp.prototype,"focused",void 0);const Xp=Kp.compose(Object.assign({baseName:"url-input",template:Wp,styles:jp,shadowOptions:Yp},qp)),Qp={foundationAccordion:m,foundationAiCriteriaSearch:xe,foundationAiIndicator:Te,foundationAccordionItem:w,foundationActionsMenu:A,foundationAnchor:Ae,foundationAnchoredRegion:He,foundationAvatar:Ve,foundationBadge:Qe,foundationBanner:at,foundationBreadcrumb:ut,foundationBreadcrumbItem:ft,foundationButton:$t,foundationCalendar:It,foundationCard:Ft,foundationCategorizedMultiselect:jt,foundationCheckbox:Xt,foundationCombobox:wi,foundationConnectionIndicator:Ei,foundationDataGrid:Ri,foundationDataGridCell:Mi,foundationDataGridRow:Ui,foundationDatePicker:ho,foundationDesignSystemProvider:dn,foundationDialog:wn,foundationDisclosure:Tn,foundationDivider:An,foundationDropdownMenu:zn,foundationErrorBanner:na,foundationErrorBoundary:ba,foundationErrorDialog:Sa,foundationFileReader:Ra,foundationFileUpload:Ya,foundationFilter:ns,foundationFilterBar:ps,foundationFlexLayout:Cs,foundationFlipper:Os,foundationFlyout:Fs,foundationGridLayout:js,foundationGridLayoutItem:Ks,foundationHorizontalScroll:tr,foundationIcon:fr,foundationListbox:$r,foundationListboxOption:Ir,foundationMenu:Fr,foundationMenuItem:Ur,foundationModal:Yr,foundationMultiselect:il,foundationNumberField:xl,foundationOptgroup:Tl,foundationPopper:md,foundationProgress:Jl,foundationProgressRing:wd,foundationRadio:Td,foundationRadioGroup:Ad,foundationScheduler:zd,foundationSchedulerCronBuilder:Dc,foundationSchedulerTimezone:_c,foundationSearchBar:Xc,foundationSearchBarCombobox:iu,foundationSegmentedControl:yu,foundationSegmentedItem:Eu,foundationSelect:Ru,foundationSkeleton:_u,foundationSlider:Vu,foundationSliderLabel:Qu,foundationSnackbar:rh,foundationStackingIcons:uh,foundationStatusPill:vh,foundationEnvironmentIndicator:Zn,foundationStepperTab:$h,foundationStepperTabPanel:kh,foundationSwitch:Lh,foundationSystemHealthOverlay:ld,foundationTab:Ph,foundationTabPanel:Wh,foundationTabs:Jh,foundationTextArea:np,foundationTextField:hp,foundationToast:yp,foundationToolbar:Ep,foundationTooltip:Rp,foundationTreeItem:_p,foundationTreeView:Gp,foundationUrlInput:Xp,foundationSectionNavigator:pu,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Jp 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 Zp=class extends di{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(){Ze.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){Ze.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Ze.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Ze.debug("handleStreamUpdates - Method not implemented.")}};Zp=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],Zp);const em=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],tm=[...em,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],im={type:"NULL",maxRules:1,invisible:!0},om=["int","short","long","bigdecimal","double"],nm=["date","date-time"],am=["enum",...om,"string",...nm,"boolean"],sm=[{type:"equal",nbInputs:1,applyTo:am,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:am,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...om,...nm],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...om,...nm],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:[...am].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...am].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...om,...nm],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...om,...nm],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...am],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...am],optgroup:"Null"}];var rm=i(93678);const lm=i.n(rm)()();function dm(e,t,i){const o=function e(o){const n=lm(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 cm(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 um(e,t){const i=cm(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 hm(e,t){const i=cm(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 pm(e,t,i){return dm(e,t,e=>[...e,i])}const mm="group-root";function gm(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:mm,children:e.children.map(e=>i(e,2))})}function vm(e){const t=e.children.map(e=>"children"in e?vm(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 fm=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,bm=e=>`${fm(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,ym=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},wm=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},Cm=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 xm(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 $m;!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"}($m||($m={}));const Sm=l.css`
|
|
5682
5682
|
:host {
|
|
5683
5683
|
--item-vertical-spacing: 4px;
|
|
5684
5684
|
--item-border-radius: 5px;
|
|
@@ -5852,7 +5852,7 @@
|
|
|
5852
5852
|
.rules-list > *:last-child::after {
|
|
5853
5853
|
display: none;
|
|
5854
5854
|
}
|
|
5855
|
-
`,
|
|
5855
|
+
`,Em=l.css`
|
|
5856
5856
|
.rules-group-container {
|
|
5857
5857
|
border: 1px solid #ccc;
|
|
5858
5858
|
margin-bottom: 10px;
|
|
@@ -5895,10 +5895,10 @@
|
|
|
5895
5895
|
list-style: none;
|
|
5896
5896
|
padding-left: 0;
|
|
5897
5897
|
}
|
|
5898
|
-
`;function
|
|
5898
|
+
`;function Tm(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 Om=l.html`
|
|
5899
5899
|
${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`
|
|
5900
5900
|
<div class="btn-group group-conditions">
|
|
5901
|
-
${
|
|
5901
|
+
${Tm(e=>"input"!==n,l.html`
|
|
5902
5902
|
<${a}
|
|
5903
5903
|
class="radio-group-container"
|
|
5904
5904
|
name="combinator"
|
|
@@ -5936,7 +5936,7 @@
|
|
|
5936
5936
|
`)}
|
|
5937
5937
|
</div>
|
|
5938
5938
|
`}}
|
|
5939
|
-
`,
|
|
5939
|
+
`,km=l.html`
|
|
5940
5940
|
${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`
|
|
5941
5941
|
<div class="btn-group float-end group-actions">
|
|
5942
5942
|
${(0,l.when)(e=>e.allowAddRule,l.html`
|
|
@@ -5973,13 +5973,13 @@
|
|
|
5973
5973
|
`)}
|
|
5974
5974
|
</div>
|
|
5975
5975
|
`}}
|
|
5976
|
-
`,
|
|
5976
|
+
`,Im=l.html`
|
|
5977
5977
|
<div class="rules-group-container">
|
|
5978
|
-
<div class="rules-group-header">${
|
|
5978
|
+
<div class="rules-group-header">${km} ${Om}</div>
|
|
5979
5979
|
<div class="rules-group-body">
|
|
5980
5980
|
<div class="rules-list">
|
|
5981
5981
|
${(0,l.repeat)(e=>{var t,i;return null!==(i=null===(t=e.model)||void 0===t?void 0:t.children)&&void 0!==i?i:[]},l.html`
|
|
5982
|
-
${
|
|
5982
|
+
${Tm(e=>"children"in e,l.html`
|
|
5983
5983
|
<expression-group
|
|
5984
5984
|
:config=${(e,t)=>t.parent.config}
|
|
5985
5985
|
:styles=${(e,t)=>t.parent.styles}
|
|
@@ -6003,7 +6003,7 @@
|
|
|
6003
6003
|
</div>
|
|
6004
6004
|
</div>
|
|
6005
6005
|
</div>
|
|
6006
|
-
`;let
|
|
6006
|
+
`;let Dm=class extends l.FASTElement{connectedCallback(){super.connectedCallback(),xm(this,this.styles,"group")}get allowAddRule(){return!!this.model&&("many"===this.model.combinator.maxRules||this.model.children.length<this.model.combinator.maxRules)}get allowAddGroup(){var e,t;return!!this.model&&(1!==this.model.combinator.maxRules&&(!(2===this.model.combinator.maxRules&&this.model.children.length>=2)&&(!(null===(e=this.config)||void 0===e?void 0:e.maxNesting)||(null===(t=this.config)||void 0===t?void 0:t.maxNesting)<1||this.config.maxNesting>this.model.level)))}dispatchAddRule(e){if(e.stopPropagation(),!this.allowAddRule)throw new Error("Cannot add extra rules to group");const t={parentGroupId:this.model.groupId};this.dispatchEvent(new CustomEvent($m.AddRule,{detail:t,bubbles:!0,composed:!0}))}dispatchAddGroup(e){if(e.stopPropagation(),!this.allowAddGroup)throw new Error("Cannot add further nested groups");const t={parentGroupId:this.model.groupId,newGroup:{level:this.model.level+1}};this.dispatchEvent(new CustomEvent($m.AddGroup,{detail:t,bubbles:!0,composed:!0}))}dispatchDeleteGroup(e){e.stopPropagation();const t={groupId:this.model.groupId};this.dispatchEvent(new CustomEvent($m.DelGroup,{detail:t,bubbles:!0,composed:!0}))}handleCombinatorChange(e){e.stopPropagation();const t=e.target.value;this.updateCombinator(t)}handleCustomCombinatorChange(e){var t;if(e.stopPropagation(),!(null===(t=this.model)||void 0===t?void 0:t.groupId)||!e.target)return;const i=e.target.getAttribute("value");if(!i)throw new Error("No value found in the custom radio group event target");this.updateCombinator(i)}updateCombinator(e){var t,i;const o=this.config.combinators.find(({type:t})=>t===e);if(!o)throw new Error(`Cannot find selected combinator ${e}`);(null===(i=null===(t=this.model)||void 0===t?void 0:t.combinator)||void 0===i?void 0:i.type)!==o.type&&this.dispatchGroupDataUpdated(o)}dispatchGroupDataUpdated(e){const t={groupId:this.model.groupId,newData:{combinator:e}};this.dispatchEvent(new CustomEvent($m.UpdateGroup,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Dm.prototype,"config",void 0),(0,C.Cg)([l.observable],Dm.prototype,"styles",void 0),(0,C.Cg)([l.observable],Dm.prototype,"model",void 0),(0,C.Cg)([l.observable],Dm.prototype,"index",void 0),(0,C.Cg)([l.volatile],Dm.prototype,"allowAddRule",null),(0,C.Cg)([l.volatile],Dm.prototype,"allowAddGroup",null),Dm=(0,C.Cg)([(0,l.customElement)({name:"expression-group",template:Im,styles:Em,shadowOptions:{delegatesFocus:!0}})],Dm);const Rm=l.html`
|
|
6007
6007
|
<div class="query-builder">
|
|
6008
6008
|
${(0,l.when)(e=>null!==e.model,l.html`
|
|
6009
6009
|
<expression-group
|
|
@@ -6013,7 +6013,7 @@
|
|
|
6013
6013
|
></expression-group>
|
|
6014
6014
|
`)}
|
|
6015
6015
|
</div>
|
|
6016
|
-
`,
|
|
6016
|
+
`,Am=l.html`
|
|
6017
6017
|
${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`
|
|
6018
6018
|
<${r}
|
|
6019
6019
|
class="form-select"
|
|
@@ -6044,7 +6044,7 @@
|
|
|
6044
6044
|
`)}
|
|
6045
6045
|
</${r}>
|
|
6046
6046
|
`}}
|
|
6047
|
-
`;let
|
|
6047
|
+
`;let Nm=class extends l.FASTElement{constructor(){super(...arguments),this.fields=[]}connectedCallback(){super.connectedCallback(),xm(this,this.styles,"field")}get groupedFieldss(){return Cm(this.fields)}dispatchFieldsChanged(e){e.stopPropagation();const t={fieldId:e.target.value};this.dispatchEvent(new CustomEvent($m.FieldSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Nm.prototype,"fields",void 0),(0,C.Cg)([l.observable],Nm.prototype,"field",void 0),(0,C.Cg)([l.observable],Nm.prototype,"config",void 0),(0,C.Cg)([l.observable],Nm.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Nm.prototype,"groupedFieldss",null),Nm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-field",template:Am})],Nm);const Lm=l.html`
|
|
6048
6048
|
${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`
|
|
6049
6049
|
<${r}
|
|
6050
6050
|
class="form-select"
|
|
@@ -6077,7 +6077,7 @@
|
|
|
6077
6077
|
`)}
|
|
6078
6078
|
</${r}>
|
|
6079
6079
|
`}}
|
|
6080
|
-
`;let
|
|
6080
|
+
`;let Fm=class extends l.FASTElement{constructor(){super(...arguments),this.operators=[],this.field=null}connectedCallback(){super.connectedCallback(),xm(this,this.styles,"operator")}get allowedOperators(){const e=e=>{var t,i,o;return null===(o=null===(i=null===(t=this.field)||void 0===t?void 0:t.operators)||void 0===i?void 0:i.includes(e.type))||void 0===o||o},t=e=>{var t,i,o,n;return null===(n=null===(i=null===(t=null==e?void 0:e.applyTo)||void 0===t?void 0:t.includes)||void 0===i?void 0:i.call(t,null===(o=this.field)||void 0===o?void 0:o.type))||void 0===n||n};return this.operators.filter(i=>e(i)&&t(i))}get groupedOperators(){return Cm(this.allowedOperators)}handleOperatorChange(e){e.stopPropagation();const t={operatorId:e.target.value};this.dispatchEvent(new CustomEvent($m.OperatorSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Fm.prototype,"operators",void 0),(0,C.Cg)([l.observable],Fm.prototype,"operator",void 0),(0,C.Cg)([l.observable],Fm.prototype,"field",void 0),(0,C.Cg)([l.observable],Fm.prototype,"config",void 0),(0,C.Cg)([l.observable],Fm.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Fm.prototype,"allowedOperators",null),(0,C.Cg)([l.volatile],Fm.prototype,"groupedOperators",null),Fm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-operator",template:Lm})],Fm);const Mm=e=>["short","int","long"].includes(e),_m=e=>["double","bigdecimal"].includes(e),Hm=(e,t)=>{var i,o;return null===(o=null===(i=(e=>Mm(e)?/^[+-]?[0-9]+$/:_m(e)?/[+-]?([0-9]*[.])?[0-9]+/:null)(e))||void 0===i?void 0:i.test(t))||void 0===o||o?null:"Invalid number format"},zm=l.css`
|
|
6081
6081
|
.text-input.error {
|
|
6082
6082
|
color: red;
|
|
6083
6083
|
}
|
|
@@ -6086,8 +6086,8 @@
|
|
|
6086
6086
|
display: inline-grid;
|
|
6087
6087
|
align-items: center;
|
|
6088
6088
|
}
|
|
6089
|
-
`,
|
|
6090
|
-
${e=>{var t,i;const o=
|
|
6089
|
+
`,Pm=l.html`
|
|
6090
|
+
${e=>{var t,i;const o=ym(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`
|
|
6091
6091
|
<${a}
|
|
6092
6092
|
type="${o}"
|
|
6093
6093
|
class="text-input ${e=>(0,x.x)(["error",e.validationError])}"
|
|
@@ -6095,7 +6095,7 @@
|
|
|
6095
6095
|
@blur=${(e,t)=>e.handleInputChange(t.event)}
|
|
6096
6096
|
/>
|
|
6097
6097
|
`}}
|
|
6098
|
-
`,
|
|
6098
|
+
`,Um=l.html`
|
|
6099
6099
|
${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`
|
|
6100
6100
|
<${a}
|
|
6101
6101
|
class="form-select"
|
|
@@ -6113,7 +6113,7 @@
|
|
|
6113
6113
|
`)}
|
|
6114
6114
|
</${a}>
|
|
6115
6115
|
`}}
|
|
6116
|
-
`,
|
|
6116
|
+
`,Bm=l.html`
|
|
6117
6117
|
${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`
|
|
6118
6118
|
<label>
|
|
6119
6119
|
<${n}
|
|
@@ -6125,15 +6125,15 @@
|
|
|
6125
6125
|
True
|
|
6126
6126
|
</label>
|
|
6127
6127
|
`}}
|
|
6128
|
-
`,Bm=l.html`
|
|
6129
|
-
<div>Input type "${e=>bm(e)}" not yet supported.</div>
|
|
6130
6128
|
`,Gm=l.html`
|
|
6131
|
-
${e=>
|
|
6129
|
+
<div>Input type "${e=>ym(e)}" not yet supported.</div>
|
|
6130
|
+
`,jm=l.html`
|
|
6131
|
+
${e=>{const t=ym(e);return l.html`
|
|
6132
6132
|
<div class="value-and-validation">
|
|
6133
|
-
${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),
|
|
6134
|
-
${(0,l.when)(()=>"select"===t,
|
|
6135
|
-
${(0,l.when)(()=>"checkbox"===t,
|
|
6136
|
-
${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),
|
|
6133
|
+
${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),Pm)}
|
|
6134
|
+
${(0,l.when)(()=>"select"===t,Um)}
|
|
6135
|
+
${(0,l.when)(()=>"checkbox"===t,Bm)}
|
|
6136
|
+
${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),Gm)}
|
|
6137
6137
|
${(0,l.when)(e=>e.validationMsg,l.html`
|
|
6138
6138
|
<p class="validation-msg">${e=>e.validationMsg}</p>
|
|
6139
6139
|
`)}
|
|
@@ -6150,11 +6150,11 @@
|
|
|
6150
6150
|
`}}
|
|
6151
6151
|
`)}
|
|
6152
6152
|
`}}
|
|
6153
|
-
`,
|
|
6154
|
-
${
|
|
6153
|
+
`,Vm=l.html`
|
|
6154
|
+
${Tm(e=>e.field,jm,l.html`
|
|
6155
6155
|
<div>Select a field to set value</div>
|
|
6156
6156
|
`)}
|
|
6157
|
-
`;let
|
|
6157
|
+
`;let Wm=class extends l.FASTElement{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),xm(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,Hm(wm(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&&Mm(wm(this))?parseInt(t.value):this.field&&_m(wm(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent($m.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($m.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};(0,C.Cg)([(0,l.attr)({attribute:"value-index"})],Wm.prototype,"valueIndex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wm.prototype,"variadic",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"validation-error"})],Wm.prototype,"validationError",void 0),(0,C.Cg)([(0,l.attr)({attribute:"validation-msg"})],Wm.prototype,"validationMsg",void 0),(0,C.Cg)([l.observable],Wm.prototype,"field",void 0),(0,C.Cg)([l.observable],Wm.prototype,"operator",void 0),(0,C.Cg)([l.observable],Wm.prototype,"value",void 0),(0,C.Cg)([l.observable],Wm.prototype,"config",void 0),(0,C.Cg)([l.observable],Wm.prototype,"styles",void 0),Wm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-value",template:Vm,styles:zm,shadowOptions:{delegatesFocus:!0}})],Wm);const Ym=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:qm(e,t),qm=(e,t)=>{var i,o;switch(wm(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return fm(new Date);case"date-time":return bm(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]}}},Km=(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:Ym(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(o=s(0))&&void 0!==o?o:Ym(e,t),null!==(n=s(1))&&void 0!==n?n:Ym(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(a=s(0))&&void 0!==a?a:Ym(e,t)]}}},Xm=(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)}}},Qm=e=>!e&&0!==e,Jm=l.css`
|
|
6158
6158
|
.rule-container {
|
|
6159
6159
|
border: 1px solid #eee;
|
|
6160
6160
|
margin-bottom: 5px;
|
|
@@ -6213,7 +6213,7 @@
|
|
|
6213
6213
|
expression-rule-value {
|
|
6214
6214
|
display: flex;
|
|
6215
6215
|
}
|
|
6216
|
-
`,
|
|
6216
|
+
`,Zm=l.html`
|
|
6217
6217
|
${e=>{var t,i;const o=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button";return l.html`
|
|
6218
6218
|
<div class="rule-container ${e=>(0,x.x)(["error",e.error])}">
|
|
6219
6219
|
<div class="rule-content">
|
|
@@ -6273,11 +6273,11 @@ class="margin"
|
|
|
6273
6273
|
</div>
|
|
6274
6274
|
</div>
|
|
6275
6275
|
`}}
|
|
6276
|
-
`;let Zm=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),Cm(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"!==ym(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(Xm)})(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,Wm(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(xm.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(xm.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(xm.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(xm.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Km(this.model,t,i)};this.dispatchEvent(new CustomEvent(xm.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(xm.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:qm(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Zm.prototype,"config",void 0),(0,C.Cg)([l.observable],Zm.prototype,"styles",void 0),(0,C.Cg)([l.observable],Zm.prototype,"model",void 0),(0,C.Cg)([l.observable],Zm.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zm.prototype,"error",void 0),(0,C.Cg)([l.volatile],Zm.prototype,"operandIterator",null),Zm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Jm,styles:Qm,shadowOptions:{delegatesFocus:!0}})],Zm);let eg=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=mm(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=gm(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(xm.AddGroup,this.handleAddGroup),this.addEventListener(xm.DelGroup,this.handleDeleteGroup),this.addEventListener(xm.AddRule,this.handleAddRule),this.addEventListener(xm.DelRule,this.handleDeleteRule),this.addEventListener(xm.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(xm.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(xm.AddGroup,this.handleAddGroup),this.removeEventListener(xm.DelGroup,this.handleDeleteGroup),this.removeEventListener(xm.AddRule,this.handleAddRule),this.removeEventListener(xm.DelRule,this.handleDeleteRule),this.removeEventListener(xm.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(xm.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:pm,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=hm(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=hm(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=lm(i=this.model,cm(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=lm(i=this.model,um(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===pm?Object.assign(Object.assign({},e),i):lm(e,cm(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 lm(e,um(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],eg.prototype,"config",void 0),(0,C.Cg)([l.observable],eg.prototype,"styles",void 0),(0,C.Cg)([l.observable],eg.prototype,"model",void 0),eg=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Dm,styles:$m})],eg);let tg=class extends eg{};tg=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:$m,template:Dm})],tg);const ig=["int","short","long"],og=["double","bigdecimal"],ng=[...ig,...og],ag=["date","date-time"],sg=["string","enum"],rg=["boolean"],lg=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 dg(e){switch(lg(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 cg(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 ug(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function hg(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function pg(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=lg(e);if(sg.includes(i))return t;if(ng.includes(i))return t.toString();if(rg.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(ag.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function mg(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?mg(e,t):t(e)).filter(Boolean)}}function gg(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=lg(e);if(sg.includes(i))return t;if(ig.includes(i))return parseInt(t);if(og.includes(i))return parseFloat(t);if(rg.includes(i))return t;if(ag.includes(i)){const e=new Date(parseInt(t));return"date"===i?vm(e):fm(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const vg={template:Dm,styles:$m};var fg;!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"})}(fg||(fg={}));const bg=[{type:fg.logicalOperations.AND,maxRules:"many"},{type:fg.logicalOperations.OR,maxRules:"many"}],yg={EQUALS:fg.operations.EQUALS,NOT_EQUALS:fg.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:fg.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:fg.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:fg.operations.LESS_THAN,LESS_THAN_OR_EQUAL:fg.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:fg.operations.IS_CURRENT,IS_PREVIOUS:fg.operations.IS_PREVIOUS},wg=e=>({type:"enum",input:"select",values:e}),Cg=wg({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."}}),xg=wg({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."}}),$g=[{type:yg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...sg,...rg,...ng,...ag],tooltip:"Check the equality of the field compared to a set value"},{type:yg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...sg,...rg,...ng,...ag],tooltip:"Check that the field is different from a set value"},{type:yg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...rg,...ng,...ag],tooltip:"Check if the field value is null"},{type:yg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...rg,...ng,...ag],tooltip:"Check if the field value is not null"},{type:yg.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:yg.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:yg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:yg.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:yg.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:yg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field value is greater than a specified number"},{type:yg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:yg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field value is less than a specified number"},{type:yg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field value is less than or equal to a specified number"},{type:yg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field is before a specified date/time"},{type:yg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field is after a specified date/time"},{type:yg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field is on or before a specified date/time"},{type:yg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field is on or after a specified date/time"},{type:yg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...ag],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:xg,optgroup:"Relative Period"},{type:yg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...ag],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:Cg,optgroup:"Relative Period"}];function Sg(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 Eg(e,t){switch(t){case yg.IS_NULL_OR_BLANK:return hg(e,fg.methodCall.IS_NULL_OR_BLANK,[]);case yg.NOT_NULL_OR_BLANK:return hg(e,fg.methodCall.NOT_NULL_OR_BLANK,[]);case yg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return hg(e,fg.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case yg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return hg(e,fg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case yg.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 hg(e,fg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case yg.IS_CURRENT:case yg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return hg(e,fg.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===yg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function Tg(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=pg(e),n=dg(o),a=Sg(o.operator.type);switch(a){case yg.EQUALS:case yg.NOT_EQUALS:case yg.GREATER_THAN:case yg.GREATER_THAN_OR_EQUAL:case yg.LESS_THAN:case yg.LESS_THAN_OR_EQUAL:return cg(o,a,n);case yg.IS_NULL:return ug(o,fg.operations.EQUALS,{TYPE:"NULL"});case yg.NOT_NULL:return ug(o,fg.operations.NOT_EQUALS,{TYPE:"NULL"});case yg.IS_NULL_OR_BLANK:case yg.NOT_NULL_OR_BLANK:case yg.CONTAINS:case yg.CONTAINS_WORDS_STARTING_WITH:case yg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case yg.IS_CURRENT:case yg.IS_PREVIOUS:return Eg(o,a);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function Og(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 kg(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?yg[yg.IS_NULL]:yg[yg.NOT_NULL];return $g.find(t=>t.type===e)}const i=Og(t.OPERATION,e);return $g.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function Ig(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 gg(kg({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Dg(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[yg[yg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[yg[yg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[yg[yg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[yg[yg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[yg[yg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===fg.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[yg["CURRENT"===t.PARAMETERS[2].VALUE?yg.IS_CURRENT:yg.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:$g.find(e=>e.type===i),value:o}}function Rg(e,t){return{combinator:bg.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 Rg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Ig(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Dg(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Ag=class extends eg{ruleConfigChanged(e,t){this.config=Object.assign({combinators:bg,operators:$g,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Rg(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=mg(e,Tg);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Ag.prototype,"ruleConfig",void 0),Ag=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:$m,template:Dm})],Ag);const Ng={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Lg=[{type:Ng.PLUS,label:"Add (+)",applyTo:[...ng],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Ng.MINUS,label:"Subtract (-)",applyTo:[...ng],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Ng.MULTIPLY,label:"Multiply (*)",applyTo:[...ng],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Ng.DIVIDE,label:"Divide (/)",applyTo:[...ng],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Ng.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:Ng.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 Fg(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=pg(e),n=dg(o),a=o.operator.type;switch(a){case Ng.TRIM:case Ng.CONVERT_TO_DATE:case Ng.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Ng.TRIM:return hg(e,fg.methodCall.TRIM,[]);case Ng.CONVERT_TO_DATE:return hg(e,fg.methodCall.LONG_TO_DATE,[]);case Ng.CONVERT_TO_DATE_TIME:return hg(e,fg.methodCall.LONG_TO_DATE_TIME,[])}}(o,a);case Ng.PLUS:case Ng.MINUS:case Ng.DIVIDE:case Ng.MULTIPLY:return cg(o,a,n);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function Mg(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 gg(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Lg.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 _g(e,t){return{combinator:tm,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 _g(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Mg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Ng[Ng.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Ng[Ng.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Ng[Ng.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:Lg.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Hg=class extends eg{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=_g(t.fields,i);this.config={combinators:[tm],operators:Lg,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:Fg(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Hg.prototype,"valueConfig",void 0),Hg=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:$m,template:Dm})],Hg);const zg=l.html`
|
|
6276
|
+
`;let eg=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),xm(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"!==wm(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(Qm)})(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,Ym(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent($m.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($m.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent($m.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($m.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Xm(this.model,t,i)};this.dispatchEvent(new CustomEvent($m.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($m.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Km(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],eg.prototype,"config",void 0),(0,C.Cg)([l.observable],eg.prototype,"styles",void 0),(0,C.Cg)([l.observable],eg.prototype,"model",void 0),(0,C.Cg)([l.observable],eg.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],eg.prototype,"error",void 0),(0,C.Cg)([l.volatile],eg.prototype,"operandIterator",null),eg=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Zm,styles:Jm,shadowOptions:{delegatesFocus:!0}})],eg);let tg=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=gm(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=vm(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($m.AddGroup,this.handleAddGroup),this.addEventListener($m.DelGroup,this.handleDeleteGroup),this.addEventListener($m.AddRule,this.handleAddRule),this.addEventListener($m.DelRule,this.handleDeleteRule),this.addEventListener($m.UpdateGroup,this.handleUpdateGroupData),this.addEventListener($m.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($m.AddGroup,this.handleAddGroup),this.removeEventListener($m.DelGroup,this.handleDeleteGroup),this.removeEventListener($m.AddRule,this.handleAddRule),this.removeEventListener($m.DelRule,this.handleDeleteRule),this.removeEventListener($m.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener($m.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:mm,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=pm(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=pm(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=dm(i=this.model,um(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=dm(i=this.model,hm(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===mm?Object.assign(Object.assign({},e),i):dm(e,um(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 dm(e,hm(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],tg.prototype,"config",void 0),(0,C.Cg)([l.observable],tg.prototype,"styles",void 0),(0,C.Cg)([l.observable],tg.prototype,"model",void 0),tg=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Rm,styles:Sm})],tg);let ig=class extends tg{};ig=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:Sm,template:Rm})],ig);const og=["int","short","long"],ng=["double","bigdecimal"],ag=[...og,...ng],sg=["date","date-time"],rg=["string","enum"],lg=["boolean"],dg=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 cg(e){switch(dg(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 ug(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 hg(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function pg(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function mg(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=dg(e);if(rg.includes(i))return t;if(ag.includes(i))return t.toString();if(lg.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(sg.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function gg(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?gg(e,t):t(e)).filter(Boolean)}}function vg(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=dg(e);if(rg.includes(i))return t;if(og.includes(i))return parseInt(t);if(ng.includes(i))return parseFloat(t);if(lg.includes(i))return t;if(sg.includes(i)){const e=new Date(parseInt(t));return"date"===i?fm(e):bm(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const fg={template:Rm,styles:Sm};var bg;!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"})}(bg||(bg={}));const yg=[{type:bg.logicalOperations.AND,maxRules:"many"},{type:bg.logicalOperations.OR,maxRules:"many"}],wg={EQUALS:bg.operations.EQUALS,NOT_EQUALS:bg.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:bg.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:bg.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:bg.operations.LESS_THAN,LESS_THAN_OR_EQUAL:bg.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:bg.operations.IS_CURRENT,IS_PREVIOUS:bg.operations.IS_PREVIOUS},Cg=e=>({type:"enum",input:"select",values:e}),xg=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."}}),$g=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."}}),Sg=[{type:wg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...rg,...lg,...ag,...sg],tooltip:"Check the equality of the field compared to a set value"},{type:wg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...rg,...lg,...ag,...sg],tooltip:"Check that the field is different from a set value"},{type:wg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...lg,...ag,...sg],tooltip:"Check if the field value is null"},{type:wg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...lg,...ag,...sg],tooltip:"Check if the field value is not null"},{type:wg.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:wg.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:wg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:wg.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:wg.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:wg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field value is greater than a specified number"},{type:wg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:wg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field value is less than a specified number"},{type:wg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...ag],tooltip:"Check if the field value is less than or equal to a specified number"},{type:wg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...sg],tooltip:"Check if the field is before a specified date/time"},{type:wg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...sg],tooltip:"Check if the field is after a specified date/time"},{type:wg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...sg],tooltip:"Check if the field is on or before a specified date/time"},{type:wg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...sg],tooltip:"Check if the field is on or after a specified date/time"},{type:wg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...sg],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:$g,optgroup:"Relative Period"},{type:wg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...sg],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:xg,optgroup:"Relative Period"}];function Eg(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}function Tg(e,t){switch(t){case wg.IS_NULL_OR_BLANK:return pg(e,bg.methodCall.IS_NULL_OR_BLANK,[]);case wg.NOT_NULL_OR_BLANK:return pg(e,bg.methodCall.NOT_NULL_OR_BLANK,[]);case wg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return pg(e,bg.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case wg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return pg(e,bg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case wg.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 pg(e,bg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case wg.IS_CURRENT:case wg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return pg(e,bg.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===wg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function Og(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=mg(e),n=cg(o),a=Eg(o.operator.type);switch(a){case wg.EQUALS:case wg.NOT_EQUALS:case wg.GREATER_THAN:case wg.GREATER_THAN_OR_EQUAL:case wg.LESS_THAN:case wg.LESS_THAN_OR_EQUAL:return ug(o,a,n);case wg.IS_NULL:return hg(o,bg.operations.EQUALS,{TYPE:"NULL"});case wg.NOT_NULL:return hg(o,bg.operations.NOT_EQUALS,{TYPE:"NULL"});case wg.IS_NULL_OR_BLANK:case wg.NOT_NULL_OR_BLANK:case wg.CONTAINS:case wg.CONTAINS_WORDS_STARTING_WITH:case wg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case wg.IS_CURRENT:case wg.IS_PREVIOUS:return Tg(o,a);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function kg(e,t){if(!("date"===t.field.type||"date-time"===t.field.type))return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}function Ig(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?wg[wg.IS_NULL]:wg[wg.NOT_NULL];return Sg.find(t=>t.type===e)}const i=kg(t.OPERATION,e);return Sg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function Dg(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 vg(Ig({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Rg(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[wg[wg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[wg[wg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[wg[wg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[wg[wg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[wg[wg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===bg.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[wg["CURRENT"===t.PARAMETERS[2].VALUE?wg.IS_CURRENT:wg.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:Sg.find(e=>e.type===i),value:o}}function Ag(e,t){return{combinator:yg.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 Ag(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Dg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Rg(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Ng=class extends tg{ruleConfigChanged(e,t){this.config=Object.assign({combinators:yg,operators:Sg,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Ag(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=gg(e,Og);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Ng.prototype,"ruleConfig",void 0),Ng=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:Sm,template:Rm})],Ng);const Lg={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Fg=[{type:Lg.PLUS,label:"Add (+)",applyTo:[...ag],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Lg.MINUS,label:"Subtract (-)",applyTo:[...ag],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Lg.MULTIPLY,label:"Multiply (*)",applyTo:[...ag],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Lg.DIVIDE,label:"Divide (/)",applyTo:[...ag],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Lg.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:Lg.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 Mg(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=mg(e),n=cg(o),a=o.operator.type;switch(a){case Lg.TRIM:case Lg.CONVERT_TO_DATE:case Lg.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Lg.TRIM:return pg(e,bg.methodCall.TRIM,[]);case Lg.CONVERT_TO_DATE:return pg(e,bg.methodCall.LONG_TO_DATE,[]);case Lg.CONVERT_TO_DATE_TIME:return pg(e,bg.methodCall.LONG_TO_DATE_TIME,[])}}(o,a);case Lg.PLUS:case Lg.MINUS:case Lg.DIVIDE:case Lg.MULTIPLY:return ug(o,a,n);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function _g(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 vg(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Fg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Hg(e,t){return{combinator:im,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Hg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return _g(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Lg[Lg.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Lg[Lg.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Lg[Lg.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:Fg.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let zg=class extends tg{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Hg(t.fields,i);this.config={combinators:[im],operators:Fg,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:Mg(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],zg.prototype,"valueConfig",void 0),zg=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:Sm,template:Rm})],zg);const Pg=l.html`
|
|
6277
6277
|
<template ${(0,l.ref)("notificationListener")}>
|
|
6278
6278
|
<slot></slot>
|
|
6279
6279
|
</template>
|
|
6280
|
-
`;var Pg;!function(e){e.NOTIFICATION_EVENT="notification-event"}(Pg||(Pg={}));const Ug={mode:"open",delegatesFocus:!0};class Bg 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(Pg.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),ve(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*(){this.resourceName&&(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,ii.d)(e))}):Je.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}};zd(r,this.tagName)}}(0,C.Cg)([l.observable],Bg.prototype,"notificationListener",void 0),(0,C.Cg)([ni.dm],Bg.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Bg.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Bg.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Bg.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Bg.prototype,"toastPosition",void 0),(0,C.Cg)([ai.yW],Bg.prototype,"datasource",void 0);const Gg=Bg.compose({baseName:"notification-listener",template:zg,shadowOptions:Ug}),jg=(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 Vg(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=l.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}var Wg,Yg=i(16171);!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Wg||(Wg={}));class qg{constructor(e){this.analytics=(0,Yg.Ay)(e)}trackEvent(e,t){Ra.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`),this.analytics.track(e,t)}}const Kg=s.DI.createInterface(e=>e.singleton(qg));var Xg=i(98647),Qg=i(35044);const Jg=(0,Qe.createLogger)("foundation-router");var Zg=i(36132),ev=i(80751),tv=i(3479);const iv="$router",ov=Object.freeze({getOrCreateFor:e=>{const t=e[iv];return void 0!==t?t:e[iv]=new nv(e)},find:e=>tv.Ix.find(e),from:e=>tv.Ix.from(e)});class nv extends tv.LK{}const av=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function sv(e){return av.test(e)}function rv(e){return e.config instanceof Xg.Y?e:ov.find(e)}function lv(e){return rv(e).parent}function dv(e){let t=rv(e);for(;t&&t.level>0;)t=t.parent;return t}function cv(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 uv(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 hv(e){return e.replace(`/*${ev.N}`,"")}const pv=Object.freeze({path:Object.freeze({get current(){return Zg.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=rv(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&&sv(e)?location.href=e:(history.pushState({},document.title,e),t&&pv.path.trigger(e))},replace:(e,t=!0)=>{e&&sv(e)?location.href=e:(history.replaceState({},document.title,e),t&&pv.path.trigger(e))},trigger:e=>{Zg.qh.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=rv(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 pv.name.generateRoute(e,t,i);null!==n&&pv.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 pv.name.generateRoute(e,t,i);null!==n&&pv.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 pv.name.generateRoute(e,t,i);null!==o&&pv.path.trigger(o)})})}),mv=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,gv=10;function vv(e,t=mv,i=gv){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 fv extends ev.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(Jg.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return Jg.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return Jg.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}(0,C.Cg)([l.observable],fv.prototype,"definitions",void 0);class bv extends Xg.Y{constructor(){super(),this.logger=Jg,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new fv(this),this.basename=zn.OB,this.routes=new fv(this)}getNavItems(e=mv){return vv(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Wg.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const n=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),pv.name.replace(e.router,n)}else this.user.trackPath(),pv.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(),pv.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 pv.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&pv.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Qg.C.build(t);let n=i&&!e.startsWith(i)?cv([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?hv(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([s.Container],bv.prototype,"container",void 0),(0,C.Cg)([Kg],bv.prototype,"analytics",void 0),(0,C.Cg)([Tl.KJ],bv.prototype,"user",void 0),(0,C.Cg)([wi.N],bv.prototype,"_session",void 0);const yv="navigate-to",wv="generate-navigation-path";let Cv=class extends(ov.from(l.FASTElement)){constructor(){super(...arguments),this.logger=Jg,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[iv]}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(yv,this.onNavigateTo),this.addEventListener(wv,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(yv,this.onNavigateTo),this.removeEventListener(wv,this.onGenerateNavigationPath)}};Cv=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],Cv);const xv=e=>l.html`
|
|
6280
|
+
`;var Ug;!function(e){e.NOTIFICATION_EVENT="notification-event"}(Ug||(Ug={}));const Bg={mode:"open",delegatesFocus:!0};class Gg 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(Ug.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),fe(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*(){this.resourceName&&(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,oi.d)(e))}):Ze.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}};Pd(r,this.tagName)}}(0,C.Cg)([l.observable],Gg.prototype,"notificationListener",void 0),(0,C.Cg)([ai.dm],Gg.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Gg.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Gg.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Gg.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Gg.prototype,"toastPosition",void 0),(0,C.Cg)([si.yW],Gg.prototype,"datasource",void 0);const jg=Gg.compose({baseName:"notification-listener",template:Pg,shadowOptions:Bg}),Vg=(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 Wg(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 Yg,qg=i(16171);!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Yg||(Yg={}));class Kg{constructor(e){this.analytics=(0,qg.Ay)(e)}trackEvent(e,t){Aa.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`),this.analytics.track(e,t)}}const Xg=s.DI.createInterface(e=>e.singleton(Kg));var Qg=i(98647),Jg=i(35044);const Zg=(0,Je.createLogger)("foundation-router");var ev=i(36132),tv=i(80751),iv=i(3479);const ov="$router",nv=Object.freeze({getOrCreateFor:e=>{const t=e[ov];return void 0!==t?t:e[ov]=new av(e)},find:e=>iv.Ix.find(e),from:e=>iv.Ix.from(e)});class av extends iv.LK{}const sv=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function rv(e){return sv.test(e)}function lv(e){return e.config instanceof Qg.Y?e:nv.find(e)}function dv(e){return lv(e).parent}function cv(e){let t=lv(e);for(;t&&t.level>0;)t=t.parent;return t}function uv(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 hv(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 pv(e){return e.replace(`/*${tv.N}`,"")}const mv=Object.freeze({path:Object.freeze({get current(){return ev.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=lv(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&&rv(e)?location.href=e:(history.pushState({},document.title,e),t&&mv.path.trigger(e))},replace:(e,t=!0)=>{e&&rv(e)?location.href=e:(history.replaceState({},document.title,e),t&&mv.path.trigger(e))},trigger:e=>{ev.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=lv(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 mv.name.generateRoute(e,t,i);null!==n&&mv.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 mv.name.generateRoute(e,t,i);null!==n&&mv.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 mv.name.generateRoute(e,t,i);null!==o&&mv.path.trigger(o)})})}),gv=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,vv=10;function fv(e,t=gv,i=vv){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 bv extends tv.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],bv.prototype,"definitions",void 0);class yv extends Qg.Y{constructor(){super(),this.logger=Zg,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new bv(this),this.basename=Pn.OB,this.routes=new bv(this)}getNavItems(e=gv){return fv(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Yg.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}.`),mv.name.replace(e.router,n)}else this.user.trackPath(),mv.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(),mv.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 mv.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&mv.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Jg.C.build(t);let n=i&&!e.startsWith(i)?uv([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?pv(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([s.Container],yv.prototype,"container",void 0),(0,C.Cg)([Xg],yv.prototype,"analytics",void 0),(0,C.Cg)([Ol.KJ],yv.prototype,"user",void 0),(0,C.Cg)([Ci.N],yv.prototype,"_session",void 0);const wv="navigate-to",Cv="generate-navigation-path";let xv=class extends(nv.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[ov]}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(wv,this.onNavigateTo),this.addEventListener(Cv,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(wv,this.onNavigateTo),this.removeEventListener(Cv,this.onGenerateNavigationPath)}};xv=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],xv);const $v=e=>l.html`
|
|
6281
6281
|
|
|
6282
6282
|
<${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">
|
|
6283
6283
|
<div class=${e=>(0,x.x)("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])} part="stepper-tab-menu">
|
|
@@ -6308,9 +6308,9 @@ class="margin"
|
|
|
6308
6308
|
</div>
|
|
6309
6309
|
`)}
|
|
6310
6310
|
</${e}-card>
|
|
6311
|
-
|
|
6312
|
-
${e
|
|
6313
|
-
`,
|
|
6311
|
+
`,Sv=l.html`
|
|
6312
|
+
${e=>$v(O(e))}
|
|
6313
|
+
`,Ev=l.css`
|
|
6314
6314
|
:host {
|
|
6315
6315
|
display: flex;
|
|
6316
6316
|
height: 100%;
|
|
@@ -6409,5 +6409,5 @@ class="margin"
|
|
|
6409
6409
|
max-height: 70px;
|
|
6410
6410
|
height: 70px;
|
|
6411
6411
|
}
|
|
6412
|
-
`;class
|
|
6413
|
-
//# sourceMappingURL=210.
|
|
6412
|
+
`;class Tv extends s.FoundationElement{constructor(){super(...arguments),this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.orientation=s.TabsOrientation.vertical,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),e.setAttribute("aria-controls",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)}),this.progressValue=Math.round(e/this.tabpanels.length*100)},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.tabs.length<=this.tabpanels.length&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&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.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 Ze.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):(Ze.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,as.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,as.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],Tv.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],Tv.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],Tv.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],Tv.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],Tv.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],Tv.prototype,"hideTabs",void 0),(0,C.Cg)([l.attr],Tv.prototype,"orientation",void 0),(0,C.Cg)([l.attr],Tv.prototype,"activeid",void 0),(0,C.Cg)([l.observable],Tv.prototype,"tabs",void 0),(0,C.Cg)([l.observable],Tv.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],Tv.prototype,"validation",void 0),(0,C.Cg)([l.observable],Tv.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],Tv.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],Tv.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],Tv.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],Tv.prototype,"islastStepValid",null);const Ov=void 0,kv={},Iv=Tv.compose(Object.assign({baseName:"stepper",template:Sv,styles:Ev,shadowOptions:Ov},kv)),Dv=["text-field","text-area","combobox"],Rv=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],Av=e=>Dv.map(t=>`${e}-${t}`),Nv={rapid:Av("rapid"),zero:Av("zero")};function Lv(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=Nv[e])&&void 0!==t?t:[]}),o=t.filter(Boolean);return Array.from(new Set([...Rv,...i,...o])).join(",")}const Fv=()=>ed().register(Qp)},70997(e,t,i){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){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}}}]);
|
|
6413
|
+
//# sourceMappingURL=210.1ee31ef5dbf3196b9b4079b11a623858.js.map
|