@genesislcap/design-system-configurator 14.427.1-TAM-8.26-patch.1 → 14.427.1-TAM-8.26-patch.2
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/{210.210.a09201f35069dfc36bde.js → 210.210.6db31f51aabc50105c3f.js} +272 -272
- package/dist/210.f52c021da7728db257d40867daf62262.js.map +1 -0
- package/dist/{445.445.80e79c0be34be0593629.js → 445.445.f79ff32e396afcbc9acc.js} +2 -2
- package/dist/445.a0a8ef9fc3b9933d7a42703770867afd.js.map +1 -0
- package/dist/designSystemConfigurator.644db3f5e52da2cc85b35737c9ea026a.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/main.4a4b5fb8e587a291c18a6a9f655cff8e.js.map +1 -0
- package/dist/main.8337a8de285a25938519.js +2 -0
- package/dist/remoteEntry.js +2 -2
- package/package.json +13 -13
- package/dist/117.117.ef4c484011c9aad13a55.js +0 -2
- package/dist/117.f0b9fb54cfb1a1fc7ec1aeebc63674f5.js.map +0 -1
- package/dist/210.e5e5af8560f5f52b3a50269e7339e788.js.map +0 -1
- package/dist/445.4f622152dd9b3a994a68782fd9458c82.js.map +0 -1
- package/dist/designSystemConfigurator.045bf856c9c16f15bbea964066364e0b.js.map +0 -1
- package/dist/main.2c493fdf4f96aa691864556fc8397506.js.map +0 -1
- package/dist/main.9bc90a9e6ea54baf80f4.js +0 -2
- package/dist/npm.analytics.140.91d3afa983a3b144a392.js +0 -2
- package/dist/npm.analytics.3bf6d9468357f2e1a30e652483bc994d.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
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(89437).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(89437),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:()=>nl,AiCriteriaSearch:()=>fe,AiIndicator:()=>$e,Anchor:()=>Oe,AnchoredRegion:()=>Ne,Avatar:()=>Pe,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Iv,Badge:()=>We,Banner:()=>it,BaseDatasource:()=>ri,BaseFileComponent:()=>$a,Breadcrumb:()=>st,BreadcrumbItem:()=>ht,Button:()=>bt,COMBO_INPUT_MIN_LENGTH:()=>Gc,CSSVarsTokenMapper:()=>Xp,Calendar:()=>St,Card:()=>Dt,CategorizedMultiselect:()=>Ut,Checkbox:()=>Vt,Combobox:()=>gi,ConnectionIndicator:()=>xi,DATETIME_OPERATORS:()=>Z,DATE_OPERATORS:()=>J,DEFUALT_FILTER_BAR_COLUMNS:()=>ds,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Rv,DataGrid:()=>Ti,DataGridCell:()=>Ri,DataGridDatasource:()=>Qp,DataGridRow:()=>Mi,DatePicker:()=>lo,DefaultRouter:()=>ov,DesignTokensObservable:()=>Lo,Dialog:()=>fn,DialogElement:()=>vn,Disclosure:()=>Cn,Divider:()=>On,DropdownMenu:()=>Mn,EnvironmentIndicator:()=>Xn,ErrorBanner:()=>ta,ErrorBoundary:()=>ga,ErrorBoundaryEvent:()=>oa,ErrorDialog:()=>Ca,ExpressionBuilderConfig:()=>a,ExpressionBuilderCore:()=>gg,FaPrefixFromStyle:()=>ur,FileReader:()=>ka,FileUpload:()=>Ba,Filter:()=>ts,FilterBar:()=>cs,FilterEvents:()=>es,FlexLayout:()=>bs,FlexMediaQueriesEnum:()=>hs,Flipper:()=>xs,Flyout:()=>Ds,FoundationDesignSystemProvider:()=>sn,FoundationExpressionBuilder:()=>eg,FoundationRouteCollection:()=>vv,FoundationRouteNav:()=>hv,FoundationRouter:()=>wv,FoundationRouterConfiguration:()=>fv,FoundationRuleExpressionBuilder:()=>Rg,FoundationValueExpressionBuilder:()=>_g,GenerateNavigationPathEventType:()=>yv,GridLayout:()=>Us,GridLayoutItem:()=>Ws,GridMediaQueriesEnum:()=>Ls,HorizontalScroll:()=>Xs,INPUT_MIN_LENGTH:()=>Bc,Icon:()=>mr,Listbox:()=>br,ListboxOption:()=>Sr,Menu:()=>Dr,MenuItem:()=>Mr,Modal:()=>jr,Multiselect:()=>Zr,MultiselectDatasource:()=>qr,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>bv,NotificationListener:()=>Ug,NumberField:()=>fl,Optgroup:()=>$l,OptionsDatasource:()=>ci,Popper:()=>dd,Position:()=>Lt,Progress:()=>Yl,ProgressRing:()=>gd,Radio:()=>Cd,RadioGroup:()=>Od,Router:()=>iv,RuleExpression:()=>vg,SCROLL_TIMEOUT:()=>Uc,SECTION_NAVIGATOR_EVENTS:()=>au,SNACKBAR_CLOSE_TIMEOUT:()=>Ju,SNACKBAR_EVENTS_NAMES:()=>Zu,SNACKBAR_TYPES:()=>Qu,SNACKBAR_TYPE_DEFAULT:()=>Xu,STRING_OPERATORS:()=>X,Scheduler:()=>Ld,SchedulerCronBuilder:()=>Ec,SchedulerTimezone:()=>Ac,SearchBar:()=>Vc,SearchBarCombobox:()=>Qc,SectionNavigator:()=>lu,SegmentedControl:()=>mu,SegmentedItem:()=>wu,Select:()=>Tu,Skeleton:()=>Au,Slider:()=>Pu,SliderLabel:()=>Wu,Snackbar:()=>nh,StackingIcons:()=>lh,StatusPill:()=>ph,Stepper:()=>Sv,StepperTab:()=>bh,StepperTabPanel:()=>$h,Switch:()=>Ih,SystemHealthOverlay:()=>td,Tab:()=>Fh,TabPanel:()=>Uh,Tabs:()=>Yh,TextArea:()=>Zh,TextField:()=>rp,Toast:()=>vp,Toolbar:()=>wp,Tooltip:()=>Tp,TreeItem:()=>Ap,TreeView:()=>Hp,UrlInput:()=>Yp,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:()=>qo,actionsMenuBaseStyles:()=>$,applyCustomTokens:()=>Po,baseComponents:()=>Kp,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>Xo,black:()=>po,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>Av,categorizedMultiselectStyles:()=>Mt,categorizedMultiselectTemplate:()=>Ht,clientOperators:()=>bg,closeIcon:()=>Ya,configureDesignSystem:()=>Yo,configureEnvironmentIndicator:()=>qn,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>Jo,createDesignSystemProxy:()=>Ql,createFormData:()=>Fa,crossIcon:()=>_c,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>ye,defaultAnchorConfig:()=>Ie,defaultAnchoredRegionConfig:()=>Fe,defaultAvatarConfig:()=>Be,defaultBadgeConfig:()=>qe,defaultBreadcrumbConfig:()=>lt,defaultBreadcrumbItemConfig:()=>mt,defaultButtonConfig:()=>wt,defaultCalendarConfig:()=>Tt,defaultCardConfig:()=>At,defaultCategorizedMultiselectConfig:()=>Pt,defaultCheckboxConfig:()=>Yt,defaultComboboxConfig:()=>fi,defaultConfig:()=>Md,defaultCronBuilderConfig:()=>Oc,defaultDataGridCellConfig:()=>Ni,defaultDataGridConfig:()=>ki,defaultDataGridRowConfig:()=>Hi,defaultDatePickerConfig:()=>ro,defaultDialogConfig:()=>gn,defaultDisclosureConfig:()=>$n,defaultDividerConfig:()=>In,defaultFileUploadConfig:()=>ja,defaultFillColor:()=>go,defaultFlexLayoutConfig:()=>fs,defaultFlipperConfig:()=>Ss,defaultFlyoutConfig:()=>As,defaultGridLayoutConfig:()=>zs,defaultGridLayoutItemConfig:()=>Vs,defaultHorizontalScrollConfig:()=>Js,defaultIconConfig:()=>cr,defaultListboxConfig:()=>wr,defaultListboxOptionConfig:()=>Tr,defaultMenuConfig:()=>Ar,defaultMenuItemConfig:()=>Hr,defaultModalConfig:()=>Gr,defaultMultiselectConfig:()=>Jr,defaultNavItemPredicate:()=>pv,defaultNeutralForegroundContrast:()=>ko,defaultNumberFieldConfig:()=>yl,defaultPlacementIndexPadding:()=>mv,defaultProgressConfig:()=>Kl,defaultProgressRingConfig:()=>fd,defaultRadioConfig:()=>$d,defaultRadioGroupConfig:()=>Id,defaultSearchBarComboboxConfig:()=>Zc,defaultSearchBarConfig:()=>Yc,defaultSectionNavigatorConfig:()=>cu,defaultSegmentedControlConfig:()=>vu,defaultSegmentedItemConfig:()=>xu,defaultSelectConfig:()=>ku,defaultSkeletonConfig:()=>Lu,defaultSliderConfig:()=>Bu,defaultSliderLabelConfig:()=>qu,defaultStepperConfig:()=>Tv,defaultStepperTabConfig:()=>wh,defaultStepperTabPanelConfig:()=>Eh,defaultSwitchConfig:()=>Rh,defaultSystemHealthOverlayConfig:()=>ad,defaultTabConfig:()=>_h,defaultTabPanelConfig:()=>Gh,defaultTabsConfig:()=>Kh,defaultTextAreaConfig:()=>tp,defaultTextFieldConfig:()=>dp,defaultTimezoneConfig:()=>Lc,defaultToastConfig:()=>gp,defaultToolbarConfig:()=>xp,defaultTooltipConfig:()=>kp,defaultTreeItemConfig:()=>Lp,defaultTreeViewConfig:()=>Pp,defaultUrlInputConfig:()=>Wp,defineFactory:()=>Gg,density:()=>r.density,designToken:()=>_o,designTokensMap:()=>Vo,designUnit:()=>r.designUnit,designUnitValue:()=>Zo,direction:()=>r.direction,directionValue:()=>Qo,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>_a,dropdownMenuBaseStyles:()=>Rn,environmentIndicatorStyles:()=>zn,errorDialogTemplate:()=>ya,extractMenuItems:()=>Nn,faSizeValueDefault:()=>hr,faSizeValues:()=>pr,fileReaderStyles:()=>Sa,fileReaderTemplate:()=>Oa,fillColor:()=>r.fillColor,filterBarTemplate:()=>rs,findParentRouter:()=>rv,findRouter:()=>sv,findTopLevelRouter:()=>lv,flyoutAnimationTime:()=>Ts,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:()=>hh,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>A,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>D,foundationAiCriteriaSearch:()=>we,foundationAiCriteriaSearchShadowOptions:()=>be,foundationAiCriteriaSearchStyles:()=>M,foundationAiCriteriaSearchTemplate:()=>U,foundationAiIndicator:()=>Se,foundationAiIndicatorStyles:()=>Ce,foundationAiIndicatorTemplate:()=>xe,foundationAnchor:()=>De,foundationAnchorShadowOptions:()=>ke,foundationAnchorStyles:()=>Ee,foundationAnchorTemplate:()=>Te,foundationAnchoredRegion:()=>Me,foundationAnchoredRegionShadowOptions:()=>Le,foundationAnchoredRegionStyles:()=>Ae,foundationAnchoredRegionTemplate:()=>Re,foundationAvatar:()=>Ge,foundationAvatarShadowOptions:()=>Ue,foundationAvatarStyles:()=>_e,foundationAvatarTemplate:()=>He,foundationBadge:()=>Ke,foundationBadgeShadowOptions:()=>Ye,foundationBadgeStyles:()=>je,foundationBadgeTemplate:()=>Ve,foundationBanner:()=>ot,foundationBannerShadowOptions:()=>tt,foundationBannerStyles:()=>Je,foundationBannerTemplate:()=>et,foundationBreadcrumb:()=>dt,foundationBreadcrumbItem:()=>gt,foundationBreadcrumbItemShadowOptions:()=>pt,foundationBreadcrumbItemStyles:()=>ct,foundationBreadcrumbItemTemplate:()=>ut,foundationBreadcrumbShadowOptions:()=>rt,foundationBreadcrumbStyles:()=>nt,foundationBreadcrumbTemplate:()=>at,foundationButton:()=>Ct,foundationButtonShadowOptions:()=>yt,foundationButtonStyles:()=>vt,foundationButtonTemplate:()=>ft,foundationCalendar:()=>Ot,foundationCalendarShadowOptions:()=>Et,foundationCalendarStyles:()=>xt,foundationCalendarTemplate:()=>$t,foundationCard:()=>Nt,foundationCardShadowOptions:()=>Rt,foundationCardStyles:()=>kt,foundationCardTemplate:()=>It,foundationCategorizedMultiselect:()=>Bt,foundationCategorizedMultiselectShadowOptions:()=>zt,foundationCheckbox:()=>qt,foundationCheckboxShadowOptions:()=>Wt,foundationCheckboxStyles:()=>Gt,foundationCheckboxTemplate:()=>jt,foundationCombobox:()=>bi,foundationComboboxShadowOptions:()=>vi,foundationComboboxStyles:()=>ui,foundationComboboxTemplate:()=>hi,foundationConnectionIndicator:()=>$i,foundationConnectionIndicatorStyles:()=>wi,foundationConnectionIndicatorTemplate:()=>Ci,foundationDataGrid:()=>Ii,foundationDataGridCell:()=>Li,foundationDataGridCellShadowOptions:()=>Ai,foundationDataGridCellStyles:()=>Di,foundationDataGridCellTemplate:()=>s.dataGridCellTemplate,foundationDataGridRow:()=>zi,foundationDataGridRowShadowOptions:()=>_i,foundationDataGridRowStyles:()=>Fi,foundationDataGridRowTemplate:()=>s.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Oi,foundationDataGridStyles:()=>Si,foundationDataGridTemplate:()=>Ei,foundationDatePicker:()=>co,foundationDatePickerShadowOptions:()=>so,foundationDatePickerStyles:()=>Zi,foundationDatePickerTemplate:()=>io,foundationDesignSystemProvider:()=>rn,foundationDialog:()=>bn,foundationDialogShadowOptions:()=>mn,foundationDialogStyles:()=>dn,foundationDialogTemplate:()=>pn,foundationDisclosure:()=>Sn,foundationDisclosureShadowOptions:()=>xn,foundationDisclosureStyles:()=>yn,foundationDisclosureTemplate:()=>wn,foundationDivider:()=>Dn,foundationDividerShadowOptions:()=>kn,foundationDividerStyles:()=>En,foundationDividerTemplate:()=>Tn,foundationDropdownMenu:()=>_n,foundationDropdownMenuStyles:()=>An,foundationDropdownMenuTemplate:()=>Fn,foundationEnvironmentIndicator:()=>Qn,foundationEnvironmentIndicatorTemplate:()=>Pn,foundationErrorBanner:()=>ia,foundationErrorBannerShadowOptions:()=>ea,foundationErrorBannerTemplate:()=>Zn,foundationErrorBoundary:()=>va,foundationErrorBoundaryShadowOptions:()=>ma,foundationErrorBoundaryTemplate:()=>pa,foundationErrorDialog:()=>xa,foundationErrorDialogShadowOptions:()=>wa,foundationErrorDialogStyles:()=>fa,foundationFileReader:()=>Ia,foundationFileReaderStyles:()=>Ea,foundationFileUpload:()=>Va,foundationFileUploadShadowOptions:()=>Ga,foundationFileUploadStyles:()=>Aa,foundationFileUploadTemplate:()=>La,foundationFilter:()=>is,foundationFilterBar:()=>us,foundationFilterBarStyles:()=>ns,foundationFilterBarTemplate:()=>ls,foundationFilterStyles:()=>Wa,foundationFilterTemplate:()=>Za,foundationFlexLayout:()=>ys,foundationFlexLayoutShadowOptions:()=>vs,foundationFlexLayoutStyles:()=>ms,foundationFlexLayoutTemplate:()=>gs,foundationFlipper:()=>Es,foundationFlipperShadowOptions:()=>$s,foundationFlipperStyles:()=>ws,foundationFlipperTemplate:()=>Cs,foundationFlyout:()=>Ns,foundationFlyoutShadowOptions:()=>Rs,foundationFlyoutStyles:()=>Os,foundationFlyoutTemplate:()=>Is,foundationGridLayout:()=>Bs,foundationGridLayoutItem:()=>Ys,foundationGridLayoutItemShadowOptions:()=>js,foundationGridLayoutItemTemplate:()=>Gs,foundationGridLayoutShadowOptions:()=>Hs,foundationGridLayoutStyles:()=>Ms,foundationGridLayoutTemplate:()=>_s,foundationHorizontalScroll:()=>Zs,foundationHorizontalScrollShadowOptions:()=>Qs,foundationHorizontalScrollStyles:()=>qs,foundationHorizontalScrollTemplate:()=>Ks,foundationIcon:()=>gr,foundationIconShadowOptions:()=>dr,foundationIconStyles:()=>sr,foundationIconTemplate:()=>lr,foundationListbox:()=>Cr,foundationListboxOption:()=>Or,foundationListboxOptionShadowOptions:()=>Er,foundationListboxOptionStyles:()=>xr,foundationListboxOptionTemplate:()=>$r,foundationListboxShadowOptions:()=>yr,foundationListboxStyles:()=>vr,foundationListboxTemplate:()=>fr,foundationMenu:()=>Nr,foundationMenuItem:()=>zr,foundationMenuItemShadowOptions:()=>_r,foundationMenuItemStyles:()=>Lr,foundationMenuItemTemplate:()=>Fr,foundationMenuShadowOptions:()=>Rr,foundationMenuStyles:()=>kr,foundationMenuTemplate:()=>Ir,foundationModal:()=>Vr,foundationModalShadowOptions:()=>Br,foundationModalStyles:()=>Pr,foundationModalTemplate:()=>Ur,foundationMultiselect:()=>el,foundationMultiselectShadowOptions:()=>Qr,foundationNotificationListener:()=>Bg,foundationNotificationListenerShadowOptions:()=>Pg,foundationNotificationListenerTemplate:()=>Hg,foundationNumberField:()=>wl,foundationNumberFieldShadowOptions:()=>bl,foundationNumberFieldStyles:()=>sl,foundationNumberFieldTemplate:()=>rl,foundationOptgroup:()=>Sl,foundationOptgroupStyles:()=>Cl,foundationOptgroupTemplate:()=>xl,foundationPopper:()=>hd,foundationProgress:()=>Xl,foundationProgressRing:()=>bd,foundationProgressRingShadowOptions:()=>vd,foundationProgressRingStyles:()=>pd,foundationProgressRingTemplate:()=>md,foundationProgressShadowOptions:()=>ql,foundationProgressStyles:()=>Vl,foundationProgressTemplate:()=>Wl,foundationRadio:()=>Sd,foundationRadioGroup:()=>Dd,foundationRadioGroupShadowOptions:()=>kd,foundationRadioGroupStyles:()=>Ed,foundationRadioGroupTemplate:()=>Td,foundationRadioShadowOptions:()=>xd,foundationRadioStyles:()=>yd,foundationRadioTemplate:()=>wd,foundationScheduler:()=>_d,foundationSchedulerCronBuilder:()=>kc,foundationSchedulerCronBuilderShadowOptions:()=>Tc,foundationSchedulerCronBuilderTemplate:()=>Sc,foundationSchedulerShadowOptions:()=>Fd,foundationSchedulerTemplate:()=>Nd,foundationSchedulerTimezone:()=>Fc,foundationSchedulerTimezoneShadowOptions:()=>Nc,foundationSchedulerTimezoneTemplate:()=>Rc,foundationSearchBar:()=>qc,foundationSearchBarCombobox:()=>eu,foundationSearchBarComboboxShadowOptions:()=>Jc,foundationSearchBarComboboxStyles:()=>Kc,foundationSearchBarComboboxTemplate:()=>Xc,foundationSearchBarShadowOptions:()=>Wc,foundationSearchBarStyles:()=>Mc,foundationSearchBarTemplate:()=>Pc,foundationSectionNavigator:()=>uu,foundationSectionNavigatorShadowOptions:()=>du,foundationSectionNavigatorStyles:()=>tu,foundationSectionNavigatorTemplate:()=>iu,foundationSegmentedControl:()=>fu,foundationSegmentedControlShadowOptions:()=>gu,foundationSegmentedControlStyles:()=>hu,foundationSegmentedControlTemplate:()=>pu,foundationSegmentedItem:()=>$u,foundationSegmentedItemShadowOptions:()=>Cu,foundationSegmentedItemStyles:()=>bu,foundationSegmentedItemTemplate:()=>yu,foundationSelect:()=>Iu,foundationSelectShadowOptions:()=>Ou,foundationSelectStyles:()=>Su,foundationSelectTemplate:()=>Eu,foundationSkeleton:()=>Fu,foundationSkeletonShadowOptions:()=>Nu,foundationSkeletonStyles:()=>Du,foundationSkeletonTemplate:()=>Ru,foundationSlider:()=>Gu,foundationSliderLabel:()=>Ku,foundationSliderLabelShadowOptions:()=>Yu,foundationSliderLabelStyles:()=>ju,foundationSliderLabelTemplate:()=>Vu,foundationSliderShadowOptions:()=>Uu,foundationSliderStyles:()=>Mu,foundationSliderTemplate:()=>zu,foundationSnackbar:()=>ah,foundationSnackbarShadowOptions:()=>oh,foundationSnackbarStyles:()=>eh,foundationSnackbarTemplate:()=>ih,foundationStackingIcons:()=>dh,foundationStackingIconsStyles:()=>sh,foundationStackingIconsTemplate:()=>rh,foundationStatusPill:()=>mh,foundationStatusPillTemplate:()=>uh,foundationStepper:()=>Ov,foundationStepperShadowOptions:()=>Ev,foundationStepperStyles:()=>$v,foundationStepperTab:()=>Ch,foundationStepperTabPanel:()=>Th,foundationStepperTabPanelShadowOptions:()=>Sh,foundationStepperTabPanelTemplate:()=>xh,foundationStepperTabShadowOptions:()=>yh,foundationStepperTabStyles:()=>gh,foundationStepperTabTemplate:()=>fh,foundationStepperTemplate:()=>xv,foundationSwitch:()=>Ah,foundationSwitchShadowOptions:()=>Dh,foundationSwitchStyles:()=>Oh,foundationSwitchTemplate:()=>kh,foundationSystemHealthOverlay:()=>sd,foundationSystemHealthOverlayShadowOptions:()=>nd,foundationSystemHealthOverlayStyles:()=>od,foundationSystemHealthOverlayTemplate:()=>id,foundationTab:()=>Hh,foundationTabPanel:()=>jh,foundationTabPanelShadowOptions:()=>Bh,foundationTabPanelStyles:()=>zh,foundationTabPanelTemplate:()=>Ph,foundationTabShadowOptions:()=>Mh,foundationTabStyles:()=>Nh,foundationTabTemplate:()=>Lh,foundationTabs:()=>Xh,foundationTabsShadowOptions:()=>qh,foundationTabsStyles:()=>Vh,foundationTabsTemplate:()=>Wh,foundationTextArea:()=>ip,foundationTextAreaShadowOptions:()=>ep,foundationTextAreaStyles:()=>Qh,foundationTextAreaTemplate:()=>Jh,foundationTextField:()=>cp,foundationTextFieldShadowOptions:()=>lp,foundationTextFieldStyles:()=>ap,foundationTextFieldTemplate:()=>sp,foundationToast:()=>fp,foundationToastShadowOptions:()=>mp,foundationToastStyles:()=>up,foundationToastTemplate:()=>pp,foundationToolbar:()=>$p,foundationToolbarShadowOptions:()=>Cp,foundationToolbarStyles:()=>bp,foundationToolbarTemplate:()=>yp,foundationTooltip:()=>Ip,foundationTooltipShadowOptions:()=>Op,foundationTooltipStyles:()=>Sp,foundationTooltipTemplate:()=>Ep,foundationTreeItem:()=>Fp,foundationTreeItemShadowOptions:()=>Np,foundationTreeItemStyles:()=>Dp,foundationTreeItemTemplate:()=>Rp,foundationTreeView:()=>Up,foundationTreeViewShadowOptions:()=>zp,foundationTreeViewStyles:()=>Mp,foundationTreeViewTemplate:()=>_p,foundationUrlInput:()=>qp,foundationUrlInputShadowOptions:()=>Vp,foundationUrlInputStyles:()=>Bp,foundationUrlInputTemplate:()=>jp,fromBinaryExpression:()=>kg,fromMethodExpression:()=>Ig,fuiAccentPalette:()=>So,fuiAccentSwatch:()=>$o,fuiCardFillColor:()=>Oo,fuiCardForegroundColor:()=>Do,fuiDefaultCardFillColor:()=>fo,fuiDefaultCardPalette:()=>bo,fuiFillColor:()=>To,fuiNeutralPalette:()=>Co,fuiNeutralSwatch:()=>wo,getBannerTemplate:()=>Ze,getCriteriaBuilder:()=>jc,getDefaultConfig:()=>Bo,getDesignSystemPrefix:()=>O,getDialogTemplate:()=>hn,getDropdownMenuTemplate:()=>Ln,getErrorDialogTemplate:()=>ba,getExports:()=>Go,getFontawesomeIconsCss:()=>ar,getNavItems:()=>gv,getPrefixedCategorizedMultiselect:()=>_t,getPrefixedCronBuilder:()=>$c,getPrefixedDatePicker:()=>to,getPrefixedErrorBanner:()=>Jn,getPrefixedFileReader:()=>Ta,getPrefixedFileUpload:()=>Na,getPrefixedFilterTemplate:()=>Ja,getPrefixedFlyout:()=>ks,getPrefixedIcon:()=>rr,getPrefixedMultiselect:()=>Kr,getPrefixedScheduler:()=>Ad,getPrefixedSchedulerTimezone:()=>Dc,getPrefixedSearchBar:()=>zc,getPrefixedSnackbar:()=>th,getPrefixedStepper:()=>Cv,getPrefixedStepperTab:()=>vh,getPrefixedToast:()=>hp,getPrefixedUrlInput:()=>Gp,getTypeRampValue:()=>jo,groupsToCriteria:()=>K,inputControls:()=>ic,isAbsoluteUrl:()=>av,jsonConverter:()=>ld,mapType:()=>as,maxheight:()=>Wr,media:()=>ze,menuTemplate:()=>k,mixinFoundationFontFamily:()=>tn,multiselectStyles:()=>Yr,multiselectTemplate:()=>Xr,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:()=>Io,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:()=>Ko,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:()=>Ft,paletteFromHex:()=>zo,pathJoin:()=>dv,plusIcon:()=>Hc,provideDesignSystem:()=>Jl,provideTokens:()=>Mo,rebuildOperator:()=>Og,registerFoundationDesignSystem:()=>Nv,removeChildRouteParameter:()=>uv,removeLastPathSegment:()=>cv,routerLogger:()=>Qg,routerProperty:()=>tv,ruleExpressionToGroup:()=>Dg,ruleToRuleExpression:()=>Eg,ruleToRuleMethodExpression:()=>Sg,schedulerCronBuilderStyles:()=>oc,schedulerStyles:()=>Rd,schedulerTimezoneStyles:()=>Ic,selectCustomToken:()=>Wo,sharedFieldStyles:()=>al,singleOptionTemplate:()=>I,statusPillStyles:()=>ch,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>Ho,tagFor:()=>jg,transformOperatorNameToServerName:()=>$g,transformServerNameToOperatorName:()=>Tg,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:()=>Ma,validateClauses:()=>le,validateGroups:()=>de,white:()=>ho});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:()=>ko,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:()=>Oo,fuiCardForegroundColor:()=>Do,fuiFillColor:()=>To,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:()=>Io,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:()=>qo,baseLayerLuminanceValue:()=>Xo,controlCornerRadiusValue:()=>Jo,designUnitValue:()=>Zo,directionValue:()=>Qo,neutralPaletteValue:()=>Ko});var a={};i.r(a),i.d(a,{BASE_LOGICAL_COMBINATORS:()=>Jp,BASE_OPERATORS:()=>nm,LOGICAL_COMBINATORS:()=>Zp,NULL_COMBINATOR:()=>em});var s=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
1
|
+
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[210],{58915(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,n=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},r=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var i,o=a.meridiem;if(o){for(var n=1;n<=24;n+=1)if(e.indexOf(o(n,0,t))>-1){i=n>12;break}}else i=e===(t?"pm":"PM");return i},h={A:[s,function(e){this.afternoon=u(e,!1)}],a:[s,function(e){this.afternoon=u(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[o,l("day")],Do:[s,function(e){var t=a.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[n,l("week")],ww:[o,l("week")],M:[n,l("month")],MM:[o,l("month")],MMM:[s,function(e){var t=c("months"),i=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[o,function(e){this.year=r(e)}],YYYY:[/\d{4}/,l("year")],Z:d,ZZ:d};function p(i){var o,n;o=i,n=a&&a.formats;for(var s=(i=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,o){var s=o&&o.toUpperCase();return i||n[o]||e[o]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),r=s.length,l=0;l<r;l+=1){var d=s[l],c=h[d],u=c&&c[0],p=c&&c[1];s[l]=p?{regex:u,parser:p}:d.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,o=0;i<r;i+=1){var n=s[i];if("string"==typeof n)o+=n.length;else{var a=n.regex,l=n.parser,d=e.slice(o),c=a.exec(d)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(r=e.parseTwoDigitYear);var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date,o=e.utc,s=e.args;this.$u=o;var r=s[1];if("string"==typeof r){var l=!0===s[2],d=!0===s[3],c=l||d,u=s[2];d&&(u=s[2]),a=this.$locale(),!l&&u&&(a=i.Ls[u]),this.$d=function(e,t,i,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var n=p(t)(e),s=n.year,a=n.month,r=n.day,l=n.hours,d=n.minutes,c=n.seconds,u=n.milliseconds,h=n.zone,m=n.week,g=new Date,v=r||(s||a?1:g.getDate()),f=s||g.getFullYear(),b=0;s&&!a||(b=a>0?a-1:g.getMonth());var y,w=l||0,C=d||0,x=c||0,$=u||0;return h?new Date(Date.UTC(f,b,v,w,C,x,$+60*h.offset*1e3)):i?new Date(Date.UTC(f,b,v,w,C,x,$)):(y=new Date(f,b,v,w,C,x,$),m&&(y=o(y).week(m).toDate()),y)}catch(e){return new Date("")}}(t,r,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),c&&t!=this.format(r)&&(this.$d=new Date("")),a={}}else if(r instanceof Array)for(var h=r.length,m=1;m<=h;m+=1){s[1]=r[m-1];var g=i.apply(this,s);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}m===h&&(this.$d=new Date(""))}else n.call(this,e)}}}()},33839(e){e.exports=function(){"use strict";return function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}()},7554(e){e.exports=function(){"use strict";return function(e,t,i){var o=t.prototype,n=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,o,s){var a=e.name?e:e.$locale(),r=n(a[t]),l=n(a[i]),d=r||l.map(function(e){return e.slice(0,o)});if(!s)return d;var c=a.weekStart;return d.map(function(e,t){return d[(t+(c||0))%7]})},a=function(){return i.Ls[i.locale()]},r=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return r(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return l.bind(this)()},i.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return r(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(a(),"months")},i.monthsShort=function(){return s(a(),"monthsShort","months",3)},i.weekdays=function(e){return s(a(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(a(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(a(),"weekdaysMin","weekdays",2,e)}}}()},49916(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,i,o){var n=i.prototype,s=n.format;o.en.formats=e,n.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,o=function(t,i){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,o,n){var s=n&&n.toUpperCase();return o||i[n]||e[n]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(t,void 0===i?{}:i);return s.call(this,o)}}}()},57565(e){e.exports=a,a.default=a,a.stable=c,a.stableStringify=c;var t="[...]",i="[Circular]",o=[],n=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,i,a){var r;void 0===a&&(a=s()),l(e,"",0,[],void 0,0,a);try{r=0===n.length?JSON.stringify(e,t,i):JSON.stringify(e,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function r(e,t,i,s){var a=Object.getOwnPropertyDescriptor(s,i);void 0!==a.get?a.configurable?(Object.defineProperty(s,i,{value:e}),o.push([s,i,t,a])):n.push([t,i,e]):(s[i]=e,o.push([s,i,t]))}function l(e,o,n,s,a,d,c){var u;if(d+=1,"object"==typeof e&&null!==e){for(u=0;u<s.length;u++)if(s[u]===e)return void r(i,e,o,a);if(void 0!==c.depthLimit&&d>c.depthLimit)return void r(t,e,o,a);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void r(t,e,o,a);if(s.push(e),Array.isArray(e))for(u=0;u<e.length;u++)l(e[u],u,u,s,e,d,c);else{var h=Object.keys(e);for(u=0;u<h.length;u++){var p=h[u];l(e[p],p,u,s,e,d,c)}}s.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function c(e,t,i,a){void 0===a&&(a=s());var r,l=u(e,"",0,[],void 0,0,a)||e;try{r=0===n.length?JSON.stringify(l,t,i):JSON.stringify(l,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function u(e,n,s,a,l,c,h){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;p<a.length;p++)if(a[p]===e)return void r(i,e,n,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&c>h.depthLimit)return void r(t,e,n,l);if(void 0!==h.edgesLimit&&s+1>h.edgesLimit)return void r(t,e,n,l);if(a.push(e),Array.isArray(e))for(p=0;p<e.length;p++)u(e[p],p,p,a,e,c,h);else{var m={},g=Object.keys(e).sort(d);for(p=0;p<g.length;p++){var v=g[p];u(e[v],v,p,a,e,c,h),m[v]=e[v]}if(void 0===l)return m;o.push([l,n,e]),l[n]=m}a.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,i){if(n.length>0)for(var o=0;o<n.length;o++){var s=n[o];if(s[1]===t&&s[0]===i){i=s[2],n.splice(o,1);break}}return e.call(this,t,i)}}},93678(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles)return function(e){const i=[],o=[],n=new Map;if(n.set(Date,e=>new Date(e)),n.set(Map,(e,t)=>new Map(a(Array.from(e),t))),n.set(Set,(e,t)=>new Set(a(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)n.set(t[0],t[1]);let s=null;return e.proto?l:r;function a(e,a){const r=Object.keys(e),l=new Array(r.length);for(let d=0;d<r.length;d++){const c=r[d],u=e[c];if("object"!=typeof u||null===u)l[c]=u;else if(u.constructor!==Object&&(s=n.get(u.constructor)))l[c]=s(u,a);else if(ArrayBuffer.isView(u))l[c]=t(u);else{const e=i.indexOf(u);l[c]=-1!==e?o[e]:a(u)}}return l}function r(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,r);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,r);const l={};i.push(e),o.push(l);for(const a in e){if(!1===Object.hasOwnProperty.call(e,a))continue;const d=e[a];if("object"!=typeof d||null===d)l[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))l[a]=s(d,r);else if(ArrayBuffer.isView(d))l[a]=t(d);else{const e=i.indexOf(d);l[a]=-1!==e?o[e]:r(d)}}return i.pop(),o.pop(),l}function l(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,l);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,l);const r={};i.push(e),o.push(r);for(const a in e){const d=e[a];if("object"!=typeof d||null===d)r[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))r[a]=s(d,l);else if(ArrayBuffer.isView(d))r[a]=t(d);else{const e=i.indexOf(d);r[a]=-1!==e?o[e]:l(d)}}return i.pop(),o.pop(),r}}(e);const i=new Map;if(i.set(Date,e=>new Date(e)),i.set(Map,(e,t)=>new Map(n(Array.from(e),t))),i.set(Set,(e,t)=>new Set(n(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)i.set(t[0],t[1]);let o=null;return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a}:function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){if(!1===Object.hasOwnProperty.call(s,n))continue;const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a};function n(e,n){const s=Object.keys(e),a=new Array(s.length);for(let r=0;r<s.length;r++){const l=s[r],d=e[l];"object"!=typeof d||null===d?a[l]=d:d.constructor!==Object&&(o=i.get(d.constructor))?a[l]=o(d,n):ArrayBuffer.isView(d)?a[l]=t(d):a[l]=n(d)}return a}}},14609(e,t,i){"use strict";i.d(t,{b:()=>a});const o=(0,i(89437).createLogger)("foundation-criteria");var n=i(86636);const s="default";class a{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:a,join:r,groupName:l}=t,d=(e,t=s)=>{var o;const n=null!==(o=this.expressions[t])&&void 0!==o?o:[];this.expressions[t]=[...n,{join:i||r,condition:a,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,s)}}else d(e,s);else d(e,"string"==typeof e?s: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){"use strict";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){"use strict";i.d(t,{n:()=>a});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},s=e=>t=>`${t.field} ${e} ${n(t)}`,a={AND:e=>s(o.X.AND)(e),OR:e=>s(o.X.OR)(e),NOT:e=>s(o.X.NOT)(e),GT:e=>s(o.X.GT)(e),GE:e=>s(o.X.GE)(e),LT:e=>s(o.X.LT)(e),LE:e=>s(o.X.LE)(e),NE:e=>s(o.X.NE)(e),EQ:e=>s(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){"use strict";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){"use strict";i.d(t,{u:()=>n});var o=i(60416);const n=(e,t,i)=>{(0,o.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-dialog`),a=i?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(i):(0,o.jE)("dialog-container",t);a.appendChild(s),s.notification=e,s.show()}},60416(e,t,i){"use strict";i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(89437),n=i(52945),s=i(68424);const a=(0,o.createLogger)("foundation-notifications");let r=null;const l=new Map,d=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},c=e=>{var t,i;a.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.logLevel)||o.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,s.DW)(document.body,"rapid");if(t)t.appendChild(i),r=t;else if(r)r.appendChild(i);else{const e=document.createElement(`${o}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),r=e}}return i},h=e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return p()},p=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},28210(e,t,i){"use strict";i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>A,AffixMixin:()=>nl,AiCriteriaSearch:()=>fe,AiIndicator:()=>$e,Anchor:()=>Te,AnchoredRegion:()=>Le,Avatar:()=>Pe,BASE_EDITABLE_ELEMENT_SELECTORS:()=>kv,Badge:()=>Ye,Banner:()=>it,BaseDatasource:()=>ri,BaseFileComponent:()=>$s,Breadcrumb:()=>at,BreadcrumbItem:()=>ht,Button:()=>bt,COMBO_INPUT_MIN_LENGTH:()=>jc,CSSVarsTokenMapper:()=>Xp,Calendar:()=>St,Card:()=>Dt,CategorizedMultiselect:()=>Ut,Checkbox:()=>Vt,Combobox:()=>gi,ConnectionIndicator:()=>xi,DATETIME_OPERATORS:()=>Z,DATE_OPERATORS:()=>Q,DEFUALT_FILTER_BAR_COLUMNS:()=>da,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Dv,DataGrid:()=>Oi,DataGridCell:()=>Ai,DataGridDatasource:()=>Jp,DataGridRow:()=>Mi,DatePicker:()=>lo,DefaultRouter:()=>iv,DesignTokensObservable:()=>No,Dialog:()=>fn,DialogElement:()=>vn,Disclosure:()=>Cn,Divider:()=>Tn,DropdownMenu:()=>Mn,EnvironmentIndicator:()=>Xn,ErrorBanner:()=>ts,ErrorBoundary:()=>gs,ErrorBoundaryEvent:()=>os,ErrorDialog:()=>Cs,ExpressionBuilderConfig:()=>s,ExpressionBuilderCore:()=>gg,FaPrefixFromStyle:()=>ur,FileReader:()=>ks,FileUpload:()=>Bs,Filter:()=>ta,FilterBar:()=>ca,FilterEvents:()=>ea,FlexLayout:()=>ba,FlexMediaQueriesEnum:()=>ha,Flipper:()=>xa,Flyout:()=>Da,FoundationDesignSystemProvider:()=>an,FoundationExpressionBuilder:()=>eg,FoundationRouteCollection:()=>gv,FoundationRouteNav:()=>uv,FoundationRouter:()=>yv,FoundationRouterConfiguration:()=>vv,FoundationRuleExpressionBuilder:()=>Ag,FoundationValueExpressionBuilder:()=>_g,GenerateNavigationPathEventType:()=>bv,GridLayout:()=>Ua,GridLayoutItem:()=>Ya,GridMediaQueriesEnum:()=>Na,HorizontalScroll:()=>Xa,INPUT_MIN_LENGTH:()=>Bc,Icon:()=>mr,Listbox:()=>br,ListboxOption:()=>Sr,Menu:()=>Dr,MenuItem:()=>Mr,Modal:()=>Gr,Multiselect:()=>Zr,MultiselectDatasource:()=>qr,NUMERIC_OPERATORS:()=>J,NavigateToEventType:()=>fv,NotificationListener:()=>Ug,NumberField:()=>fl,Optgroup:()=>$l,OptionsDatasource:()=>ci,Popper:()=>dd,Position:()=>Nt,Progress:()=>Wl,ProgressRing:()=>gd,Radio:()=>Cd,RadioGroup:()=>Td,Router:()=>tv,RuleExpression:()=>vg,SCROLL_TIMEOUT:()=>Uc,SECTION_NAVIGATOR_EVENTS:()=>su,SNACKBAR_CLOSE_TIMEOUT:()=>Qu,SNACKBAR_EVENTS_NAMES:()=>Zu,SNACKBAR_TYPES:()=>Ju,SNACKBAR_TYPE_DEFAULT:()=>Xu,STRING_OPERATORS:()=>X,Scheduler:()=>Nd,SchedulerCronBuilder:()=>Ec,SchedulerTimezone:()=>Rc,SearchBar:()=>Vc,SearchBarCombobox:()=>Jc,SectionNavigator:()=>lu,SegmentedControl:()=>mu,SegmentedItem:()=>wu,Select:()=>Ou,Skeleton:()=>Ru,Slider:()=>Pu,SliderLabel:()=>Yu,Snackbar:()=>nh,StackingIcons:()=>lh,StatusPill:()=>ph,Stepper:()=>$v,StepperTab:()=>bh,StepperTabPanel:()=>$h,Switch:()=>Ih,SystemHealthOverlay:()=>td,Tab:()=>Fh,TabPanel:()=>Uh,Tabs:()=>Wh,TextArea:()=>Zh,TextField:()=>rp,Toast:()=>vp,Toolbar:()=>wp,Tooltip:()=>Op,TreeItem:()=>Rp,TreeView:()=>Hp,UrlInput:()=>Wp,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:()=>qo,actionsMenuBaseStyles:()=>$,applyCustomTokens:()=>Po,baseComponents:()=>Kp,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>Xo,black:()=>po,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>Av,categorizedMultiselectStyles:()=>Mt,categorizedMultiselectTemplate:()=>Ht,clientOperators:()=>bg,closeIcon:()=>Ws,configureDesignSystem:()=>Wo,configureEnvironmentIndicator:()=>qn,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>Qo,createDesignSystemProxy:()=>Jl,createFormData:()=>Fs,crossIcon:()=>_c,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>ye,defaultAnchorConfig:()=>Ie,defaultAnchoredRegionConfig:()=>Fe,defaultAvatarConfig:()=>Be,defaultBadgeConfig:()=>qe,defaultBreadcrumbConfig:()=>lt,defaultBreadcrumbItemConfig:()=>mt,defaultButtonConfig:()=>wt,defaultCalendarConfig:()=>Ot,defaultCardConfig:()=>Rt,defaultCategorizedMultiselectConfig:()=>Pt,defaultCheckboxConfig:()=>Wt,defaultComboboxConfig:()=>fi,defaultConfig:()=>Md,defaultCronBuilderConfig:()=>Tc,defaultDataGridCellConfig:()=>Li,defaultDataGridConfig:()=>ki,defaultDataGridRowConfig:()=>Hi,defaultDatePickerConfig:()=>ro,defaultDialogConfig:()=>gn,defaultDisclosureConfig:()=>$n,defaultDividerConfig:()=>In,defaultFileUploadConfig:()=>Gs,defaultFillColor:()=>go,defaultFlexLayoutConfig:()=>fa,defaultFlipperConfig:()=>Sa,defaultFlyoutConfig:()=>Ra,defaultGridLayoutConfig:()=>za,defaultGridLayoutItemConfig:()=>Va,defaultHorizontalScrollConfig:()=>Qa,defaultIconConfig:()=>cr,defaultListboxConfig:()=>wr,defaultListboxOptionConfig:()=>Or,defaultMenuConfig:()=>Rr,defaultMenuItemConfig:()=>Hr,defaultModalConfig:()=>jr,defaultMultiselectConfig:()=>Qr,defaultNavItemPredicate:()=>hv,defaultNeutralForegroundContrast:()=>ko,defaultNumberFieldConfig:()=>yl,defaultPlacementIndexPadding:()=>pv,defaultProgressConfig:()=>Kl,defaultProgressRingConfig:()=>fd,defaultRadioConfig:()=>$d,defaultRadioGroupConfig:()=>Id,defaultSearchBarComboboxConfig:()=>Zc,defaultSearchBarConfig:()=>Wc,defaultSectionNavigatorConfig:()=>cu,defaultSegmentedControlConfig:()=>vu,defaultSegmentedItemConfig:()=>xu,defaultSelectConfig:()=>ku,defaultSkeletonConfig:()=>Nu,defaultSliderConfig:()=>Bu,defaultSliderLabelConfig:()=>qu,defaultStepperConfig:()=>Ev,defaultStepperTabConfig:()=>wh,defaultStepperTabPanelConfig:()=>Eh,defaultSwitchConfig:()=>Ah,defaultSystemHealthOverlayConfig:()=>sd,defaultTabConfig:()=>_h,defaultTabPanelConfig:()=>jh,defaultTabsConfig:()=>Kh,defaultTextAreaConfig:()=>tp,defaultTextFieldConfig:()=>dp,defaultTimezoneConfig:()=>Nc,defaultToastConfig:()=>gp,defaultToolbarConfig:()=>xp,defaultTooltipConfig:()=>kp,defaultTreeItemConfig:()=>Np,defaultTreeViewConfig:()=>Pp,defaultUrlInputConfig:()=>Yp,defineFactory:()=>jg,density:()=>r.density,designToken:()=>_o,designTokensMap:()=>Vo,designUnit:()=>r.designUnit,designUnitValue:()=>Zo,direction:()=>r.direction,directionValue:()=>Jo,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>_s,dropdownMenuBaseStyles:()=>An,environmentIndicatorStyles:()=>zn,errorDialogTemplate:()=>ys,extractMenuItems:()=>Ln,faSizeValueDefault:()=>hr,faSizeValues:()=>pr,fileReaderStyles:()=>Ss,fileReaderTemplate:()=>Ts,fillColor:()=>r.fillColor,filterBarTemplate:()=>ra,findParentRouter:()=>av,findRouter:()=>sv,findTopLevelRouter:()=>rv,flyoutAnimationTime:()=>Oa,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:()=>hh,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>R,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>D,foundationAiCriteriaSearch:()=>we,foundationAiCriteriaSearchShadowOptions:()=>be,foundationAiCriteriaSearchStyles:()=>M,foundationAiCriteriaSearchTemplate:()=>U,foundationAiIndicator:()=>Se,foundationAiIndicatorStyles:()=>Ce,foundationAiIndicatorTemplate:()=>xe,foundationAnchor:()=>De,foundationAnchorShadowOptions:()=>ke,foundationAnchorStyles:()=>Ee,foundationAnchorTemplate:()=>Oe,foundationAnchoredRegion:()=>Me,foundationAnchoredRegionShadowOptions:()=>Ne,foundationAnchoredRegionStyles:()=>Re,foundationAnchoredRegionTemplate:()=>Ae,foundationAvatar:()=>je,foundationAvatarShadowOptions:()=>Ue,foundationAvatarStyles:()=>_e,foundationAvatarTemplate:()=>He,foundationBadge:()=>Ke,foundationBadgeShadowOptions:()=>We,foundationBadgeStyles:()=>Ge,foundationBadgeTemplate:()=>Ve,foundationBanner:()=>ot,foundationBannerShadowOptions:()=>tt,foundationBannerStyles:()=>Qe,foundationBannerTemplate:()=>et,foundationBreadcrumb:()=>dt,foundationBreadcrumbItem:()=>gt,foundationBreadcrumbItemShadowOptions:()=>pt,foundationBreadcrumbItemStyles:()=>ct,foundationBreadcrumbItemTemplate:()=>ut,foundationBreadcrumbShadowOptions:()=>rt,foundationBreadcrumbStyles:()=>nt,foundationBreadcrumbTemplate:()=>st,foundationButton:()=>Ct,foundationButtonShadowOptions:()=>yt,foundationButtonStyles:()=>vt,foundationButtonTemplate:()=>ft,foundationCalendar:()=>Tt,foundationCalendarShadowOptions:()=>Et,foundationCalendarStyles:()=>xt,foundationCalendarTemplate:()=>$t,foundationCard:()=>Lt,foundationCardShadowOptions:()=>At,foundationCardStyles:()=>kt,foundationCardTemplate:()=>It,foundationCategorizedMultiselect:()=>Bt,foundationCategorizedMultiselectShadowOptions:()=>zt,foundationCheckbox:()=>qt,foundationCheckboxShadowOptions:()=>Yt,foundationCheckboxStyles:()=>jt,foundationCheckboxTemplate:()=>Gt,foundationCombobox:()=>bi,foundationComboboxShadowOptions:()=>vi,foundationComboboxStyles:()=>ui,foundationComboboxTemplate:()=>hi,foundationConnectionIndicator:()=>$i,foundationConnectionIndicatorStyles:()=>wi,foundationConnectionIndicatorTemplate:()=>Ci,foundationDataGrid:()=>Ii,foundationDataGridCell:()=>Ni,foundationDataGridCellShadowOptions:()=>Ri,foundationDataGridCellStyles:()=>Di,foundationDataGridCellTemplate:()=>a.dataGridCellTemplate,foundationDataGridRow:()=>zi,foundationDataGridRowShadowOptions:()=>_i,foundationDataGridRowStyles:()=>Fi,foundationDataGridRowTemplate:()=>a.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Ti,foundationDataGridStyles:()=>Si,foundationDataGridTemplate:()=>Ei,foundationDatePicker:()=>co,foundationDatePickerShadowOptions:()=>ao,foundationDatePickerStyles:()=>Zi,foundationDatePickerTemplate:()=>io,foundationDesignSystemProvider:()=>rn,foundationDialog:()=>bn,foundationDialogShadowOptions:()=>mn,foundationDialogStyles:()=>dn,foundationDialogTemplate:()=>pn,foundationDisclosure:()=>Sn,foundationDisclosureShadowOptions:()=>xn,foundationDisclosureStyles:()=>yn,foundationDisclosureTemplate:()=>wn,foundationDivider:()=>Dn,foundationDividerShadowOptions:()=>kn,foundationDividerStyles:()=>En,foundationDividerTemplate:()=>On,foundationDropdownMenu:()=>_n,foundationDropdownMenuStyles:()=>Rn,foundationDropdownMenuTemplate:()=>Fn,foundationEnvironmentIndicator:()=>Jn,foundationEnvironmentIndicatorTemplate:()=>Pn,foundationErrorBanner:()=>is,foundationErrorBannerShadowOptions:()=>es,foundationErrorBannerTemplate:()=>Zn,foundationErrorBoundary:()=>vs,foundationErrorBoundaryShadowOptions:()=>ms,foundationErrorBoundaryTemplate:()=>ps,foundationErrorDialog:()=>xs,foundationErrorDialogShadowOptions:()=>ws,foundationErrorDialogStyles:()=>fs,foundationFileReader:()=>Is,foundationFileReaderStyles:()=>Es,foundationFileUpload:()=>Vs,foundationFileUploadShadowOptions:()=>js,foundationFileUploadStyles:()=>Rs,foundationFileUploadTemplate:()=>Ns,foundationFilter:()=>ia,foundationFilterBar:()=>ua,foundationFilterBarStyles:()=>na,foundationFilterBarTemplate:()=>la,foundationFilterStyles:()=>Ys,foundationFilterTemplate:()=>Zs,foundationFlexLayout:()=>ya,foundationFlexLayoutShadowOptions:()=>va,foundationFlexLayoutStyles:()=>ma,foundationFlexLayoutTemplate:()=>ga,foundationFlipper:()=>Ea,foundationFlipperShadowOptions:()=>$a,foundationFlipperStyles:()=>wa,foundationFlipperTemplate:()=>Ca,foundationFlyout:()=>La,foundationFlyoutShadowOptions:()=>Aa,foundationFlyoutStyles:()=>Ta,foundationFlyoutTemplate:()=>Ia,foundationGridLayout:()=>Ba,foundationGridLayoutItem:()=>Wa,foundationGridLayoutItemShadowOptions:()=>Ga,foundationGridLayoutItemTemplate:()=>ja,foundationGridLayoutShadowOptions:()=>Ha,foundationGridLayoutStyles:()=>Ma,foundationGridLayoutTemplate:()=>_a,foundationHorizontalScroll:()=>Za,foundationHorizontalScrollShadowOptions:()=>Ja,foundationHorizontalScrollStyles:()=>qa,foundationHorizontalScrollTemplate:()=>Ka,foundationIcon:()=>gr,foundationIconShadowOptions:()=>dr,foundationIconStyles:()=>ar,foundationIconTemplate:()=>lr,foundationListbox:()=>Cr,foundationListboxOption:()=>Tr,foundationListboxOptionShadowOptions:()=>Er,foundationListboxOptionStyles:()=>xr,foundationListboxOptionTemplate:()=>$r,foundationListboxShadowOptions:()=>yr,foundationListboxStyles:()=>vr,foundationListboxTemplate:()=>fr,foundationMenu:()=>Lr,foundationMenuItem:()=>zr,foundationMenuItemShadowOptions:()=>_r,foundationMenuItemStyles:()=>Nr,foundationMenuItemTemplate:()=>Fr,foundationMenuShadowOptions:()=>Ar,foundationMenuStyles:()=>kr,foundationMenuTemplate:()=>Ir,foundationModal:()=>Vr,foundationModalShadowOptions:()=>Br,foundationModalStyles:()=>Pr,foundationModalTemplate:()=>Ur,foundationMultiselect:()=>el,foundationMultiselectShadowOptions:()=>Jr,foundationNotificationListener:()=>Bg,foundationNotificationListenerShadowOptions:()=>Pg,foundationNotificationListenerTemplate:()=>Hg,foundationNumberField:()=>wl,foundationNumberFieldShadowOptions:()=>bl,foundationNumberFieldStyles:()=>al,foundationNumberFieldTemplate:()=>rl,foundationOptgroup:()=>Sl,foundationOptgroupStyles:()=>Cl,foundationOptgroupTemplate:()=>xl,foundationPopper:()=>hd,foundationProgress:()=>Xl,foundationProgressRing:()=>bd,foundationProgressRingShadowOptions:()=>vd,foundationProgressRingStyles:()=>pd,foundationProgressRingTemplate:()=>md,foundationProgressShadowOptions:()=>ql,foundationProgressStyles:()=>Vl,foundationProgressTemplate:()=>Yl,foundationRadio:()=>Sd,foundationRadioGroup:()=>Dd,foundationRadioGroupShadowOptions:()=>kd,foundationRadioGroupStyles:()=>Ed,foundationRadioGroupTemplate:()=>Od,foundationRadioShadowOptions:()=>xd,foundationRadioStyles:()=>yd,foundationRadioTemplate:()=>wd,foundationScheduler:()=>_d,foundationSchedulerCronBuilder:()=>kc,foundationSchedulerCronBuilderShadowOptions:()=>Oc,foundationSchedulerCronBuilderTemplate:()=>Sc,foundationSchedulerShadowOptions:()=>Fd,foundationSchedulerTemplate:()=>Ld,foundationSchedulerTimezone:()=>Fc,foundationSchedulerTimezoneShadowOptions:()=>Lc,foundationSchedulerTimezoneTemplate:()=>Ac,foundationSearchBar:()=>qc,foundationSearchBarCombobox:()=>eu,foundationSearchBarComboboxShadowOptions:()=>Qc,foundationSearchBarComboboxStyles:()=>Kc,foundationSearchBarComboboxTemplate:()=>Xc,foundationSearchBarShadowOptions:()=>Yc,foundationSearchBarStyles:()=>Mc,foundationSearchBarTemplate:()=>Pc,foundationSectionNavigator:()=>uu,foundationSectionNavigatorShadowOptions:()=>du,foundationSectionNavigatorStyles:()=>tu,foundationSectionNavigatorTemplate:()=>iu,foundationSegmentedControl:()=>fu,foundationSegmentedControlShadowOptions:()=>gu,foundationSegmentedControlStyles:()=>hu,foundationSegmentedControlTemplate:()=>pu,foundationSegmentedItem:()=>$u,foundationSegmentedItemShadowOptions:()=>Cu,foundationSegmentedItemStyles:()=>bu,foundationSegmentedItemTemplate:()=>yu,foundationSelect:()=>Iu,foundationSelectShadowOptions:()=>Tu,foundationSelectStyles:()=>Su,foundationSelectTemplate:()=>Eu,foundationSkeleton:()=>Fu,foundationSkeletonShadowOptions:()=>Lu,foundationSkeletonStyles:()=>Du,foundationSkeletonTemplate:()=>Au,foundationSlider:()=>ju,foundationSliderLabel:()=>Ku,foundationSliderLabelShadowOptions:()=>Wu,foundationSliderLabelStyles:()=>Gu,foundationSliderLabelTemplate:()=>Vu,foundationSliderShadowOptions:()=>Uu,foundationSliderStyles:()=>Mu,foundationSliderTemplate:()=>zu,foundationSnackbar:()=>sh,foundationSnackbarShadowOptions:()=>oh,foundationSnackbarStyles:()=>eh,foundationSnackbarTemplate:()=>ih,foundationStackingIcons:()=>dh,foundationStackingIconsStyles:()=>ah,foundationStackingIconsTemplate:()=>rh,foundationStatusPill:()=>mh,foundationStatusPillTemplate:()=>uh,foundationStepper:()=>Ov,foundationStepperShadowOptions:()=>Sv,foundationStepperStyles:()=>xv,foundationStepperTab:()=>Ch,foundationStepperTabPanel:()=>Oh,foundationStepperTabPanelShadowOptions:()=>Sh,foundationStepperTabPanelTemplate:()=>xh,foundationStepperTabShadowOptions:()=>yh,foundationStepperTabStyles:()=>gh,foundationStepperTabTemplate:()=>fh,foundationStepperTemplate:()=>Cv,foundationSwitch:()=>Rh,foundationSwitchShadowOptions:()=>Dh,foundationSwitchStyles:()=>Th,foundationSwitchTemplate:()=>kh,foundationSystemHealthOverlay:()=>ad,foundationSystemHealthOverlayShadowOptions:()=>nd,foundationSystemHealthOverlayStyles:()=>od,foundationSystemHealthOverlayTemplate:()=>id,foundationTab:()=>Hh,foundationTabPanel:()=>Gh,foundationTabPanelShadowOptions:()=>Bh,foundationTabPanelStyles:()=>zh,foundationTabPanelTemplate:()=>Ph,foundationTabShadowOptions:()=>Mh,foundationTabStyles:()=>Lh,foundationTabTemplate:()=>Nh,foundationTabs:()=>Xh,foundationTabsShadowOptions:()=>qh,foundationTabsStyles:()=>Vh,foundationTabsTemplate:()=>Yh,foundationTextArea:()=>ip,foundationTextAreaShadowOptions:()=>ep,foundationTextAreaStyles:()=>Jh,foundationTextAreaTemplate:()=>Qh,foundationTextField:()=>cp,foundationTextFieldShadowOptions:()=>lp,foundationTextFieldStyles:()=>sp,foundationTextFieldTemplate:()=>ap,foundationToast:()=>fp,foundationToastShadowOptions:()=>mp,foundationToastStyles:()=>up,foundationToastTemplate:()=>pp,foundationToolbar:()=>$p,foundationToolbarShadowOptions:()=>Cp,foundationToolbarStyles:()=>bp,foundationToolbarTemplate:()=>yp,foundationTooltip:()=>Ip,foundationTooltipShadowOptions:()=>Tp,foundationTooltipStyles:()=>Sp,foundationTooltipTemplate:()=>Ep,foundationTreeItem:()=>Fp,foundationTreeItemShadowOptions:()=>Lp,foundationTreeItemStyles:()=>Dp,foundationTreeItemTemplate:()=>Ap,foundationTreeView:()=>Up,foundationTreeViewShadowOptions:()=>zp,foundationTreeViewStyles:()=>Mp,foundationTreeViewTemplate:()=>_p,foundationUrlInput:()=>qp,foundationUrlInputShadowOptions:()=>Vp,foundationUrlInputStyles:()=>Bp,foundationUrlInputTemplate:()=>Gp,fromBinaryExpression:()=>kg,fromMethodExpression:()=>Ig,fuiAccentPalette:()=>So,fuiAccentSwatch:()=>$o,fuiCardFillColor:()=>To,fuiCardForegroundColor:()=>Do,fuiDefaultCardFillColor:()=>fo,fuiDefaultCardPalette:()=>bo,fuiFillColor:()=>Oo,fuiNeutralPalette:()=>Co,fuiNeutralSwatch:()=>wo,getBannerTemplate:()=>Ze,getCriteriaBuilder:()=>Gc,getDefaultConfig:()=>Bo,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>hn,getDropdownMenuTemplate:()=>Nn,getErrorDialogTemplate:()=>bs,getExports:()=>jo,getFontawesomeIconsCss:()=>sr,getNavItems:()=>mv,getPrefixedCategorizedMultiselect:()=>_t,getPrefixedCronBuilder:()=>$c,getPrefixedDatePicker:()=>to,getPrefixedErrorBanner:()=>Qn,getPrefixedFileReader:()=>Os,getPrefixedFileUpload:()=>Ls,getPrefixedFilterTemplate:()=>Qs,getPrefixedFlyout:()=>ka,getPrefixedIcon:()=>rr,getPrefixedMultiselect:()=>Kr,getPrefixedScheduler:()=>Rd,getPrefixedSchedulerTimezone:()=>Dc,getPrefixedSearchBar:()=>zc,getPrefixedSnackbar:()=>th,getPrefixedStepper:()=>wv,getPrefixedStepperTab:()=>vh,getPrefixedToast:()=>hp,getPrefixedUrlInput:()=>jp,getTypeRampValue:()=>Go,groupsToCriteria:()=>K,inputControls:()=>ic,isAbsoluteUrl:()=>nv,jsonConverter:()=>ld,mapType:()=>sa,maxheight:()=>Yr,media:()=>ze,menuTemplate:()=>k,mixinFoundationFontFamily:()=>tn,multiselectStyles:()=>Wr,multiselectTemplate:()=>Xr,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:()=>Io,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:()=>Ko,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:()=>Ft,paletteFromHex:()=>zo,pathJoin:()=>lv,plusIcon:()=>Hc,provideDesignSystem:()=>Ql,provideTokens:()=>Mo,rebuildOperator:()=>Tg,registerFoundationDesignSystem:()=>Rv,removeChildRouteParameter:()=>cv,removeLastPathSegment:()=>dv,routerLogger:()=>Xg,routerProperty:()=>ev,ruleExpressionToGroup:()=>Dg,ruleToRuleExpression:()=>Eg,ruleToRuleMethodExpression:()=>Sg,schedulerCronBuilderStyles:()=>oc,schedulerStyles:()=>Ad,schedulerTimezoneStyles:()=>Ic,selectCustomToken:()=>Yo,sharedFieldStyles:()=>sl,singleOptionTemplate:()=>I,statusPillStyles:()=>ch,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>Ho,tagFor:()=>Gg,transformOperatorNameToServerName:()=>$g,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:()=>Ms,validateClauses:()=>le,validateGroups:()=>de,white:()=>ho});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:()=>ko,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:()=>To,fuiCardForegroundColor:()=>Do,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:()=>Io,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:()=>qo,baseLayerLuminanceValue:()=>Xo,controlCornerRadiusValue:()=>Qo,designUnitValue:()=>Zo,directionValue:()=>Jo,neutralPaletteValue:()=>Ko});var s={};i.r(s),i.d(s,{BASE_LOGICAL_COMBINATORS:()=>Qp,BASE_OPERATORS:()=>nm,LOGICAL_COMBINATORS:()=>Zp,NULL_COMBINATOR:()=>em});var a=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
2
2
|
${(0,r.accordionStyles)(e,t)}
|
|
3
|
-
`,c=(e,t)=>(0,
|
|
3
|
+
`,c=(e,t)=>(0,a.accordionTemplate)(e,t);class u extends a.Accordion{}const h={delegatesFocus:!0,mode:"open"},p={},m=u.compose(Object.assign({baseName:"accordion",template:c,styles:d,shadowOptions:h},p)),g=(e,t)=>l.css`
|
|
4
4
|
${(0,r.accordionItemStyles)(e,t)}
|
|
5
5
|
|
|
6
6
|
slot[name='collapsed-icon'] {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
stroke: var(--accent-foreground-rest);
|
|
15
15
|
fill: none;
|
|
16
16
|
}
|
|
17
|
-
`,v=(e,t)=>(0,
|
|
17
|
+
`,v=(e,t)=>(0,a.accordionItemTemplate)(e,t);class f extends r.AccordionItem{}const b={delegatesFocus:!0,mode:"open"},y={collapsedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="collapsed-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M9 5.44446V12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="plus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>',expandedIcon:'<svg width="16" height="16" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" slot="expanded-icon">\n <path d="M15.2222 1H2.77778C1.79594 1 1 1.79594 1 2.77778V15.2222C1 16.2041 1.79594 17 2.77778 17H15.2222C16.2041 17 17 16.2041 17 15.2222V2.77778C17 1.79594 16.2041 1 15.2222 1Z" stroke-linecap="round" stroke-linejoin="round"></path>\n <path class="minus-sign" d="M5.44446 9H12.5556" stroke-linecap="round" stroke-linejoin="round"></path>\n </svg>'},w=f.compose(Object.assign({baseName:"accordion-item",template:v,styles:g,shadowOptions:b},y));var C=i(55823),x=i(31679);const $=(e,t)=>l.css`
|
|
18
18
|
:host {
|
|
19
19
|
--actions-opener-height-multiplier: 0.7px;
|
|
20
20
|
--actions-opener-bg-color: 249 254 255;
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
}
|
|
108
108
|
`,S=(e,t)=>l.css`
|
|
109
109
|
${$(e,t)}
|
|
110
|
-
`,E=(e,t)=>!e.composedPath().includes(t),
|
|
110
|
+
`,E=(e,t)=>!e.composedPath().includes(t),O=(e,t)=>e.composedPath().includes(t),T=e=>e.tagName.toLowerCase().split("-")[0];const k=e=>l.html`
|
|
111
111
|
<${e}-button
|
|
112
112
|
id="actiosnMenuTrigger"
|
|
113
113
|
class="actions-opener${e=>e.open?" opened":""}"
|
|
@@ -158,9 +158,9 @@
|
|
|
158
158
|
class="actions-container${e=>e.isVertical?" actions-vertical":""}"
|
|
159
159
|
part="actions-container"
|
|
160
160
|
>
|
|
161
|
-
${e=>e.getTemplate(
|
|
161
|
+
${e=>e.getTemplate(T(e))}
|
|
162
162
|
</div>
|
|
163
|
-
`;class
|
|
163
|
+
`;class A extends a.FoundationElement{constructor(){super(...arguments),this.isVertical=!1,this.addDefaultActions=!0,this.autoCloseOnAction=!0,this.name="Actions",this.open=!1,this.hideDisabled=!1,this.hideMenuSingleOption=!1}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],A.prototype,"actions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"is-vertical",mode:"boolean"})],A.prototype,"isVertical",void 0),(0,C.Cg)([(0,l.attr)({attribute:"add-default-actions",mode:"boolean"})],A.prototype,"addDefaultActions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close-on-action",mode:"boolean"})],A.prototype,"autoCloseOnAction",void 0),(0,C.Cg)([l.observable],A.prototype,"classNames",void 0),(0,C.Cg)([l.observable],A.prototype,"definition",void 0),(0,C.Cg)([l.attr],A.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],A.prototype,"open",void 0),(0,C.Cg)([l.attr],A.prototype,"buttonAppearance",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-disabled",mode:"boolean"})],A.prototype,"hideDisabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-menu-single-option",mode:"boolean"})],A.prototype,"hideMenuSingleOption",void 0),(0,C.Cg)([l.observable],A.prototype,"singleOption",void 0);const R=A.compose({baseName:"actions-menu",styles:S,template:D});function L(){return"undefined"!=typeof window&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)}class N{getStatus(){return(0,C.sH)(this,void 0,void 0,function*(){return{provider:"none",model:""}})}interpretCriteria(e,t){return(0,C.sH)(this,void 0,void 0,function*(){return null})}}const F=a.DI.createInterface(e=>e.singleton(N));const M=l.css`
|
|
164
164
|
:host {
|
|
165
165
|
display: block;
|
|
166
166
|
width: 800px;
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
flex-shrink: 0;
|
|
195
195
|
}
|
|
196
196
|
`;var _=i(77679);let H=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(H="true"===GENX_ENABLE_AI)}catch(_l){}const z=()=>H||(0,_.m)("ai");var P=i(40729);const U=l.html`
|
|
197
|
-
${e=>{return t=
|
|
197
|
+
${e=>{return t=T(e),l.html`
|
|
198
198
|
${(0,l.when)(()=>z(),l.html`
|
|
199
199
|
<div class="ai-criteria-search">
|
|
200
200
|
<div class="ai-criteria-search-row">
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
</div>
|
|
232
232
|
`)}
|
|
233
233
|
`;var t}}
|
|
234
|
-
`;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=new Set(["DATE","LOCALDATE"]),te=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),ie=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function oe(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function ne(e){const t=oe(e);return ee.has(t)?J:te.has(t)?Z:ie.has(t)?Q:X}function ae(e){return ie.has(oe(e))}function se(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 re(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function le(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";ne(l).includes(a)?!J.includes(a)&&!Z.includes(a)||"dateIsToday"===a||se(s)?ae(l)&&Q.includes(a)&&!re(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 de(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}=le(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 ce=i(60416);var ue=i(31274);var he=i(52945);const pe=(e,t,i)=>{var o,n,a,s,r,l,d,c,u,h,p,m,g,v,f,b,y,w,C;(0,ce.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,he.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==a?a:(0,ce.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)},me={alert:e=>{(0,ce.u_)(e),alert((0,ce.uP)(e))},toast:pe,dialog:ue.u,snackbar:(e,t)=>{(0,ce.u_)(e);const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`),n=(0,ce.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,ce.u_)(e);const n=t.split("-")[0],a=document.createElement(`${n}-banner`),s=(0,ce.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}},ge=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{me[o]&&me[o](e,t,i)})};function ve(e,t,i){(null==t?void 0:t.trim())&&ge({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class fe extends s.FoundationElement{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.mode="replace",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null,this.baseInputForAppend=""}get speechAvailable(){return N()}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 ve("AI criteria search","AI could not interpret the criteria",O(this)),void(this.isInterpreting=!1);const{valid:a,invalid:s}=de(t.groups,this.fieldMetadata);if(s.length>0&&(ve("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=K(a);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}catch(e){ve("AI criteria search",e instanceof Error?e.message:"Interpretation failed",O(this))}finally{this.isInterpreting=!1}var n}else ve("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.clear()}clear(){this.inputValue="",this.lastValidCriteria=null,this.$emit("criteria-changed",null)}toggleSpeechInput(){var e,t;if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,this.isRecording=!1,void(this.baseInputForAppend="");this.baseInputForAppend="append"===this.mode&&null!==(t=null===(e=this.inputValue)||void 0===e?void 0:e.trim())&&void 0!==t?t:"",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)=>{"append"===this.mode?this.inputValue=this.baseInputForAppend?`${this.baseInputForAppend} ${e}`.trim():e:this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1,this.baseInputForAppend=""),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null,this.baseInputForAppend=""}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}(0,C.Cg)([F],fe.prototype,"aiProvider",void 0),(0,C.Cg)([l.attr],fe.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],fe.prototype,"disabled",void 0),(0,C.Cg)([l.attr],fe.prototype,"mode",void 0),(0,C.Cg)([l.observable],fe.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],fe.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],fe.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],fe.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],fe.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],fe.prototype,"speechAvailable",null);const be=void 0,ye={},we=fe.compose(Object.assign({baseName:"ai-criteria-search",template:U,styles:M,shadowOptions:be},ye)),Ce=(e,t)=>l.css`
|
|
234
|
+
`;var B=i(95553),j=i(58749),G=i(14609),V=i(86636);const Y={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 W(e){var t,i;const o=null!==(t=Y[e.operator])&&void 0!==t?t:B.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 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 G.b;let o=!1;for(const n of e){if(!(null===(t=n.clauses)||void 0===t?void 0:t.length))continue;const e=n.clauses.map(W),s="or"===n.logic?V.r.Or():V.r.And(),a=q(e,s),r=e.length>1?{join:s}:{};n.negated?i.And([V.r.Not(),a]):i.And(1===e.length?e[0]:e,r),o=!0}return o?i.build():""}const X=["contains","equals","startsWith","endsWith","notEqual"],J=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],Q=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],Z=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],ee=new Set(["DATE","LOCALDATE"]),te=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),ie=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function oe(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function ne(e){const t=oe(e);return ee.has(t)?Q:te.has(t)?Z:ie.has(t)?J:X}function se(e){return ie.has(oe(e))}function ae(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 re(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function le(e,t){const i=[],o=[],n=new Map;if(Array.isArray(t)&&t.length>0){"string"==typeof t[0]?t.forEach(e=>n.set(e,void 0)):t.forEach(e=>n.set(e.NAME,e))}for(const t of e){const{field:e,operator:s,value:a}=t;if(!e||"string"!=typeof e){o.push({field:String(e),message:"Field name is required"});continue}const r=n.get(e),l=r&&"TYPE"in r?r.TYPE:"STRING";ne(l).includes(s)?!Q.includes(s)&&!Z.includes(s)||"dateIsToday"===s||ae(a)?se(l)&&J.includes(s)&&!re(a)?o.push({field:e,operator:s,value:a,message:"Invalid numeric value"}):n.size>0&&!n.has(e)?o.push({field:e,operator:s,value:a,message:`Unknown field '${e}'`}):i.push(t):o.push({field:e,operator:s,value:a,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):o.push({field:e,operator:s,value:a,message:`Operator '${s}' is not allowed for field type ${l}`})}return{valid:i,invalid:o}}function de(e,t){var i;const o=[],n=[];for(const s of e){if(!(null==s?void 0:s.clauses)||!Array.isArray(s.clauses)){n.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:a}=le(s.clauses,t);n.push(...a),e.length>0&&o.push({logic:null!==(i=s.logic)&&void 0!==i?i:"and",negated:s.negated,clauses:e})}return{valid:o,invalid:n}}var ce=i(60416);var ue=i(31274);var he=i(52945);const pe=(e,t,i)=>{var o,n,s,a,r,l,d,c,u,h,p,m,g,v,f,b,y,w,C;(0,ce.u_)(e);const x=t.split("-")[0],$=(null===(n=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.toast)||void 0===n?void 0:n.position)||"top-right",S=null!==(s=null!=i?i:(e=>(0,he.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==s?s:(0,ce.jE)("notify-container",t);S&&"notify-container"!==S.tagName.toLowerCase()&&function(e,t){var i,o;switch(t.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.toast)||void 0===o?void 0:o.position){case"top-left":t.style.top="var(--nav-height, 0)",t.style.left="0";break;case"bottom-left":t.style.bottom="0",t.style.left="0";break;case"bottom-right":t.style.bottom="0",t.style.right="0";break;default:t.style.top="var(--nav-height, 0)",t.style.right="0"}}(e,S);const E=document.createElement(`${x}-toast`),O=document.createElement("div");O.setAttribute("slot","top"),O.textContent=e.title;const T=document.createElement("div");T.setAttribute("slot","content"),T.textContent=(null==e?void 0:e.body)||"";const k=document.createElement("div");let I;k.setAttribute("slot","date"),k.textContent=(null===(a=null==e?void 0:e.createdAt)||void 0===a?void 0:a.toLocaleTimeString())||"",(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.toast)||void 0===l?void 0:l.buttons)&&(null===(u=null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.toast)||void 0===c?void 0:c.buttons)||void 0===u?void 0:u.length)&&(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(O),E.appendChild(T),E.appendChild(k),I&&E.appendChild(I),S.prepend(E)},me={alert:e=>{(0,ce.u_)(e),alert((0,ce.uP)(e))},toast:pe,dialog:ue.u,snackbar:(e,t)=>{(0,ce.u_)(e);const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`),n=(0,ce.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,ce.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-banner`),a=(0,ce.cL)(i);(null===(o=null==a?void 0:a.children)||void 0===o?void 0:o.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.notification=e}},ge=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{me[o]&&me[o](e,t,i)})};function ve(e,t,i){(null==t?void 0:t.trim())&&ge({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class fe extends a.FoundationElement{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.mode="replace",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null,this.baseInputForAppend=""}get speechAvailable(){return L()}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 ve("AI criteria search","AI could not interpret the criteria",T(this)),void(this.isInterpreting=!1);const{valid:s,invalid:a}=de(t.groups,this.fieldMetadata);if(a.length>0&&(ve("Criteria validation error",0===(n=a).length?"":1===n.length?n[0].message:n.map(e=>e.message).join("; "),T(this)),this.$emit("validation-errors",a)),s.length>0){const e=K(s);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}catch(e){ve("AI criteria search",e instanceof Error?e.message:"Interpretation failed",T(this))}finally{this.isInterpreting=!1}var n}else ve("AI criteria search","AI provider not configured",T(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.clear()}clear(){this.inputValue="",this.lastValidCriteria=null,this.$emit("criteria-changed",null)}toggleSpeechInput(){var e,t;if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,this.isRecording=!1,void(this.baseInputForAppend="");this.baseInputForAppend="append"===this.mode&&null!==(t=null===(e=this.inputValue)||void 0===e?void 0:e.trim())&&void 0!==t?t:"",this.stopRecording=function(e,t){if(!L())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let o="";return i.onresult=t=>{let i="",n="";for(let e=t.resultIndex;e<t.results.length;e+=1){const o=t.results[e][0].transcript;t.results[e].isFinal?n+=o:i+=o}n?(o+=n,e(o,!0)):i&&e(o+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{"append"===this.mode?this.inputValue=this.baseInputForAppend?`${this.baseInputForAppend} ${e}`.trim():e:this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1,this.baseInputForAppend=""),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null,this.baseInputForAppend=""}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}(0,C.Cg)([F],fe.prototype,"aiProvider",void 0),(0,C.Cg)([l.attr],fe.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],fe.prototype,"disabled",void 0),(0,C.Cg)([l.attr],fe.prototype,"mode",void 0),(0,C.Cg)([l.observable],fe.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],fe.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],fe.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],fe.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],fe.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],fe.prototype,"speechAvailable",null);const be=void 0,ye={},we=fe.compose(Object.assign({baseName:"ai-criteria-search",template:U,styles:M,shadowOptions:be},ye)),Ce=(e,t)=>l.css`
|
|
235
235
|
:host {
|
|
236
236
|
display: flex;
|
|
237
237
|
justify-content: center;
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
width: 100%;
|
|
363
363
|
}
|
|
364
364
|
`,xe=l.html`
|
|
365
|
-
${e=>{return t=
|
|
365
|
+
${e=>{return t=T(e),l.html`
|
|
366
366
|
${(0,l.when)(()=>z(),l.html`
|
|
367
367
|
<div class="ai-indicator-container" part="ai-indicator-container">
|
|
368
368
|
<div
|
|
@@ -418,19 +418,19 @@
|
|
|
418
418
|
</div>
|
|
419
419
|
`)}
|
|
420
420
|
`;var t}}
|
|
421
|
-
`;class $e extends
|
|
421
|
+
`;class $e extends a.FoundationElement{constructor(){super(...arguments),this.status=null,this.open=!1,this.state="none",this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get 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)([F],$e.prototype,"aiProvider",void 0),(0,C.Cg)([l.observable],$e.prototype,"status",void 0),(0,C.Cg)([l.observable],$e.prototype,"open",void 0),(0,C.Cg)([l.observable],$e.prototype,"state",void 0),(0,C.Cg)([l.observable],$e.prototype,"isInstalling",void 0),(0,C.Cg)([l.volatile],$e.prototype,"chromeStatusLabel",null),(0,C.Cg)([l.volatile],$e.prototype,"canInstall",null),(0,C.Cg)([l.volatile],$e.prototype,"isDownloading",null);const Se=$e.compose({baseName:"ai-indicator",template:xe,styles:Ce}),Ee=(e,t)=>l.css`
|
|
422
422
|
${(0,r.anchorStyles)(e,t)}
|
|
423
|
-
`,
|
|
423
|
+
`,Oe=(e,t)=>(0,a.anchorTemplate)(e,t);class Te extends r.Anchor{}const ke={delegatesFocus:!0,mode:"open"},Ie={},De=Te.compose(Object.assign({baseName:"anchor",template:Oe,styles:Ee,shadowOptions:ke},Ie)),Ae=(e,t)=>(0,a.anchoredRegionTemplate)(e,t),Re=(e,t)=>l.css`
|
|
424
424
|
${(0,r.anchoredRegionStyles)(e,t)}
|
|
425
|
-
`;class
|
|
425
|
+
`;class Le extends r.AnchoredRegion{}const Ne={delegatesFocus:!0,mode:"open"},Fe={},Me=Le.compose(Object.assign({baseName:"anchored-region",template:Ae,styles:Re,shadowOptions:Ne},Fe)),_e=(e,t)=>l.css`
|
|
426
426
|
${(0,r.avatarStyles)(e,t)}
|
|
427
|
-
`,He=(e,t)=>(0,
|
|
427
|
+
`,He=(e,t)=>(0,a.avatarTemplate)(e,t),ze=l.html`
|
|
428
428
|
${(0,l.when)(e=>e.imgSrc,l.html`
|
|
429
429
|
<img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />
|
|
430
430
|
`)}
|
|
431
|
-
`;class Pe extends r.Avatar{}const Ue={delegatesFocus:!0,mode:"open"},Be={media:ze},
|
|
431
|
+
`;class Pe extends r.Avatar{}const Ue={delegatesFocus:!0,mode:"open"},Be={media:ze},je=Pe.compose(Object.assign({baseName:"avatar",template:He,styles:_e,shadowOptions:Ue},Be)),Ge=(e,t)=>l.css`
|
|
432
432
|
${(0,r.badgeStyles)(e,t)}
|
|
433
|
-
`,Ve=(e,t)=>(0,
|
|
433
|
+
`,Ve=(e,t)=>(0,a.badgeTemplate)(e,t);class Ye extends r.Badge{}const We=void 0,qe={},Ke=Ye.compose(Object.assign({baseName:"badge",template:Ve,styles:Ge,shadowOptions:We},qe));var Xe=i(89437);const Je=(0,Xe.createLogger)("foundation-ui"),Qe=l.css`
|
|
434
434
|
@keyframes delete-animate {
|
|
435
435
|
from {
|
|
436
436
|
height: 100px;
|
|
@@ -532,22 +532,22 @@
|
|
|
532
532
|
</div>
|
|
533
533
|
</div>
|
|
534
534
|
`,et=l.html`
|
|
535
|
-
${e=>Ze(
|
|
536
|
-
`,tt={mode:"open",delegatesFocus:!0};class it extends
|
|
535
|
+
${e=>Ze(T(e))}
|
|
536
|
+
`,tt={mode:"open",delegatesFocus:!0};class it extends a.FoundationElement{constructor(){super(...arguments),this.dismissAnimation=""}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation="banner-delete",new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return(0,C.sH)(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){Je.error(e)}})}}(0,C.Cg)([l.observable],it.prototype,"dismissAnimation",void 0),(0,C.Cg)([l.observable],it.prototype,"notification",void 0);const ot=it.compose({baseName:"banner",styles:Qe,template:et,shadowOptions:tt}),nt=(e,t)=>l.css`
|
|
537
537
|
${(0,r.breadcrumbStyles)(e,t)}
|
|
538
|
-
`,
|
|
538
|
+
`,st=(e,t)=>(0,a.breadcrumbTemplate)(e,t);class at extends r.Breadcrumb{}const rt=void 0,lt={},dt=at.compose(Object.assign({baseName:"breadcrumb",template:st,styles:nt,shadowOptions:rt},lt)),ct=(e,t)=>l.css`
|
|
539
539
|
${(0,r.breadcrumbItemStyles)(e,t)}
|
|
540
|
-
`,ut=(e,t)=>(0,
|
|
540
|
+
`,ut=(e,t)=>(0,a.breadcrumbItemTemplate)(e,t);class ht extends r.BreadcrumbItem{}const pt=void 0,mt={separator:"/"},gt=ht.compose(Object.assign({baseName:"breadcrumb-item",template:ut,styles:ct,shadowOptions:pt},mt)),vt=(e,t)=>l.css`
|
|
541
541
|
${(0,r.buttonStyles)(e,t)}
|
|
542
|
-
`,ft=(e,t)=>(0,
|
|
542
|
+
`,ft=(e,t)=>(0,a.buttonTemplate)(e,t);class bt extends r.Button{}const yt={delegatesFocus:!0,mode:"open"},wt={},Ct=bt.compose(Object.assign({baseName:"button",template:ft,styles:vt,shadowOptions:yt},wt)),xt=()=>l.css`
|
|
543
543
|
${r.CalendarStyles}
|
|
544
|
-
`,$t=(e,t)=>(0,
|
|
544
|
+
`,$t=(e,t)=>(0,a.calendarTemplate)(e,t);class St extends r.Calendar{}const Et={delegatesFocus:!0,mode:"open"},Ot={},Tt=St.compose(Object.assign({baseName:"calendar",template:$t,styles:xt,shadowOptions:Et},Ot)),kt=(e,t)=>l.css`
|
|
545
545
|
${(0,r.cardStyles)(e,t)}
|
|
546
546
|
:host {
|
|
547
547
|
background-color: var(--fui-card-fill-color);
|
|
548
548
|
color: var(--fui-card-foreground-color);
|
|
549
549
|
}
|
|
550
|
-
`,It=(e,t)=>(0,
|
|
550
|
+
`,It=(e,t)=>(0,a.cardTemplate)(e,t);class Dt extends r.Card{}const At=void 0,Rt={},Lt=Dt.compose(Object.assign({baseName:"card",template:It,styles:kt,shadowOptions:At},Rt));var Nt;!function(e){e.BELOW="below",e.ABOVE="above"}(Nt||(Nt={}));const Ft=450,Mt=l.css`
|
|
551
551
|
.root {
|
|
552
552
|
position: relative;
|
|
553
553
|
width: 100%;
|
|
@@ -746,7 +746,7 @@
|
|
|
746
746
|
class=${e=>{var t;return(0,x.x)("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}
|
|
747
747
|
>
|
|
748
748
|
<slot
|
|
749
|
-
${(0,l.slotted)({property:"defaultSlottedNodes",filter:
|
|
749
|
+
${(0,l.slotted)({property:"defaultSlottedNodes",filter:a.whitespaceFilter})}
|
|
750
750
|
></slot>
|
|
751
751
|
</label>
|
|
752
752
|
<${e}-button class="control-button" part="control-button">
|
|
@@ -808,9 +808,9 @@
|
|
|
808
808
|
</div>
|
|
809
809
|
`,Ht=l.html`
|
|
810
810
|
${_t()}
|
|
811
|
-
`,zt=void 0,Pt={};class Ut extends
|
|
811
|
+
`,zt=void 0,Pt={};class Ut extends a.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=Nt.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===Nt.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?Nt.BELOW:Nt.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<t.height&&o>n?Nt.ABOVE:Nt.BELOW}}e===Nt.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===Nt.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],Ut.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Ut.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ut.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ut.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Ut.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Ut.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Ut.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Ut.prototype,"open",void 0),(0,C.Cg)([l.observable],Ut.prototype,"options",void 0),(0,C.Cg)([l.observable],Ut.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Ut.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Ut.prototype,"position",void 0),(0,C.Cg)([l.volatile],Ut.prototype,"getPlaceholder",null);const Bt=Ut.compose(Object.assign({baseName:"categorized-multiselect",template:Ht,styles:Mt,shadowOptions:zt},Pt)),jt=(e,t)=>l.css`
|
|
812
812
|
${(0,r.checkboxStyles)(e,t)}
|
|
813
|
-
`,jt=(e,t)=>(0,s.checkboxTemplate)(e,t);class Vt extends r.Checkbox{}const Wt=void 0,Yt={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 '},qt=Vt.compose(Object.assign({baseName:"checkbox",template:jt,styles:Gt,shadowOptions:Wt},Yt));var Kt=i(62051),Xt=i.n(Kt),Qt=i(40370),Jt=i(6884),Zt=i(96730),ei=i(21281),ti=i(34193),ii=i(41119),oi=i(26347),ni=i(9033),ai=i(12066),si=i(97156);class ri extends((0,Qt.C)(s.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=Jt.OD.MAX_ROWS_250,this.maxView=Jt.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 si.t(new Map)}criteriaChanged(e,t){const i=e!==(0,Zt.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.dataSub&&(this.dataSub.unsubscribe(),this.dataSub=void 0),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){if(this.data)return void this.syncComponentData(this.data);const t=e||!this.datasource.initialized;t||(this.connect.dataLogoff(this.sourceRef),this.clearData());if(yield this.datasource.init(this.datasourceOptions(),t)){if(this.isSnapshot){const e=yield this.datasource.snapshotFiltered();return void this.syncComponentData(e)}Qe.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{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===ei.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,ti.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,Zt.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&&Qe[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===ii.w.DATE||t===ii.w.DATETIME?(0,ai.Ey)(e,t===ii.w.DATETIME):e}}function li(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 di;(0,C.Cg)([oi.dm],ri.prototype,"connect",void 0),(0,C.Cg)([ni.yW],ri.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ri.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],ri.prototype,"criteria",void 0),(0,C.Cg)([l.observable],ri.prototype,"data",void 0),(0,C.Cg)([l.attr],ri.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ri.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],ri.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],ri.prototype,"maxView",void 0),(0,C.Cg)([l.attr],ri.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],ri.prototype,"request",void 0),(0,C.Cg)([l.attr],ri.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ri.prototype,"reverse",void 0),(0,C.Cg)([l.attr],ri.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],ri.prototype,"withTimestampFormatting",void 0);let ci=di=class extends ri{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||Qe.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))?li(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 di||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){Qe.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Qe.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Qe.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],ci.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],ci.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],ci.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],ci.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],ci.prototype,"allowCustomOptions",void 0),(0,C.Cg)([l.observable],ci.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],ci.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],ci.prototype,"initialSelectedValue",void 0),ci=di=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],ci);const ui=(e,t)=>l.css`
|
|
813
|
+
`,Gt=(e,t)=>(0,a.checkboxTemplate)(e,t);class Vt extends r.Checkbox{}const Yt=void 0,Wt={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 '},qt=Vt.compose(Object.assign({baseName:"checkbox",template:Gt,styles:jt,shadowOptions:Yt},Wt));var Kt=i(62051),Xt=i.n(Kt),Jt=i(40370),Qt=i(6884),Zt=i(96730),ei=i(21281),ti=i(34193),ii=i(41119),oi=i(26347),ni=i(9033),si=i(12066),ai=i(97156);class ri extends((0,Jt.C)(a.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=Qt.OD.MAX_ROWS_250,this.maxView=Qt.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 ai.t(new Map)}criteriaChanged(e,t){const i=e!==(0,Zt.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.dataSub&&(this.dataSub.unsubscribe(),this.dataSub=void 0),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){if(this.data)return void this.syncComponentData(this.data);const t=e||!this.datasource.initialized;t||(this.connect.dataLogoff(this.sourceRef),this.clearData());if(yield this.datasource.init(this.datasourceOptions(),t)){if(this.isSnapshot){const e=yield this.datasource.snapshotFiltered();return void this.syncComponentData(e)}Je.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{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===ei.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,ti.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,Zt.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===ii.w.DATE||t===ii.w.DATETIME?(0,si.Ey)(e,t===ii.w.DATETIME):e}}function li(e,t){var i;const o=new G.b;o.withExpression((new j.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(B.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var di;(0,C.Cg)([oi.dm],ri.prototype,"connect",void 0),(0,C.Cg)([ni.yW],ri.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ri.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],ri.prototype,"criteria",void 0),(0,C.Cg)([l.observable],ri.prototype,"data",void 0),(0,C.Cg)([l.attr],ri.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ri.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],ri.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],ri.prototype,"maxView",void 0),(0,C.Cg)([l.attr],ri.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],ri.prototype,"request",void 0),(0,C.Cg)([l.attr],ri.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ri.prototype,"reverse",void 0),(0,C.Cg)([l.attr],ri.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],ri.prototype,"withTimestampFormatting",void 0);let ci=di=class extends ri{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:`${T(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))?li(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 di||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"})],ci.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],ci.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],ci.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],ci.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],ci.prototype,"allowCustomOptions",void 0),(0,C.Cg)([l.observable],ci.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],ci.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],ci.prototype,"initialSelectedValue",void 0),ci=di=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],ci);const ui=(e,t)=>l.css`
|
|
814
814
|
.combo-box-indicator {
|
|
815
815
|
transition-property: transform;
|
|
816
816
|
transition-duration: 0.2s;
|
|
@@ -832,7 +832,7 @@
|
|
|
832
832
|
@keydown="${(e,t)=>e.keydownHandler(t.event)}"
|
|
833
833
|
>
|
|
834
834
|
<div class="control" part="control">
|
|
835
|
-
${(0,
|
|
835
|
+
${(0,a.startSlotTemplate)(e,t)}
|
|
836
836
|
<slot name="control">
|
|
837
837
|
<input
|
|
838
838
|
aria-activedescendant="${e=>e.activeDescendant}"
|
|
@@ -859,7 +859,7 @@
|
|
|
859
859
|
<slot name="indicator">${t.indicator||""}</slot>
|
|
860
860
|
</div>
|
|
861
861
|
</slot>
|
|
862
|
-
${(0,
|
|
862
|
+
${(0,a.endSlotTemplate)(e,t)}
|
|
863
863
|
</div>
|
|
864
864
|
<div
|
|
865
865
|
class="listbox"
|
|
@@ -872,11 +872,11 @@
|
|
|
872
872
|
>
|
|
873
873
|
<slot
|
|
874
874
|
${(0,l.ref)("slottedDatasource")}
|
|
875
|
-
${(0,l.slotted)({filter:
|
|
875
|
+
${(0,l.slotted)({filter:a.Listbox.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
|
|
876
876
|
></slot>
|
|
877
877
|
</div>
|
|
878
878
|
</template>
|
|
879
|
-
`;var pi,mi;class gi extends r.Combobox{constructor(){super(...arguments),pi.set(this,void 0),mi.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=Xt()(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(),
|
|
879
|
+
`;var pi,mi;class gi extends r.Combobox{constructor(){super(...arguments),pi.set(this,void 0),mi.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=Xt()(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(),s=this.options?this.options.findIndex(n):-1,a=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(i=this.options[s])||void 0===i?void 0:i.text;this.selectedIndex=r&&r!==a?s:this.selectedIndex,e&&""!==e.trim()&&-1===s&&(e=(null===(o=this.firstSelectedOption)||void 0===o?void 0:o.text)||e)}n!==e&&(this._ourValue=e,super.valueChanged(n,e),l.Observable.notify(this,"value"))}slottedOptionsChanged(e,t){const i=!!this.async;super.slottedOptionsChanged(e,t),this.updateValue(i)}filterOptions(){this.autocomplete&&this.autocomplete!==a.ComboboxAutocomplete.none||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(E(e,this))this.open=!1;else{if(O(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!O(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if((0,C.GG)(this,mi,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,mi,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===a.ComboboxAutocomplete.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return(0,C.gn)(this,pi,"f")||(0,C.GG)(this,pi,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,C.gn)(this,pi,"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 ci);t.length>0?(li(t[0],this.control.value),l.DOM.queueUpdate(()=>{this.control.value=e})):Je.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===a.ComboboxAutocomplete.both&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}pi=new WeakMap,mi=new WeakMap,(0,C.Cg)([l.observable],gi.prototype,"activeDescendant",null),(0,C.Cg)([l.observable],gi.prototype,"slottedDatasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"async",void 0),(0,C.Cg)([l.attr],gi.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"case-sensitive"})],gi.prototype,"caseSensitive",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"ignore-input-click"})],gi.prototype,"ignoreInputClick",void 0),(0,C.Cg)([(0,l.attr)({attribute:"filter-mode"})],gi.prototype,"filterMode",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],gi.prototype,"scrollToSelectedWhenOpening",void 0),(0,C.Cg)([l.observable],gi.prototype,"scrollToSelectedWhenOpeningOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-when-selection-changes"})],gi.prototype,"scrollWhenSelectionChanges",void 0),(0,C.Cg)([l.observable],gi.prototype,"scrollWhenSelectionChangesOptions",void 0);const vi={delegatesFocus:!0,mode:"open"},fi={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 '},bi=gi.compose(Object.assign({baseName:"combobox",template:hi,styles:ui,shadowOptions:vi},fi));var yi=i(98316);const wi=(e,t)=>l.css`
|
|
880
880
|
:host {
|
|
881
881
|
--light-size: 12px;
|
|
882
882
|
--height: calc(var(--design-unit) * 2px + var(--light-size));
|
|
@@ -932,13 +932,13 @@
|
|
|
932
932
|
${(0,l.when)(e=>e.showLabel,l.html`
|
|
933
933
|
<div class="label">${e=>e.label}</div>
|
|
934
934
|
`)}
|
|
935
|
-
`;class xi extends
|
|
935
|
+
`;class xi extends a.FoundationElement{constructor(){super(...arguments),this.showLabel=!1,this.label="disconnected",this.colour="red"}connectedCallback(){super.connectedCallback(),this.subscription=this.connect.isConnectedSubject.subscribe(e=>{this.label=this.getLabel(e),this.colour=e?"green":"red"})}disconnectedCallback(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}getLabel(e){if(!e)return"disconnected";return`${this.session.getSessionStorageItem("hostUrl")} ✔`}}(0,C.Cg)([oi.dm],xi.prototype,"connect",void 0),(0,C.Cg)([yi.N],xi.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-label"})],xi.prototype,"showLabel",void 0),(0,C.Cg)([l.observable],xi.prototype,"label",void 0),(0,C.Cg)([l.observable],xi.prototype,"colour",void 0);const $i=xi.compose({baseName:"connection-indicator",template:Ci,styles:wi}),Si=(e,t)=>l.css`
|
|
936
936
|
${(0,r.dataGridStyles)(e,t)}
|
|
937
|
-
`,Ei=(e,t)=>(0,
|
|
937
|
+
`,Ei=(e,t)=>(0,a.dataGridTemplate)(e,t);class Oi extends r.DataGrid{}const Ti=void 0,ki={},Ii=Oi.compose(Object.assign({baseName:"data-grid",template:Ei,styles:Si,shadowOptions:Ti},ki)),Di=(e,t)=>l.css`
|
|
938
938
|
${(0,r.dataGridCellStyles)(e,t)}
|
|
939
|
-
`;class
|
|
939
|
+
`;class Ai extends r.DataGridCell{}const Ri=void 0,Li={},Ni=Ai.compose(Object.assign({baseName:"data-grid-cell",template:a.dataGridCellTemplate,styles:Di,shadowOptions:Ri},Li)),Fi=(e,t)=>l.css`
|
|
940
940
|
${(0,r.dataGridRowStyles)(e,t)}
|
|
941
|
-
`;class Mi extends r.DataGridRow{}const _i=void 0,Hi={},zi=Mi.compose(Object.assign({baseName:"data-grid-row",template:
|
|
941
|
+
`;class Mi extends r.DataGridRow{}const _i=void 0,Hi={},zi=Mi.compose(Object.assign({baseName:"data-grid-row",template:a.dataGridRowTemplate,styles:Fi,shadowOptions:_i},Hi));var Pi=i(94343),Ui=i.n(Pi),Bi=i(58915),ji=i.n(Bi),Gi=i(7554),Vi=i.n(Gi),Yi=i(49916),Wi=i.n(Yi),qi=i(33839),Ki=i.n(qi);class Xi{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()}}Ui().extend(Ki());class Ji{constructor(e=null,t="default"){const i=new Xi(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+=Ui()(i.date).isLeapYear()?1:0)}getDay(e){return new Xi(new Date(this.year,this.number-1,e),this.lang)}}Ui().extend(Ki());class Qi{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new Xi(null,i),this.year=null!=e?e:this.today.year,this.month=new Ji(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 Ji(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new Ji(new Date(this.year-1,11),this.lang):new Ji(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new Ji(new Date(this.year+1,0),this.lang):new Ji(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new Ji(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new Ji(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new Ji(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new Ji(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new Ji(new Date(this.year,this.month.number-1-1),this.lang)}}const Zi=l.css`
|
|
942
942
|
:host {
|
|
943
943
|
position: relative;
|
|
944
944
|
}
|
|
@@ -1140,35 +1140,35 @@
|
|
|
1140
1140
|
<slot name="bottom"></slot>
|
|
1141
1141
|
</div>
|
|
1142
1142
|
`,io=l.html`
|
|
1143
|
-
${e=>to(
|
|
1144
|
-
`;var oo=i(28745);const no=[1,2,3,4,5,6,7],
|
|
1145
|
-
${(0,
|
|
1143
|
+
${e=>to(T(e))}
|
|
1144
|
+
`;var oo=i(28745);const no=[1,2,3,4,5,6,7],so=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=no.filter(t=>-1===e.indexOf(t));let s=n.find(e=>e>t.dayNumber);s||(s=Math.min(...n));const a=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return n.length?new Xi(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,a),i):(oo.v.warn("Date picker disabled days - all days of week have been disabled"),t)},ao=void 0,ro={};class lo extends a.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=Ui()(this.currentDate.Date).format(t))}inlineCalendarChanged(){this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){if(t&&this.calendar){const e=Ui()().localeData().longDateFormat("L");this.currentDate=new Xi(Ui()(t,e).toDate(),this.lang),this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=Ui()(this.currentDate.Date).format(this.format),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}}connectedCallback(){var e;super.connectedCallback(),Ui().extend(ji()),Ui().extend(Wi()),Ui().extend(Vi()),this.substringNumber=3;const t=this.value,i=t?Ui()(t,"MM-DD-YYYY"):Ui()();let o=new Xi(i.toDate(),this.lang);(null===(e=this.disabledDaysOfWeek)||void 0===e?void 0:e.length)&&(o=so(this.disabledDaysOfWeek,o,this.lang)),this.currentDate=o,this.calendar=new Qi(this.currentDate.year,this.currentDate.monthNumber,this.lang),this.value=Ui()(this.currentDate.Date).format("MM-DD-YYYY"),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.formatDate=Ui()(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 Ui()(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){Ui()(e.Date).isSame(this.currentDate.Date)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=Ui()(this.currentDate.Date).format(this.format),this.value=Ui()(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],lo.prototype,"format",void 0),(0,C.Cg)([l.attr],lo.prototype,"lang",void 0),(0,C.Cg)([l.attr],lo.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],lo.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],lo.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],lo.prototype,"position",void 0),(0,C.Cg)([l.attr],lo.prototype,"label",void 0),(0,C.Cg)([l.attr],lo.prototype,"value",void 0),(0,C.Cg)([l.observable],lo.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],lo.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],lo.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],lo.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],lo.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],lo.prototype,"monthList",void 0),(0,C.Cg)([l.observable],lo.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],lo.prototype,"calendar",void 0);const co=lo.compose(Object.assign({baseName:"date-picker",styles:Zi,template:io,shadowOptions:ao},ro));var uo=i(83912);const ho=r.SwatchRGB.create(1,1,1),po=r.SwatchRGB.create(0,0,0),mo=(0,uo.parseColorHexRGB)("#585858"),go=r.SwatchRGB.create(mo.r,mo.g,mo.b),vo=(0,uo.parseColorHexRGB)("#ffffff"),fo=r.SwatchRGB.create(vo.r,vo.g,vo.b),bo=r.PaletteRGB.from(fo),yo=(0,uo.parseColorHexRGB)("#eeeeee"),wo=r.SwatchRGB.create(yo.r,yo.g,yo.b),Co=r.PaletteRGB.from(wo),xo=(0,uo.parseColorHexRGB)("#08c3a5"),$o=r.SwatchRGB.create(xo.r,xo.g,xo.b),So=r.PaletteRGB.from($o),{create:Eo}=a.DesignToken,Oo=Eo("fui-fill-color").withDefault(go),To=Eo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(fo),ko=14;function Io(e,t){return e.colorContrast(t,ko)}const Do=Eo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>Io(Eo("fui-card-palette").withDefault(bo).getValueFor(e),To.getValueFor(e))),Ao=(e,t)=>{const i=structuredClone(e);return!t||"object"!=typeof t||Array.isArray(t)?void 0!==t?t:i:(Object.keys(t).forEach(e=>{const o=t[e],n=i[e];if(null==o)return;const s=e=>e instanceof Date;!o||"object"!=typeof o||Array.isArray(o)||s(o)||!n||"object"!=typeof n||Array.isArray(n)||s(n)?i[e]=o:i[e]=Ao(n,o)}),i)};var Ro=i(80273);const Lo={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 No{constructor(){this.value=null}}(0,C.Cg)([l.observable],No.prototype,"value",void 0);const Fo=new No,Mo=(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 _o(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const Ho={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,uo.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},zo=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,uo.parseColorHexRGB)(e))),Po=(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)):Po(e,o,n))})},Uo=["baseClass","baseName","shadowOptions","styles","template"],Bo=(e,t=Uo)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),jo=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:Bo(t)}},Go=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},Vo=()=>Fo,Yo=(...e)=>{const t=Fo.value;if(!(null==t?void 0:t.customTokens)||0===e.length)return null;return function e(t,i){const[o,...n]=t;if(0===n.length){const e=i[o];return e&&e.$value?e:null}const s=i[o];return s?e(n,s):null}(e,t.customTokens)},Wo=(e,t)=>{const i=Ao(Lo,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,zo(o.color.accent.$value)),r.neutralPalette.setValueFor(e,zo(o.color.neutral.$value)),r.bodyFont.setValueFor(e,o.fontFamily.bodyFont.$value),r.baseLayerLuminance.setValueFor(e,o.mode.luminance.$value),r.density.setValueFor(e,o.style.density.$value),r.baseHeightMultiplier.setValueFor(e,o.style.baseHeightMultiplier.$value),r.controlCornerRadius.setValueFor(e,o.style.borderRadius.$value),r.strokeWidth.setValueFor(e,o.style.strokeWidth.$value),r.designUnit.setValueFor(e,o.space.designUnit.$value),r.typeRampBaseFontSize.setValueFor(e,o.typography.baseFontSize.$value),r.typeRampBaseLineHeight.setValueFor(e,o.typography.baseLineHeight.$value);const n=r.typeRampBaseFontSize.getValueFor(e),s=r.typeRampBaseLineHeight.getValueFor(e);r.typeRampMinus1FontSize.setValueFor(e,Go(n,Ro.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,Go(s,Ro.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,Go(n,Ro.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,Go(s,Ro.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,Go(n,Ro.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,Go(s,Ro.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,Go(n,Ro.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,Go(s,Ro.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,Go(n,Ro.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,Go(s,Ro.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,Go(n,Ro.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,Go(s,Ro.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,Go(n,Ro.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,Go(s,Ro.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,Go(n,Ro.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,Go(s,Ro.Du.plusSix)),i.customTokens&&Po(e,i.customTokens),Fo.value=structuredClone(i)},qo=zo("#08c3a5"),Ko=zo("#eeeeee"),Xo=r.StandardLuminance.DarkMode;const Jo=i(85109).O.ltr,Qo=4,Zo=4;var en=i(85090);const tn=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,on=l.css`
|
|
1145
|
+
${(0,a.display)("flex")}
|
|
1146
1146
|
:host {
|
|
1147
1147
|
flex: 1;
|
|
1148
1148
|
}
|
|
1149
1149
|
`,nn=l.css`
|
|
1150
1150
|
:host {
|
|
1151
|
-
background-color: ${
|
|
1151
|
+
background-color: ${Oo};
|
|
1152
1152
|
}
|
|
1153
|
-
`.withBehaviors((0,
|
|
1153
|
+
`.withBehaviors((0,a.forcedColorsStylesheetBehavior)(l.css`
|
|
1154
1154
|
:host {
|
|
1155
1155
|
background-color: ${en.A.ButtonFace};
|
|
1156
1156
|
box-shadow: 0 0 0 1px ${en.A.CanvasText};
|
|
1157
1157
|
color: ${en.A.ButtonText};
|
|
1158
1158
|
}
|
|
1159
|
-
`)),
|
|
1159
|
+
`)),sn=(e,t)=>l.css`
|
|
1160
1160
|
${e.name} ${"h"+t} {
|
|
1161
1161
|
margin: 0;
|
|
1162
1162
|
}
|
|
1163
|
-
`;class
|
|
1163
|
+
`;class an extends r.DesignSystemProvider{constructor(){super(),Mo(o,n,this)}}(0,C.Cg)([(0,l.attr)({attribute:"card-fill-color",converter:Ho}),_o(To)],an.prototype,"cardFillColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"card-foreground-color",converter:Ho}),_o(Do)],an.prototype,"cardForegroundColor",void 0);const rn=an.compose({baseName:"design-system-provider",template:l.html`
|
|
1164
1164
|
<slot></slot>
|
|
1165
1165
|
`,styles:e=>{const t=(e=>l.css`
|
|
1166
|
-
${
|
|
1167
|
-
${
|
|
1168
|
-
${
|
|
1169
|
-
${
|
|
1170
|
-
${
|
|
1171
|
-
${
|
|
1166
|
+
${sn(e,"1")}
|
|
1167
|
+
${sn(e,"2")}
|
|
1168
|
+
${sn(e,"3")}
|
|
1169
|
+
${sn(e,"4")}
|
|
1170
|
+
${sn(e,"5")}
|
|
1171
|
+
${sn(e,"6")}
|
|
1172
1172
|
`)(e);return t.addStylesTo(document),l.css`
|
|
1173
1173
|
${on}
|
|
1174
1174
|
${nn}
|
|
@@ -1506,12 +1506,12 @@
|
|
|
1506
1506
|
`)}
|
|
1507
1507
|
</dialog>
|
|
1508
1508
|
`,pn=l.html`
|
|
1509
|
-
${e=>hn(
|
|
1510
|
-
`,mn={mode:"open",delegatesFocus:!0},gn={};class vn extends
|
|
1509
|
+
${e=>hn(T(e))}
|
|
1510
|
+
`,mn={mode:"open",delegatesFocus:!0},gn={};class vn extends a.FoundationElement{constructor(){super(...arguments),this.type="default",this.position="center",this.showCloseIcon=!0,this.resizable=!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}notificationChanged(){this.notification&&(this.showCloseIcon=!1)}connectedCallback(){super.connectedCallback(),window.HTMLDialogElement||ln.A.registerDialog(this.mainElement),this.mainElement.addEventListener("close",()=>{this.onCloseCallback&&this.onCloseCallback(),this.$emit("close")}),this.hasAttribute("open")&&this.shadowRoot.querySelector("dialog").setAttribute("open",""),this.setupResizeHandlers()}disconnectedCallback(){super.disconnectedCallback(),this.removeResizeHandlers()}setupResizeHandlers(){if(!this.resizable)return;const e=window.innerWidth,t=window.innerHeight;let i=this.minWidth,o=this.minHeight;void 0!==this.initialWidth&&(i=Math.max(this.minWidth,Math.min(this.initialWidth,e))),void 0!==this.initialHeight&&(o=Math.max(this.minHeight,Math.min(this.initialHeight,t))),this.originalWidth=this.mainElement.style.width||`${i}px`,this.originalHeight=this.mainElement.style.height||`${o}px`,this.originalPosition=this.mainElement.style.position||"",this.originalLeft=this.mainElement.style.left||"",this.originalTop=this.mainElement.style.top||"",this.originalMargin=this.mainElement.style.margin||"",this.mainElement.style.height=`${o}px`,this.mainElement.style.minHeight=`${this.minHeight}px`,this.mainElement.style.width=`${i}px`,this.mainElement.style.minWidth=`${this.minWidth}px`,this.originalWidth=this.mainElement.style.width,this.originalHeight=this.mainElement.style.height;this.shadowRoot.querySelectorAll(".resize-handle").forEach(e=>{e.addEventListener("mousedown",this.handleResizeStart.bind(this)),e.addEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}removeResizeHandlers(){var e;document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this));const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".resize-handle");null==t||t.forEach(e=>{e.removeEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}handleEdgeDoubleClick(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation();const t=e.target.dataset.direction;if(!["n","s","e","w"].includes(t))return;const i=this.mainElement.getBoundingClientRect(),o=window.innerWidth,n=window.innerHeight;switch(this.mainElement.style.position="fixed",this.mainElement.style.margin="0",t){case"n":this.mainElement.style.height=`${i.bottom}px`,this.mainElement.style.top="0px";break;case"s":this.mainElement.style.height=n-i.top+"px";break;case"e":this.mainElement.style.width=o-i.left+"px";break;case"w":this.mainElement.style.width=`${i.right}px`,this.mainElement.style.left="0px"}this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}handleResizeStart(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation(),this.isResizing=!0;const t=e.target;this.currentResizeHandle=t.dataset.direction,this.startX=e.clientX,this.startY=e.clientY;const i=this.mainElement.getBoundingClientRect();switch(this.startWidth=i.width,this.startHeight=i.height,this.startLeft=i.left,this.startTop=i.top,this.resizeOffsetX=0,this.resizeOffsetY=0,this.currentResizeHandle){case"n":this.resizeOffsetY=e.clientY-i.top;break;case"s":this.resizeOffsetY=e.clientY-i.bottom;break;case"e":this.resizeOffsetX=e.clientX-i.right;break;case"w":this.resizeOffsetX=e.clientX-i.left;break;case"ne":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.top;break;case"nw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.top;break;case"se":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.bottom;break;case"sw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.bottom}this.mainElement.style.position="fixed",this.mainElement.style.left=`${i.left}px`,this.mainElement.style.top=`${i.top}px`,this.mainElement.style.margin="0",document.addEventListener("mousemove",this.handleResizeMove.bind(this)),document.addEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.add("resizing")}handleResizeMove(e){if(!this.isResizing||!this.currentResizeHandle)return;e.preventDefault();const t=e.clientX-this.startX-this.resizeOffsetX,i=e.clientY-this.startY-this.resizeOffsetY;let o=this.startWidth,n=this.startHeight,s=this.startLeft,a=this.startTop,r=!1;switch(this.currentResizeHandle){case"se":o=this.startWidth+t,n=this.startHeight+i;break;case"sw":o=this.startWidth-t,n=this.startHeight+i,s=this.startLeft+t,r=!0;break;case"ne":o=this.startWidth+t,n=this.startHeight-i,a=this.startTop+i,r=!0;break;case"nw":o=this.startWidth-t,n=this.startHeight-i,s=this.startLeft+t,a=this.startTop+i,r=!0;break;case"e":o=this.startWidth+t;break;case"w":o=this.startWidth-t,s=this.startLeft+t,r=!0;break;case"s":n=this.startHeight+i;break;case"n":n=this.startHeight-i,a=this.startTop+i,r=!0}const l=window.innerWidth,d=window.innerHeight;if(this.resizable){if(o<this.minWidth){const e=this.minWidth-o;o=this.minWidth,this.currentResizeHandle.includes("w")&&(s-=e)}if(n<this.minHeight){const e=this.minHeight-n;n=this.minHeight,this.currentResizeHandle.includes("n")&&(a-=e)}if(this.currentResizeHandle.includes("e")){const e=l-this.startLeft;o>e&&(o=e)}if(this.currentResizeHandle.includes("s")){const e=d-this.startTop;n>e&&(n=e)}if(this.currentResizeHandle.includes("w")){s<0&&(o+=s,s=0);const e=l-s;o>e&&(o=e)}if(this.currentResizeHandle.includes("n")){a<0&&(n+=a,a=0);const e=d-a;n>e&&(n=e)}}this.mainElement.style.width=`${o}px`,this.mainElement.style.height=`${n}px`,r&&(this.mainElement.style.left=`${s}px`,this.mainElement.style.top=`${a}px`)}handleResizeEnd(e){if(!this.isResizing)return;e.preventDefault(),this.isResizing=!1,this.currentResizeHandle=null,this.resizeOffsetX=0,this.resizeOffsetY=0,document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.remove("resizing");const t=this.mainElement.style.width,i=this.mainElement.style.height;t===this.originalWidth&&i===this.originalHeight||(this.hasBeenResized=!0),this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}get open(){return this.mainElement.hasAttribute("open")}get resizeIconName(){return this.hasBeenResized||this.isMaximized?"compress":"expand"}close(){this.mainElement.close()}dismiss(){var e,t,i,o;(null===(o=null===(i=null===(t=null===(e=this.notification)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.mainElement.close(),this.remove()}catch(e){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())}}(0,C.Cg)([l.observable],vn.prototype,"notification",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],vn.prototype,"type",void 0),(0,C.Cg)([l.attr],vn.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-close-icon"})],vn.prototype,"showCloseIcon",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"resizable"})],vn.prototype,"resizable",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-width"})],vn.prototype,"minWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-height"})],vn.prototype,"minHeight",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-width"})],vn.prototype,"initialWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-height"})],vn.prototype,"initialHeight",void 0),(0,C.Cg)([l.observable],vn.prototype,"onShowCallback",void 0),(0,C.Cg)([l.observable],vn.prototype,"onCloseCallback",void 0),(0,C.Cg)([l.observable],vn.prototype,"isMaximized",void 0),(0,C.Cg)([l.observable],vn.prototype,"hasBeenResized",void 0),(0,C.Cg)([l.volatile],vn.prototype,"open",null),(0,C.Cg)([l.volatile],vn.prototype,"resizeIconName",null);class fn extends vn{show(){this.onShowCallback&&this.onShowCallback(),this.mainElement.show()}}const bn=fn.compose(Object.assign({baseName:"dialog",styles:dn,template:pn,shadowOptions:mn},gn)),yn=(e,t)=>l.css`
|
|
1511
1511
|
${(0,r.disclosureStyles)(e,t)}
|
|
1512
|
-
`,wn=(e,t)=>(0,
|
|
1512
|
+
`,wn=(e,t)=>(0,a.disclosureTemplate)(e,t);class Cn extends a.Disclosure{}const xn=void 0,$n={},Sn=Cn.compose(Object.assign({baseName:"disclosure",template:wn,styles:yn,shadowOptions:xn},$n)),En=(e,t)=>l.css`
|
|
1513
1513
|
${(0,r.dividerStyles)(e,t)}
|
|
1514
|
-
`,
|
|
1514
|
+
`,On=(e,t)=>(0,a.dividerTemplate)(e,t);class Tn extends a.Divider{}const kn=void 0,In={},Dn=Tn.compose(Object.assign({baseName:"divider",template:On,styles:En,shadowOptions:kn},In)),An=(e,t,i)=>l.css`
|
|
1515
1515
|
:host {
|
|
1516
1516
|
--dropdown-opener-height-multiplier: 0.7px;
|
|
1517
1517
|
--menu-item-height-multiplier: 0.7px;
|
|
@@ -1574,9 +1574,9 @@
|
|
|
1574
1574
|
var(--menu-item-height-multiplier)
|
|
1575
1575
|
);
|
|
1576
1576
|
}
|
|
1577
|
-
`,
|
|
1578
|
-
${
|
|
1579
|
-
`,
|
|
1577
|
+
`,Rn=(e,t)=>l.css`
|
|
1578
|
+
${An("foundation",e,t)}
|
|
1579
|
+
`,Ln=(e,t)=>l.html`
|
|
1580
1580
|
${(0,l.repeat)(()=>e,l.html`
|
|
1581
1581
|
${(0,l.when)(e=>e.isDisabled&&e.isDisabled(),l.html`
|
|
1582
1582
|
<${t}-menu-item class="menu-item" disabled>${e=>e.name}</${t}-menu-item>
|
|
@@ -1597,12 +1597,12 @@
|
|
|
1597
1597
|
`)}
|
|
1598
1598
|
${e=>e.name}
|
|
1599
1599
|
${(0,l.when)(e=>e.submenu,l.html`
|
|
1600
|
-
<${t}-menu>${e=>
|
|
1600
|
+
<${t}-menu>${e=>Ln(e.submenu,t)}</${t}-menu>
|
|
1601
1601
|
`)}
|
|
1602
1602
|
</${t}-menu-item>
|
|
1603
1603
|
`)}
|
|
1604
1604
|
`)}
|
|
1605
|
-
`,
|
|
1605
|
+
`,Nn=e=>l.html`
|
|
1606
1606
|
<div class="actions-container" part="actions-container">
|
|
1607
1607
|
<${e}-button
|
|
1608
1608
|
id="actiosnMenuTrigger"
|
|
@@ -1619,12 +1619,12 @@
|
|
|
1619
1619
|
class="actions-menu ${e=>e.classNames}"
|
|
1620
1620
|
part="actions-menu"
|
|
1621
1621
|
>
|
|
1622
|
-
${t=>
|
|
1622
|
+
${t=>Ln(t.allItems,e)}
|
|
1623
1623
|
</${e}-menu>
|
|
1624
1624
|
</div>
|
|
1625
1625
|
`,Fn=l.html`
|
|
1626
|
-
${e=>
|
|
1627
|
-
`;class Mn extends
|
|
1626
|
+
${e=>Nn(T(e))}
|
|
1627
|
+
`;class Mn extends a.FoundationElement{constructor(){super(...arguments),this.autoClose=!0,this.disabled=!1,this.name="Dropdown Menu",this.open=!1,this.clickOutside=e=>this.handleClickOutside(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("onMenuClick",this.onDropdownMenuItemClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){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],Mn.prototype,"items",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Mn.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],Mn.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Mn.prototype,"classNames",void 0),(0,C.Cg)([l.attr],Mn.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],Mn.prototype,"open",void 0),(0,C.Cg)([l.attr],Mn.prototype,"buttonAppearance",void 0);const _n=Mn.compose({baseName:"dropdown-menu",styles:Rn,template:Fn});var Hn=i(84686);const zn=l.css`
|
|
1628
1628
|
.environment-indicator {
|
|
1629
1629
|
font-size: 12px;
|
|
1630
1630
|
display: inline-flex;
|
|
@@ -1652,7 +1652,7 @@
|
|
|
1652
1652
|
font-size: calc(var(--design-unit) * 3.5px);
|
|
1653
1653
|
}
|
|
1654
1654
|
`,Pn=l.html`
|
|
1655
|
-
${e=>{return t=
|
|
1655
|
+
${e=>{return t=T(e),l.html`
|
|
1656
1656
|
${(0,l.when)(e=>e.config,l.html`
|
|
1657
1657
|
<div
|
|
1658
1658
|
data-test-id="environment-indicator"
|
|
@@ -1676,7 +1676,7 @@
|
|
|
1676
1676
|
</div>
|
|
1677
1677
|
`)}
|
|
1678
1678
|
`;var t}}
|
|
1679
|
-
`;var Un=i(17190);const Bn="default",
|
|
1679
|
+
`;var Un=i(17190);const Bn="default",jn={level:Bn,showIcon:!1,iconSize:"sm",backgroundColor:"#2222ff",textColor:"#ffffff",label:"DEFAULT"},Gn=[jn,{level:"dev",showIcon:!1,icon:"code",backgroundColor:"#ff6b35",label:"DEV"},{level:"prod",showIcon:!1,icon:"check-circle",backgroundColor:"#28a745",label:"PROD"}],Vn=(0,Un.r)(),Yn=a.DI.createInterface(e=>e.instance(Vn),e=>e.instance(Vn)),Wn=a.DI.createInterface("EnvironmentIndicatorConfig");function qn(){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:[jn]};a.DI.getOrCreateDOMContainer().register(a.Registration.instance(Yn,Vn),a.Registration.instance(Wn,o)),Vn.publish(o)})}const Kn=(0,Xe.createLogger)("EnvironmentIndicator");class Xn extends a.FoundationElement{constructor(){super(...arguments),this.size="sm",this.textColor="#ffffff",this.icon="check-circle",this.iconSize="sm",this.useDefaultConfig=!1,this.config=jn,this.envConfigs=Gn}envConfigsChanged(){this.config=this.getEnvConfigByLevel()}diConfigChanged(){this.config=this.getEnvConfigByLevel()}subscribeToDiConfig(){const e=a.DI.getOrCreateDOMContainer().get(Yn);e&&"function"==typeof e.subscribe?this.unsubscribeConfig=e.subscribe(e=>{this.diConfig=e}):Kn.error("Observer not found or invalid in DI container")}connectedCallback(){super.connectedCallback(),this.diConfig=function(){try{const e=a.DI.getOrCreateDOMContainer().get(Wn);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){Kn.error(e)}return Hn.H6!==Bn?Hn.H6:this.useDefaultConfig?Bn:void 0}getEnvConfigByLevel(){const e=this.getAttributesConfig(),t=this.getCurrentEnvironmentLevel();if(!t)return this.useDefaultConfig?jn:void 0;if(this.label)return Object.assign(Object.assign(Object.assign({},jn),{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],Xn.prototype,"level",void 0),(0,C.Cg)([l.attr],Xn.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-icon"})],Xn.prototype,"showIcon",void 0),(0,C.Cg)([l.attr],Xn.prototype,"size",void 0),(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],Xn.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],Xn.prototype,"textColor",void 0),(0,C.Cg)([l.attr],Xn.prototype,"icon",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],Xn.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"use-default-config"})],Xn.prototype,"useDefaultConfig",void 0),(0,C.Cg)([l.observable],Xn.prototype,"config",void 0),(0,C.Cg)([l.observable],Xn.prototype,"envConfigs",void 0),(0,C.Cg)([l.observable],Xn.prototype,"diConfig",void 0);const Jn=Xn.compose({baseName:"environment-indicator",template:Pn,styles:zn}),Qn=e=>l.html`
|
|
1680
1680
|
<${e}-banner ${(0,l.ref)("banner")}>
|
|
1681
1681
|
<div slot="content">
|
|
1682
1682
|
<div>
|
|
@@ -1685,7 +1685,7 @@
|
|
|
1685
1685
|
</div>
|
|
1686
1686
|
|
|
1687
1687
|
<${e}-button slot="action" appearance="lightweight" @click=${e=>e.dismiss()}>
|
|
1688
|
-
${e=>{var t,i,o,n,a,
|
|
1688
|
+
${e=>{var t,i,o,n,s,a,r,l;return(null===(n=null===(o=null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner)||void 0===o?void 0:o.dismissingAction)||void 0===n?void 0:n.label)||(null===(l=null===(r=null===(a=null===(s=e.notification)||void 0===s?void 0:s.config)||void 0===a?void 0:a.banner)||void 0===r?void 0:r.dismissingAction)||void 0===l?void 0:l.label)||"Ignore"}}
|
|
1689
1689
|
</${e}-button>
|
|
1690
1690
|
${(0,l.repeat)(e=>{var t,i,o,n;return(null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.banner.confirmingActions)||(null===(n=null===(o=e.notification)||void 0===o?void 0:o.config)||void 0===n?void 0:n.banner.confirmingActions)},l.html`
|
|
1691
1691
|
<${e}-button
|
|
@@ -1698,12 +1698,12 @@
|
|
|
1698
1698
|
`)}
|
|
1699
1699
|
</${e}-banner>
|
|
1700
1700
|
`,Zn=l.html`
|
|
1701
|
-
${e=>
|
|
1702
|
-
`,
|
|
1701
|
+
${e=>Qn(T(e))}
|
|
1702
|
+
`,es={mode:"open",delegatesFocus:!0};class ts extends a.FoundationElement{connectedCallback(){super.connectedCallback(),Je.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){Je.error(e)}})}}(0,C.Cg)([l.observable],ts.prototype,"error",void 0),(0,C.Cg)([l.observable],ts.prototype,"notification",void 0);const is=ts.compose({baseName:"error-banner",template:Zn,shadowOptions:es});var os;!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(os||(os={}));const ns=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"}`},ss=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)||Xe.LogLevel.Error},as=(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},rs=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},ls=(0,Xe.createLogger)("foundation-error"),ds={alert:e=>{alert(ns(e))},notification:(e,t)=>{var i,o,n,s,a,r,l,d,c,u,h,p,m;const g=t.split("-")[0],v=as("notify-container",t);if(v)switch(v.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.notification)||void 0===o?void 0:o.position){case"top-left":v.style.top="0",v.style.left="0";break;case"bottom-left":v.style.bottom="0",v.style.left="0";break;case"bottom-right":v.style.bottom="0",v.style.right="0";break;default:v.style.top="0",v.style.right="0"}const f=document.createElement(`${g}-toast`),b=document.createElement("div");b.setAttribute("slot","top"),b.textContent=null!==(n=e.title)&&void 0!==n?n:"Error";const y=document.createElement("div");y.setAttribute("slot","content"),y.textContent=(null==e?void 0:e.errorDetails)||"";const w=document.createElement("div");w.setAttribute("slot","date"),w.textContent=(new Date).toLocaleTimeString(),f.setAttribute("notify",(null===(a=null===(s=null==e?void 0:e.config)||void 0===s?void 0:s.notification)||void 0===a?void 0:a.type)||""),(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.notification)||void 0===l?void 0:l.autoClose)&&f.setAttribute("auto-close",`${null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.notification)||void 0===c?void 0:c.autoClose}`),(null===(h=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.notification)||void 0===h?void 0:h.closeTimeout)&&f.setAttribute("close-timeout",`${null===(m=null===(p=null==e?void 0:e.config)||void 0===p?void 0:p.notification)||void 0===m?void 0:m.closeTimeout}`),f.appendChild(b),f.appendChild(y),f.appendChild(w),v.appendChild(f)},dialog:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-error-dialog`);as("dialog-container",t).appendChild(o),o.error=e,o.show()},snackbar:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`);as("snack-container",t).appendChild(o),o.error=e},banner:(e,t,i)=>{var o;const n=t.split("-")[0],s=document.createElement(`${n}-error-banner`),a=(e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("error-banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return rs()})(i);(null===(o=null==a?void 0:a.children)||void 0===o?void 0:o.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.error=e}},cs=(e,t,i)=>{ls.log({message:ns(e),level:ss(e)});Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{ds[o]&&ds[o](e,t,i)})};class us{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 Xe.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 hs{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 ps=l.html`
|
|
1703
1703
|
<template ${(0,l.ref)("errorBoundary")}>
|
|
1704
1704
|
<slot></slot>
|
|
1705
1705
|
</template>
|
|
1706
|
-
`,
|
|
1706
|
+
`,ms={mode:"open",delegatesFocus:!0};class gs extends a.FoundationElement{constructor(){super(...arguments),this.logger=(0,Xe.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(os.ERROR_BOUNDARY_EVENT,e=>{e.stopImmediatePropagation(),cs(e.detail,this.tagName,this.errorBoundary)}),this.resourceName){if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))return void Je.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;cs((new us).withTitle(e).withErrorDetails(i).withNotification((new hs).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],gs.prototype,"errorBoundary",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],gs.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],gs.prototype,"closeTimeout",void 0),(0,C.Cg)([ni.yW],gs.prototype,"datasource",void 0);const vs=gs.compose({baseName:"error-boundary",template:ps,shadowOptions:ms}),fs=l.css`
|
|
1707
1707
|
:host {
|
|
1708
1708
|
--design-unit: 3;
|
|
1709
1709
|
--dialog-max-width: 358px;
|
|
@@ -1722,12 +1722,12 @@
|
|
|
1722
1722
|
overflow: hidden;
|
|
1723
1723
|
min-height: var(--error-details-min-height);
|
|
1724
1724
|
}
|
|
1725
|
-
`,
|
|
1725
|
+
`,bs=e=>l.html`
|
|
1726
1726
|
<${e}-dialog show-close-icon="false" ${(0,l.ref)("dialog")}>
|
|
1727
1727
|
<h2 slot="top" class="title">${e=>{var t;return null===(t=e.error)||void 0===t?void 0:t.title}}</h2>
|
|
1728
1728
|
<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>
|
|
1729
1729
|
<${e}-button slot="bottom" appearance="lightweight" @click=${e=>{e.dismiss()}}>
|
|
1730
|
-
${e=>{var t,i,o,n,a,
|
|
1730
|
+
${e=>{var t,i,o,n,s,a,r,l;return(null===(n=null===(o=null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.dialog)||void 0===o?void 0:o.dismissingAction)||void 0===n?void 0:n.label)||(null===(l=null===(r=null===(a=null===(s=e.notification)||void 0===s?void 0:s.config)||void 0===a?void 0:a.dialog)||void 0===r?void 0:r.dismissingAction)||void 0===l?void 0:l.label)||"Ignore"}}
|
|
1731
1731
|
</${e}-button>
|
|
1732
1732
|
${(0,l.repeat)(e=>{var t,i,o,n;return(null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.dialog.confirmingActions)||(null===(n=null===(o=e.notification)||void 0===o?void 0:o.config)||void 0===n?void 0:n.dialog.confirmingActions)},l.html`
|
|
1733
1733
|
<${e}-button
|
|
@@ -1739,9 +1739,9 @@
|
|
|
1739
1739
|
</${e}-button>
|
|
1740
1740
|
`)}
|
|
1741
1741
|
</${e}-dialog>
|
|
1742
|
-
`,
|
|
1743
|
-
${e=>
|
|
1744
|
-
`,
|
|
1742
|
+
`,ys=l.html`
|
|
1743
|
+
${e=>bs(T(e))}
|
|
1744
|
+
`,ws={mode:"open",delegatesFocus:!0};class Cs extends a.FoundationElement{connectedCallback(){super.connectedCallback(),Je.deprecated("ErrorDialog","Use `${prefix}-dialog` instead.")}show(){this.dialog.show()}dismiss(){var e,t,i,o,n,s,a,r;(null===(o=null===(i=null===(t=null===(e=this.error)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.error.config.dialog.dismissingAction.action(),(null===(r=null===(a=null===(s=null===(n=this.notification)||void 0===n?void 0:n.config)||void 0===s?void 0:s.dialog)||void 0===a?void 0:a.dismissingAction)||void 0===r?void 0:r.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.dialog.close(),this.remove()}catch(e){Je.error(e)}}}(0,C.Cg)([l.observable],Cs.prototype,"error",void 0),(0,C.Cg)([l.observable],Cs.prototype,"notification",void 0);const xs=Cs.compose({baseName:"error-dialog",template:ys,styles:fs,shadowOptions:ws});class $s extends a.FoundationElement{constructor(){super(...arguments),this.selectedFile=null,this.accept="",this.fileSizeLimitBytes=10485760,this.fileName="",this.isProcessing=!1}handleClick(){this.fileInput.value=null,this.fileInput.click()}onInputChange(e){var t;const i=null==e?void 0:e.target,o=Array.from(null!==(t=null==i?void 0:i.files)&&void 0!==t?t:[]),n=o.find(e=>e.size>this.fileSizeLimitBytes);if(n){const e=`File "${n.name}" exceeds size limit of ${this.fileSizeLimitBytes} bytes`;return this.showError("File Size Error",e),void this.$emit("error",new Error(e))}this.onFileSelected(o)}clearSelection(){this.fileName="",this.selectedFile=null,this.isProcessing=!1,this.fileInput&&(this.fileInput.value=""),this.onFileCleared(),this.$emit("clear")}getSelectedFile(){return this.selectedFile}showError(e,t){ge({title:e,body:t,config:{toast:{type:"warning",autoClose:!0,closeTimeout:5e3}}},this.tagName)}}(0,C.Cg)([l.attr],$s.prototype,"label",void 0),(0,C.Cg)([l.attr],$s.prototype,"accept",void 0),(0,C.Cg)([(0,l.attr)({attribute:"file-size-limit-bytes"})],$s.prototype,"fileSizeLimitBytes",void 0),(0,C.Cg)([l.observable],$s.prototype,"fileName",void 0),(0,C.Cg)([l.observable],$s.prototype,"isProcessing",void 0);const Ss=(e,t,i)=>l.css`
|
|
1745
1745
|
/* Host */
|
|
1746
1746
|
:host {
|
|
1747
1747
|
display: flex;
|
|
@@ -1791,9 +1791,9 @@
|
|
|
1791
1791
|
justify-content: center;
|
|
1792
1792
|
z-index: 2;
|
|
1793
1793
|
}
|
|
1794
|
-
`,
|
|
1795
|
-
${
|
|
1796
|
-
`,
|
|
1794
|
+
`,Es=(e,t)=>l.css`
|
|
1795
|
+
${Ss("foundation",e,t)}
|
|
1796
|
+
`,Os=e=>l.html`
|
|
1797
1797
|
<template>
|
|
1798
1798
|
<div class="file-reader">
|
|
1799
1799
|
${(0,l.when)(e=>e.isProcessing,l.html`
|
|
@@ -1829,9 +1829,9 @@
|
|
|
1829
1829
|
`)}
|
|
1830
1830
|
</div>
|
|
1831
1831
|
</template>
|
|
1832
|
-
`,
|
|
1833
|
-
${e=>
|
|
1834
|
-
`;class
|
|
1832
|
+
`,Ts=l.html`
|
|
1833
|
+
${e=>Os(T(e))}
|
|
1834
|
+
`;class ks extends $s{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"})],ks.prototype,"autoProcess",void 0),(0,C.Cg)([(0,l.attr)({attribute:"processing-delay-ms"})],ks.prototype,"processingDelayMs",void 0),(0,C.Cg)([l.observable],ks.prototype,"fileContent",void 0),(0,C.Cg)([l.observable],ks.prototype,"onFileRead",void 0);const Is=ks.compose({baseName:"file-reader",styles:Es,template:Ts});var Ds=i(17465),As=i(32748);const Rs=l.css`
|
|
1835
1835
|
/* Host */
|
|
1836
1836
|
:host {
|
|
1837
1837
|
display: flex;
|
|
@@ -1879,7 +1879,7 @@
|
|
|
1879
1879
|
fast-data-grid-row {
|
|
1880
1880
|
align-items: center;
|
|
1881
1881
|
}
|
|
1882
|
-
`,
|
|
1882
|
+
`,Ls=e=>l.html`
|
|
1883
1883
|
<template>
|
|
1884
1884
|
<div class="file-selection">
|
|
1885
1885
|
<input type="file" multiple ${(0,l.ref)("fileInput")}
|
|
@@ -1905,13 +1905,13 @@
|
|
|
1905
1905
|
</${e}-data-grid>
|
|
1906
1906
|
</div>
|
|
1907
1907
|
</template>
|
|
1908
|
-
`,
|
|
1909
|
-
${e=>
|
|
1910
|
-
`,
|
|
1908
|
+
`,Ns=l.html`
|
|
1909
|
+
${e=>Ls(T(e))}
|
|
1910
|
+
`,Fs=e=>{const t=new FormData;return e.forEach(e=>{t.append(e.name,e)}),t},Ms=(e,t,i,o)=>{const n=new Headers;return n.append("SESSION_AUTH_TOKEN",i),o.post(e,{body:t,headers:n})},_s=(e,t,i,o="GET",n,s,a="zero")=>{const r=new Headers;r.append("SESSION_AUTH_TOKEN",i),fetch(e,{method:o,body:s,headers:r,credentials:"include"}).then(e=>(0,C.sH)(void 0,void 0,void 0,function*(){var t;if(e.ok)return e.blob();{const i=yield e.json();n&&ge({title:null==i?void 0:i.MESSAGE_TYPE,body:null===(t=null==i?void 0:i.DETAILS)||void 0===t?void 0:t.ERROR,config:{toast:{autoClose:!0,closeTimeout:5e3,type:"warning"}}},a),Je.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&&ge({title:"Success",body:"File downloaded successfully",config:{toast:{autoClose:!0,closeTimeout:5e3,type:"success"}}},a),Je.info("File downloaded successfully")}}).catch(e=>{Je.error(e)})},Hs=["image/png","image/bmp","image/gif","image/jpeg","image/jpg"],zs=["text/plain","text/csv"],Ps=["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"],Us=l.html`
|
|
1911
1911
|
${(0,l.when)(e=>e.rowData,l.html`
|
|
1912
|
-
${e=>"DATETIME"===e.columnDefinition.type?(0,
|
|
1912
|
+
${e=>"DATETIME"===e.columnDefinition.type?(0,si.zT)(e.rowData[e.columnDefinition.columnDataKey]):e.rowData[e.columnDefinition.columnDataKey]}
|
|
1913
1913
|
`)}
|
|
1914
|
-
`;class
|
|
1914
|
+
`;class Bs extends $s{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,...Hs]:"office/*"===t?e=[...e,...Ps]:"text/*"===t?e=[...e,...zs]:e.push(t)}),this.acceptedFormats=e}fieldNameChanged(){this.setupGrid()}entityIdChanged(){this.setupGrid()}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),(null===(t=this.filesGridColumnDefinitions)||void 0===t?void 0:t.length)||this.setColumnDefs()})}setupGrid(){void 0!==this.entityId&&void 0!==this.fieldName&&(this.gridCriteria=(new G.b).withExpression((new j.K).withField(this.fieldName).withValue(this.entityId).build()).build(),this.setRowData())}handleStreamRowOperation(e){let t;for(const i of e.ROW)if(i.DETAILS)switch(i.DETAILS.OPERATION){case"INSERT":this.uploadedFilesList.unshift(i);break;case"MODIFY":t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===i.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1,i);break;case"DELETE":t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===i.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1);break;default:Ds.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=>{Ds.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`
|
|
1915
1915
|
<template>
|
|
1916
1916
|
<div class="download-button-container">
|
|
1917
1917
|
<${e}-button
|
|
@@ -1922,7 +1922,7 @@
|
|
|
1922
1922
|
</${e}-button>
|
|
1923
1923
|
</div>
|
|
1924
1924
|
</template>
|
|
1925
|
-
`}}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:
|
|
1925
|
+
`}}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:Us}}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=Fs(this.selectedFiles);e.append(this.uploadKey,this.entityId);const t=yield Ms(this.uploadEventName,e,this.session.getItem("authToken","session"),this.http);if(t.ERROR)return Ds.v.error(t.ERROR),void this.$emit("errorOut",t.ERROR);Ds.v.info(t),this.$emit("success",t),this.clearSelection()}catch(e){this.$emit("errorOut",e),Ds.v.error(e)}})}handleFileDownload(e){const t=this.tagName.toLowerCase().split("-")[0];_s(this.downloadEventName(e),e.FILE_NAME,this.session.getItem("authToken","session"),"GET",!0,void 0,t)}}(0,C.Cg)([l.observable],Bs.prototype,"gridCriteria",void 0),(0,C.Cg)([oi.dm],Bs.prototype,"connect",void 0),(0,C.Cg)([As.l],Bs.prototype,"http",void 0),(0,C.Cg)([yi.N],Bs.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({attribute:"uploaded-files-resource-name"})],Bs.prototype,"uploadedFilesResourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-event-name"})],Bs.prototype,"uploadEventName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"field-name"})],Bs.prototype,"fieldName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"entity-id"})],Bs.prototype,"entityId",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-key"})],Bs.prototype,"uploadKey",void 0),(0,C.Cg)([(0,l.attr)({attribute:"grid-fields"})],Bs.prototype,"gridFields",void 0),(0,C.Cg)([l.observable],Bs.prototype,"fileName",void 0),(0,C.Cg)([l.observable],Bs.prototype,"uploadedFilesList",void 0),(0,C.Cg)([l.observable],Bs.prototype,"filesGridColumnDefinitions",void 0);const js=void 0,Gs={},Vs=Bs.compose(Object.assign({baseName:"file-upload",styles:Rs,template:Ns,shadowOptions:js},Gs)),Ys=l.css`
|
|
1926
1926
|
.filter-wrapper {
|
|
1927
1927
|
border: 1px solid gray;
|
|
1928
1928
|
border-radius: calc(var(--design-unit) * 2px);
|
|
@@ -1973,12 +1973,12 @@
|
|
|
1973
1973
|
.flex-row foundation-select {
|
|
1974
1974
|
flex: 1;
|
|
1975
1975
|
}
|
|
1976
|
-
`,
|
|
1977
|
-
<div class="close-icon" @click=${e=>e.clear()}>${
|
|
1978
|
-
`;function
|
|
1976
|
+
`,Ws=(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`,qs=l.html`
|
|
1977
|
+
<div class="close-icon" @click=${e=>e.clear()}>${Ws()}</div>
|
|
1978
|
+
`;function Ks(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 Xs=[{name:"All",value:"all",selected:!0},{name:"True",value:"true"},{name:"False",value:"false"},{name:"N/A",value:"null"}],Js=(e,t)=>{switch(e.type){case"number":return(e=>l.html`
|
|
1979
1979
|
<div class="flex-row">
|
|
1980
1980
|
<div>${e=>e.label}</div>
|
|
1981
|
-
${
|
|
1981
|
+
${qs}
|
|
1982
1982
|
</div>
|
|
1983
1983
|
<div class="flex-row">
|
|
1984
1984
|
<${e}-text-field
|
|
@@ -1997,7 +1997,7 @@
|
|
|
1997
1997
|
`)(t);case"date":return(e=>l.html`
|
|
1998
1998
|
<div class="flex-row">
|
|
1999
1999
|
<div>${e=>e.label}</div>
|
|
2000
|
-
${
|
|
2000
|
+
${qs}
|
|
2001
2001
|
</div>
|
|
2002
2002
|
<div class="flex-row">
|
|
2003
2003
|
<${e}-text-field
|
|
@@ -2014,11 +2014,11 @@
|
|
|
2014
2014
|
`)(t);case"boolean":return(e=>l.html`
|
|
2015
2015
|
<div class="flex-row">
|
|
2016
2016
|
<div>${e=>e.label}</div>
|
|
2017
|
-
${
|
|
2017
|
+
${qs}
|
|
2018
2018
|
</div>
|
|
2019
2019
|
<div class="flex-row">
|
|
2020
|
-
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(
|
|
2021
|
-
${(0,l.repeat)(()=>
|
|
2020
|
+
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(Ks(t))}}">
|
|
2021
|
+
${(0,l.repeat)(()=>Xs,l.html`
|
|
2022
2022
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2023
2023
|
${e=>e.name}
|
|
2024
2024
|
</${e}-option>
|
|
@@ -2028,10 +2028,10 @@
|
|
|
2028
2028
|
`)(t);case"enum":return(e=>l.html`
|
|
2029
2029
|
<div class="flex-row">
|
|
2030
2030
|
<div>${e=>e.label}</div>
|
|
2031
|
-
${
|
|
2031
|
+
${qs}
|
|
2032
2032
|
</div>
|
|
2033
2033
|
<div class="flex-row">
|
|
2034
|
-
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(
|
|
2034
|
+
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(Ks(t))}}">
|
|
2035
2035
|
${(0,l.repeat)(e=>e.enumFilterOptions,l.html`
|
|
2036
2036
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2037
2037
|
${e=>e.name}
|
|
@@ -2042,7 +2042,7 @@
|
|
|
2042
2042
|
`)(t);default:return(e=>l.html`
|
|
2043
2043
|
<div class="flex-row">
|
|
2044
2044
|
<div>${e=>e.label}</div>
|
|
2045
|
-
${
|
|
2045
|
+
${qs}
|
|
2046
2046
|
</div>
|
|
2047
2047
|
<div class="flex-row">
|
|
2048
2048
|
<${e}-text-field
|
|
@@ -2051,11 +2051,11 @@
|
|
|
2051
2051
|
:value=${(0,P.O)(e=>e.textFilter)}
|
|
2052
2052
|
/>
|
|
2053
2053
|
</div>
|
|
2054
|
-
`)(t)}},
|
|
2055
|
-
<div class="filter-wrapper">${t=>
|
|
2056
|
-
`,
|
|
2057
|
-
${e=>
|
|
2058
|
-
`;var
|
|
2054
|
+
`)(t)}},Qs=e=>l.html`
|
|
2055
|
+
<div class="filter-wrapper">${t=>Js(t,e)}</div>
|
|
2056
|
+
`,Zs=l.html`
|
|
2057
|
+
${e=>Qs(T(e))}</div>
|
|
2058
|
+
`;var ea;!function(e){e.change="filter-changed",e.clear="filter-cleared"}(ea||(ea={}));class ta extends a.FoundationElement{constructor(){super(...arguments),this.type="text",this.textFilter="",this.enumFilterOptions=[{name:"All",value:"all",selected:!0}]}textFilterChanged(e,t){if(!(null==t?void 0:t.length))return void this.$emit(ea.clear,{fieldName:this.fieldName,target:this.target});const i=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(ea.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(ea.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(ea.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(ea.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(ea.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(ea.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){e&&"all"!==e?this.$emit(ea.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target}):this.$emit(ea.clear,{fieldName:this.fieldName,target:this.target})}onEnumFilterSelection(e){e&&"all"!==e?this.$emit(ea.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target}):this.$emit(ea.clear,{fieldName:this.fieldName,target:this.target})}}(0,C.Cg)([l.attr],ta.prototype,"fieldName",void 0),(0,C.Cg)([l.attr],ta.prototype,"type",void 0),(0,C.Cg)([l.attr],ta.prototype,"label",void 0),(0,C.Cg)([l.attr],ta.prototype,"target",void 0),(0,C.Cg)([l.observable],ta.prototype,"textFilter",void 0),(0,C.Cg)([l.observable],ta.prototype,"numFilterMin",void 0),(0,C.Cg)([l.observable],ta.prototype,"numFilterMax",void 0),(0,C.Cg)([l.observable],ta.prototype,"dateFilterMin",void 0),(0,C.Cg)([l.observable],ta.prototype,"dateFilterMax",void 0),(0,C.Cg)([l.attr],ta.prototype,"enumOptions",void 0),(0,C.Cg)([l.observable],ta.prototype,"enumFilterOptions",void 0);const ia=ta.compose({baseName:"filter",template:Zs,styles:Ys});var oa=i(64324);const na=(e,t)=>l.css`
|
|
2059
2059
|
.filter-bar {
|
|
2060
2060
|
background-color: #2c2f33;
|
|
2061
2061
|
padding: calc(var(--design-unit) * 2px);
|
|
@@ -2091,9 +2091,9 @@
|
|
|
2091
2091
|
.toggle-collapsed {
|
|
2092
2092
|
color: #48ed9c;
|
|
2093
2093
|
}
|
|
2094
|
-
`,
|
|
2094
|
+
`,sa=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"}},aa=l.html`
|
|
2095
2095
|
<p>Fetching metadata for ${e=>e.resource}...</p>
|
|
2096
|
-
`,
|
|
2096
|
+
`,ra=e=>l.html`
|
|
2097
2097
|
<div
|
|
2098
2098
|
class=${e=>(0,x.x)(["toggle",!0],["toggle-collapsed",e.collapsed])}
|
|
2099
2099
|
@click="${e=>e.toggle()}"
|
|
@@ -2113,17 +2113,17 @@
|
|
|
2113
2113
|
<${e}-filter
|
|
2114
2114
|
label="${e=>e.UI_LABEL}"
|
|
2115
2115
|
target="${(e,t)=>{var i;return null===(i=t.parent)||void 0===i?void 0:i.target}}"
|
|
2116
|
-
type="${e=>
|
|
2116
|
+
type="${e=>sa(e.TYPE)}"
|
|
2117
2117
|
fieldName="${e=>e.NAME}"
|
|
2118
2118
|
enumOptions="${e=>e.VALID_VALUES}"
|
|
2119
2119
|
></${e}-filter>
|
|
2120
2120
|
`)}
|
|
2121
2121
|
</div>
|
|
2122
2122
|
</div>
|
|
2123
|
-
`,
|
|
2124
|
-
${e=>e.ready?
|
|
2125
|
-
`,
|
|
2126
|
-
${t&&`@media only screen and ${
|
|
2123
|
+
`,la=l.html`
|
|
2124
|
+
${e=>e.ready?ra(T(e)):aa}
|
|
2125
|
+
`,da=5;class ca extends a.FoundationElement{constructor(){super(...arguments),this.columns=da,this.ready=!1,this.collapsed=!0}connectedCallback(){super.connectedCallback(),this.init()}initLabels(){var e,t,i,o;let n=!1,s=[];(null===(e=null==this?void 0:this.labels)||void 0===e?void 0:e.length)&&(s=null===(t=this.labels.split(","))||void 0===t?void 0:t.map(e=>e.trim()),n=(null===(i=this.fields)||void 0===i?void 0:i.length)===(null==s?void 0:s.length));for(let e=0;e<((null===(o=this.fields)||void 0===o?void 0:o.length)||0);e+=1){const t=n?s[e]:this.camelCasePreserveWhitespace(this.fields[e].NAME.replace(/_/g," "));this.fields[e].UI_LABEL=t}}camelCasePreserveWhitespace(e){return e.split(" ").map(e=>(0,oa.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=>Je.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],ca.prototype,"resource",void 0),(0,C.Cg)([l.attr],ca.prototype,"only",void 0),(0,C.Cg)([l.attr],ca.prototype,"labels",void 0),(0,C.Cg)([l.attr],ca.prototype,"target",void 0),(0,C.Cg)([l.attr],ca.prototype,"columns",void 0),(0,C.Cg)([l.observable],ca.prototype,"ready",void 0),(0,C.Cg)([l.observable],ca.prototype,"fields",void 0),(0,C.Cg)([oi.dm],ca.prototype,"connect",void 0),(0,C.Cg)([l.observable],ca.prototype,"collapsed",void 0);const ua=ca.compose({baseName:"filter-bar",template:la,styles:na});var ha;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(ha||(ha={}));const pa=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2126
|
+
${t&&`@media only screen and ${ha[e]} {`}
|
|
2127
2127
|
:host(.spacing${t}-1x) slot {
|
|
2128
2128
|
gap: calc(var(--design-unit) * 2px);
|
|
2129
2129
|
}
|
|
@@ -2240,7 +2240,7 @@
|
|
|
2240
2240
|
align-content: space-evenly;
|
|
2241
2241
|
}
|
|
2242
2242
|
${t&&"}"}
|
|
2243
|
-
`},
|
|
2243
|
+
`},ma=l.css`
|
|
2244
2244
|
:host {
|
|
2245
2245
|
width: 100%;
|
|
2246
2246
|
height: 100%;
|
|
@@ -2252,17 +2252,17 @@
|
|
|
2252
2252
|
display: flex;
|
|
2253
2253
|
}
|
|
2254
2254
|
|
|
2255
|
-
${
|
|
2256
|
-
${
|
|
2257
|
-
${
|
|
2258
|
-
${
|
|
2259
|
-
`,
|
|
2255
|
+
${pa()}
|
|
2256
|
+
${pa("lg")}
|
|
2257
|
+
${pa("md")}
|
|
2258
|
+
${pa("sm")}
|
|
2259
|
+
`,ga=l.html`
|
|
2260
2260
|
<template>
|
|
2261
2261
|
<slot></slot>
|
|
2262
2262
|
</template>
|
|
2263
|
-
`,
|
|
2263
|
+
`,va=void 0,fa={};class ba extends a.FoundationElement{}const ya=ba.compose(Object.assign({baseName:"flex-layout",styles:ma,template:ga,shadowOptions:va},fa)),wa=(e,t)=>l.css`
|
|
2264
2264
|
${(0,r.flipperStyles)(e,t)}
|
|
2265
|
-
`,
|
|
2265
|
+
`,Ca=(e,t)=>(0,a.flipperTemplate)(e,t);class xa extends r.Flipper{}const $a=void 0,Sa={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 '},Ea=xa.compose(Object.assign({baseName:"flipper",template:Ca,styles:wa,shadowOptions:$a},Sa)),Oa=225,Ta=l.css`
|
|
2266
2266
|
/* Host */
|
|
2267
2267
|
:host {
|
|
2268
2268
|
display: inline-block;
|
|
@@ -2288,8 +2288,8 @@
|
|
|
2288
2288
|
position: absolute;
|
|
2289
2289
|
/* stylelint-disable-next-line function-name-case */
|
|
2290
2290
|
transition:
|
|
2291
|
-
transform ${
|
|
2292
|
-
width ${
|
|
2291
|
+
transform ${Oa.toString()}ms ease-in,
|
|
2292
|
+
width ${Oa.toString()}ms ease-in-out;
|
|
2293
2293
|
width: var(--flyout-width, 20%);
|
|
2294
2294
|
z-index: 2001;
|
|
2295
2295
|
}
|
|
@@ -2348,7 +2348,7 @@
|
|
|
2348
2348
|
opacity: 50%;
|
|
2349
2349
|
position: absolute;
|
|
2350
2350
|
/* stylelint-disable-next-line function-name-case */
|
|
2351
|
-
transition: opacity ${
|
|
2351
|
+
transition: opacity ${Oa.toString()}ms linear;
|
|
2352
2352
|
width: 100%;
|
|
2353
2353
|
z-index: 2000;
|
|
2354
2354
|
}
|
|
@@ -2356,7 +2356,7 @@
|
|
|
2356
2356
|
:host([visuallyhidden]) div.background {
|
|
2357
2357
|
opacity: 0%;
|
|
2358
2358
|
}
|
|
2359
|
-
`,
|
|
2359
|
+
`,ka=e=>l.html`
|
|
2360
2360
|
<div ?closed=${e=>e.closed} ?visuallyhidden=${e=>e.visuallyhidden}>
|
|
2361
2361
|
<div class="container">
|
|
2362
2362
|
<div class="background" part="background" @click=${e=>e.closeFlyout()}></div>
|
|
@@ -2380,10 +2380,10 @@
|
|
|
2380
2380
|
</div>
|
|
2381
2381
|
</div>
|
|
2382
2382
|
</div>
|
|
2383
|
-
`,
|
|
2384
|
-
${e=>
|
|
2385
|
-
`;class
|
|
2386
|
-
${t&&`@media only screen and ${
|
|
2383
|
+
`,Ia=l.html`
|
|
2384
|
+
${e=>ka(T(e))}
|
|
2385
|
+
`;class Da extends a.FoundationElement{constructor(){super(...arguments),this.position="right",this.flyoutWidth="20%",this.displayHeader=!0,this.closed=!0,this.visuallyhidden=!0}flyoutWidthChanged(){this.isConnected&&null!=this.flyoutWidth&&this.style.setProperty("--flyout-width",this.flyoutWidth)}closedChanged(){this.closed||(setTimeout(()=>this.visuallyhidden=!1,1),this.focusExit())}connectedCallback(){super.connectedCallback(),null!=this.flyoutWidth&&this.style.setProperty("--flyout-width",this.flyoutWidth)}closeFlyout(){this.visuallyhidden=!0}closingFinished(){this.visuallyhidden&&(this.closed=!0,this.$emit("closed"))}focusExit(){this.exit.focus()}}(0,C.Cg)([l.attr],Da.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({attribute:"flyout-width"})],Da.prototype,"flyoutWidth",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Da.prototype,"displayHeader",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Da.prototype,"closed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Da.prototype,"visuallyhidden",void 0);const Aa=void 0,Ra={},La=Da.compose(Object.assign({baseName:"flyout",styles:Ta,template:Ia,shadowOptions:Aa},Ra));var Na;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(Na||(Na={}));const Fa=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2386
|
+
${t&&`@media only screen and ${Na[e]} {`}
|
|
2387
2387
|
:host(.spacing${t}-1x) slot {
|
|
2388
2388
|
gap: calc(var(--design-unit) * 2px);
|
|
2389
2389
|
}
|
|
@@ -2468,32 +2468,32 @@
|
|
|
2468
2468
|
place-items: stretch;
|
|
2469
2469
|
}
|
|
2470
2470
|
${t&&"}"}
|
|
2471
|
-
`},
|
|
2471
|
+
`},Ma=l.css`
|
|
2472
2472
|
slot {
|
|
2473
2473
|
width: 100%;
|
|
2474
2474
|
height: 100%;
|
|
2475
2475
|
display: grid;
|
|
2476
2476
|
}
|
|
2477
2477
|
|
|
2478
|
-
${
|
|
2479
|
-
${
|
|
2480
|
-
${
|
|
2481
|
-
${
|
|
2482
|
-
`,
|
|
2478
|
+
${Fa()}
|
|
2479
|
+
${Fa("lg")}
|
|
2480
|
+
${Fa("md")}
|
|
2481
|
+
${Fa("sm")}
|
|
2482
|
+
`,_a=l.html`
|
|
2483
2483
|
<template>
|
|
2484
2484
|
<slot></slot>
|
|
2485
2485
|
</template>
|
|
2486
|
-
`,
|
|
2486
|
+
`,Ha=void 0,za={};class Pa{constructor(e,t,i,o="1fr",n="1fr"){this.listenerCache=new WeakMap,this.query=window.matchMedia(e);const s=t&&l.cssPartial`grid-template-columns: repeat(${t}, ${o});`,a=i&&l.cssPartial`grid-template-rows: repeat(${i}, ${n});`;this.styles=l.css`
|
|
2487
2487
|
slot {
|
|
2488
|
-
${s||""}
|
|
2489
2488
|
${a||""}
|
|
2489
|
+
${s||""}
|
|
2490
2490
|
}
|
|
2491
|
-
`}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
|
|
2491
|
+
`}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 Ua extends a.FoundationElement{constructor(){super(...arguments),this.behaviors=[]}connectedCallback(){super.connectedCallback(),this.behaviors=Object.keys(Na).map(e=>{if(this[`col-${e}-count`]||this[`row-${e}-count`])return new Pa(Na[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`
|
|
2492
2492
|
slot {
|
|
2493
2493
|
${e||""}
|
|
2494
2494
|
${t||""}
|
|
2495
2495
|
}
|
|
2496
|
-
`,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],
|
|
2496
|
+
`,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],Ua.prototype,"col-count",void 0),(0,C.Cg)([l.attr],Ua.prototype,"col-width",void 0),(0,C.Cg)([l.attr],Ua.prototype,"col-lg-count",void 0),(0,C.Cg)([l.attr],Ua.prototype,"col-lg-width",void 0),(0,C.Cg)([l.attr],Ua.prototype,"col-md-count",void 0),(0,C.Cg)([l.attr],Ua.prototype,"col-md-width",void 0),(0,C.Cg)([l.attr],Ua.prototype,"col-sm-count",void 0),(0,C.Cg)([l.attr],Ua.prototype,"col-sm-width",void 0),(0,C.Cg)([l.attr],Ua.prototype,"row-count",void 0),(0,C.Cg)([l.attr],Ua.prototype,"row-height",void 0),(0,C.Cg)([l.attr],Ua.prototype,"row-lg-count",void 0),(0,C.Cg)([l.attr],Ua.prototype,"row-lg-height",void 0),(0,C.Cg)([l.attr],Ua.prototype,"row-md-count",void 0),(0,C.Cg)([l.attr],Ua.prototype,"row-md-height",void 0),(0,C.Cg)([l.attr],Ua.prototype,"row-sm-count",void 0),(0,C.Cg)([l.attr],Ua.prototype,"row-sm-height",void 0);const Ba=Ua.compose(Object.assign({baseName:"grid-layout",styles:Ma,template:_a,shadowOptions:Ha},za)),ja=l.html`
|
|
2497
2497
|
<template>
|
|
2498
2498
|
<style>
|
|
2499
2499
|
:host {
|
|
@@ -2522,9 +2522,9 @@
|
|
|
2522
2522
|
</style>
|
|
2523
2523
|
<slot></slot>
|
|
2524
2524
|
</template>
|
|
2525
|
-
`,
|
|
2525
|
+
`,Ga=void 0,Va={};class Ya extends a.FoundationElement{setGridItemProperties(e,t,i,o){if(t&&e&&i&&o){return`grid-row: ${0===t||0===o?"auto":`${t} / ${Number(t)+Number(o)}`}; grid-column: ${0===e||0===i?"auto":`${e} / ${Number(e)+Number(i)}`}`}}}(0,C.Cg)([(0,l.attr)({attribute:"col-number"})],Ya.prototype,"colNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-sm-number"})],Ya.prototype,"colSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-md-number"})],Ya.prototype,"colMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-lg-number"})],Ya.prototype,"colLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-number"})],Ya.prototype,"rowNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-sm-number"})],Ya.prototype,"rowSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-md-number"})],Ya.prototype,"rowMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-lg-number"})],Ya.prototype,"rowLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width"})],Ya.prototype,"width",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-sm"})],Ya.prototype,"widthSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-md"})],Ya.prototype,"widthMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-lg"})],Ya.prototype,"widthLg",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height"})],Ya.prototype,"height",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-sm"})],Ya.prototype,"heightSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-md"})],Ya.prototype,"heightMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-lg"})],Ya.prototype,"heightLg",void 0);const Wa=Ya.compose(Object.assign({baseName:"grid-layout-item",template:ja,shadowOptions:Ga},Va)),qa=(e,t)=>l.css`
|
|
2526
2526
|
${(0,r.horizontalScrollStyles)(e,t)}
|
|
2527
|
-
`,
|
|
2527
|
+
`,Ka=(e,t)=>(0,a.horizontalScrollTemplate)(e,t);class Xa extends r.HorizontalScroll{}const Ja={delegatesFocus:!0,mode:"open"},Qa={nextFlipper:l.html`
|
|
2528
2528
|
<foundation-flipper
|
|
2529
2529
|
@click="${e=>e.scrollToNext()}"
|
|
2530
2530
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
@@ -2535,8 +2535,8 @@
|
|
|
2535
2535
|
direction="previous"
|
|
2536
2536
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
2537
2537
|
></foundation-flipper>
|
|
2538
|
-
`},
|
|
2539
|
-
${
|
|
2538
|
+
`},Za=Xa.compose(Object.assign({baseName:"horizontal-scroll",template:Ka,styles:qa,shadowOptions:Ja},Qa));var er=i(70623),tr=i(32808),ir=i(10463),or=i(19037),nr=i(22984);const sr=()=>(er.Yv.add(nr.X7I,or.C91,ir.Cvc),er.tT.css()),ar=(e,t)=>l.css`
|
|
2539
|
+
${sr()}
|
|
2540
2540
|
|
|
2541
2541
|
.fa-stack-1x {
|
|
2542
2542
|
font-size: 1em;
|
|
@@ -2629,8 +2629,8 @@
|
|
|
2629
2629
|
`)}
|
|
2630
2630
|
</template>
|
|
2631
2631
|
`,lr=l.html`
|
|
2632
|
-
${e=>rr(
|
|
2633
|
-
`,dr={mode:"open",delegatesFocus:!0},cr={};var ur;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(ur||(ur={}));const hr="1x",pr=["2xs","xs","sm","lg","xl","2xl",hr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class mr extends
|
|
2632
|
+
${e=>rr(T(e))}
|
|
2633
|
+
`,dr={mode:"open",delegatesFocus:!0},cr={};var ur;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(ur||(ur={}));const hr="1x",pr=["2xs","xs","sm","lg","xl","2xl",hr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class mr extends a.FoundationElement{constructor(){super(...arguments),this.isError=!1,this.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,er.wu)({prefix:ur[this.variant],iconName:this.name}),t=(0,er.Kk)(e);t&&t.node&&(this.iElement.innerHTML="",Array.from(t.node).map(e=>this.iElement.appendChild(e)))}}(0,C.Cg)([l.observable],mr.prototype,"iElement",void 0),(0,C.Cg)([tr.k],mr.prototype,"uuid",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tooltip-id"})],mr.prototype,"tooltipId",void 0),(0,C.Cg)([l.attr],mr.prototype,"tooltip",void 0),(0,C.Cg)([(0,l.attr)({attribute:"error",mode:"boolean"})],mr.prototype,"isError",void 0),(0,C.Cg)([l.attr],mr.prototype,"name",void 0),(0,C.Cg)([l.attr],mr.prototype,"size",void 0),(0,C.Cg)([l.attr],mr.prototype,"variant",void 0);const gr=mr.compose(Object.assign({baseName:"icon",template:lr,styles:ar,shadowOptions:dr},cr)),vr=(e,t)=>l.css`
|
|
2634
2634
|
${(0,r.listboxStyles)(e,t)}
|
|
2635
2635
|
|
|
2636
2636
|
:host {
|
|
@@ -2641,11 +2641,11 @@
|
|
|
2641
2641
|
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);
|
|
2642
2642
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
2643
2643
|
}
|
|
2644
|
-
`,fr=(e,t)=>(0,
|
|
2644
|
+
`,fr=(e,t)=>(0,a.listboxTemplate)(e,t);class br extends r.Listbox{}const yr=void 0,wr={},Cr=br.compose(Object.assign({baseName:"listbox",template:fr,styles:vr,shadowOptions:yr},wr)),xr=(e,t)=>l.css`
|
|
2645
2645
|
${(0,r.optionStyles)(e,t)}
|
|
2646
|
-
`,$r=(e,t)=>(0,
|
|
2646
|
+
`,$r=(e,t)=>(0,a.listboxOptionTemplate)(e,t);class Sr extends r.ListboxOption{}const Er=void 0,Or={},Tr=Sr.compose(Object.assign({baseName:"option",template:$r,styles:xr,shadowOptions:Er},Or)),kr=(e,t)=>l.css`
|
|
2647
2647
|
${(0,r.menuStyles)(e,t)}
|
|
2648
|
-
`,Ir=(e,t)=>(0,
|
|
2648
|
+
`,Ir=(e,t)=>(0,a.menuTemplate)(e,t);class Dr extends r.Menu{}const Ar=void 0,Rr={},Lr=Dr.compose(Object.assign({baseName:"menu",template:Ir,styles:kr,shadowOptions:Ar},Rr)),Nr=(e,t)=>l.css`
|
|
2649
2649
|
${(0,r.menuItemStyles)(e,t)}
|
|
2650
2650
|
|
|
2651
2651
|
:host, :host(.indent-0[aria-haspopup='menu']) {
|
|
@@ -2659,7 +2659,7 @@
|
|
|
2659
2659
|
height: auto;
|
|
2660
2660
|
width: auto;
|
|
2661
2661
|
}
|
|
2662
|
-
`,Fr=(e,t)=>(0,
|
|
2662
|
+
`,Fr=(e,t)=>(0,a.menuItemTemplate)(e,t);class Mr extends r.MenuItem{connectedCallback(){super.connectedCallback(),this.addEventListener("click",()=>this.$emit("onMenuClick"))}}const _r=void 0,Hr={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 '},zr=Mr.compose(Object.assign({baseName:"menu-item",template:Fr,styles:Nr,shadowOptions:_r},Hr)),Pr=l.css`
|
|
2663
2663
|
${dn}
|
|
2664
2664
|
|
|
2665
2665
|
:host([draggable])::part(top) {
|
|
@@ -2667,7 +2667,7 @@
|
|
|
2667
2667
|
}
|
|
2668
2668
|
`,Ur=l.html`
|
|
2669
2669
|
${pn}
|
|
2670
|
-
`,Br={mode:"open",delegatesFocus:!0},
|
|
2670
|
+
`,Br={mode:"open",delegatesFocus:!0},jr={};class Gr extends vn{constructor(){super(...arguments),this.isDragging=!1,this.offsetX=0,this.offsetY=0,this.modalWidth=0,this.modalHeight=0,this.onMouseDownBound=null,this.onMouseMoveBound=null,this.onMouseUpBound=null,this.draggable=!1,this.onCloseCallback=()=>{this.draggable&&this.mainElement instanceof HTMLElement&&Object.assign(this.mainElement.style,{position:"",left:"",top:"",margin:""})}}draggableChanged(e,t){var i,o;t?(this.onMouseDownBound=this.onMouseDown.bind(this),null===(i=this.mainElement)||void 0===i||i.addEventListener("mousedown",this.onMouseDownBound)):(this.onMouseDownBound&&(null===(o=this.mainElement)||void 0===o||o.removeEventListener("mousedown",this.onMouseDownBound),this.onMouseDownBound=null),this.removeDraggableEventListeners())}show(){var e,t;null===(e=this.onShowCallback)||void 0===e||e.call(this),null===(t=this.mainElement)||void 0===t||t.showModal()}connectedCallback(){var e;super.connectedCallback(),this.draggable&&(this.onMouseDownBound=this.onMouseDown.bind(this),null===(e=this.mainElement)||void 0===e||e.addEventListener("mousedown",this.onMouseDownBound))}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeDraggableEventListeners(),this.onMouseDownBound&&(null===(e=this.mainElement)||void 0===e||e.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.offsetX=e.clientX-t.left,this.offsetY=e.clientY-t.top,this.modalWidth=t.width,this.modalHeight=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.offsetX,n=e.clientY-this.offsetY;o=Math.max(0,Math.min(t-this.modalWidth,o)),n=Math.max(0,Math.min(i-this.modalHeight,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)}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gr.prototype,"draggable",void 0);const Vr=Gr.compose(Object.assign({baseName:"modal",template:Ur,styles:Pr,shadowOptions:Br},jr)),Yr=230,Wr=l.css`
|
|
2671
2671
|
:host {
|
|
2672
2672
|
--scrollbar-width: 12px;
|
|
2673
2673
|
--scrollbar-thumb-width: 8px;
|
|
@@ -2811,7 +2811,7 @@
|
|
|
2811
2811
|
|
|
2812
2812
|
.visible {
|
|
2813
2813
|
visibility: visible;
|
|
2814
|
-
max-height: var(--custom-max-height, ${
|
|
2814
|
+
max-height: var(--custom-max-height, ${Yr.toString()}px);
|
|
2815
2815
|
overflow: hidden;
|
|
2816
2816
|
}
|
|
2817
2817
|
|
|
@@ -2908,7 +2908,7 @@
|
|
|
2908
2908
|
resize: none;
|
|
2909
2909
|
overflow: hidden;
|
|
2910
2910
|
}
|
|
2911
|
-
`;let qr=class extends ri{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||
|
|
2911
|
+
`;let qr=class extends ri{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||Je.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){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:"value-field"})],qr.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],qr.prototype,"labelField",void 0),qr=(0,C.Cg)([(0,l.customElement)({name:"multiselect-datasource"})],qr);const Kr=(e="foundation")=>l.html`
|
|
2912
2912
|
<label
|
|
2913
2913
|
part="label"
|
|
2914
2914
|
for="display-field"
|
|
@@ -2916,7 +2916,7 @@
|
|
|
2916
2916
|
>
|
|
2917
2917
|
<slot
|
|
2918
2918
|
name="label"
|
|
2919
|
-
${(0,l.slotted)({property:"defaultSlottedNodes",filter:
|
|
2919
|
+
${(0,l.slotted)({property:"defaultSlottedNodes",filter:a.whitespaceFilter})}
|
|
2920
2920
|
></slot>
|
|
2921
2921
|
</label>
|
|
2922
2922
|
<div class="root" part="root" @keydown="${(e,t)=>e.keydownHandler(t.event)}">
|
|
@@ -2989,7 +2989,7 @@
|
|
|
2989
2989
|
>
|
|
2990
2990
|
<slot
|
|
2991
2991
|
name="options-header"
|
|
2992
|
-
${(0,l.slotted)({property:"optionsHeaderSlottedNodes",filter:
|
|
2992
|
+
${(0,l.slotted)({property:"optionsHeaderSlottedNodes",filter:a.whitespaceFilter})}
|
|
2993
2993
|
></slot>
|
|
2994
2994
|
</li>
|
|
2995
2995
|
${(0,l.repeat)(e=>e.filteredAvailableOptions,l.html`
|
|
@@ -3019,7 +3019,7 @@
|
|
|
3019
3019
|
></slot>
|
|
3020
3020
|
`,Xr=l.html`
|
|
3021
3021
|
${Kr()}
|
|
3022
|
-
`,
|
|
3022
|
+
`,Jr=void 0,Qr={};class Zr extends a.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=Nt.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=Xt()(this.asyncSetFilter,t)}openChanged(e,t){var i,o,n,s;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.arrowIcon)||void 0===i||i.classList.add("flipped"),null===(o=this.multiselectDropdown)||void 0===o||o.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(n=this.arrowIcon)||void 0===n||n.classList.remove("flipped"),null===(s=this.multiselectDropdown)||void 0===s||s.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Nt.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`
|
|
3023
3023
|
${"string"==typeof e?l.html`
|
|
3024
3024
|
<span part="option-label">${()=>t.getItemLabel(e)}</span>
|
|
3025
3025
|
`:l.html`
|
|
@@ -3031,7 +3031,7 @@
|
|
|
3031
3031
|
${()=>t.getItemLabel(e)}
|
|
3032
3032
|
</span>
|
|
3033
3033
|
`}
|
|
3034
|
-
`}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<
|
|
3034
|
+
`}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<Yr&&o>n?Nt.ABOVE:Nt.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===Nt.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===Nt.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?li(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,Je.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],Zr.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Zr.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"all",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"allSelected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"creatable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"async",void 0),(0,C.Cg)([l.attr],Zr.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"resizable",void 0),(0,C.Cg)([l.attr],Zr.prototype,"tabindex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"filter-by-contains"})],Zr.prototype,"filterByContains",void 0),(0,C.Cg)([l.observable],Zr.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Zr.prototype,"slottedDatasource",void 0),(0,C.Cg)([l.observable],Zr.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Zr.prototype,"loading",void 0),(0,C.Cg)([l.observable],Zr.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Zr.prototype,"open",void 0),(0,C.Cg)([l.observable],Zr.prototype,"options",void 0),(0,C.Cg)([l.observable],Zr.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Zr.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Zr.prototype,"scrollContainer",void 0),(0,C.Cg)([l.attr],Zr.prototype,"position",void 0),(0,C.Cg)([l.observable],Zr.prototype,"onAllSelectedCallback",void 0),(0,C.Cg)([l.observable],Zr.prototype,"itemRenderer",void 0),(0,C.Cg)([l.volatile],Zr.prototype,"getDisplayValue",null),(0,C.Cg)([l.volatile],Zr.prototype,"getPlaceholder",null),(0,C.Cg)([l.volatile],Zr.prototype,"isAllOptionsDisabled",null),(0,C.Cg)([l.volatile],Zr.prototype,"showCreatable",null),(0,C.Cg)([l.observable],Zr.prototype,"optionsHeaderSlottedNodes",void 0);const el=Zr.compose(Object.assign({baseName:"multiselect",template:Xr,styles:Wr,shadowOptions:Jr},Qr)),tl={k:1e3,m:1e6,b:1e9},il=/^(.*?)([kmb])$/i;class ol{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(il),i=t?tl[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 nl(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 sl=l.css`
|
|
3035
3035
|
.label-hidden {
|
|
3036
3036
|
margin: 0;
|
|
3037
3037
|
}
|
|
@@ -3091,7 +3091,7 @@
|
|
|
3091
3091
|
:host(.has-prefix.has-suffix) .control-field .control {
|
|
3092
3092
|
border-radius: 0;
|
|
3093
3093
|
}
|
|
3094
|
-
`,
|
|
3094
|
+
`,al=(e,t)=>l.css`
|
|
3095
3095
|
${(0,r.numberFieldStyles)(e,t)}
|
|
3096
3096
|
::part(label) {
|
|
3097
3097
|
color: var(--neutral-foreground-rest);
|
|
@@ -3122,7 +3122,7 @@
|
|
|
3122
3122
|
margin-inline-end: unset;
|
|
3123
3123
|
}
|
|
3124
3124
|
|
|
3125
|
-
${
|
|
3125
|
+
${sl}
|
|
3126
3126
|
`,rl=(e,t)=>l.html`
|
|
3127
3127
|
<template
|
|
3128
3128
|
class="${e=>[e.readOnly?"readonly":"",e.prefix?"has-prefix":"",e.suffix?"has-suffix":""].filter(Boolean).join(" ")}"
|
|
@@ -3135,7 +3135,7 @@
|
|
|
3135
3135
|
<slot ${(0,l.slotted)("defaultSlottedNodes")}></slot>
|
|
3136
3136
|
</label>
|
|
3137
3137
|
<div class="root" part="root">
|
|
3138
|
-
${(0,
|
|
3138
|
+
${(0,a.startSlotTemplate)(e,t)}
|
|
3139
3139
|
<div class="control-field">
|
|
3140
3140
|
${(0,l.when)(e=>e.prefix,l.html`
|
|
3141
3141
|
<span
|
|
@@ -3213,10 +3213,10 @@
|
|
|
3213
3213
|
</div>
|
|
3214
3214
|
</div>
|
|
3215
3215
|
`)}
|
|
3216
|
-
${(0,
|
|
3216
|
+
${(0,a.endSlotTemplate)(e,t)}
|
|
3217
3217
|
</div>
|
|
3218
3218
|
</template>
|
|
3219
|
-
`,ll=9,dl=(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)||"."}},cl=(e,t)=>{const{decimalSeparator:i}=dl(0,t);return"."===i?e:e.replace(/\./g,i)},ul=(e,t,i)=>Intl.NumberFormat(t,i).format(Number(e)),hl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,
|
|
3219
|
+
`,ll=9,dl=(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)||"."}},cl=(e,t)=>{const{decimalSeparator:i}=dl(0,t);return"."===i?e:e.replace(/\./g,i)},ul=(e,t,i)=>Intl.NumberFormat(t,i).format(Number(e)),hl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,s=n?e.length-o-1:0,a=t.minimumFractionDigits,r=t.maximumFractionDigits;if(s>=a&&s<=r)return e;let l=e;if(s<a){n||(l=e+".");l+="0".repeat(a-s)}if(s>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},pl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;let a;if(i)a=((e,t)=>String(new ol(t).parse(String(e))))(n,t);else{const{decimalSeparator:e}=dl(0,t);if("."!==e){a=n.replace(new RegExp(`\\${e}`,"g"),".");const t=a.indexOf(".");-1!==t&&(a=a.substring(0,t))}else a=n}a=String(a);if(!/^-?\d*\.?\d+$/.test(a))return"";if(void 0!==s){if(a.replace(".","").replace(/^0+/,"").length>s){const e=a.indexOf(".");if(-1!==e){const t=a.substring(0,e),i=t.length;if(i>=s)return a.substring(0,s);{const o=s-i;return`${t}.${a.substring(e+1).substring(0,o)}`}}return a.substring(0,s)}}return a},ml=(e,t,i)=>((e,t,i)=>{const{decimalSeparator:o}=dl(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(`${n}(\\d*?)(0+)$`),a=e.match(s);if(a){const e=a[1],i=a[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,pl(e,t,void 0,i),t),gl=(e,t,i=!0,o,n,s)=>{let a=parseFloat(pl(e,t,i,s));return isNaN(a)?a="":(a=Math.min(a,null!=n?n:a),a=Math.max(a,null!=o?o:a)),String(a)},vl=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const s=Math.pow(10,-n);return parseFloat(s.toFixed(n))}};class fl extends(nl(r.NumberField)){constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?vl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))+1;if(a<=ll){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=ll?(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=gl(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?vl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))-1;if(a>=0){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=ll.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=gl(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 ol(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=ml(this.control.value,this.locale,this.maximumInputPrecision);this.value=hl(e,this.options),this.control&&(this.control.value=hl(cl(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=gl(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.control&&(this.control.value=this.withFormatting&&this.value?ul(this.value,this.locale,this.options):this.value)});const e=t;l.DOM.queueUpdate(()=>{this.control&&(""!==this.control.value&&""!==this.value?(this.control.value=cl(String(e),this.locale),this.value=this.withFormatting?ml(this.control.value,this.locale,this.maximumInputPrecision):this.control.value):this.control.value=e)})}}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=gl(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?hl(e,this.options):e),this.control.value=this.withFormatting&&this.value?ul(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],fl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],fl.prototype,"hideStep",void 0),(0,C.Cg)([l.attr],fl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],fl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],fl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],fl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],fl.prototype,"maximumInputPrecision",void 0);const bl={delegatesFocus:!0,mode:"open"},yl={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},wl=fl.compose(Object.assign({baseName:"number-field",template:rl,styles:al,shadowOptions:bl},yl)),Cl=(e,t)=>l.css`
|
|
3220
3220
|
:host {
|
|
3221
3221
|
display: block;
|
|
3222
3222
|
}
|
|
@@ -3247,19 +3247,19 @@
|
|
|
3247
3247
|
<slot></slot>
|
|
3248
3248
|
</div>
|
|
3249
3249
|
</template>
|
|
3250
|
-
`;class $l extends
|
|
3250
|
+
`;class $l extends a.ListboxOption{connectedCallback(){super.connectedCallback(),this.disabled=!0}}(0,C.Cg)([(0,l.attr)({attribute:"label"})],$l.prototype,"groupLabel",void 0);const Sl=$l.compose({baseName:"optgroup",template:xl,styles:Cl});var El=i(92277);var Ol=i(72154),Tl=i.n(Ol),kl=i(57565),Il=i.n(kl),Dl=i(13160),Al=i(24669),Rl=i(5709),Ll=i(45230);const Nl={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,oi.tn)(),i=yield t.getMoreColumns(e),o=Date.now(),n=i;return{isConnected:i.MESSAGE_TYPE===ei.Go.MORE_COLUMNS_ACK,lastUpdated:o,lastMessage:n}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:o}=t;(0,Ll.Ol)().sendForStream(e,i,o)}},Fl=a.DI.createInterface(e=>e.instance(Nl)),Ml="system-health-changed";var _l;const Hl=(0,Xe.createLogger)("network-monitor",{level:Xe.LogLevel.Info}),zl=Date.now(),Pl=(null===(_l=window.navigator)||void 0===_l?void 0:_l.userAgent)?Tl().parse(window.navigator.userAgent):void 0,Ul=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:Il()(e,void 0,2,t);class Bl{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>(0,C.sH)(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;Hl.info("Run health checks, triggered by",Ul(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const o=yield this.isOnlineCheck();o?Hl.debug(`Network connected at ${i}`):Hl.warn(`Network disconnected at ${i}`);const n=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),o),s=this.preFlightSocketChecks(n);if(s||Hl.debug("Socket pre-flight checks failed"),!o||!s){Hl.debug("Aborting remaining health checks");const e=[...this.resources].reduce((e,[t,i])=>{const n=e[i.resourceName];return n?(n.sourceRef=[...n.sourceRef,i.message.SOURCE_REF],e):Object.assign(Object.assign({},e),{[i.resourceName]:this.normaliseResourceHealth({name:i.resourceName,sourceRef:[i.message.SOURCE_REF],isConnected:i.isConnected,lastUpdated:i.lastUpdated},o)})},{});return this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:e,resourcesAllConnected:!1,socket:n}),void(this.isRunningChecks=!1)}let a=!0;const r=[];this.resources.forEach((e,t)=>{const{resourceName:o,message:n,functions:s}=e,{resourceChecks:l=this.config.resourceChecks,resourceDataLogon:d=this.config.resourceDataLogon}=s,{SOURCE_REF:c}=n;let u,h,p,m,g,v=!1;r.push((()=>(0,C.sH)(this,void 0,void 0,function*(){var n,s,r;try{Hl.debug(`Running health check against ${o}`);const e=yield Promise.race([l(c,t),(s=this.config.checkTimeout,r=()=>({isConnected:!1,lastUpdated:this.getNowTimestamp(),timeout:!0}),new Promise(e=>{setTimeout(()=>{e(r())},s)}))]);v=e.isConnected,u=e.lastUpdated,h=e.lastMessage,m=e.timeout}catch(e){v=!1,u=this.getNowTimestamp(),p=e,h=null!==(n=null==e?void 0:e.receivedMessage)&&void 0!==n?n:e}return g=(null==h?void 0:h.MESSAGE_TYPE)===ei.Go.MSG_NACK||(0,ei.z2)(h,Dl.v.NOT_FOUND),i=this.getFormattedTimestamp(null!=u?u:this.getNowTimestamp()),v?Hl.debug(`${o} is healthy at ${i}`):Hl.warn(`${o} is not healthy at ${i}`),h&&Hl.debug(`${o} messaged at ${i}`,Ul(h)),p&&Hl.error(`${o} errored at ${i}`,Ul(p)),m&&Hl.warn(`${o} timed out at ${i}`),g&&(Hl.error(`${o} issue, re-attempting data logon at ${i}`),d(e)),a&&(a=v),{name:o,sourceRef:[c],isConnected:v,lastUpdated:u,lastError:p}}))())});const l=(yield Promise.allSettled(r)).reduce((e,t)=>{if("fulfilled"===t.status){const i=e[t.value.name];return i?(i.sourceRef=[...i.sourceRef,...t.value.sourceRef],e):Object.assign(Object.assign({},e),{[t.value.name]:this.normaliseResourceHealth(t.value)})}return Hl.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});Hl.debug("Health checks complete"),this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:l,resourcesAllConnected:a,socket:n}),this.isRunningChecks=!1}),void 0!==this.config.logLevel&&(Hl.level=this.config.logLevel)}create(){this.resources?Hl.warn("NetworkMonitor already created. If this is intentional, please call NetworkMonitor.destroy first."):(this.addListeners(),this.resources=new Map,setTimeout(()=>{this.isReady=!0,this.synchroniseCheckInterval(),this.runAllChecks("NetworkMonitor.create()")},this.config.startDelay))}destroy(){this.removeListeners(),clearInterval(this.internalId),this.resources.clear(),this.resources=void 0,this.status=void 0,this.isReady=void 0}isOnlineCheck(){return Promise.resolve(navigator.onLine)}addResource(e,t){this.resources||this.create(),this.resources.set(e,t)}removeResource(e){this.resources.delete(e)}addListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.addEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.addEventListener(e,this.runAllChecks)),this.config.genesisConnectEvents.includes("stream")&&this.unsubscribableObservers.push(this.connectEvents.addStreamListener(({detail:e})=>{const{functions:t,message:i,resourceName:o,stream:n}=e;this.config.ignoredGenesisResources.includes(o)||this.addResource(n,{functions:t,message:i,resourceName:o})},({detail:e})=>{const{resourceName:t,stream:i}=e;this.config.ignoredGenesisResources.includes(t)||this.removeResource(i)},({detail:e})=>{var t;const{resourceName:i,stream:o,error:n}=e,s=null!==(t=n.receivedMessage)&&void 0!==t?t:n;let a="";(0,ei.z2)(s,Dl.v.NOT_FOUND)?a="Please check the resource is running.":(0,ei.z2)(s,Dl.v.FORBIDDEN)&&(a="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(o)),Hl.error(`${i} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,a,n)})),this.config.genesisConnectEvents.includes("commit")&&this.unsubscribableObservers.push(this.connectEvents.addCommitListener(e=>{this.config.ignoredGenesisResources.includes(e.detail.eventName)||this.runAllChecks(e)})),this.unsubscribableObservers.push(this.connectEvents.addMetadataListener(({detail:e})=>{const{resourceName:t,error:i}=e;i&&Hl.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?Hl.debug:Hl.warn)("Emitting 'system-health-changed' event",Ul(this.status)),null==i||i.dispatchEvent(new CustomEvent(Ml,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(Hl.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 Hl.debug("User requested report stability to Genesis."),Hl.info("Please attach this data to your Genesis Support request: \n",JSON.stringify(e,null,2)),!0})}normaliseResourceHealth(e,t=!0){var i;const o=!!t&&e.isConnected,n=null!==(i=e.lastUpdated)&&void 0!==i?i:this.getNowTimestamp();return Object.assign(Object.assign({},e),{isConnected:o,lastUpdated:n})}normaliseSerializedSocketStatus(e,t=!0){const i=!!t&&e.isConnected,o=!i;return Object.assign(Object.assign({},e),{isConnected:i,isDisconnected:o})}normaliseEventDetail(e){var t,i,o,n;const s=!!((null===(t=e.socket)||void 0===t?void 0:t.isConfigured)?e.isOnline&&(null===(i=e.socket)||void 0===i?void 0:i.isConnected)&&e.resourcesAllConnected:e.isOnline),a=null!==(o=e.lastUpdated)&&void 0!==o?o:this.getNowTimestamp(),r=null!==(n=e.nextUpdate)&&void 0!==n?n:this.getNextTimestamp(),l=e.isAuthenticated&&this.user?this.user.username:void 0,d=Object.assign(Object.assign({},e),{browserInformation:Pl,username:l,isHealthy:s,lastUpdated:a,nextUpdate:r,firstUpdated:zl,runAllChecks:()=>{Hl.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(d)});return d}preFlightSocketChecks(e){if(!e.isConfigured)return Hl.debug("Socket not configured"),!1;if(e.isReconnecting)return Hl.debug("Socket reconnecting"),!1;if(e.isConnecting)return Hl.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return Hl.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&Hl.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return Hl.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return(0,si.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)([Fl],Bl.prototype,"config",void 0),(0,C.Cg)([Rl.S5],Bl.prototype,"socketStatus",void 0),(0,C.Cg)([Al.a4],Bl.prototype,"connectEvents",void 0),(0,C.Cg)([El.KJ],Bl.prototype,"user",void 0),(0,C.Cg)([l.observable],Bl.prototype,"status",void 0);const jl=a.DI.createInterface(e=>e.singleton(Bl));var Gl=i(6526);const Vl=(e,t)=>l.css`
|
|
3251
3251
|
${(0,r.progressStyles)(e,t)}
|
|
3252
3252
|
:host {
|
|
3253
3253
|
height: calc(var(--design-unit) * 2px);
|
|
3254
3254
|
}
|
|
3255
|
-
`,
|
|
3255
|
+
`,Yl=(e,t)=>(0,a.progressTemplate)(e,t);class Wl extends r.Progress{}const ql=void 0,Kl={indeterminateIndicator1:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>',indeterminateIndicator2:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>'},Xl=Wl.compose(Object.assign({baseName:"progress",template:Yl,styles:Vl,shadowOptions:ql},Kl));function Jl(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 Ql=(e,t="foundation",i,s)=>{e&&Mo(null!=i?i:o,null!=s?s:n,e);return Jl(a.DesignSystem.getOrCreate(e).withPrefix(t))},Zl="app",ed="component";Ql().register(Xl({prefix:"next-update"}));class td extends a.FoundationElement{constructor(){super(...arguments),this.timeTillNextUpdate={totalMs:1e4,remainMs:1e4,remainPercent:100},this.mode=Zl,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 Gl.Is.ArrowUp:e.ctrlKey&&e.altKey&&!this.isOpen&&(this.onOpen(!0),e.preventDefault());break;case Gl.Is.ArrowDown:e.ctrlKey&&e.altKey&&this.isOpen&&(this.onClose(),e.preventDefault());break;case Gl.F9:this.isOpen&&(this.onDismiss(),e.preventDefault())}}}isOpenChanged(){this.updateTemplateClassNames()}isDismissedChanged(){this.updateTemplateClassNames()}modeChanged(){this.$fastController.isConnected&&this.mode===ed&&Je.warn("SystemHealthOverlay has support for app overlays only right now.")}logLevelChanged(){Hl.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(Ml,this.onSystemHealthChanged,!0),document.addEventListener("keydown",this.onDocumentKeydown)}removeEventListeners(){this.eventBridge().removeEventListener(Ml,this.onSystemHealthChanged,!0),document.removeEventListener("keydown",this.onDocumentKeydown)}static getCheckmarkTemplate(e){return e?l.html`
|
|
3256
3256
|
<span class="checkmark">✔</span>
|
|
3257
3257
|
`:l.html`
|
|
3258
3258
|
<span class="checkmark">✘</span>
|
|
3259
|
-
`}}(0,C.Cg)([Fl],td.prototype,"config",void 0),(0,C.Cg)([
|
|
3259
|
+
`}}(0,C.Cg)([Fl],td.prototype,"config",void 0),(0,C.Cg)([jl],td.prototype,"networkMonitor",void 0),(0,C.Cg)([l.observable],td.prototype,"resourceList",void 0),(0,C.Cg)([l.observable],td.prototype,"isOpen",void 0),(0,C.Cg)([l.observable],td.prototype,"wasOpenedByUser",void 0),(0,C.Cg)([l.observable],td.prototype,"isDismissed",void 0),(0,C.Cg)([l.observable],td.prototype,"templateClassNames",void 0),(0,C.Cg)([l.observable],td.prototype,"containerClassNames",void 0),(0,C.Cg)([l.observable],td.prototype,"isOnlineClassNames",void 0),(0,C.Cg)([l.observable],td.prototype,"isHealthyClassNames",void 0),(0,C.Cg)([l.observable],td.prototype,"isSocketHealthyClassNames",void 0),(0,C.Cg)([l.observable],td.prototype,"resourcesAllConnectedClassNames",void 0),(0,C.Cg)([l.observable],td.prototype,"timeTillNextUpdate",void 0),(0,C.Cg)([l.observable],td.prototype,"saveDataCallback",void 0),(0,C.Cg)([l.attr],td.prototype,"mode",void 0),(0,C.Cg)([(0,l.attr)({attribute:"log-level",converter:l.nullableNumberConverter})],td.prototype,"logLevel",void 0),(0,C.Cg)([l.observable],td.prototype,"status",void 0);const id=(e,t)=>l.html`
|
|
3260
3260
|
<template class="${e=>e.templateClassNames}">
|
|
3261
3261
|
<header class="${e=>e.isHealthyClassNames}" part="header">
|
|
3262
|
-
<h1>System ${e=>(0,
|
|
3262
|
+
<h1>System ${e=>(0,oa.fL)(e.isHealthyClassNames)}</h1>
|
|
3263
3263
|
${(0,l.when)(e=>!e.status.isHealthy,l.html`
|
|
3264
3264
|
<span class="data-warning">Data Validity Unknown</span>
|
|
3265
3265
|
`)}
|
|
@@ -3288,7 +3288,7 @@
|
|
|
3288
3288
|
</header>
|
|
3289
3289
|
<div class="container ${e=>e.containerClassNames}" part="container">
|
|
3290
3290
|
<section class="network-section ${e=>e.isOnlineClassNames}" part="network-section">
|
|
3291
|
-
<h2>Network ${e=>(0,
|
|
3291
|
+
<h2>Network ${e=>(0,oa.fL)(e.status.isOnline?"online":"offline")}</h2>
|
|
3292
3292
|
<dl class="resource-list">
|
|
3293
3293
|
<div class="resource ${e=>e.isOnlineClassNames}">
|
|
3294
3294
|
<div class="attributes">
|
|
@@ -3308,11 +3308,11 @@
|
|
|
3308
3308
|
`)}
|
|
3309
3309
|
<div class="platform-type">
|
|
3310
3310
|
<dt>Platform Type</dt>
|
|
3311
|
-
<dd>${e=>{var t;return(0,
|
|
3311
|
+
<dd>${e=>{var t;return(0,oa.fL)(null===(t=e.status.browserInformation.platform)||void 0===t?void 0:t.type)}}</dd>
|
|
3312
3312
|
</div>
|
|
3313
3313
|
<div class="os-name">
|
|
3314
3314
|
<dt>OS Name</dt>
|
|
3315
|
-
<dd>${e=>{var t;return(0,
|
|
3315
|
+
<dd>${e=>{var t;return(0,oa.fL)(null===(t=e.status.browserInformation.os)||void 0===t?void 0:t.name)}}</dd>
|
|
3316
3316
|
</div>
|
|
3317
3317
|
<div class="os-version">
|
|
3318
3318
|
<dt>OS Version</dt>
|
|
@@ -3322,7 +3322,7 @@
|
|
|
3322
3322
|
<div class="attributes">
|
|
3323
3323
|
<div class="browser-name">
|
|
3324
3324
|
<dt>Browser Name</dt>
|
|
3325
|
-
<dd>${e=>{var t;return(0,
|
|
3325
|
+
<dd>${e=>{var t;return(0,oa.fL)(null===(t=e.status.browserInformation.browser)||void 0===t?void 0:t.name)}}</dd>
|
|
3326
3326
|
</div>
|
|
3327
3327
|
<div class="browser-version">
|
|
3328
3328
|
<dt>Browser Version</dt>
|
|
@@ -3330,16 +3330,16 @@
|
|
|
3330
3330
|
</div>
|
|
3331
3331
|
<div class="first-updated">
|
|
3332
3332
|
<dt>First updated</dt>
|
|
3333
|
-
<dd>${e=>(0,
|
|
3333
|
+
<dd>${e=>(0,si.zT)(e.status.firstUpdated)}</dd>
|
|
3334
3334
|
</div>
|
|
3335
3335
|
<div class="last-updated">
|
|
3336
3336
|
<dt>Last updated</dt>
|
|
3337
|
-
<dd>${e=>(0,
|
|
3337
|
+
<dd>${e=>(0,si.zT)(e.status.lastUpdated)}</dd>
|
|
3338
3338
|
</div>
|
|
3339
3339
|
${(0,l.when)(e=>!e.status.socket.reconnectionLimitReached,l.html`
|
|
3340
3340
|
<div class="next-update">
|
|
3341
3341
|
<dt>Next update</dt>
|
|
3342
|
-
<dd>${e=>(0,
|
|
3342
|
+
<dd>${e=>(0,si.zT)(e.status.nextUpdate)}</dd>
|
|
3343
3343
|
</div>
|
|
3344
3344
|
<div class="next-update-progress">
|
|
3345
3345
|
<dt></dt>
|
|
@@ -3358,7 +3358,7 @@
|
|
|
3358
3358
|
</dl>
|
|
3359
3359
|
</section>
|
|
3360
3360
|
<section class="socket-section ${e=>e.isSocketHealthyClassNames}" part="socket-section">
|
|
3361
|
-
<h2>WebSocket ${e=>(0,
|
|
3361
|
+
<h2>WebSocket ${e=>(0,oa.fL)(e.isSocketHealthyClassNames)}</h2>
|
|
3362
3362
|
<dl class="resource-list">
|
|
3363
3363
|
<div class="resource ${e=>e.isSocketHealthyClassNames}">
|
|
3364
3364
|
<div class="attributes">
|
|
@@ -3407,7 +3407,7 @@
|
|
|
3407
3407
|
class="resource-section ${e=>e.resourcesAllConnectedClassNames}"
|
|
3408
3408
|
part="resource-section"
|
|
3409
3409
|
>
|
|
3410
|
-
<h2>Resources ${e=>(0,
|
|
3410
|
+
<h2>Resources ${e=>(0,oa.fL)(e.resourcesAllConnectedClassNames)}</h2>
|
|
3411
3411
|
<dl class="resource-list">
|
|
3412
3412
|
${(0,l.repeat)(e=>e.resourceList,l.html`
|
|
3413
3413
|
<div class="resource ${e=>e.isConnected?"healthy":"unhealthy"}">
|
|
@@ -3422,7 +3422,7 @@
|
|
|
3422
3422
|
</div>
|
|
3423
3423
|
<div class="last-checked">
|
|
3424
3424
|
<dt>Checked</dt>
|
|
3425
|
-
<dd>${e=>(0,
|
|
3425
|
+
<dd>${e=>(0,si.zT)(e.lastUpdated)}</dd>
|
|
3426
3426
|
</div>
|
|
3427
3427
|
<div class="subscriptions">
|
|
3428
3428
|
<dt>Subscriptions</dt>
|
|
@@ -3713,7 +3713,7 @@
|
|
|
3713
3713
|
padding: 0.2em 0.5em;
|
|
3714
3714
|
background-color: var(--color-unhealthy-opacity-20);
|
|
3715
3715
|
}
|
|
3716
|
-
`,nd=void 0,
|
|
3716
|
+
`,nd=void 0,sd={},ad=td.compose(Object.assign({baseName:"system-health-overlay",template:id,styles:od,shadowOptions:nd},sd));var rd=i(4934);const ld={toView:e=>JSON.stringify(e),fromView:e=>null==e?e:JSON.parse(e)};class dd extends a.FoundationElement{constructor(){super(...arguments),this.show=!1,this.event="click",this.placement="bottom",this.flip=!1}selectorChanged(e,t){t!==e&&(this.popper&&this.popper.destroy(),this.target&&this.target.removeEventListener(this.event,this.toggle.bind(this)),this.target=this.getRootNode().querySelector(this.selector),this.target.addEventListener(this.event,this.toggle.bind(this)),this.popper=(0,rd.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],dd.prototype,"selector",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],dd.prototype,"show",void 0),(0,C.Cg)([l.attr],dd.prototype,"event",void 0),(0,C.Cg)([l.attr],dd.prototype,"placement",void 0),(0,C.Cg)([(0,l.attr)({converter:ld})],dd.prototype,"offset",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],dd.prototype,"flip",void 0);const cd=l.css`
|
|
3717
3717
|
:host {
|
|
3718
3718
|
display: none;
|
|
3719
3719
|
inset: unset !important;
|
|
@@ -3729,18 +3729,18 @@
|
|
|
3729
3729
|
</template>
|
|
3730
3730
|
`,hd=dd.compose({baseName:"popper",styles:cd,template:ud}),pd=(e,t)=>l.css`
|
|
3731
3731
|
${(0,r.progressRingStyles)(e,t)}
|
|
3732
|
-
`,md=(e,t)=>(0,
|
|
3732
|
+
`,md=(e,t)=>(0,a.progressRingTemplate)(e,t);class gd extends r.Progress{}const vd=void 0,fd={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 '},bd=gd.compose(Object.assign({baseName:"progress-ring",template:md,styles:pd,shadowOptions:vd},fd)),yd=(e,t)=>l.css`
|
|
3733
3733
|
${(0,r.radioStyles)(e,t)}
|
|
3734
|
-
`,wd=(e,t)=>(0,
|
|
3734
|
+
`,wd=(e,t)=>(0,a.radioTemplate)(e,t);class Cd extends r.Radio{}const xd=void 0,$d={checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '},Sd=Cd.compose(Object.assign({baseName:"radio",template:wd,styles:yd,shadowOptions:xd},$d)),Ed=(e,t)=>l.css`
|
|
3735
3735
|
${(0,r.radioGroupStyles)(e,t)}
|
|
3736
|
-
`,
|
|
3736
|
+
`,Od=(e,t)=>(0,a.radioGroupTemplate)(e,t);class Td extends r.RadioGroup{}const kd=void 0,Id={},Dd=Td.compose(Object.assign({baseName:"radio-group",template:Od,styles:Ed,shadowOptions:kd},Id)),Ad=l.css`
|
|
3737
3737
|
/* Host */
|
|
3738
3738
|
:host {
|
|
3739
3739
|
display: flex;
|
|
3740
3740
|
flex-direction: column;
|
|
3741
3741
|
width: 100%;
|
|
3742
3742
|
}
|
|
3743
|
-
`,
|
|
3743
|
+
`,Rd=e=>l.html`
|
|
3744
3744
|
<template>
|
|
3745
3745
|
<${e}-scheduler-timezone
|
|
3746
3746
|
:timezone=${(0,P.O)(e=>e.timezone)}
|
|
@@ -3753,9 +3753,9 @@
|
|
|
3753
3753
|
?disable-tooltips=${e=>e.disableTooltips}
|
|
3754
3754
|
></${e}-scheduler-cron-builder>
|
|
3755
3755
|
</template>
|
|
3756
|
-
`,
|
|
3757
|
-
${e=>
|
|
3758
|
-
`;class
|
|
3756
|
+
`,Ld=l.html`
|
|
3757
|
+
${e=>Rd(T(e))}
|
|
3758
|
+
`;class Nd extends a.FoundationElement{constructor(){super(...arguments),this.disableTooltips=!1,this.timezone="",this.cron=""}cronConfigChanged(){var e,t;this.timezone=(null===(e=this.cronConfig)||void 0===e?void 0:e.timezone)||"",this.cron=(null===(t=this.cronConfig)||void 0===t?void 0:t.cronExpression)||""}handleChange(e,t){e.stopPropagation();const{value:i}=e.target;this.cronConfig=Object.assign(Object.assign({},this.cronConfig),{[t]:i}),this.$emit("change",this.cronConfig)}}(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],Nd.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Nd.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],Nd.prototype,"timezone",void 0),(0,C.Cg)([l.observable],Nd.prototype,"cron",void 0),(0,C.Cg)([l.observable],Nd.prototype,"cronConfig",void 0);const Fd=void 0,Md={},_d=Nd.compose(Object.assign({baseName:"scheduler",styles:Ad,template:Ld,shadowOptions:Fd},Md)),Hd=(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 Xe.LogLevel&&(o=Object.assign({logLevel:e.logLevel},o)),e.toast&&(n=Object.assign({toast:e.toast},n),o=Object.assign({config:n},o)),pe(o,t,i)};var zd,Pd,Ud;!function(e){e.MINUTES="Minutes",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e.MONTHLY="Monthly",e.YEARLY="Yearly"}(zd||(zd={})),function(e){e.WEEK="Week",e.WORK_WEEK="Work week"}(Pd||(Pd={})),function(e){e.DATE="Date",e.DAY_OF_MONTH="Day of month"}(Ud||(Ud={}));const Bd=[{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"}],jd=[{value:"1",label:"First"},{value:"2",label:"Second"},{value:"3",label:"Third"},{value:"4",label:"Fourth"},{value:"-1",label:"Last"}],Gd=[{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 Vd;!function(e){e.updateCronConfig="update-cron-config"}(Vd||(Vd={}));const Yd=e=>Number(e)>1?`/${e}`:"";const Wd=(e,t,i)=>{const o=Number(e);return!isNaN(o)&&o<=i&&o>=t};function qd(e,t,i,o=!1,n=Wd){if("*"===e)return!0;if(o&&("?"===e||"L"===e))return!0;if(o&&e.endsWith("L"))return n(e.slice(0,-1),t,i);if(e.startsWith("*/"))return n(e.substring(2),1,i);if(e.startsWith("0/"))return n(e.substring(2),1,i);if(o&&e.includes("#")){const[o,s]=e.split("#");return n(o,t,i)&&n(s,1,4)}if(n(e,t,i))return!0;if(e.includes("-")){const[o,s]=e.split("-");return n(o,t,i)&&n(s,t,i)}return!!e.includes(",")&&e.split(",").every(e=>qd(e,t,i,o,n))}function Kd(e,t){return{type:zd.DAILY,frequency:e.startsWith("*/")?e.split("*/")[1]:"1",weekType:"?"===t?Pd.WEEK:Pd.WORK_WEEK}}function Xd(e){const t=e.includes("/");return{type:zd.HOURLY,frequency:t?e.split("/")[1]:"1",during:t?"every_hour":"specific_hours",hours:t?void 0:e}}function Jd(e,t="*"){const i="*"!==t&&"0/1"!==t;return{type:zd.MINUTES,frequency:e.includes("/")?e.split("/")[1]:"1",during:i?"specific_hours":"every_hour",hours:i?t:void 0}}function Qd(e){return{type:zd.WEEKLY,selectedDays:"*"!==e?new Set(e.split(",")):new Set}}const Zd=(e,t,i,o)=>{let n;return n="?"===t?{type:Ud.DAY_OF_MONTH,day:o.split(/[L#]/)[0],weekNumber:o.includes("#")?o.split("#")[1]:"-1"}:{type:Ud.DATE,dayDate:t},e===zd.YEARLY&&(n.month=i),n};function ec(e,t,i,o=Zd){return{type:zd.YEARLY,frequency:2===i.split("/").length?i.split("/")[1]:"1",dateOrDay:o(zd.YEARLY,e,t,i.split("/")[0])}}function tc(e,t,i,o=Zd){return{type:zd.MONTHLY,frequency:t.startsWith("*/")?t.split("*/")[1]:"1",dateOrDay:o(zd.MONTHLY,e,t,i.split("/")[0])}}const ic=l.css`
|
|
3759
3759
|
.input-container {
|
|
3760
3760
|
display: flex;
|
|
3761
3761
|
flex-direction: column;
|
|
@@ -3852,15 +3852,15 @@
|
|
|
3852
3852
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
3853
3853
|
white-space: nowrap;
|
|
3854
3854
|
}
|
|
3855
|
-
`;var nc=i(20633);const
|
|
3855
|
+
`;var nc=i(20633);const sc=(e,t,i)=>l.html`
|
|
3856
3856
|
<${t}-icon tooltip="${()=>e}" name="${()=>i}"></${t}-icon>
|
|
3857
|
-
`,
|
|
3857
|
+
`,ac=e=>class extends e{$emit(...e){const[t,i,o]=((...e)=>{let[t,i,o]=e,n=i;var s;if(((null==(s=i)?void 0:s.hasOwnProperty("bubbles"))||(null==s?void 0:s.hasOwnProperty("cancelable"))||(null==s?void 0:s.hasOwnProperty("composed"))||(null==s?void 0:s.hasOwnProperty("broadcast")))&&(o=i,n=void 0),"string"!=typeof t)throw new Error("$emit event types must be typeof string.");return[t,n,o]})(...e);if(null==o?void 0:o.broadcast){const e=new CustomEvent(t,Object.assign({detail:i,bubbles:!0,composed:!0,cancelable:!0},o));return e.broadcast=!0,this.dispatchEvent(e)}return super.$emit(t,i,o)}},rc=l.css`
|
|
3858
3858
|
${ic}
|
|
3859
3859
|
`,lc="\n <p>Select one or more hours.</p>\n",dc=l.html`
|
|
3860
3860
|
${e=>{return t=e.prefix,l.html`
|
|
3861
3861
|
<template>
|
|
3862
3862
|
<div class="input-container">
|
|
3863
|
-
<label class="label">Of ${e=>e.disableTooltips?"":
|
|
3863
|
+
<label class="label">Of ${e=>e.disableTooltips?"":sc("\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>
|
|
3864
3864
|
<${t}-select
|
|
3865
3865
|
data-test-id="select-week-type"
|
|
3866
3866
|
:value=${(0,P.O)(e=>e.weekType)}
|
|
@@ -3876,7 +3876,7 @@
|
|
|
3876
3876
|
</div>
|
|
3877
3877
|
</template>
|
|
3878
3878
|
`;var t}}
|
|
3879
|
-
`;let cc=class extends(
|
|
3879
|
+
`;let cc=class extends(ac(a.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix=""}configChanged(){var e;this.weekType=(null===(e=this.config)||void 0===e?void 0:e.weekType)||Pd.WORK_WEEK}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{weekType:this.weekType}),this.$emit(Vd.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],cc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],cc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],cc.prototype,"config",void 0),(0,C.Cg)([l.observable],cc.prototype,"weekType",void 0),cc=(0,C.Cg)([(0,l.customElement)({name:"daily-recurrence",template:dc,styles:rc})],cc);const uc=l.css`
|
|
3880
3880
|
${ic}
|
|
3881
3881
|
:host {
|
|
3882
3882
|
display: flex;
|
|
@@ -3902,7 +3902,7 @@
|
|
|
3902
3902
|
<div class="input-container">
|
|
3903
3903
|
<label class="label">Month</label>
|
|
3904
3904
|
<${e}-select data-test-id="month-dropdown" :value=${(0,P.O)(e=>e.selectedMonth)} @change="${e=>e.updateCronConfig()}" >
|
|
3905
|
-
${(0,l.repeat)(()=>
|
|
3905
|
+
${(0,l.repeat)(()=>Gd,l.html`
|
|
3906
3906
|
<${e}-option value="${e=>e.value}">
|
|
3907
3907
|
${e=>e.label}
|
|
3908
3908
|
</${e}-option>
|
|
@@ -3956,7 +3956,7 @@
|
|
|
3956
3956
|
:value=${(0,P.O)(e=>e.weekNumber)}
|
|
3957
3957
|
@change="${e=>e.updateCronConfig()}"
|
|
3958
3958
|
>
|
|
3959
|
-
${(0,l.repeat)(()=>
|
|
3959
|
+
${(0,l.repeat)(()=>jd,l.html`
|
|
3960
3960
|
<${e}-option value="${e=>e.value}">
|
|
3961
3961
|
${e=>e.label}
|
|
3962
3962
|
</${e}-option>
|
|
@@ -3981,7 +3981,7 @@
|
|
|
3981
3981
|
`)(e))}
|
|
3982
3982
|
`,mc=l.html`
|
|
3983
3983
|
${e=>pc(e.prefix)}
|
|
3984
|
-
`;let gc=class extends(
|
|
3984
|
+
`;let gc=class extends(ac(a.FoundationElement)){constructor(){super(...arguments),this.prefix="",this.dayOrDate=Ud.DATE,this.weekNumber="1",this.day="1",this.selectedMonth="1"}configChanged(){this.config.type!==zd.YEARLY&&this.config.type!==zd.MONTHLY||(this.dayOrDate=this.config.dateOrDay.type||Ud.DATE,this.setFieldsFromConfig())}setFieldsFromConfig(){this.config.type===zd.YEARLY&&(this.selectedMonth=this.config.dateOrDay.month),this.config.dateOrDay.type===Ud.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===Ud.DATE?{type:Ud.DATE,dayDate:this.dayDate||"1"}:{type:Ud.DAY_OF_MONTH,day:this.day||"1",weekNumber:this.weekNumber||"1"},e}updateCronConfig(){this.config.type===zd.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(Vd.updateCronConfig,this.config)}};(0,C.Cg)([l.observable],gc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],gc.prototype,"config",void 0),(0,C.Cg)([l.observable],gc.prototype,"dayOrDate",void 0),(0,C.Cg)([l.observable],gc.prototype,"dayDate",void 0),(0,C.Cg)([l.observable],gc.prototype,"weekNumber",void 0),(0,C.Cg)([l.observable],gc.prototype,"day",void 0),(0,C.Cg)([l.observable],gc.prototype,"selectedMonth",void 0),gc=(0,C.Cg)([(0,l.customElement)({name:"monthly-yearly-recurrence",template:mc,styles:uc})],gc);const vc=l.css`
|
|
3985
3985
|
${ic}
|
|
3986
3986
|
.weekdays-row {
|
|
3987
3987
|
display: flex;
|
|
@@ -3993,7 +3993,7 @@
|
|
|
3993
3993
|
<template>
|
|
3994
3994
|
<div class="input-container">
|
|
3995
3995
|
<label class="label">
|
|
3996
|
-
On ${e=>e.disableTooltips?"":
|
|
3996
|
+
On ${e=>e.disableTooltips?"":sc("\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)}
|
|
3997
3997
|
</label>
|
|
3998
3998
|
<div class="weekdays-row">
|
|
3999
3999
|
${(0,l.repeat)(()=>Bd,l.html`
|
|
@@ -4012,7 +4012,7 @@
|
|
|
4012
4012
|
</div>
|
|
4013
4013
|
</template>
|
|
4014
4014
|
`;var t}}
|
|
4015
|
-
`;let bc=class extends(
|
|
4015
|
+
`;let bc=class extends(ac(a.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix="",this.selectedDays=new Set}configChanged(){var e;this.selectedDays=(null===(e=this.config)||void 0===e?void 0:e.selectedDays)?new Set([...this.config.selectedDays]):new Set}isDisabled(e){return 1===this.selectedDays.size&&this.selectedDays.has(e)}checkboxChangeHandler(e){const{checked:t,value:i}=e.target;t?this.selectedDays.add(i):this.selectedDays.size>1&&this.selectedDays.delete(i),this.updateCronConfig()}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{selectedDays:this.selectedDays}),this.$emit(Vd.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],bc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],bc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],bc.prototype,"config",void 0),(0,C.Cg)([l.observable],bc.prototype,"selectedDays",void 0),bc=(0,C.Cg)([(0,l.customElement)({name:"weekly-recurrence",template:fc,styles:vc})],bc),(0,nc.N)(cc,bc,gc);const yc=(e,t)=>l.html`
|
|
4016
4016
|
<monthly-yearly-recurrence
|
|
4017
4017
|
:prefix=${()=>e}
|
|
4018
4018
|
:config=${()=>t.cronConfig}
|
|
@@ -4066,7 +4066,7 @@
|
|
|
4066
4066
|
<div class="input-container">
|
|
4067
4067
|
<label class="label"
|
|
4068
4068
|
>During
|
|
4069
|
-
${()=>i.disableTooltips?"":
|
|
4069
|
+
${()=>i.disableTooltips?"":sc("\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
|
|
4070
4070
|
>
|
|
4071
4071
|
<${t}-select
|
|
4072
4072
|
data-test-id="during-select"
|
|
@@ -4086,7 +4086,7 @@
|
|
|
4086
4086
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4087
4087
|
<div class="input-container">
|
|
4088
4088
|
<label class="label"
|
|
4089
|
-
>Hours ${
|
|
4089
|
+
>Hours ${sc(lc,t)}</label
|
|
4090
4090
|
>
|
|
4091
4091
|
<${t}-multiselect
|
|
4092
4092
|
class="time-select"
|
|
@@ -4109,7 +4109,7 @@
|
|
|
4109
4109
|
<div class="input-container">
|
|
4110
4110
|
<label class="label"
|
|
4111
4111
|
>Mode
|
|
4112
|
-
${()=>i.disableTooltips?"":
|
|
4112
|
+
${()=>i.disableTooltips?"":sc("\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
|
|
4113
4113
|
>
|
|
4114
4114
|
<${t}-select
|
|
4115
4115
|
data-test-id="hourly-during-select"
|
|
@@ -4125,7 +4125,7 @@
|
|
|
4125
4125
|
<div class="break"></div>
|
|
4126
4126
|
<div class="input-container">
|
|
4127
4127
|
<label class="label">
|
|
4128
|
-
Hours ${
|
|
4128
|
+
Hours ${sc(lc,t)}
|
|
4129
4129
|
</label>
|
|
4130
4130
|
<${t}-multiselect
|
|
4131
4131
|
class="time-select"
|
|
@@ -4177,7 +4177,7 @@
|
|
|
4177
4177
|
<label class="label"
|
|
4178
4178
|
>Recurrence
|
|
4179
4179
|
${(0,l.when)(e=>!e.disableTooltips,l.html`
|
|
4180
|
-
${t=>
|
|
4180
|
+
${t=>sc(`\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)}
|
|
4181
4181
|
`)}
|
|
4182
4182
|
</label>
|
|
4183
4183
|
<${e}-select
|
|
@@ -4214,8 +4214,8 @@
|
|
|
4214
4214
|
</div>
|
|
4215
4215
|
</template>
|
|
4216
4216
|
`,Sc=l.html`
|
|
4217
|
-
${e=>$c(
|
|
4218
|
-
`;class Ec extends s.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Qd,buildConfigForHourlyRecurrence:Xd,buildConfigForDailyRecurrence:Kd,buildConfigForWeeklyRecurrence:Jd,buildConfigForMonthlyRecurrence:tc,buildConfigForYearlyRecurrence:ec},this.recurrence=zd.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:zd.DAILY,weekType:Pd.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=qd)=>{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 Hd({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},O(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void Hd({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 zd.MINUTES:return"Minute(s)";case zd.HOURLY:return"Hour(s)";case zd.DAILY:return"Day(s)";case zd.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case zd.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 zd.HOURLY:return Array.from({length:23},(e,t)=>t+1);case zd.DAILY:return Array.from({length:31},(e,t)=>t+1);case zd.MONTHLY:case zd.YEARLY:return Array.from({length:12},(e,t)=>t+1);case zd.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===zd.DAILY&&this.cronConfig.weekType===Pd.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(Vd.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Vd.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case zd.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:zd.MINUTES},i),{frequency:a.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case zd.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:zd.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case zd.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:zd.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:Pd.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case zd.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:zd.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case zd.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:zd.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Ud.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case zd.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:zd.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Ud.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:Hd({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!==zd.MINUTES&&this.cronConfig.type!==zd.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 zd.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 zd.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 zd.DAILY:this.cron=function(e,t=Wd){const i=e.weekType===Pd.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===Pd.WORK_WEEK?"2-6":"?"}`}(e,Wd);break;case zd.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case zd.MONTHLY:this.cron=function(e,t=Wd){const{dateOrDay:i,minutes:o,hours:n,seconds:a,frequency:s}=e,r=t(s);return i.type===Ud.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,Wd);break;case zd.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===Ud.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:Hd({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!==zd.MINUTES&&e.type!==zd.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==zd.HOURLY&&e.type!==zd.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],Ec.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],Ec.prototype,"cron",void 0),(0,C.Cg)([l.observable],Ec.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],Ec.prototype,"frequency",void 0),(0,C.Cg)([l.observable],Ec.prototype,"during",void 0),(0,C.Cg)([l.volatile],Ec.prototype,"duringOptions",null),(0,C.Cg)([l.observable],Ec.prototype,"hours",void 0),(0,C.Cg)([l.observable],Ec.prototype,"minutes",void 0),(0,C.Cg)([l.observable],Ec.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],Ec.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],Ec.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],Ec.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],Ec.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],Ec.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Ec.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],Ec.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],Ec.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],Ec.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],Ec.prototype,"timezone",void 0);const Tc=void 0,Oc={},kc=Ec.compose(Object.assign({baseName:"scheduler-cron-builder",styles:oc,template:Sc,shadowOptions:Tc},Oc)),Ic=l.css`
|
|
4217
|
+
${e=>$c(T(e))}
|
|
4218
|
+
`;class Ec extends a.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Jd,buildConfigForHourlyRecurrence:Xd,buildConfigForDailyRecurrence:Kd,buildConfigForWeeklyRecurrence:Qd,buildConfigForMonthlyRecurrence:tc,buildConfigForYearlyRecurrence:ec},this.recurrence=zd.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:zd.DAILY,weekType:Pd.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=qd)=>{const i=e.trim().split(" ");if(6!=i.length)return!1;const[o,n,s,a,r,l]=i;return t(o,0,59)&&t(n,0,59)&&t(s,0,23)&&t(a,1,31,!0)&&t(r,1,12)&&t(l,0,7,!0)})(this.cron))return void Hd({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},T(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void Hd({title:"Cron Scheduler",body:e,toast:{type:"critical"}},T(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case zd.MINUTES:return"Minute(s)";case zd.HOURLY:return"Hour(s)";case zd.DAILY:return"Day(s)";case zd.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case zd.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 zd.HOURLY:return Array.from({length:23},(e,t)=>t+1);case zd.DAILY:return Array.from({length:31},(e,t)=>t+1);case zd.MONTHLY:case zd.YEARLY:return Array.from({length:12},(e,t)=>t+1);case zd.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===zd.DAILY&&this.cronConfig.weekType===Pd.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(Vd.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Vd.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case zd.MINUTES:const e=this.getBaseConfigFields(),{minutes:t}=e,i=(0,C.Tt)(e,["minutes"]);this.during="every_hour",this.hours="*";const o=[1,2,3,4,5,6,10,12,15,20,30],n=this.minMinuteInterval?Number(this.minMinuteInterval):1,s=o.find(e=>e>=n)||1;this.cronConfig=Object.assign(Object.assign({type:zd.MINUTES},i),{frequency:s.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case zd.HOURLY:const a=this.getBaseConfigFields(),{hours:r}=a,l=(0,C.Tt)(a,["hours"]);this.during="every_hour",this.hours="0",this.cronConfig=Object.assign(Object.assign({type:zd.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case zd.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:zd.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:Pd.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case zd.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:zd.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case zd.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:zd.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Ud.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case zd.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:zd.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Ud.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:Hd({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}}handleChange(e){if("frequency"===e&&0===Number(this.frequency))throw new Error("Frequency must be greater than 0");this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){"every_hour"===this.during?this.hours="*":"*"===this.hours&&(this.hours="0"),this.cronConfig.type!==zd.MINUTES&&this.cronConfig.type!==zd.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 zd.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 zd.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 zd.DAILY:this.cron=function(e,t=Yd){const i=e.weekType===Pd.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===Pd.WORK_WEEK?"2-6":"?"}`}(e,Yd);break;case zd.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case zd.MONTHLY:this.cron=function(e,t=Yd){const{dateOrDay:i,minutes:o,hours:n,seconds:s,frequency:a}=e,r=t(a);return i.type===Ud.DATE?`${s} ${o} ${n} ${i.dayDate} *${r} ?`:"-1"===i.weekNumber?`${s} ${o} ${n} ? *${r} ${i.day}L`:`${e.seconds} ${o} ${n} ? *${r} ${i.day}#${i.weekNumber}`}(e,Yd);break;case zd.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===Ud.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:Hd({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}this.value=this.cron,this.$emit("change")}setsFieldsFromCronEx(){this.cronConfig=function(e,t){if(!e)return;const i=e.split(" "),[o,n,s,a,r,l]=i;if("?"!==l&&"?"!==a)throw new Error("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented");if(/^(0|\*)\/\d+$/.test(n))return Object.assign({seconds:o},t.buildConfigForMinutesRecurrence(n,s));if(/^(0|\*)\/\d+$/.test(s))return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("?"===a&&"*"===l)return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("2-6"===l||"?"===l&&("*"===a||a.startsWith("*")))return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForDailyRecurrence(a,l));if(/^([1-7](,[1-7])*)$/.test(l)||"*"===l)return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForWeeklyRecurrence(l));if(l.includes("L")||l.includes("#")||/^([1-9]|[12]\d|3[01])$/.test(a)&&"?"===l)return"*"==r||r.startsWith("*/")?Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForMonthlyRecurrence(a,r,l)):Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForYearlyRecurrence(a,r,l));throw new Error("Invalid Cron Expression")}(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;const e=this.cronConfig;"minutes"in e&&(this.minutes=e.minutes),e.type!==zd.MINUTES&&e.type!==zd.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==zd.HOURLY&&e.type!==zd.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],Ec.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],Ec.prototype,"cron",void 0),(0,C.Cg)([l.observable],Ec.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],Ec.prototype,"frequency",void 0),(0,C.Cg)([l.observable],Ec.prototype,"during",void 0),(0,C.Cg)([l.volatile],Ec.prototype,"duringOptions",null),(0,C.Cg)([l.observable],Ec.prototype,"hours",void 0),(0,C.Cg)([l.observable],Ec.prototype,"minutes",void 0),(0,C.Cg)([l.observable],Ec.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],Ec.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],Ec.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],Ec.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],Ec.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],Ec.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Ec.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],Ec.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],Ec.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],Ec.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],Ec.prototype,"timezone",void 0);const Oc=void 0,Tc={},kc=Ec.compose(Object.assign({baseName:"scheduler-cron-builder",styles:oc,template:Sc,shadowOptions:Oc},Tc)),Ic=l.css`
|
|
4219
4219
|
/* Host */
|
|
4220
4220
|
:host {
|
|
4221
4221
|
display: flex;
|
|
@@ -4258,9 +4258,9 @@
|
|
|
4258
4258
|
</${e}-combobox>
|
|
4259
4259
|
</div>
|
|
4260
4260
|
</template>
|
|
4261
|
-
`,
|
|
4262
|
-
${e=>Dc(
|
|
4263
|
-
`;class
|
|
4261
|
+
`,Ac=l.html`
|
|
4262
|
+
${e=>Dc(T(e))}
|
|
4263
|
+
`;class Rc extends a.FoundationElement{constructor(){super(...arguments),this.timezone="",this.value=this.timezone}timezoneChanged(){this.value=this.timezone,this.$emit("change")}connectedCallback(){super.connectedCallback(),this.getTimeZones()}getTimeZones(){return(0,C.sH)(this,void 0,void 0,function*(){const e=["Europe/London","America/New_York"];try{const t=yield this.connect.request("VALID_TIME_ZONE",{REQUEST:{}});if(!t.REPLY||!Array.isArray(t.REPLY))throw new Error("Invalid data returned for Timezones");this.timeZones=t.REPLY.map(e=>e.ZONE_ID).sort((t,i)=>e.includes(t)&&!e.includes(i)?-1:!e.includes(t)&&e.includes(i)?1:t.localeCompare(i))}catch(e){Hd({title:"Cron Scheduler",body:"Unable to fetch timezones data.",toast:{type:"critical"}},"rapid"),Ds.v.error(e)}})}}(0,C.Cg)([l.observable],Rc.prototype,"timezone",void 0),(0,C.Cg)([oi.dm],Rc.prototype,"connect",void 0),(0,C.Cg)([l.observable],Rc.prototype,"timeZones",void 0);const Lc=void 0,Nc={},Fc=Rc.compose(Object.assign({baseName:"scheduler-timezone",styles:Ic,template:Ac,shadowOptions:Lc},Nc)),Mc=l.css`
|
|
4264
4264
|
.search-bar-combobox {
|
|
4265
4265
|
width: 100%;
|
|
4266
4266
|
min-width: auto;
|
|
@@ -4358,7 +4358,7 @@
|
|
|
4358
4358
|
<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)])}}
|
|
4359
4359
|
>
|
|
4360
4360
|
<slot
|
|
4361
|
-
${(0,l.slotted)({property:"defaultSlottedNodes",filter:
|
|
4361
|
+
${(0,l.slotted)({property:"defaultSlottedNodes",filter:a.whitespaceFilter})}
|
|
4362
4362
|
></slot>
|
|
4363
4363
|
</label>
|
|
4364
4364
|
|
|
@@ -4433,8 +4433,8 @@
|
|
|
4433
4433
|
Clear Search Terms
|
|
4434
4434
|
</${e}-tooltip>
|
|
4435
4435
|
`,Pc=l.html`
|
|
4436
|
-
${e=>zc(
|
|
4437
|
-
`,Uc=10,Bc=3,
|
|
4436
|
+
${e=>zc(T(e))}
|
|
4437
|
+
`,Uc=10,Bc=3,jc=1,Gc=(e,t)=>(new G.b).withExpression((new j.K).withField(e).withValue(t).withSerialiser(B.n.containsIgnoreCase).build()).build();class Vc extends a.FoundationElement{constructor(){super(...arguments),this.searchTerm="",this.appearance="neutral",this.minlength=Bc,this.position=Nt.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 s=t.value,a=this.searchTerm.trim();e.push({field:s,term:a,label:(null===(i=this.options.find(e=>e.field===s))||void 0===i?void 0:i.label(a))||t.text,createCriteria:null===(o=this.options.find(e=>e.field===s))||void 0===o?void 0:o.createCriteria,resourceType:null===(n=this.options.find(e=>e.field===s))||void 0===n?void 0:n.resourceType})}),this.selectedOptions=[...this.selectedOptions,...e],this.selectedOptions=this.selectedOptions.filter((e,t,i)=>t===i.findIndex(t=>e.field===t.field&&e.term===t.term)),this.combobox.value="",this.combobox.open=!1,this.$emit("selectionChange",this.selectedOptions),l.DOM.queueUpdate(()=>{setTimeout(()=>{this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth,0)},Uc)})}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(),s=this.addOrReplaceSelectedText(this.combobox.value,n,o);(null==s?void 0:s.length)>=this.minlength&&(this.combobox.value=s,this.searchTerm=s,this.combobox.open=!0),this.loading=!1}hasSelectedOption(e,t){return this.selectedOptions.some(i=>i.term===e&&i.field===t)}unselectOption(e){this.selectedOptions=this.selectedOptions.filter(t=>t!==e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){return(0,C.sH)(this,void 0,void 0,function*(){this.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],Vc.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Vc.prototype,"options",void 0),(0,C.Cg)([l.observable],Vc.prototype,"searchTerm",void 0),(0,C.Cg)([l.attr],Vc.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Vc.prototype,"minlength",void 0),(0,C.Cg)([l.attr],Vc.prototype,"position",void 0),(0,C.Cg)([l.attr],Vc.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Vc.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Vc.prototype,"loading",void 0),(0,C.Cg)([l.observable],Vc.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Vc.prototype,"filteredOptions",void 0);const Yc=void 0,Wc={},qc=Vc.compose(Object.assign({baseName:"search-bar",template:Pc,styles:Mc,shadowOptions:Yc},Wc)),Kc=(e,t)=>l.css`
|
|
4438
4438
|
${ui(e,t)}
|
|
4439
4439
|
.control {
|
|
4440
4440
|
width: auto;
|
|
@@ -4492,7 +4492,7 @@
|
|
|
4492
4492
|
/>
|
|
4493
4493
|
</slot>
|
|
4494
4494
|
</div>
|
|
4495
|
-
${(0,
|
|
4495
|
+
${(0,a.endSlotTemplate)(e,t)}
|
|
4496
4496
|
<div
|
|
4497
4497
|
class="listbox"
|
|
4498
4498
|
id="${e=>e.listboxId}"
|
|
@@ -4504,11 +4504,11 @@
|
|
|
4504
4504
|
data-test-id="listbox"
|
|
4505
4505
|
>
|
|
4506
4506
|
<slot
|
|
4507
|
-
${(0,l.slotted)({filter:
|
|
4507
|
+
${(0,l.slotted)({filter:a.Listbox.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
|
|
4508
4508
|
></slot>
|
|
4509
4509
|
</div>
|
|
4510
4510
|
</template>
|
|
4511
|
-
`;class
|
|
4511
|
+
`;class Jc extends r.Combobox{constructor(){super(...arguments),this.minlength=jc,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],Jc.prototype,"minlength",void 0);const Qc={delegatesFocus:!0,mode:"open"},Zc={},eu=Jc.compose(Object.assign({baseName:"search-bar-combobox",template:Xc,styles:Kc,shadowOptions:Qc},Zc)),tu=l.css`
|
|
4512
4512
|
:host {
|
|
4513
4513
|
display: block;
|
|
4514
4514
|
width: 100%;
|
|
@@ -4702,7 +4702,7 @@
|
|
|
4702
4702
|
color: var(--neutral-foreground-rest);
|
|
4703
4703
|
}
|
|
4704
4704
|
`,iu=l.html`
|
|
4705
|
-
${e=>{return t=
|
|
4705
|
+
${e=>{return t=T(e),l.html`
|
|
4706
4706
|
<template>
|
|
4707
4707
|
<div
|
|
4708
4708
|
class="section-navigator-container"
|
|
@@ -4746,7 +4746,7 @@
|
|
|
4746
4746
|
</div>
|
|
4747
4747
|
</template>
|
|
4748
4748
|
`;var t}}
|
|
4749
|
-
`,ou=(0,Xe.createLogger)("SectionNavigator"),nu="section-navigator",au={setState:`${nu}-set-state`,setStates:`${nu}-set-states`,clearState:`${nu}-clear-state`,clearAllStates:`${nu}-clear-all-states`},su={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},ru={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 lu extends s.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=su,this.stateIcons=ru,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 ou.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){ou.error("Error updating spacer:",e)}}else ou.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void ou.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){ou.error("Error scrolling to section:",e)}else ou.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()},lu.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,lu.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){ou.error("Error setting up scroll detection:",e)}else ou.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){ou.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){ou.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){ou.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){ou.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){ou.error("Error handling generic state event:",e)}},this.addEventListener(au.setState,this.handleSetStateRef),this.addEventListener(au.setStates,this.handleSetStatesRef),this.addEventListener(au.clearState,this.handleClearStateRef),this.addEventListener(au.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(au.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(au.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(au.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(au.clearAllStates,this.handleGenericStateEventRef,!0)):ou.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 ou.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ou.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 ou.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ou.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 ou.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ou.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 ou.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):ou.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]||"":(ou.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return ou.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]||ru[e]:(ou.warn("State name is required"),ru.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(au.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(au.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(au.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(au.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(au.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(au.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(au.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(au.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}lu.SCROLL_END_TIMEOUT=150,lu.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],lu.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],lu.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],lu.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],lu.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],lu.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],lu.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],lu.prototype,"activeSection",void 0);const du={mode:"open"},cu={},uu=lu.compose(Object.assign({baseName:"foundation-section-navigator",template:iu,styles:tu,shadowOptions:du},cu)),hu=(e,t)=>l.css`
|
|
4749
|
+
`,ou=(0,Xe.createLogger)("SectionNavigator"),nu="section-navigator",su={setState:`${nu}-set-state`,setStates:`${nu}-set-states`,clearState:`${nu}-clear-state`,clearAllStates:`${nu}-clear-all-states`},au={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},ru={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 lu extends a.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=au,this.stateIcons=ru,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 ou.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){ou.error("Error updating spacer:",e)}}else ou.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void ou.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){ou.error("Error scrolling to section:",e)}else ou.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()},lu.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,lu.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){ou.error("Error setting up scroll detection:",e)}else ou.warn("Section content not available for scroll detection")}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;const e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2;let t=null,i=1/0;this.sectionItems.forEach(o=>{const n=this.sectionContent.querySelector(`[data-section="${o.name}"]`);if(n){const s=n.offsetTop+n.clientHeight/2,a=Math.abs(s-e);a<i&&(i=a,t=o.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener("scroll",this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){this.sectionContent?(this.handleSetStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.addState(t,i)}catch(e){ou.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){ou.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){ou.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){ou.error("Error handling clear-all-states event:",e)}},this.handleGenericStateEventRef=e=>{try{const t=e.type,i=e.detail;if(null==i?void 0:i.sectionName)return;const o=e.target.closest("[data-section]");let n=null==o?void 0:o.getAttribute("data-section");if(!n){const t=e.target.closest("[slot]");n=(null==t?void 0:t.getAttribute("slot"))||this.activeSection}n||(n=this.activeSection),e.stopPropagation(),e.preventDefault();const s=Object.assign(Object.assign({},i),{sectionName:n}),a=new CustomEvent(t,{detail:s,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){ou.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)):ou.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 ou.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ou.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 ou.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ou.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 ou.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ou.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 ou.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):ou.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]||"":(ou.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return ou.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]||ru[e]:(ou.warn("State name is required"),ru.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}}lu.SCROLL_END_TIMEOUT=150,lu.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],lu.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],lu.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],lu.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],lu.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],lu.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],lu.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],lu.prototype,"activeSection",void 0);const du={mode:"open"},cu={},uu=lu.compose(Object.assign({baseName:"foundation-section-navigator",template:iu,styles:tu,shadowOptions:du},cu)),hu=(e,t)=>l.css`
|
|
4750
4750
|
${(0,r.radioGroupStyles)(e,t)}
|
|
4751
4751
|
::slotted(foundation-segmented-item:first-of-type) {
|
|
4752
4752
|
border-radius: calc(var(--control-corner-radius) * 1px) 0 0
|
|
@@ -4759,7 +4759,7 @@
|
|
|
4759
4759
|
calc(var(--control-corner-radius) * 1px) 0;
|
|
4760
4760
|
border-left-width: 0;
|
|
4761
4761
|
}
|
|
4762
|
-
`,pu=(e,t)=>(0,
|
|
4762
|
+
`,pu=(e,t)=>(0,a.radioGroupTemplate)(e,t);class mu extends a.RadioGroup{valueChanged(){void 0===this.value&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}}const gu=void 0,vu={},fu=mu.compose(Object.assign({baseName:"segmented-control",template:pu,styles:hu,shadowOptions:gu},vu)),bu=(e,t)=>l.css`
|
|
4763
4763
|
${(0,r.radioStyles)(e,t)}
|
|
4764
4764
|
:host {
|
|
4765
4765
|
padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
|
|
@@ -4792,9 +4792,9 @@
|
|
|
4792
4792
|
box-shadow: none;
|
|
4793
4793
|
outline: none;
|
|
4794
4794
|
}
|
|
4795
|
-
`,Eu=(e,t)=>(0,
|
|
4795
|
+
`,Eu=(e,t)=>(0,a.selectTemplate)(e,t);class Ou 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 Tu=void 0,ku={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 '},Iu=Ou.compose(Object.assign({baseName:"select",template:Eu,styles:Su,shadowOptions:Tu},ku)),Du=(e,t)=>l.css`
|
|
4796
4796
|
${(0,r.skeletonStyles)(e,t)}
|
|
4797
|
-
`,
|
|
4797
|
+
`,Au=(e,t)=>(0,a.skeletonTemplate)(e,t);class Ru extends r.Skeleton{}const Lu=void 0,Nu={},Fu=Ru.compose(Object.assign({baseName:"skeleton",template:Au,styles:Du,shadowOptions:Lu},Nu)),Mu=(e,t)=>l.css`
|
|
4798
4798
|
${(0,r.sliderStyles)(e,t)}
|
|
4799
4799
|
.track-progress {
|
|
4800
4800
|
background-color: var(--accent-fill-rest);
|
|
@@ -4833,9 +4833,9 @@
|
|
|
4833
4833
|
</div>
|
|
4834
4834
|
</div>
|
|
4835
4835
|
</template>
|
|
4836
|
-
`;class Pu extends r.Slider{}const Uu=void 0,Bu={thumb:'\n <div class="thumb-cursor"></div>\n '},
|
|
4836
|
+
`;class Pu extends r.Slider{}const Uu=void 0,Bu={thumb:'\n <div class="thumb-cursor"></div>\n '},ju=Pu.compose(Object.assign({baseName:"slider",template:zu,styles:Mu,shadowOptions:Uu},Bu)),Gu=(e,t)=>l.css`
|
|
4837
4837
|
${(0,r.sliderLabelStyles)(e,t)}
|
|
4838
|
-
`,Vu=(e,t)=>(0,
|
|
4838
|
+
`,Vu=(e,t)=>(0,a.sliderLabelTemplate)(e,t);class Yu extends r.SliderLabel{}const Wu=void 0,qu={},Ku=Yu.compose(Object.assign({baseName:"slider-label",template:Vu,styles:Gu,shadowOptions:Wu},qu)),Xu="default",Ju={DEFAULT:Xu,ERROR:"error",SUCCESS:"success"},Qu=1e4,Zu={DISMISS:"dismiss",AUTO_DISMISS:"autoDismiss"},eh=l.css`
|
|
4839
4839
|
@keyframes append-from-left-animate {
|
|
4840
4840
|
from {
|
|
4841
4841
|
transform: translateX(100%);
|
|
@@ -4969,10 +4969,10 @@
|
|
|
4969
4969
|
${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"}}
|
|
4970
4970
|
</slot>
|
|
4971
4971
|
</div>
|
|
4972
|
-
${(0,l.when)(e=>{var t,i,o,n,a,
|
|
4972
|
+
${(0,l.when)(e=>{var t,i,o,n,s,a,r,l;return(null===(n=null===(o=null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.confirmingActions)||void 0===n?void 0:n.length)||(null===(l=null===(r=null===(a=null===(s=e.notification)||void 0===s?void 0:s.config)||void 0===a?void 0:a.snackbar)||void 0===r?void 0:r.confirmingActions)||void 0===l?void 0:l.length)},l.html`
|
|
4973
4973
|
<div part="action" class="action">
|
|
4974
4974
|
<slot name="action">
|
|
4975
|
-
${(0,l.repeat)(e=>{var t,i,o,n,a
|
|
4975
|
+
${(0,l.repeat)(e=>{var t,i,o,n,s,a;return(null===(o=null===(i=null===(t=e.error)||void 0===t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.confirmingActions)||(null===(a=null===(s=null===(n=e.notification)||void 0===n?void 0:n.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.confirmingActions)},l.html`
|
|
4976
4976
|
<${e}-button
|
|
4977
4977
|
slot="action"
|
|
4978
4978
|
appearance="lightweight"
|
|
@@ -4986,9 +4986,9 @@
|
|
|
4986
4986
|
`)}
|
|
4987
4987
|
</div>
|
|
4988
4988
|
`,ih=l.html`
|
|
4989
|
-
${e=>th(
|
|
4990
|
-
`,oh={mode:"open",delegatesFocus:!0};class nh extends
|
|
4991
|
-
${
|
|
4989
|
+
${e=>th(T(e))}
|
|
4990
|
+
`,oh={mode:"open",delegatesFocus:!0};class nh extends a.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=Qu,this.autoClose=!0,this.type=Xu,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(Zu.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:Xu}notificationChanged(e,t){var i,o,n,s,a,r,l,d,c;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:Xu,this.autoClose=null===(r=null===(a=null===(s=null==t?void 0:t.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.autoClose)||void 0===r||r,this.closeTimeout=null!==(c=null===(d=null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.snackbar)||void 0===d?void 0:d.closeTimeout)&&void 0!==c?c:Qu}handleDissmis(e=!1){this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(Zu.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Zu.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}}(0,C.Cg)([l.observable],nh.prototype,"error",void 0),(0,C.Cg)([l.observable],nh.prototype,"notification",void 0),(0,C.Cg)([l.observable],nh.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"identifier"})],nh.prototype,"identifier",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],nh.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],nh.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],nh.prototype,"type",void 0);const sh=nh.compose({baseName:"snackbar",styles:eh,template:ih,shadowOptions:oh}),ah=(e,t)=>l.css`
|
|
4991
|
+
${sr()}
|
|
4992
4992
|
|
|
4993
4993
|
.fa-stack {
|
|
4994
4994
|
display: inline-block;
|
|
@@ -5020,7 +5020,7 @@
|
|
|
5020
5020
|
>
|
|
5021
5021
|
<slot></slot>
|
|
5022
5022
|
</span>
|
|
5023
|
-
`;class lh extends
|
|
5023
|
+
`;class lh extends a.FoundationElement{constructor(){super(...arguments),this.size=hr,this["vertical-align"]="baseline"}}(0,C.Cg)([l.attr],lh.prototype,"size",void 0),(0,C.Cg)([l.attr],lh.prototype,"vertical-align",void 0);const dh=lh.compose({baseName:"stacking-icons",template:rh,styles:ah}),ch=l.css`
|
|
5024
5024
|
.status-pill {
|
|
5025
5025
|
font-size: 12px;
|
|
5026
5026
|
display: inline-flex;
|
|
@@ -5055,7 +5055,7 @@
|
|
|
5055
5055
|
height: 14px;
|
|
5056
5056
|
}
|
|
5057
5057
|
`,uh=l.html`
|
|
5058
|
-
${e=>{return t=
|
|
5058
|
+
${e=>{return t=T(e),l.html`
|
|
5059
5059
|
${(0,l.when)(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),l.html`
|
|
5060
5060
|
<div
|
|
5061
5061
|
data-test-id="status-pill"
|
|
@@ -5085,7 +5085,7 @@
|
|
|
5085
5085
|
</div>
|
|
5086
5086
|
`)}
|
|
5087
5087
|
`;var t}}
|
|
5088
|
-
`,hh=(e,t="second")=>{let i=e/1e3;const o=Math.floor(i/86400);i%=86400;const n=Math.floor(i/3600);i%=3600;const
|
|
5088
|
+
`,hh=(e,t="second")=>{let i=e/1e3;const o=Math.floor(i/86400);i%=86400;const n=Math.floor(i/3600);i%=3600;const s=Math.floor(i/60),a=Math.floor(i%60),r=[];switch(o&&r.push(`${o}d`),t){case"minute":n&&r.push(`${n}h`),s&&r.push(`${s}m`),!s&&a&&r.push("< 1m");break;case"hour":n&&r.push(`${n}h`),n||!s&&!a||r.push("< 1h");break;default:n&&r.push(`${n}h`),s&&r.push(`${s}m`),a&&r.push(`${a}s`)}return r.length?r.join(" "):"0s"};class ph extends a.FoundationElement{constructor(){super(...arguments),this.iconSize="sm",this.dateCountdownCompletedMessage="Expired",this.dateCountdownUnit="second",this.hideWhenCountdownCompleted=!1,this.isCountdownExpired=!1,this.isCountdownVisible=!0}dateCountdownChanged(e,t){if(e!==t){if(!t)return void this.clearCountdownTimer();this.isCountdownExpired=!1,this.setUpDateCountdown(t)}}dateCountdownVisibleAfterChanged(e,t){e!==t&&this.updateVisibilityFromStartTime()}connectedCallback(){this.updateVisibilityFromStartTime(),super.connectedCallback()}disconnectedCallback(){this.clearCountdownTimer(),super.disconnectedCallback()}setUpDateCountdown(e){if(this.clearCountdownTimer(),isNaN(parseInt(e)))Je.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=hh(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"})],ph.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],ph.prototype,"iconName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-src"})],ph.prototype,"iconSrc",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial"})],ph.prototype,"iconInitial",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial-background-color"})],ph.prototype,"iconInitialBackgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],ph.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],ph.prototype,"textColor",void 0),(0,C.Cg)([l.attr],ph.prototype,"text",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown"})],ph.prototype,"dateCountdown",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-completed-message"})],ph.prototype,"dateCountdownCompletedMessage",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-unit"})],ph.prototype,"dateCountdownUnit",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-visible-after"})],ph.prototype,"dateCountdownVisibleAfter",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"hide-when-countdown-completed"})],ph.prototype,"hideWhenCountdownCompleted",void 0),(0,C.Cg)([l.observable],ph.prototype,"countdown",void 0),(0,C.Cg)([l.observable],ph.prototype,"isCountdownExpired",void 0),(0,C.Cg)([l.observable],ph.prototype,"isCountdownVisible",void 0);const mh=ph.compose({baseName:"status-pill",styles:ch,template:uh}),gh=(e,t)=>l.css`
|
|
5089
5089
|
.tree-item {
|
|
5090
5090
|
cursor: default;
|
|
5091
5091
|
}
|
|
@@ -5196,7 +5196,7 @@
|
|
|
5196
5196
|
background-color: var(--accent-fill-rest); /* Choose a color */
|
|
5197
5197
|
}
|
|
5198
5198
|
`,vh=e=>l.html`
|
|
5199
|
-
${(0,cn.q)(e=>e.orientation===
|
|
5199
|
+
${(0,cn.q)(e=>e.orientation===a.TabsOrientation.vertical,l.html`
|
|
5200
5200
|
<${e}-tree-item ${(0,l.ref)("treeItem")}
|
|
5201
5201
|
class=${e=>(0,x.x)("tree-item",["cursor-pointer",e.showCursorPointer])}
|
|
5202
5202
|
@click="${(e,t)=>e.$emit("tab-clicked",e.tabPosition-1)}">
|
|
@@ -5240,12 +5240,12 @@
|
|
|
5240
5240
|
</div>
|
|
5241
5241
|
`)}
|
|
5242
5242
|
`,fh=l.html`
|
|
5243
|
-
${e=>vh(
|
|
5244
|
-
`;class bh extends
|
|
5243
|
+
${e=>vh(T(e))}
|
|
5244
|
+
`;class bh extends a.FoundationElement{constructor(){super(...arguments),this.slot="tab",this.orientation=a.TabsOrientation.vertical}isCompleted(){return this.completed}selectedChanged(){this.treeItem&&(this.treeItem.selected=this.selected)}disconnectedCallback(){super.disconnectedCallback(),this.completed=void 0,this.error=void 0,this.selected=void 0}}(0,C.Cg)([l.attr],bh.prototype,"slot",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],bh.prototype,"selected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],bh.prototype,"completed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],bh.prototype,"error",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],bh.prototype,"isLast",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],bh.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],bh.prototype,"showCursorPointer",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tab-position"})],bh.prototype,"tabPosition",void 0),(0,C.Cg)([l.attr],bh.prototype,"orientation",void 0);const yh=void 0,wh={},Ch=bh.compose(Object.assign({baseName:"stepper-tab",template:fh,styles:gh,shadowOptions:yh},wh)),xh=()=>l.html`
|
|
5245
5245
|
<template slot="tab-panel" role="stepper-tab-panel">
|
|
5246
5246
|
<slot></slot>
|
|
5247
5247
|
</template>
|
|
5248
|
-
`;class $h extends
|
|
5248
|
+
`;class $h extends a.FoundationElement{}const Sh=void 0,Eh={},Oh=$h.compose(Object.assign({baseName:"stepper-tab-panel",template:xh,shadowOptions:Sh},Eh)),Th=(e,t)=>l.css`
|
|
5249
5249
|
${(0,r.switchStyles)(e,t)}
|
|
5250
5250
|
.checked-indicator {
|
|
5251
5251
|
transform: scale(1.3);
|
|
@@ -5258,20 +5258,20 @@
|
|
|
5258
5258
|
.checked-indicator {
|
|
5259
5259
|
border-radius: calc(var(--control-corner-radius) * 2px);
|
|
5260
5260
|
}
|
|
5261
|
-
`,kh=(e,t)=>(0,
|
|
5261
|
+
`,kh=(e,t)=>(0,a.switchTemplate)(e,t);class Ih extends r.Switch{}const Dh=void 0,Ah={switch:'<div class="checked-indicator" part="checked-indicator"></div>'},Rh=Ih.compose(Object.assign({baseName:"switch",template:kh,styles:Th,shadowOptions:Dh},Ah)),Lh=(e,t)=>l.css`
|
|
5262
5262
|
${(0,r.tabStyles)(e,t)}
|
|
5263
5263
|
|
|
5264
5264
|
:host {
|
|
5265
5265
|
user-select: none;
|
|
5266
5266
|
}
|
|
5267
|
-
`,
|
|
5267
|
+
`,Nh=(e,t)=>(0,a.tabTemplate)(e,t);class Fh extends r.Tab{}const Mh=void 0,_h={},Hh=Fh.compose(Object.assign({baseName:"tab",template:Nh,styles:Lh,shadowOptions:Mh},_h)),zh=(e,t)=>l.css`
|
|
5268
5268
|
${(0,r.tabPanelStyles)(e,t)}
|
|
5269
5269
|
|
|
5270
5270
|
:host {
|
|
5271
5271
|
height: 100%;
|
|
5272
5272
|
padding: 0;
|
|
5273
5273
|
}
|
|
5274
|
-
`,Ph=(e,t)=>(0,
|
|
5274
|
+
`,Ph=(e,t)=>(0,a.tabPanelTemplate)(e,t);class Uh extends r.TabPanel{}const Bh=void 0,jh={},Gh=Uh.compose(Object.assign({baseName:"tab-panel",template:Ph,styles:zh,shadowOptions:Bh},jh)),Vh=(e,t)=>l.css`
|
|
5275
5275
|
${(0,r.tabsStyles)(e,t)}
|
|
5276
5276
|
|
|
5277
5277
|
:host {
|
|
@@ -5288,20 +5288,20 @@
|
|
|
5288
5288
|
:host([scrollable]) ::slotted([role='tab']) {
|
|
5289
5289
|
flex: 0 0 auto;
|
|
5290
5290
|
}
|
|
5291
|
-
`,
|
|
5291
|
+
`,Yh=(e,t)=>(0,a.tabsTemplate)(e,t);class Wh extends r.Tabs{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wh.prototype,"scrollable",void 0);const qh=void 0,Kh={},Xh=Wh.compose(Object.assign({baseName:"tabs",template:Yh,styles:Vh,shadowOptions:qh},Kh)),Jh=(e,t)=>l.css`
|
|
5292
5292
|
${(0,r.textAreaStyles)(e,t)}
|
|
5293
5293
|
:host .control {
|
|
5294
5294
|
padding: calc(var(--design-unit) * 3px);
|
|
5295
5295
|
}
|
|
5296
|
-
`,
|
|
5296
|
+
`,Qh=(e,t)=>(0,a.textAreaTemplate)(e,t);class Zh extends r.TextArea{}const ep=void 0,tp={},ip=Zh.compose(Object.assign({baseName:"text-area",template:Qh,styles:Jh,shadowOptions:ep},tp)),{create:op}=a.DesignToken,np=op("active-color-scheme").withDefault(e=>r.baseLayerLuminance.getValueFor(e)===r.StandardLuminance.LightMode?"light":"dark"),sp=(e,t)=>l.css`
|
|
5297
5297
|
${(0,r.textFieldStyles)(e,t)}
|
|
5298
5298
|
/* Override FAST .root align-items: baseline for this flex child so it still fills the row. */
|
|
5299
|
-
${
|
|
5299
|
+
${sl}
|
|
5300
5300
|
|
|
5301
5301
|
input {
|
|
5302
5302
|
color-scheme: ${np};
|
|
5303
5303
|
}
|
|
5304
|
-
`,
|
|
5304
|
+
`,ap=(e,t)=>l.html`
|
|
5305
5305
|
<template
|
|
5306
5306
|
class="${e=>(0,x.x)(["readonly",e.readOnly],["has-prefix",!!e.prefix],["has-suffix",!!e.suffix])}"
|
|
5307
5307
|
>
|
|
@@ -5310,10 +5310,10 @@
|
|
|
5310
5310
|
for="${e=>e.id?e.id:"control"}"
|
|
5311
5311
|
class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label-hidden"}"
|
|
5312
5312
|
>
|
|
5313
|
-
<slot ${(0,l.slotted)({property:"defaultSlottedNodes",filter:
|
|
5313
|
+
<slot ${(0,l.slotted)({property:"defaultSlottedNodes",filter:a.whitespaceFilter})}></slot>
|
|
5314
5314
|
</label>
|
|
5315
5315
|
<div class="root" part="root">
|
|
5316
|
-
${(0,
|
|
5316
|
+
${(0,a.startSlotTemplate)(e,t)}
|
|
5317
5317
|
<div class="control-field">
|
|
5318
5318
|
${(0,l.when)(e=>e.prefix,l.html`
|
|
5319
5319
|
<span
|
|
@@ -5380,10 +5380,10 @@
|
|
|
5380
5380
|
</span>
|
|
5381
5381
|
`)}
|
|
5382
5382
|
</div>
|
|
5383
|
-
${(0,
|
|
5383
|
+
${(0,a.endSlotTemplate)(e,t)}
|
|
5384
5384
|
</div>
|
|
5385
5385
|
</template>
|
|
5386
|
-
`;class rp extends(nl(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],rp.prototype,"autocomplete",void 0),(0,C.Cg)([l.attr],rp.prototype,"autocapitalize",void 0),(0,C.Cg)([l.attr],rp.prototype,"step",void 0);const lp={mode:"open",delegatesFocus:!0},dp={},cp=rp.compose(Object.assign({baseName:"text-field",template:
|
|
5386
|
+
`;class rp extends(nl(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],rp.prototype,"autocomplete",void 0),(0,C.Cg)([l.attr],rp.prototype,"autocapitalize",void 0),(0,C.Cg)([l.attr],rp.prototype,"step",void 0);const lp={mode:"open",delegatesFocus:!0},dp={},cp=rp.compose(Object.assign({baseName:"text-field",template:ap,styles:sp,shadowOptions:lp},dp)),up=l.css`
|
|
5387
5387
|
@keyframes append-animate {
|
|
5388
5388
|
from {
|
|
5389
5389
|
transform: translateX(100%);
|
|
@@ -5522,12 +5522,12 @@
|
|
|
5522
5522
|
</div>
|
|
5523
5523
|
</div>
|
|
5524
5524
|
`,pp=l.html`
|
|
5525
|
-
${e=>hp(
|
|
5526
|
-
`,mp={mode:"open",delegatesFocus:!0},gp={};class vp extends
|
|
5525
|
+
${e=>hp(T(e))}
|
|
5526
|
+
`,mp={mode:"open",delegatesFocus:!0},gp={};class vp extends a.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=1e4,this.autoClose=!1,this.closeTimer=null}connectedCallback(){super.connectedCallback(),this.autoClose&&(this.closeTimer=setTimeout(()=>{this.deleteAnimation="toast-delete",this.toast.onanimationend=()=>{this.remove()}},this.closeTimeout))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.closeTimer),this.closeTimer=null}close(){this.remove()}}(0,C.Cg)([l.observable],vp.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],vp.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close"})],vp.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"notification-icon"})],vp.prototype,"notificationIcon",void 0);const fp=vp.compose(Object.assign({baseName:"toast",styles:up,template:pp,shadowOptions:mp},gp)),bp=(e,t)=>l.css`
|
|
5527
5527
|
${(0,r.toolbarStyles)(e,t)}
|
|
5528
|
-
`,yp=(e,t)=>(0,
|
|
5528
|
+
`,yp=(e,t)=>(0,a.toolbarTemplate)(e,t);class wp extends r.Toolbar{}const Cp=void 0,xp={},$p=wp.compose(Object.assign({baseName:"toolbar",template:yp,styles:bp,shadowOptions:Cp},xp)),Sp=(e,t)=>l.css`
|
|
5529
5529
|
${(0,r.tooltipStyles)(e,t)}
|
|
5530
|
-
`,Ep=(e,t)=>(0,
|
|
5530
|
+
`,Ep=(e,t)=>(0,a.tooltipTemplate)(e,t);class Op extends r.Tooltip{}const Tp=void 0,kp={},Ip=Op.compose(Object.assign({baseName:"tooltip",template:Ep,styles:Sp,shadowOptions:Tp},kp)),Dp=(e,t)=>l.css`
|
|
5531
5531
|
${(0,r.treeItemStyles)(e,t)}
|
|
5532
5532
|
:host {
|
|
5533
5533
|
--focus-stroke-width: 0;
|
|
@@ -5544,9 +5544,9 @@
|
|
|
5544
5544
|
.positioning-region {
|
|
5545
5545
|
height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);
|
|
5546
5546
|
}
|
|
5547
|
-
`,
|
|
5547
|
+
`,Ap=(e,t)=>(0,a.treeItemTemplate)(e,t);class Rp extends r.TreeItem{}const Lp=void 0,Np={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>'},Fp=Rp.compose(Object.assign({baseName:"tree-item",template:Ap,styles:Dp,shadowOptions:Lp},Np)),Mp=(e,t)=>l.css`
|
|
5548
5548
|
${(0,r.treeViewStyles)(e,t)}
|
|
5549
|
-
`,_p=(e,t)=>(0,
|
|
5549
|
+
`,_p=(e,t)=>(0,a.treeViewTemplate)(e,t);class Hp extends a.TreeView{}const zp=void 0,Pp={},Up=Hp.compose(Object.assign({baseName:"tree-view",template:_p,styles:Mp,shadowOptions:zp},Pp)),Bp=(e,t)=>l.css`
|
|
5550
5550
|
.container {
|
|
5551
5551
|
position: relative;
|
|
5552
5552
|
width: 100%;
|
|
@@ -5566,7 +5566,7 @@
|
|
|
5566
5566
|
overflow: hidden;
|
|
5567
5567
|
text-overflow: ellipsis;
|
|
5568
5568
|
}
|
|
5569
|
-
`,
|
|
5569
|
+
`,jp=e=>l.html`
|
|
5570
5570
|
<div class="container" value=${e=>e.value}>
|
|
5571
5571
|
<${e}-text-field
|
|
5572
5572
|
class="url-input"
|
|
@@ -5581,9 +5581,9 @@
|
|
|
5581
5581
|
<a class="url-input-link" href=${e=>e.value} target="_blank">${e=>e.value}</a>
|
|
5582
5582
|
`)}
|
|
5583
5583
|
</div>
|
|
5584
|
-
`,
|
|
5585
|
-
${e=>
|
|
5586
|
-
`,Vp=void 0,
|
|
5584
|
+
`,Gp=l.html`
|
|
5585
|
+
${e=>jp(T(e))}
|
|
5586
|
+
`,Vp=void 0,Yp={};class Wp 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],Wp.prototype,"value",void 0),(0,C.Cg)([l.observable],Wp.prototype,"focused",void 0);const qp=Wp.compose(Object.assign({baseName:"url-input",template:Gp,styles:Bp,shadowOptions:Vp},Yp)),Kp={foundationAccordion:m,foundationAiCriteriaSearch:we,foundationAiIndicator:Se,foundationAccordionItem:w,foundationActionsMenu:R,foundationAnchor:De,foundationAnchoredRegion:Me,foundationAvatar:je,foundationBadge:Ke,foundationBanner:ot,foundationBreadcrumb:dt,foundationBreadcrumbItem:gt,foundationButton:Ct,foundationCalendar:Tt,foundationCard:Lt,foundationCategorizedMultiselect:Bt,foundationCheckbox:qt,foundationCombobox:bi,foundationConnectionIndicator:$i,foundationDataGrid:Ii,foundationDataGridCell:Ni,foundationDataGridRow:zi,foundationDatePicker:co,foundationDesignSystemProvider:rn,foundationDialog:bn,foundationDisclosure:Sn,foundationDivider:Dn,foundationDropdownMenu:_n,foundationErrorBanner:is,foundationErrorBoundary:vs,foundationErrorDialog:xs,foundationFileReader:Is,foundationFileUpload:Vs,foundationFilter:ia,foundationFilterBar:ua,foundationFlexLayout:ya,foundationFlipper:Ea,foundationFlyout:La,foundationGridLayout:Ba,foundationGridLayoutItem:Wa,foundationHorizontalScroll:Za,foundationIcon:gr,foundationListbox:Cr,foundationListboxOption:Tr,foundationMenu:Lr,foundationMenuItem:zr,foundationModal:Vr,foundationMultiselect:el,foundationNumberField:wl,foundationOptgroup:Sl,foundationPopper:hd,foundationProgress:Xl,foundationProgressRing:bd,foundationRadio:Sd,foundationRadioGroup:Dd,foundationScheduler:_d,foundationSchedulerCronBuilder:kc,foundationSchedulerTimezone:Fc,foundationSearchBar:qc,foundationSearchBarCombobox:eu,foundationSegmentedControl:fu,foundationSegmentedItem:$u,foundationSelect:Iu,foundationSkeleton:Fu,foundationSlider:ju,foundationSliderLabel:Ku,foundationSnackbar:sh,foundationStackingIcons:dh,foundationStatusPill:mh,foundationEnvironmentIndicator:Jn,foundationStepperTab:Ch,foundationStepperTabPanel:Oh,foundationSwitch:Rh,foundationSystemHealthOverlay:ad,foundationTab:Hh,foundationTabPanel:Gh,foundationTabs:Xh,foundationTextArea:ip,foundationTextField:cp,foundationToast:fp,foundationToolbar:$p,foundationTooltip:Ip,foundationTreeItem:Fp,foundationTreeView:Up,foundationUrlInput:qp,foundationSectionNavigator:uu,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Xp 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 Jp=class extends ri{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(){Je.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){Je.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Je.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Je.debug("handleStreamUpdates - Method not implemented.")}};Jp=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],Jp);const Qp=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],Zp=[...Qp,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],em={type:"NULL",maxRules:1,invisible:!0},tm=["int","short","long","bigdecimal","double"],im=["date","date-time"],om=["enum",...tm,"string",...im,"boolean"],nm=[{type:"equal",nbInputs:1,applyTo:om,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:om,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...tm,...im],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...tm,...im],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:[...om].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...om].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...tm,...im],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...tm,...im],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...om],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...om],optgroup:"Null"}];var sm=i(93678);const am=i.n(sm)()();function rm(e,t,i){const o=function e(o){const n=am(o);if(n.groupId===t)return n.children=i(n.children),n;const s=[];let a=!1;for(const t of n.children)if("children"in t){const i=e(t);i?(s.push(i),a=!0):s.push(t)}else s.push(t);return n.children=s,a?n:null}(e);if(!o)throw new Error(`Unable to find group with groupId ${t}`);return o}function lm(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 dm(e,t){const i=lm(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 cm(e,t){const i=lm(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 um(e,t,i){return rm(e,t,e=>[...e,i])}const hm="group-root";function pm(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:hm,children:e.children.map(e=>i(e,2))})}function mm(e){const t=e.children.map(e=>"children"in e?mm(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 gm=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,vm=e=>`${gm(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,fm=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},bm=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},ym=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 wm(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 Cm;!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"}(Cm||(Cm={}));const xm=l.css`
|
|
5587
5587
|
:host {
|
|
5588
5588
|
--item-vertical-spacing: 4px;
|
|
5589
5589
|
--item-border-radius: 5px;
|
|
@@ -5800,11 +5800,11 @@
|
|
|
5800
5800
|
list-style: none;
|
|
5801
5801
|
padding-left: 0;
|
|
5802
5802
|
}
|
|
5803
|
-
`;function Sm(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),
|
|
5804
|
-
${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:
|
|
5803
|
+
`;function Sm(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),s=o(i);return(t,i)=>e(t,i)?n(t,i):s(t,i)}const Em=l.html`
|
|
5804
|
+
${e=>{var t,i;const o=null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.radio,{radioTag:n,radioGroupTag:s}=o?{radioTag:o.input,radioGroupTag:o.group}:{radioTag:"input",radioGroupTag:"div"};return l.html`
|
|
5805
5805
|
<div class="btn-group group-conditions">
|
|
5806
5806
|
${Sm(e=>"input"!==n,l.html`
|
|
5807
|
-
<${
|
|
5807
|
+
<${s}
|
|
5808
5808
|
class="radio-group-container"
|
|
5809
5809
|
name="combinator"
|
|
5810
5810
|
@change="${(e,t)=>e.handleCombinatorChange(t.event)}"
|
|
@@ -5820,7 +5820,7 @@
|
|
|
5820
5820
|
</${n}>
|
|
5821
5821
|
`)}
|
|
5822
5822
|
`)}
|
|
5823
|
-
</${
|
|
5823
|
+
</${s}>
|
|
5824
5824
|
`,l.html`
|
|
5825
5825
|
<div class="radio-group-container">
|
|
5826
5826
|
${(0,l.repeat)(e=>e.config.combinators,l.html`
|
|
@@ -5841,8 +5841,8 @@
|
|
|
5841
5841
|
`)}
|
|
5842
5842
|
</div>
|
|
5843
5843
|
`}}
|
|
5844
|
-
`,
|
|
5845
|
-
${e=>{var t,i,o,n,a,
|
|
5844
|
+
`,Om=l.html`
|
|
5845
|
+
${e=>{var t,i,o,n,s,a,r,d;const c=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button",u=`Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${null===(s=null===(n=null===(o=e.config)||void 0===o?void 0:o.combinators)||void 0===n?void 0:n[0])||void 0===s?void 0:s.type})`,h=`Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${null===(d=null===(r=null===(a=e.config)||void 0===a?void 0:a.combinators)||void 0===r?void 0:r[0])||void 0===d?void 0:d.type})`;return l.html`
|
|
5846
5846
|
<div class="btn-group float-end group-actions">
|
|
5847
5847
|
${(0,l.when)(e=>e.allowAddRule,l.html`
|
|
5848
5848
|
<${c}
|
|
@@ -5878,9 +5878,9 @@
|
|
|
5878
5878
|
`)}
|
|
5879
5879
|
</div>
|
|
5880
5880
|
`}}
|
|
5881
|
-
`,
|
|
5881
|
+
`,Tm=l.html`
|
|
5882
5882
|
<div class="rules-group-container">
|
|
5883
|
-
<div class="rules-group-header">${
|
|
5883
|
+
<div class="rules-group-header">${Om} ${Em}</div>
|
|
5884
5884
|
<div class="rules-group-body">
|
|
5885
5885
|
<div class="rules-list">
|
|
5886
5886
|
${(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`
|
|
@@ -5908,7 +5908,7 @@
|
|
|
5908
5908
|
</div>
|
|
5909
5909
|
</div>
|
|
5910
5910
|
</div>
|
|
5911
|
-
`;let km=class extends l.FASTElement{connectedCallback(){super.connectedCallback(),wm(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(Cm.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(Cm.AddGroup,{detail:t,bubbles:!0,composed:!0}))}dispatchDeleteGroup(e){e.stopPropagation();const t={groupId:this.model.groupId};this.dispatchEvent(new CustomEvent(Cm.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(Cm.UpdateGroup,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],km.prototype,"config",void 0),(0,C.Cg)([l.observable],km.prototype,"styles",void 0),(0,C.Cg)([l.observable],km.prototype,"model",void 0),(0,C.Cg)([l.observable],km.prototype,"index",void 0),(0,C.Cg)([l.volatile],km.prototype,"allowAddRule",null),(0,C.Cg)([l.volatile],km.prototype,"allowAddGroup",null),km=(0,C.Cg)([(0,l.customElement)({name:"expression-group",template:
|
|
5911
|
+
`;let km=class extends l.FASTElement{connectedCallback(){super.connectedCallback(),wm(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(Cm.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(Cm.AddGroup,{detail:t,bubbles:!0,composed:!0}))}dispatchDeleteGroup(e){e.stopPropagation();const t={groupId:this.model.groupId};this.dispatchEvent(new CustomEvent(Cm.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(Cm.UpdateGroup,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],km.prototype,"config",void 0),(0,C.Cg)([l.observable],km.prototype,"styles",void 0),(0,C.Cg)([l.observable],km.prototype,"model",void 0),(0,C.Cg)([l.observable],km.prototype,"index",void 0),(0,C.Cg)([l.volatile],km.prototype,"allowAddRule",null),(0,C.Cg)([l.volatile],km.prototype,"allowAddGroup",null),km=(0,C.Cg)([(0,l.customElement)({name:"expression-group",template:Tm,styles:$m,shadowOptions:{delegatesFocus:!0}})],km);const Im=l.html`
|
|
5912
5912
|
<div class="query-builder">
|
|
5913
5913
|
${(0,l.when)(e=>null!==e.model,l.html`
|
|
5914
5914
|
<expression-group
|
|
@@ -5919,7 +5919,7 @@
|
|
|
5919
5919
|
`)}
|
|
5920
5920
|
</div>
|
|
5921
5921
|
`,Dm=l.html`
|
|
5922
|
-
${e=>{var t,i,o,n,a
|
|
5922
|
+
${e=>{var t,i,o,n,s,a;const r=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",d=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option",c=(null===(a=null===(s=e.styles)||void 0===s?void 0:s.customElements)||void 0===a?void 0:a.optgroup)||"optgroup";return l.html`
|
|
5923
5923
|
<${r}
|
|
5924
5924
|
class="form-select"
|
|
5925
5925
|
@change=${(e,t)=>e.dispatchFieldsChanged(t.event)}
|
|
@@ -5949,8 +5949,8 @@
|
|
|
5949
5949
|
`)}
|
|
5950
5950
|
</${r}>
|
|
5951
5951
|
`}}
|
|
5952
|
-
`;let
|
|
5953
|
-
${e=>{var t,i,o,n,a
|
|
5952
|
+
`;let Am=class extends l.FASTElement{constructor(){super(...arguments),this.fields=[]}connectedCallback(){super.connectedCallback(),wm(this,this.styles,"field")}get groupedFieldss(){return ym(this.fields)}dispatchFieldsChanged(e){e.stopPropagation();const t={fieldId:e.target.value};this.dispatchEvent(new CustomEvent(Cm.FieldSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Am.prototype,"fields",void 0),(0,C.Cg)([l.observable],Am.prototype,"field",void 0),(0,C.Cg)([l.observable],Am.prototype,"config",void 0),(0,C.Cg)([l.observable],Am.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Am.prototype,"groupedFieldss",null),Am=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-field",template:Dm})],Am);const Rm=l.html`
|
|
5953
|
+
${e=>{var t,i,o,n,s,a;const r=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",d=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option",c=(null===(a=null===(s=e.styles)||void 0===s?void 0:s.customElements)||void 0===a?void 0:a.optgroup)||"optgroup";return l.html`
|
|
5954
5954
|
<${r}
|
|
5955
5955
|
class="form-select"
|
|
5956
5956
|
@change=${(e,t)=>e.handleOperatorChange(t.event)}
|
|
@@ -5982,7 +5982,7 @@
|
|
|
5982
5982
|
`)}
|
|
5983
5983
|
</${r}>
|
|
5984
5984
|
`}}
|
|
5985
|
-
`;let
|
|
5985
|
+
`;let Lm=class extends l.FASTElement{constructor(){super(...arguments),this.operators=[],this.field=null}connectedCallback(){super.connectedCallback(),wm(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 ym(this.allowedOperators)}handleOperatorChange(e){e.stopPropagation();const t={operatorId:e.target.value};this.dispatchEvent(new CustomEvent(Cm.OperatorSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Lm.prototype,"operators",void 0),(0,C.Cg)([l.observable],Lm.prototype,"operator",void 0),(0,C.Cg)([l.observable],Lm.prototype,"field",void 0),(0,C.Cg)([l.observable],Lm.prototype,"config",void 0),(0,C.Cg)([l.observable],Lm.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Lm.prototype,"allowedOperators",null),(0,C.Cg)([l.volatile],Lm.prototype,"groupedOperators",null),Lm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-operator",template:Rm})],Lm);const Nm=e=>["short","int","long"].includes(e),Fm=e=>["double","bigdecimal"].includes(e),Mm=(e,t)=>{var i,o;return null===(o=null===(i=(e=>Nm(e)?/^[+-]?[0-9]+$/:Fm(e)?/[+-]?([0-9]*[.])?[0-9]+/:null)(e))||void 0===i?void 0:i.test(t))||void 0===o||o?null:"Invalid number format"},_m=l.css`
|
|
5986
5986
|
.text-input.error {
|
|
5987
5987
|
color: red;
|
|
5988
5988
|
}
|
|
@@ -5992,8 +5992,8 @@
|
|
|
5992
5992
|
align-items: center;
|
|
5993
5993
|
}
|
|
5994
5994
|
`,Hm=l.html`
|
|
5995
|
-
${e=>{var t,i;const o=fm(e),n="datetime-local"===o?"datetimeLocal":o,
|
|
5996
|
-
<${
|
|
5995
|
+
${e=>{var t,i;const o=fm(e),n="datetime-local"===o?"datetimeLocal":o,s=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i[n])||"input";return l.html`
|
|
5996
|
+
<${s}
|
|
5997
5997
|
type="${o}"
|
|
5998
5998
|
class="text-input ${e=>(0,x.x)(["error",e.validationError])}"
|
|
5999
5999
|
value=${e=>e.value}
|
|
@@ -6001,22 +6001,22 @@
|
|
|
6001
6001
|
/>
|
|
6002
6002
|
`}}
|
|
6003
6003
|
`,zm=l.html`
|
|
6004
|
-
${e=>{var t,i,o,n;const
|
|
6005
|
-
<${
|
|
6004
|
+
${e=>{var t,i,o,n;const s=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",a=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option";return l.html`
|
|
6005
|
+
<${s}
|
|
6006
6006
|
class="form-select"
|
|
6007
6007
|
@change=${(e,t)=>e.handleInputChange(t.event)}
|
|
6008
6008
|
value=${e=>e.value}
|
|
6009
6009
|
>
|
|
6010
|
-
${(0,l.repeat)(e=>{var t,i,o,n;const
|
|
6011
|
-
<${
|
|
6010
|
+
${(0,l.repeat)(e=>{var t,i,o,n;const s="enum"===(null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&(null===(n=null===(o=null==e?void 0:e.operator)||void 0===o?void 0:o.valueType)||void 0===n?void 0:n.values)?e.operator.valueType.values:"enum"===e.field.type&&e.field.values?e.field.values:{};return Object.entries(s)},()=>l.html`
|
|
6011
|
+
<${a}
|
|
6012
6012
|
value="${e=>e[0]}"
|
|
6013
6013
|
?selected=${(e,t)=>e[0]===t.parent.value}
|
|
6014
6014
|
title="${e=>"object"==typeof e[1]?e[1].tooltip:""}"
|
|
6015
6015
|
>
|
|
6016
6016
|
${e=>"object"==typeof e[1]?e[1].label:e[1]}
|
|
6017
|
-
</${
|
|
6017
|
+
</${a}>
|
|
6018
6018
|
`)}
|
|
6019
|
-
</${
|
|
6019
|
+
</${s}>
|
|
6020
6020
|
`}}
|
|
6021
6021
|
`,Pm=l.html`
|
|
6022
6022
|
${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`
|
|
@@ -6055,11 +6055,11 @@
|
|
|
6055
6055
|
`}}
|
|
6056
6056
|
`)}
|
|
6057
6057
|
`}}
|
|
6058
|
-
`,
|
|
6058
|
+
`,jm=l.html`
|
|
6059
6059
|
${Sm(e=>e.field,Bm,l.html`
|
|
6060
6060
|
<div>Select a field to set value</div>
|
|
6061
6061
|
`)}
|
|
6062
|
-
`;let
|
|
6062
|
+
`;let Gm=class extends l.FASTElement{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),wm(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,Mm(bm(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&&Nm(bm(this))?parseInt(t.value):this.field&&Fm(bm(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(Cm.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(Cm.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};(0,C.Cg)([(0,l.attr)({attribute:"value-index"})],Gm.prototype,"valueIndex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gm.prototype,"variadic",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"validation-error"})],Gm.prototype,"validationError",void 0),(0,C.Cg)([(0,l.attr)({attribute:"validation-msg"})],Gm.prototype,"validationMsg",void 0),(0,C.Cg)([l.observable],Gm.prototype,"field",void 0),(0,C.Cg)([l.observable],Gm.prototype,"operator",void 0),(0,C.Cg)([l.observable],Gm.prototype,"value",void 0),(0,C.Cg)([l.observable],Gm.prototype,"config",void 0),(0,C.Cg)([l.observable],Gm.prototype,"styles",void 0),Gm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-value",template:jm,styles:_m,shadowOptions:{delegatesFocus:!0}})],Gm);const Vm=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:Ym(e,t),Ym=(e,t)=>{var i,o;switch(bm(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return gm(new Date);case"date-time":return vm(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]}}},Wm=(e,t)=>{var i,o,n,s;const a=(r=e,l=t,e=>{var t,i,o;if((null===(t=null==r?void 0:r.valueType)||void 0===t?void 0:t.type)!==(null===(o=null===(i=l.operator)||void 0===i?void 0:i.valueType)||void 0===o?void 0:o.type))return null;if(!("value"in l)||!l.value||!l.operator)return null;const n=1===l.operator.nbInputs?[l.value]:l.value;return e>=n.length?null:n[e]});var r,l;switch(e.nbInputs){case 0:return{field:t.field,operator:e,value:void 0};case 1:return{field:t.field,operator:e,value:null!==(i=a(0))&&void 0!==i?i:Vm(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(o=a(0))&&void 0!==o?o:Vm(e,t),null!==(n=a(1))&&void 0!==n?n:Vm(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(s=a(0))&&void 0!==s?s:Vm(e,t)]}}},qm=(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)}}},Km=e=>!e&&0!==e,Xm=l.css`
|
|
6063
6063
|
.rule-container {
|
|
6064
6064
|
border: 1px solid #eee;
|
|
6065
6065
|
margin-bottom: 5px;
|
|
@@ -6118,7 +6118,7 @@
|
|
|
6118
6118
|
expression-rule-value {
|
|
6119
6119
|
display: flex;
|
|
6120
6120
|
}
|
|
6121
|
-
`,
|
|
6121
|
+
`,Jm=l.html`
|
|
6122
6122
|
${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`
|
|
6123
6123
|
<div class="rule-container ${e=>(0,x.x)(["error",e.error])}">
|
|
6124
6124
|
<div class="rule-content">
|
|
@@ -6178,17 +6178,17 @@ class="margin"
|
|
|
6178
6178
|
</div>
|
|
6179
6179
|
</div>
|
|
6180
6180
|
`}}
|
|
6181
|
-
`;let Jm=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),wm(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"!==bm(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(Km)})(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,Vm(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(Cm.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(Cm.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(Cm.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(Cm.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:qm(this.model,t,i)};this.dispatchEvent(new CustomEvent(Cm.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(Cm.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Ym(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Jm.prototype,"config",void 0),(0,C.Cg)([l.observable],Jm.prototype,"styles",void 0),(0,C.Cg)([l.observable],Jm.prototype,"model",void 0),(0,C.Cg)([l.observable],Jm.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Jm.prototype,"error",void 0),(0,C.Cg)([l.volatile],Jm.prototype,"operandIterator",null),Jm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Qm,styles:Xm,shadowOptions:{delegatesFocus:!0}})],Jm);let Zm=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=pm(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=mm(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(Cm.AddGroup,this.handleAddGroup),this.addEventListener(Cm.DelGroup,this.handleDeleteGroup),this.addEventListener(Cm.AddRule,this.handleAddRule),this.addEventListener(Cm.DelRule,this.handleDeleteRule),this.addEventListener(Cm.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(Cm.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(Cm.AddGroup,this.handleAddGroup),this.removeEventListener(Cm.DelGroup,this.handleDeleteGroup),this.removeEventListener(Cm.AddRule,this.handleAddRule),this.removeEventListener(Cm.DelRule,this.handleDeleteRule),this.removeEventListener(Cm.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(Cm.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:hm,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=um(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=um(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=rm(i=this.model,dm(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=rm(i=this.model,cm(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===hm?Object.assign(Object.assign({},e),i):rm(e,dm(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 rm(e,cm(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],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),Zm=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Im,styles:xm})],Zm);let eg=class extends Zm{};eg=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:xm,template:Im})],eg);const tg=["int","short","long"],ig=["double","bigdecimal"],og=[...tg,...ig],ng=["date","date-time"],ag=["string","enum"],sg=["boolean"],rg=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 lg(e){switch(rg(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 dg(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 cg(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function ug(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function hg(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=rg(e);if(ag.includes(i))return t;if(og.includes(i))return t.toString();if(sg.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(ng.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function pg(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?pg(e,t):t(e)).filter(Boolean)}}function mg(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=rg(e);if(ag.includes(i))return t;if(tg.includes(i))return parseInt(t);if(ig.includes(i))return parseFloat(t);if(sg.includes(i))return t;if(ng.includes(i)){const e=new Date(parseInt(t));return"date"===i?gm(e):vm(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const gg={template:Im,styles:xm};var vg;!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"})}(vg||(vg={}));const fg=[{type:vg.logicalOperations.AND,maxRules:"many"},{type:vg.logicalOperations.OR,maxRules:"many"}],bg={EQUALS:vg.operations.EQUALS,NOT_EQUALS:vg.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:vg.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:vg.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:vg.operations.LESS_THAN,LESS_THAN_OR_EQUAL:vg.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:vg.operations.IS_CURRENT,IS_PREVIOUS:vg.operations.IS_PREVIOUS},yg=e=>({type:"enum",input:"select",values:e}),wg=yg({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."}}),Cg=yg({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."}}),xg=[{type:bg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...ag,...sg,...og,...ng],tooltip:"Check the equality of the field compared to a set value"},{type:bg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...ag,...sg,...og,...ng],tooltip:"Check that the field is different from a set value"},{type:bg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...sg,...og,...ng],tooltip:"Check if the field value is null"},{type:bg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...sg,...og,...ng],tooltip:"Check if the field value is not null"},{type:bg.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:bg.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:bg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:bg.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:bg.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:bg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...og],tooltip:"Check if the field value is greater than a specified number"},{type:bg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...og],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:bg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...og],tooltip:"Check if the field value is less than a specified number"},{type:bg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...og],tooltip:"Check if the field value is less than or equal to a specified number"},{type:bg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field is before a specified date/time"},{type:bg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field is after a specified date/time"},{type:bg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field is on or before a specified date/time"},{type:bg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field is on or after a specified date/time"},{type:bg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...ng],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:Cg,optgroup:"Relative Period"},{type:bg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...ng],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:wg,optgroup:"Relative Period"}];function $g(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 Sg(e,t){switch(t){case bg.IS_NULL_OR_BLANK:return ug(e,vg.methodCall.IS_NULL_OR_BLANK,[]);case bg.NOT_NULL_OR_BLANK:return ug(e,vg.methodCall.NOT_NULL_OR_BLANK,[]);case bg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return ug(e,vg.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case bg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return ug(e,vg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case bg.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 ug(e,vg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case bg.IS_CURRENT:case bg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return ug(e,vg.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===bg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function Eg(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=hg(e),n=lg(o),a=$g(o.operator.type);switch(a){case bg.EQUALS:case bg.NOT_EQUALS:case bg.GREATER_THAN:case bg.GREATER_THAN_OR_EQUAL:case bg.LESS_THAN:case bg.LESS_THAN_OR_EQUAL:return dg(o,a,n);case bg.IS_NULL:return cg(o,vg.operations.EQUALS,{TYPE:"NULL"});case bg.NOT_NULL:return cg(o,vg.operations.NOT_EQUALS,{TYPE:"NULL"});case bg.IS_NULL_OR_BLANK:case bg.NOT_NULL_OR_BLANK:case bg.CONTAINS:case bg.CONTAINS_WORDS_STARTING_WITH:case bg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case bg.IS_CURRENT:case bg.IS_PREVIOUS:return Sg(o,a);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function Tg(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 Og(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?bg[bg.IS_NULL]:bg[bg.NOT_NULL];return xg.find(t=>t.type===e)}const i=Tg(t.OPERATION,e);return xg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function kg(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 mg(Og({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Ig(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[bg[bg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[bg[bg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[bg[bg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[bg[bg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[bg[bg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===vg.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[bg["CURRENT"===t.PARAMETERS[2].VALUE?bg.IS_CURRENT:bg.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:xg.find(e=>e.type===i),value:o}}function Dg(e,t){return{combinator:fg.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 Dg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return kg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Ig(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Rg=class extends Zm{ruleConfigChanged(e,t){this.config=Object.assign({combinators:fg,operators:xg,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Dg(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=pg(e,Eg);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Rg.prototype,"ruleConfig",void 0),Rg=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:xm,template:Im})],Rg);const Ag={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Ng=[{type:Ag.PLUS,label:"Add (+)",applyTo:[...og],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Ag.MINUS,label:"Subtract (-)",applyTo:[...og],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Ag.MULTIPLY,label:"Multiply (*)",applyTo:[...og],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Ag.DIVIDE,label:"Divide (/)",applyTo:[...og],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Ag.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:Ag.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 Lg(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=hg(e),n=lg(o),a=o.operator.type;switch(a){case Ag.TRIM:case Ag.CONVERT_TO_DATE:case Ag.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Ag.TRIM:return ug(e,vg.methodCall.TRIM,[]);case Ag.CONVERT_TO_DATE:return ug(e,vg.methodCall.LONG_TO_DATE,[]);case Ag.CONVERT_TO_DATE_TIME:return ug(e,vg.methodCall.LONG_TO_DATE_TIME,[])}}(o,a);case Ag.PLUS:case Ag.MINUS:case Ag.DIVIDE:case Ag.MULTIPLY:return dg(o,a,n);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function Fg(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 mg(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Ng.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 Mg(e,t){return{combinator:em,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 Mg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Fg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Ag[Ag.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Ag[Ag.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Ag[Ag.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:Ng.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let _g=class extends Zm{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Mg(t.fields,i);this.config={combinators:[em],operators:Ng,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:Lg(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],_g.prototype,"valueConfig",void 0),_g=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:xm,template:Im})],_g);const Hg=l.html`
|
|
6181
|
+
`;let Qm=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),wm(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"!==bm(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(Km)})(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,Vm(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(Cm.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(Cm.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(Cm.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(Cm.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:qm(this.model,t,i)};this.dispatchEvent(new CustomEvent(Cm.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(Cm.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Wm(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Qm.prototype,"config",void 0),(0,C.Cg)([l.observable],Qm.prototype,"styles",void 0),(0,C.Cg)([l.observable],Qm.prototype,"model",void 0),(0,C.Cg)([l.observable],Qm.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Qm.prototype,"error",void 0),(0,C.Cg)([l.volatile],Qm.prototype,"operandIterator",null),Qm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Jm,styles:Xm,shadowOptions:{delegatesFocus:!0}})],Qm);let Zm=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=pm(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=mm(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(Cm.AddGroup,this.handleAddGroup),this.addEventListener(Cm.DelGroup,this.handleDeleteGroup),this.addEventListener(Cm.AddRule,this.handleAddRule),this.addEventListener(Cm.DelRule,this.handleDeleteRule),this.addEventListener(Cm.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(Cm.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(Cm.AddGroup,this.handleAddGroup),this.removeEventListener(Cm.DelGroup,this.handleDeleteGroup),this.removeEventListener(Cm.AddRule,this.handleAddRule),this.removeEventListener(Cm.DelRule,this.handleDeleteRule),this.removeEventListener(Cm.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(Cm.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:hm,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=um(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=um(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=rm(i=this.model,dm(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=rm(i=this.model,cm(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===hm?Object.assign(Object.assign({},e),i):rm(e,dm(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 rm(e,cm(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],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),Zm=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Im,styles:xm})],Zm);let eg=class extends Zm{};eg=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:xm,template:Im})],eg);const tg=["int","short","long"],ig=["double","bigdecimal"],og=[...tg,...ig],ng=["date","date-time"],sg=["string","enum"],ag=["boolean"],rg=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 lg(e){switch(rg(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 dg(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 cg(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function ug(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function hg(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=rg(e);if(sg.includes(i))return t;if(og.includes(i))return t.toString();if(ag.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(ng.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function pg(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?pg(e,t):t(e)).filter(Boolean)}}function mg(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=rg(e);if(sg.includes(i))return t;if(tg.includes(i))return parseInt(t);if(ig.includes(i))return parseFloat(t);if(ag.includes(i))return t;if(ng.includes(i)){const e=new Date(parseInt(t));return"date"===i?gm(e):vm(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const gg={template:Im,styles:xm};var vg;!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"})}(vg||(vg={}));const fg=[{type:vg.logicalOperations.AND,maxRules:"many"},{type:vg.logicalOperations.OR,maxRules:"many"}],bg={EQUALS:vg.operations.EQUALS,NOT_EQUALS:vg.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:vg.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:vg.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:vg.operations.LESS_THAN,LESS_THAN_OR_EQUAL:vg.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:vg.operations.IS_CURRENT,IS_PREVIOUS:vg.operations.IS_PREVIOUS},yg=e=>({type:"enum",input:"select",values:e}),wg=yg({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."}}),Cg=yg({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."}}),xg=[{type:bg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...sg,...ag,...og,...ng],tooltip:"Check the equality of the field compared to a set value"},{type:bg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...sg,...ag,...og,...ng],tooltip:"Check that the field is different from a set value"},{type:bg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...ag,...og,...ng],tooltip:"Check if the field value is null"},{type:bg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...ag,...og,...ng],tooltip:"Check if the field value is not null"},{type:bg.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:bg.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:bg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:bg.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:bg.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:bg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...og],tooltip:"Check if the field value is greater than a specified number"},{type:bg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...og],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:bg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...og],tooltip:"Check if the field value is less than a specified number"},{type:bg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...og],tooltip:"Check if the field value is less than or equal to a specified number"},{type:bg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field is before a specified date/time"},{type:bg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field is after a specified date/time"},{type:bg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field is on or before a specified date/time"},{type:bg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...ng],tooltip:"Check if the field is on or after a specified date/time"},{type:bg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...ng],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:Cg,optgroup:"Relative Period"},{type:bg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...ng],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:wg,optgroup:"Relative Period"}];function $g(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 Sg(e,t){switch(t){case bg.IS_NULL_OR_BLANK:return ug(e,vg.methodCall.IS_NULL_OR_BLANK,[]);case bg.NOT_NULL_OR_BLANK:return ug(e,vg.methodCall.NOT_NULL_OR_BLANK,[]);case bg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return ug(e,vg.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case bg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return ug(e,vg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case bg.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 ug(e,vg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case bg.IS_CURRENT:case bg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return ug(e,vg.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===bg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function Eg(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=hg(e),n=lg(o),s=$g(o.operator.type);switch(s){case bg.EQUALS:case bg.NOT_EQUALS:case bg.GREATER_THAN:case bg.GREATER_THAN_OR_EQUAL:case bg.LESS_THAN:case bg.LESS_THAN_OR_EQUAL:return dg(o,s,n);case bg.IS_NULL:return cg(o,vg.operations.EQUALS,{TYPE:"NULL"});case bg.NOT_NULL:return cg(o,vg.operations.NOT_EQUALS,{TYPE:"NULL"});case bg.IS_NULL_OR_BLANK:case bg.NOT_NULL_OR_BLANK:case bg.CONTAINS:case bg.CONTAINS_WORDS_STARTING_WITH:case bg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case bg.IS_CURRENT:case bg.IS_PREVIOUS:return Sg(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}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 Tg(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?bg[bg.IS_NULL]:bg[bg.NOT_NULL];return xg.find(t=>t.type===e)}const i=Og(t.OPERATION,e);return xg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function kg(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 mg(Tg({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Ig(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[bg[bg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[bg[bg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[bg[bg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[bg[bg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[bg[bg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===vg.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[bg["CURRENT"===t.PARAMETERS[2].VALUE?bg.IS_CURRENT:bg.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:xg.find(e=>e.type===i),value:o}}function Dg(e,t){return{combinator:fg.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 Dg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return kg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Ig(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Ag=class extends Zm{ruleConfigChanged(e,t){this.config=Object.assign({combinators:fg,operators:xg,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Dg(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=pg(e,Eg);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:xm,template:Im})],Ag);const Rg={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:Rg.PLUS,label:"Add (+)",applyTo:[...og],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Rg.MINUS,label:"Subtract (-)",applyTo:[...og],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Rg.MULTIPLY,label:"Multiply (*)",applyTo:[...og],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Rg.DIVIDE,label:"Divide (/)",applyTo:[...og],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Rg.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:Rg.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 Ng(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=hg(e),n=lg(o),s=o.operator.type;switch(s){case Rg.TRIM:case Rg.CONVERT_TO_DATE:case Rg.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Rg.TRIM:return ug(e,vg.methodCall.TRIM,[]);case Rg.CONVERT_TO_DATE:return ug(e,vg.methodCall.LONG_TO_DATE,[]);case Rg.CONVERT_TO_DATE_TIME:return ug(e,vg.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case Rg.PLUS:case Rg.MINUS:case Rg.DIVIDE:case Rg.MULTIPLY:return dg(o,s,n);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Fg(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 mg(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 Mg(e,t){return{combinator:em,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 Mg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Fg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Rg[Rg.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Rg[Rg.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Rg[Rg.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 _g=class extends Zm{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Mg(t.fields,i);this.config={combinators:[em],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:Ng(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],_g.prototype,"valueConfig",void 0),_g=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:xm,template:Im})],_g);const Hg=l.html`
|
|
6182
6182
|
<template ${(0,l.ref)("notificationListener")}>
|
|
6183
6183
|
<slot></slot>
|
|
6184
6184
|
</template>
|
|
6185
|
-
`;var zg;!function(e){e.NOTIFICATION_EVENT="notification-event"}(zg||(zg={}));const Pg={mode:"open",delegatesFocus:!0};class Ug 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(zg.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),ge(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,ti.d)(e))}):Qe.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}};Hd(r,this.tagName)}}(0,C.Cg)([l.observable],Ug.prototype,"notificationListener",void 0),(0,C.Cg)([oi.dm],Ug.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Ug.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Ug.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Ug.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Ug.prototype,"toastPosition",void 0),(0,C.Cg)([ni.yW],Ug.prototype,"datasource",void 0);const Bg=Ug.compose({baseName:"notification-listener",template:Hg,shadowOptions:Pg}),Gg=(e,t)=>i=>{const o="function"==typeof t?t:(n=t,e=>Object.assign(Object.assign({},n),e));var n;return l.FASTElement.define(class extends e{},o(i))};function jg(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 Vg,Wg=i(16171);!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Vg||(Vg={}));class Yg{constructor(e){this.analytics=(0,Wg.Ay)(e)}trackEvent(e,t){Da.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`),this.analytics.track(e,t)}}const qg=s.DI.createInterface(e=>e.singleton(Yg));var Kg=i(98647),Xg=i(35044);const Qg=(0,Xe.createLogger)("foundation-router");var Jg=i(36132),Zg=i(80751),ev=i(3479);const tv="$router",iv=Object.freeze({getOrCreateFor:e=>{const t=e[tv];return void 0!==t?t:e[tv]=new ov(e)},find:e=>ev.Ix.find(e),from:e=>ev.Ix.from(e)});class ov extends ev.LK{}const nv=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function av(e){return nv.test(e)}function sv(e){return e.config instanceof Kg.Y?e:iv.find(e)}function rv(e){return sv(e).parent}function lv(e){let t=sv(e);for(;t&&t.level>0;)t=t.parent;return t}function dv(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 cv(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 uv(e){return e.replace(`/*${Zg.N}`,"")}const hv=Object.freeze({path:Object.freeze({get current(){return Jg.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=sv(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&&av(e)?location.href=e:(history.pushState({},document.title,e),t&&hv.path.trigger(e))},replace:(e,t=!0)=>{e&&av(e)?location.href=e:(history.replaceState({},document.title,e),t&&hv.path.trigger(e))},trigger:e=>{Jg.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=sv(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 hv.name.generateRoute(e,t,i);null!==n&&hv.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 hv.name.generateRoute(e,t,i);null!==n&&hv.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 hv.name.generateRoute(e,t,i);null!==o&&hv.path.trigger(o)})})}),pv=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,mv=10;function gv(e,t=pv,i=mv){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 vv extends Zg.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(Qg.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return Qg.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return Qg.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}(0,C.Cg)([l.observable],vv.prototype,"definitions",void 0);class fv extends Kg.Y{constructor(){super(),this.logger=Qg,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new vv(this),this.basename=Hn.OB,this.routes=new vv(this)}getNavItems(e=pv){return gv(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Vg.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}.`),hv.name.replace(e.router,n)}else this.user.trackPath(),hv.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(),hv.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 hv.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&hv.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Xg.C.build(t);let n=i&&!e.startsWith(i)?dv([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?uv(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([s.Container],fv.prototype,"container",void 0),(0,C.Cg)([qg],fv.prototype,"analytics",void 0),(0,C.Cg)([El.KJ],fv.prototype,"user",void 0),(0,C.Cg)([yi.N],fv.prototype,"_session",void 0);const bv="navigate-to",yv="generate-navigation-path";let wv=class extends(iv.from(l.FASTElement)){constructor(){super(...arguments),this.logger=Qg,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[tv]}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(bv,this.onNavigateTo),this.addEventListener(yv,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(bv,this.onNavigateTo),this.removeEventListener(yv,this.onGenerateNavigationPath)}};wv=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],wv);const Cv=e=>l.html`
|
|
6185
|
+
`;var zg;!function(e){e.NOTIFICATION_EVENT="notification-event"}(zg||(zg={}));const Pg={mode:"open",delegatesFocus:!0};class Ug extends a.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(zg.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),ge(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,ti.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,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const r={title:t,body:i,createdAt:n,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};Hd(r,this.tagName)}}(0,C.Cg)([l.observable],Ug.prototype,"notificationListener",void 0),(0,C.Cg)([oi.dm],Ug.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Ug.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Ug.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Ug.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Ug.prototype,"toastPosition",void 0),(0,C.Cg)([ni.yW],Ug.prototype,"datasource",void 0);const Bg=Ug.compose({baseName:"notification-listener",template:Hg,shadowOptions:Pg}),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 Gg(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 Vg;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Vg||(Vg={}));class Yg{trackEvent(e,t){Ds.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const Wg=a.DI.createInterface(e=>e.singleton(Yg));var qg=i(98647),Kg=i(35044);const Xg=(0,Xe.createLogger)("foundation-router");var Jg=i(36132),Qg=i(80751),Zg=i(3479);const ev="$router",tv=Object.freeze({getOrCreateFor:e=>{const t=e[ev];return void 0!==t?t:e[ev]=new iv(e)},find:e=>Zg.Ix.find(e),from:e=>Zg.Ix.from(e)});class iv extends Zg.LK{}const ov=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function nv(e){return ov.test(e)}function sv(e){return e.config instanceof qg.Y?e:tv.find(e)}function av(e){return sv(e).parent}function rv(e){let t=sv(e);for(;t&&t.level>0;)t=t.parent;return t}function lv(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 dv(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 cv(e){return e.replace(`/*${Qg.N}`,"")}const uv=Object.freeze({path:Object.freeze({get current(){return Jg.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=sv(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&&nv(e)?location.href=e:(history.pushState({},document.title,e),t&&uv.path.trigger(e))},replace:(e,t=!0)=>{e&&nv(e)?location.href=e:(history.replaceState({},document.title,e),t&&uv.path.trigger(e))},trigger:e=>{Jg.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=sv(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 uv.name.generateRoute(e,t,i);null!==n&&uv.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 uv.name.generateRoute(e,t,i);null!==n&&uv.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 uv.name.generateRoute(e,t,i);null!==o&&uv.path.trigger(o)})})}),hv=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,pv=10;function mv(e,t=hv,i=pv){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,n)=>{e.navItems.filter(t).map((t,o)=>{var s,a,r,l;const d=null!==(s=t.placementIndex)&&void 0!==s?s:n*i+o;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}class gv extends Qg.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(Xg.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 Xg.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return Xg.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],gv.prototype,"definitions",void 0);class vv extends qg.Y{constructor(){super(),this.logger=Xg,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new gv(this),this.basename=Hn.OB,this.routes=new gv(this)}getNavItems(e=hv){return mv(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Vg.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}.`),uv.name.replace(e.router,n)}else this.user.trackPath(),uv.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(),uv.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 uv.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&uv.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Kg.C.build(t);let n=i&&!e.startsWith(i)?lv([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?cv(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([a.Container],vv.prototype,"container",void 0),(0,C.Cg)([Wg],vv.prototype,"analytics",void 0),(0,C.Cg)([El.KJ],vv.prototype,"user",void 0),(0,C.Cg)([yi.N],vv.prototype,"_session",void 0);const fv="navigate-to",bv="generate-navigation-path";let yv=class extends(tv.from(l.FASTElement)){constructor(){super(...arguments),this.logger=Xg,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[ev]}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(fv,this.onNavigateTo),this.addEventListener(bv,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(fv,this.onNavigateTo),this.removeEventListener(bv,this.onGenerateNavigationPath)}};yv=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],yv);const wv=e=>l.html`
|
|
6186
6186
|
|
|
6187
6187
|
<${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">
|
|
6188
6188
|
<div class=${e=>(0,x.x)("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])} part="stepper-tab-menu">
|
|
6189
6189
|
<slot name="tab" ${(0,l.slotted)("tabs")} ></slot>
|
|
6190
6190
|
</div>
|
|
6191
|
-
${(0,l.when)(e=>e.orientation===
|
|
6191
|
+
${(0,l.when)(e=>e.orientation===a.TabsOrientation.vertical,l.html`
|
|
6192
6192
|
<div class="stepper-tab-progress" part="stepper-tab-progress">
|
|
6193
6193
|
<${e}-progress-ring class="progress-ring" part="progress-ring" value=${e=>e.progressValue}></${e}-progress-ring>
|
|
6194
6194
|
<label>You have completed ${e=>e.progressValue}% of the fields required to create a project</label>
|
|
@@ -6213,9 +6213,9 @@ class="margin"
|
|
|
6213
6213
|
</div>
|
|
6214
6214
|
`)}
|
|
6215
6215
|
</${e}-card>
|
|
6216
|
-
`,
|
|
6217
|
-
${e=>
|
|
6218
|
-
|
|
6216
|
+
`,Cv=l.html`
|
|
6217
|
+
${e=>wv(T(e))}
|
|
6218
|
+
`,xv=l.css`
|
|
6219
6219
|
:host {
|
|
6220
6220
|
display: flex;
|
|
6221
6221
|
height: 100%;
|
|
@@ -6314,5 +6314,5 @@ class="margin"
|
|
|
6314
6314
|
max-height: 70px;
|
|
6315
6315
|
height: 70px;
|
|
6316
6316
|
}
|
|
6317
|
-
`;class
|
|
6318
|
-
//# sourceMappingURL=210.
|
|
6317
|
+
`;class $v extends a.FoundationElement{constructor(){super(...arguments),this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.orientation=a.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],s=this.tabpanelIds[t];e.setAttribute("id",n),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-disabled",i?"false":"true"),e.setAttribute("selected",i?"true":"false"),e.setAttribute("orientation",this.orientation),e.setAttribute("aria-controls",s),e.setAttribute("aria-controls",s),e.setAttribute("tab-position",String(t+1)),e.setAttribute("isLast",String(o)),e.setAttribute("hideStepNumber",String(!0===this.hideStepNumber)),e.setAttribute("tabindex",i?"0":"-1"),e.setAttribute("showCursorPointer",String(t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps)),i&&(this.activetab=e,this.activeid=n)}}),0===this.activeTabIndex&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)}),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 Je.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):(Je.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,oa.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,oa.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],$v.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],$v.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],$v.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],$v.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],$v.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],$v.prototype,"hideTabs",void 0),(0,C.Cg)([l.attr],$v.prototype,"orientation",void 0),(0,C.Cg)([l.attr],$v.prototype,"activeid",void 0),(0,C.Cg)([l.observable],$v.prototype,"tabs",void 0),(0,C.Cg)([l.observable],$v.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],$v.prototype,"validation",void 0),(0,C.Cg)([l.observable],$v.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],$v.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],$v.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],$v.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],$v.prototype,"islastStepValid",null);const Sv=void 0,Ev={},Ov=$v.compose(Object.assign({baseName:"stepper",template:Cv,styles:xv,shadowOptions:Sv},Ev)),Tv=["text-field","text-area","combobox"],kv=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],Iv=e=>Tv.map(t=>`${e}-${t}`),Dv={rapid:Iv("rapid"),zero:Iv("zero")};function Av(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=Dv[e])&&void 0!==t?t:[]}),o=t.filter(Boolean);return Array.from(new Set([...kv,...i,...o])).join(",")}const Rv=()=>Ql().register(Kp)},70997(e,t,i){"use strict";function o(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),s=o(i);return(t,i)=>e(t,i)?n(t,i):s(t,i)}i.d(t,{q:()=>o})},80273(e,t,i){"use strict";i.d(t,{Du:()=>l,IT:()=>a,WP:()=>n,f4:()=>r,zz:()=>s});var o=i(52945);const n=(e,t)=>{(0,o.O5)(e,t)};var s,a;!function(e){e.Italic="italic",e.Normal="normal"}(s||(s={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(a||(a={}));const r=(e,t=s.Normal,i=a.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${i};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}}}]);
|
|
6318
|
+
//# sourceMappingURL=210.f52c021da7728db257d40867daf62262.js.map
|