@momentum-ui/web-components 2.13.19 → 2.13.20
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/chunks/md-10.js +2 -2
- package/dist/chunks/md-11.js +1 -1
- package/dist/chunks/md-16.js +1 -1
- package/dist/chunks/md-17.js +1 -1
- package/dist/chunks/md-18.js +1 -1
- package/dist/chunks/md-26.js +1 -1
- package/dist/chunks/md-27.js +1 -1
- package/dist/chunks/md-29.js +1 -1
- package/dist/chunks/md-33.js +1 -1
- package/dist/chunks/md-34.js +1 -1
- package/dist/chunks/md-35.js +1 -1
- package/dist/chunks/md-39.js +1 -1
- package/dist/chunks/md-41.js +1 -1
- package/dist/chunks/md-42.js +1 -1
- package/dist/chunks/md-44.js +1 -1
- package/dist/chunks/md-46.js +1 -1
- package/dist/chunks/md-49.js +101 -42
- package/dist/chunks/md-50.js +1 -1
- package/dist/chunks/md-51.js +1 -1
- package/dist/chunks/md-53.js +1 -1
- package/dist/chunks/md-54.js +1 -1
- package/dist/chunks/md-57.js +1 -1
- package/dist/chunks/md-61.js +1 -1
- package/dist/chunks/md-63.js +1 -1
- package/dist/chunks/md-64.js +1 -1
- package/dist/chunks/md-65.js +1 -1
- package/dist/chunks/md-66.js +1 -1
- package/dist/chunks/md-67.js +1 -1
- package/dist/chunks/md-68.js +1 -1
- package/dist/chunks/md-69.js +1 -1
- package/dist/chunks/md-7.js +1 -1
- package/dist/chunks/md-70.js +1 -1
- package/dist/chunks/md-71.js +1 -1
- package/dist/chunks/md-73.js +1 -1
- package/dist/chunks/md-74.js +1 -1
- package/dist/chunks/md-75.js +1 -1
- package/dist/chunks/md-76.js +1 -1
- package/dist/chunks/md-78.js +1 -1
- package/dist/chunks/md-80.js +2 -2
- package/dist/chunks/md-81.js +1 -1
- package/dist/chunks/md-83.js +1 -1
- package/dist/chunks/md-84.js +2 -2
- package/dist/chunks/md-85.js +1 -1
- package/dist/chunks/md-86.js +1 -1
- package/dist/comp/md-accordion-item-entry.js +1 -1
- package/dist/comp/md-activity-button-entry.js +1 -1
- package/dist/comp/md-alert-banner-entry.js +1 -1
- package/dist/comp/md-alert-entry.js +1 -1
- package/dist/comp/md-audio-player-entry.js +1 -1
- package/dist/comp/md-avatar-entry.js +1 -1
- package/dist/comp/md-badge-entry.js +1 -1
- package/dist/comp/md-breadcrumb-entry.js +1 -1
- package/dist/comp/md-button-entry.js +1 -1
- package/dist/comp/md-card-entry.js +1 -1
- package/dist/comp/md-chat-message-entry.js +1 -1
- package/dist/comp/md-chip-entry.js +1 -1
- package/dist/comp/md-coachmark-entry.js +1 -1
- package/dist/comp/md-combobox-entry.js +1 -1
- package/dist/comp/md-date-range-picker-entry.js +1 -1
- package/dist/comp/md-date-time-picker-entry.js +1 -1
- package/dist/comp/md-datepicker-calendar-entry.js +1 -1
- package/dist/comp/md-datepicker-day-entry.js +1 -1
- package/dist/comp/md-datepicker-entry.js +1 -1
- package/dist/comp/md-datepicker-month-entry.js +1 -1
- package/dist/comp/md-datepicker-week-entry.js +1 -1
- package/dist/comp/md-draggable-item-entry.js +1 -1
- package/dist/comp/md-dropdown-entry.js +1 -1
- package/dist/comp/md-editable-field-entry.js +1 -1
- package/dist/comp/md-favorite-entry.js +1 -1
- package/dist/comp/md-floating-minimize-entry.js +1 -1
- package/dist/comp/md-floating-modal-entry.js +1 -1
- package/dist/comp/md-form-entry.js +1 -1
- package/dist/comp/md-grabber-entry.js +1 -1
- package/dist/comp/md-icon-entry.js +1 -1
- package/dist/comp/md-input-entry.js +1 -1
- package/dist/comp/md-input-file.js +1 -1
- package/dist/comp/md-link-entry.js +1 -1
- package/dist/comp/md-list-entry.js +1 -1
- package/dist/comp/md-meeting-alert-entry.js +1 -1
- package/dist/comp/md-menu-entry.js +1 -1
- package/dist/comp/md-menu-item-entry.js +1 -1
- package/dist/comp/md-menu-overlay-entry.js +1 -1
- package/dist/comp/md-modal-entry.js +1 -1
- package/dist/comp/md-pagination-entry.js +1 -1
- package/dist/comp/md-phone-input-entry.js +1 -1
- package/dist/comp/md-radio-entry.js +1 -1
- package/dist/comp/md-slider-entry.js +1 -1
- package/dist/comp/md-tab-entry.js +1 -1
- package/dist/comp/md-table-advanced-entry.js +1 -1
- package/dist/comp/md-table-entry.js +1 -1
- package/dist/comp/md-tabs-entry.js +1 -1
- package/dist/comp/md-task-item-entry.js +1 -1
- package/dist/comp/md-timepicker-entry.js +1 -1
- package/dist/comp/md-toggle-switch-entry.js +1 -1
- package/dist/index-entry.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/components/alert/Alert.d.ts +15 -0
- package/dist/types/utils/enums.d.ts +1 -0
- package/package.json +2 -2
package/dist/chunks/md-73.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[73],{120:function(d,e,m){"use strict";m.r(e),m.d(e,"modalType",(function(){return f})),m.d(e,"Modal",(function(){return p}));m(17),m(15);var o=m(1),a=m(7),l=m(6),t=m(5),i=m(0),n=m(3),r=m(4),s=m(2),h=i.css`.md-modal{color:var(--md-primary-text-color,#121212);display:block;height:100vh;left:0;margin:0 auto;position:fixed;right:0;visibility:visible;width:100vw;width:100vw;max-height:none;top:auto}.md-modal .md-modal__content{height:auto;min-height:0;max-height:none}.md-modal .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal .md-modal__title{color:var(--md-primary-text-color,#707070)}.md-modal:focus{box-shadow:none}.md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1rem;line-height:1.5rem;width:100%;flex-shrink:0;padding-bottom:1rem;padding-left:calc(1rem/2);padding-right:calc(1rem/2)}.md-modal__header h2{font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}.md-modal__header .md-modal__title{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%}.md-modal__header .md-modal__message{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:.875rem;line-height:1.5rem;width:100%;color:var(--modal-main-text-color,#545454);flex-flow:row wrap;text-align:center}.md-modal__header .md-modal__close{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;border:0;position:absolute}.md-modal__content{background-color:var(--modal-main-bg-color,#fff);box-shadow:0 8px 16px 0 rgba(0,0,0,.16);border:1px solid var(--modal-main-border-color,#dedede);display:flex;flex-direction:column}.md-modal__flex-container{display:flex;flex:1 1 0%;flex-direction:column;max-height:inherit;min-height:inherit;padding:var(--modal-main-padding,1.5rem 1rem);width:100%}.md-modal__body{align-items:stretch;align-self:stretch;background:var(--modal-main-bg-color,#fff);display:flex;flex:1 1 auto;flex-direction:column;margin:0;overflow-x:hidden;overflow-y:auto;padding-left:calc(1rem/2);padding-right:calc(1rem/2)}.md-modal__body--padding{padding:0 2rem}.md-modal__footer{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-end;flex-shrink:0;padding-left:calc(1rem/2);padding-right:calc(1rem/2);padding-top:1rem;width:100%}.md-modal__footer md-button:not(:first-of-type){margin-left:.75rem}.md-modal__footer ::slotted(md-button){margin-left:.75rem}.md-modal.md-modal--full{width:100vw;max-height:none;top:auto}.md-modal.md-modal--full .md-modal__content{height:100vh;min-height:0;max-height:none}.md-modal.md-modal--full .md-modal__content{border-radius:0}.md-modal.md-modal--full .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:2.25rem;line-height:3rem;width:100%}.md-modal.md-modal--full .md-modal__header .md-modal__message{font-size:1.25rem;line-height:2rem;padding-top:1.25rem}.md-modal.md-modal--full .md-modal__header .md-modal__close{height:1.25rem;right:1.5rem;top:auto;width:1.25rem}.md-modal.md-modal--full .md-modal__header .md-modal__close::before{font-size:1.25rem}.md-modal.md-modal--full .md-modal__footer{padding-bottom:1.5rem;padding-top:1.5rem}.md-modal.md-modal--large{width:60rem;max-height:none;top:auto}.md-modal.md-modal--large .md-modal__content{min-height:45rem;max-height:none}.md-modal.md-modal--large .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1.625rem;line-height:2rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:1rem;line-height:1.5rem;text-align:left}.md-modal.md-modal--large .md-modal__header .md-modal__close{height:1rem;right:1rem;top:auto;width:1rem}.md-modal.md-modal--large .md-modal__header .md-modal__close::before{font-size:1rem}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--large{width:40rem;max-height:none;top:auto}.md-modal.md-modal--large .md-modal__content{min-height:30rem;max-height:none}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1rem;line-height:1.5rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;text-align:center}.md-modal.md-modal--large .md-modal__header .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--large .md-modal__header .md-modal__close::before{font-size:.875rem}}@media only screen and (max-height:50em){.md-modal.md-modal--large .md-modal__content{min-height:auto}}.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:none}.md-modal.md-modal--default .md-modal__close,.md-modal.md-modal--medium .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--default .md-modal__close::before,.md-modal.md-modal--medium .md-modal__close::before{font-size:.875rem}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:none}}@media only screen and (max-height:50em){.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:auto}}.md-modal.md-modal--small{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:none}.md-modal.md-modal--small .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--small .md-modal__close::before{font-size:.875rem}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--small{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:none}}.md-modal.md-modal--dialog{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--dialog .md-modal__content{height:auto;min-height:0;max-height:none}.md-modal.md-modal--dialog .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal.md-modal--dialog .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--dialog .md-modal__close::before{font-size:.875rem}.md-modal.md-modal--dialog .md-modal__content{flex-direction:row}.md-modal.md-modal--dialog .md-modal__content .md-modal__header{align-items:flex-start;padding:0 0 .75rem 0}.md-modal.md-modal--dialog .md-modal__content .md-modal__title{font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:16px;line-height:1.5rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__body{margin-bottom:1.5rem;text-align:left}.md-modal.md-modal--dialog .md-modal__content .md-modal__body>*{font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:14px;line-height:1.375rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__footer{display:flex;justify-content:flex-end;padding:0}.md-modal.md-modal--default,.md-modal.md-modal--dialog,.md-modal.md-modal--full,.md-modal.md-modal--large,.md-modal.md-modal--medium,.md-modal.md-modal--small{display:flex;flex-direction:column;justify-content:center}@media only screen and (max-width:40em){.md-modal.md-modal--default.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--dialog.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--large.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--medium.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--small.md-modal--dialog .md-modal__flex-container{min-height:calc(100vh - 1.5rem*2)}}@media only screen and (max-width:40em){.md-modal.md-modal--default,.md-modal.md-modal--dialog,.md-modal.md-modal--full,.md-modal.md-modal--large,.md-modal.md-modal--medium,.md-modal.md-modal--small{width:100vw;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--dialog .md-modal__content,.md-modal.md-modal--full .md-modal__content,.md-modal.md-modal--large .md-modal__content,.md-modal.md-modal--medium .md-modal__content,.md-modal.md-modal--small .md-modal__content{height:100vh;min-height:0;max-height:none}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--dialog .md-modal__content,.md-modal.md-modal--full .md-modal__content,.md-modal.md-modal--large .md-modal__content,.md-modal.md-modal--medium .md-modal__content,.md-modal.md-modal--small .md-modal__content{border-radius:0}.md-modal.md-modal--default .md-modal__flex-container,.md-modal.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full .md-modal__flex-container,.md-modal.md-modal--large .md-modal__flex-container,.md-modal.md-modal--medium .md-modal__flex-container,.md-modal.md-modal--small .md-modal__flex-container{min-height:100vh}.md-modal.md-modal--default .md-modal__header,.md-modal.md-modal--dialog .md-modal__header,.md-modal.md-modal--full .md-modal__header,.md-modal.md-modal--large .md-modal__header,.md-modal.md-modal--medium .md-modal__header,.md-modal.md-modal--small .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:.875rem;line-height:1.5rem;width:100%}.md-modal.md-modal--default .md-modal__header .md-modal__message,.md-modal.md-modal--dialog .md-modal__header .md-modal__message,.md-modal.md-modal--full .md-modal__header .md-modal__message,.md-modal.md-modal--large .md-modal__header .md-modal__message,.md-modal.md-modal--medium .md-modal__header .md-modal__message,.md-modal.md-modal--small .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;padding-top:.75rem}.md-modal.md-modal--default .md-modal__header .md-modal__close,.md-modal.md-modal--dialog .md-modal__header .md-modal__close,.md-modal.md-modal--full .md-modal__header .md-modal__close,.md-modal.md-modal--large .md-modal__header .md-modal__close,.md-modal.md-modal--medium .md-modal__header .md-modal__close,.md-modal.md-modal--small .md-modal__header .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--default .md-modal__header .md-modal__close::before,.md-modal.md-modal--dialog .md-modal__header .md-modal__close::before,.md-modal.md-modal--full .md-modal__header .md-modal__close::before,.md-modal.md-modal--large .md-modal__header .md-modal__close::before,.md-modal.md-modal--medium .md-modal__header .md-modal__close::before,.md-modal.md-modal--small .md-modal__header .md-modal__close::before{font-size:.875rem}.md-modal.md-modal--default .md-modal__footer,.md-modal.md-modal--dialog .md-modal__footer,.md-modal.md-modal--full .md-modal__footer,.md-modal.md-modal--large .md-modal__footer,.md-modal.md-modal--medium .md-modal__footer,.md-modal.md-modal--small .md-modal__footer{padding:var(--modal-main-padding,1.5rem 1rem);padding-right:1.5rem}.md-modal.md-modal--default .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--dialog .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--full .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--large .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--medium .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--small .md-modal__footer md-button:not(:first-of-type){margin-left:1rem}}.md-modal__backdrop{background:rgba(0,0,0,.45);bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:1040}.md-modal__backdrop .md-modal_overlay{bottom:0;position:absolute;top:0;width:100%}.md-close{color:#545454;float:right;font-size:21px;font-weight:700;line-height:1;text-shadow:0 1px 0 #fff}.md-close:focus,.md-close:hover{color:#064157;cursor:pointer;text-decoration:none}.md-close{background:rgba(0,0,0,0);border-radius:0;cursor:pointer;font-weight:400;min-width:initial;padding:0}.md-close::before{font-family:momentum-ui-icons;vertical-align:middle}.md-close:hover{color:#005e7d}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}`,c=function(d,e,m,o){var a,l=arguments.length,t=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,m):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)t=Reflect.decorate(d,e,m,o);else for(var i=d.length-1;i>=0;i--)(a=d[i])&&(t=(l<3?a(t):l>3?a(e,m,t):a(e,m))||t);return l>3&&t&&Object.defineProperty(e,m,t),t},_=function(d,e,m,o){return new(m||(m=Promise))((function(a,l){function t(d){try{n(o.next(d))}catch(d){l(d)}}function i(d){try{n(o.throw(d))}catch(d){l(d)}}function n(d){var e;d.done?a(d.value):(e=d.value,e instanceof m?e:new m((function(d){d(e)}))).then(t,i)}n((o=o.apply(d,e||[])).next())}))};const f=["default","full","large","small","dialog"];var p;!function(d){let e=class extends(Object(a.b)(i.LitElement)){constructor(){super(...arguments),this.show=!1,this.headerLabel="",this.headerMessage="",this.htmlId="",this.ariaLabel="modal",this.ariaLabelClose="Close Modal",this.ariaLabelCancel="Cancel Modal",this.ariaLabelSubmit="Submit Modal",this.ariaDescription="",this.showCloseButton=!1,this.backdropClickExit=!1,this.noExitOnEsc=!1,this.size="default",this.closeBtnName="",this.hideFooter=!1,this.hideHeader=!1,this.disableInitialFocus=!1,this.animating=!1,this.handleCloseOutside=d=>{d.code===o.b.Escape&&(d.preventDefault(),this.show&&!this.noExitOnEsc&&(this.show=!1))}}static get styles(){return[t.a,h]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleCloseOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleCloseOutside)}update(d){super.update(d),d.has("show")&&(this.show?this.modalFadeIn():!0===d.get("show")&&this.modalFadeOut())}notifyModalClose(){this.dispatchEvent(new CustomEvent("close-modal",{composed:!0,bubbles:!0}))}focusInsideModal(){var d;(null===(d=this.focusableElements)||void 0===d?void 0:d.length)&&this.setInitialFocus()}handleKeyDown(d){d.code!==o.b.Enter&&d.code!==o.b.Space||this.show&&(this.show=!0)}transitionPromise(d){return new Promise(e=>{const m=()=>{d.removeEventListener("transitionend",m),this.activateFocusTrap(),this.setFocusableElements(),requestAnimationFrame(()=>{e()})},o=()=>{d.removeEventListener("transitioncancel",o),this.deactivateFocusTrap(),this.modalFadeOut(),e()};d.addEventListener("transitionend",m),d.addEventListener("transitioncancel",o),setTimeout(()=>{this.animating=!0},13)})}modalFadeIn(){return _(this,void 0,void 0,(function*(){this.backDrop&&(yield this.transitionPromise(this.backDrop),this.disableInitialFocus||this.focusInsideModal())}))}modalFadeOut(){this.animating=!1,this.deactivateFocusTrap(),this.notifyModalClose()}handleCloseBackdrop(){this.backdropClickExit&&(this.show=!1)}hideModal(){this.animating=!1,this.show=!1}topCloseBtnTemplate(){return i.html`
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[73],{120:function(d,e,m){"use strict";m.r(e),m.d(e,"modalType",(function(){return f})),m.d(e,"Modal",(function(){return p}));m(17),m(15);var o=m(1),a=m(7),l=m(6),t=m(5),i=m(0),n=m(2),r=m(4),s=m(3),h=i.css`.md-modal{color:var(--md-primary-text-color,#121212);display:block;height:100vh;left:0;margin:0 auto;position:fixed;right:0;visibility:visible;width:100vw;width:100vw;max-height:none;top:auto}.md-modal .md-modal__content{height:auto;min-height:0;max-height:none}.md-modal .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal .md-modal__title{color:var(--md-primary-text-color,#707070)}.md-modal:focus{box-shadow:none}.md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1rem;line-height:1.5rem;width:100%;flex-shrink:0;padding-bottom:1rem;padding-left:calc(1rem/2);padding-right:calc(1rem/2)}.md-modal__header h2{font-size:inherit;font-weight:inherit;line-height:inherit;margin:0}.md-modal__header .md-modal__title{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:100%}.md-modal__header .md-modal__message{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:.875rem;line-height:1.5rem;width:100%;color:var(--modal-main-text-color,#545454);flex-flow:row wrap;text-align:center}.md-modal__header .md-modal__close{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;border:0;position:absolute}.md-modal__content{background-color:var(--modal-main-bg-color,#fff);box-shadow:0 8px 16px 0 rgba(0,0,0,.16);border:1px solid var(--modal-main-border-color,#dedede);display:flex;flex-direction:column}.md-modal__flex-container{display:flex;flex:1 1 0%;flex-direction:column;max-height:inherit;min-height:inherit;padding:var(--modal-main-padding,1.5rem 1rem);width:100%}.md-modal__body{align-items:stretch;align-self:stretch;background:var(--modal-main-bg-color,#fff);display:flex;flex:1 1 auto;flex-direction:column;margin:0;overflow-x:hidden;overflow-y:auto;padding-left:calc(1rem/2);padding-right:calc(1rem/2)}.md-modal__body--padding{padding:0 2rem}.md-modal__footer{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:flex-end;flex-shrink:0;padding-left:calc(1rem/2);padding-right:calc(1rem/2);padding-top:1rem;width:100%}.md-modal__footer md-button:not(:first-of-type){margin-left:.75rem}.md-modal__footer ::slotted(md-button){margin-left:.75rem}.md-modal.md-modal--full{width:100vw;max-height:none;top:auto}.md-modal.md-modal--full .md-modal__content{height:100vh;min-height:0;max-height:none}.md-modal.md-modal--full .md-modal__content{border-radius:0}.md-modal.md-modal--full .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:2.25rem;line-height:3rem;width:100%}.md-modal.md-modal--full .md-modal__header .md-modal__message{font-size:1.25rem;line-height:2rem;padding-top:1.25rem}.md-modal.md-modal--full .md-modal__header .md-modal__close{height:1.25rem;right:1.5rem;top:auto;width:1.25rem}.md-modal.md-modal--full .md-modal__header .md-modal__close::before{font-size:1.25rem}.md-modal.md-modal--full .md-modal__footer{padding-bottom:1.5rem;padding-top:1.5rem}.md-modal.md-modal--large{width:60rem;max-height:none;top:auto}.md-modal.md-modal--large .md-modal__content{min-height:45rem;max-height:none}.md-modal.md-modal--large .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1.625rem;line-height:2rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:1rem;line-height:1.5rem;text-align:left}.md-modal.md-modal--large .md-modal__header .md-modal__close{height:1rem;right:1rem;top:auto;width:1rem}.md-modal.md-modal--large .md-modal__header .md-modal__close::before{font-size:1rem}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--large{width:40rem;max-height:none;top:auto}.md-modal.md-modal--large .md-modal__content{min-height:30rem;max-height:none}.md-modal.md-modal--large .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:1rem;line-height:1.5rem;width:100%}.md-modal.md-modal--large .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;text-align:center}.md-modal.md-modal--large .md-modal__header .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--large .md-modal__header .md-modal__close::before{font-size:.875rem}}@media only screen and (max-height:50em){.md-modal.md-modal--large .md-modal__content{min-height:auto}}.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:none}.md-modal.md-modal--default .md-modal__close,.md-modal.md-modal--medium .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--default .md-modal__close::before,.md-modal.md-modal--medium .md-modal__close::before{font-size:.875rem}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--default,.md-modal.md-modal--medium{width:40rem;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:30rem;max-height:none}}@media only screen and (max-height:50em){.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--medium .md-modal__content{min-height:auto}}.md-modal.md-modal--small{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:none}.md-modal.md-modal--small .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--small .md-modal__close::before{font-size:.875rem}@media only screen and (min-width:40.0625em)and (max-width:64em){.md-modal.md-modal--small{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--small .md-modal__content{min-height:23.75rem;max-height:none}}.md-modal.md-modal--dialog{width:27.5rem;max-height:none;top:auto}.md-modal.md-modal--dialog .md-modal__content{height:auto;min-height:0;max-height:none}.md-modal.md-modal--dialog .md-modal__content{border-radius:var(--modal-main-radius,.5rem)}.md-modal.md-modal--dialog .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--dialog .md-modal__close::before{font-size:.875rem}.md-modal.md-modal--dialog .md-modal__content{flex-direction:row}.md-modal.md-modal--dialog .md-modal__content .md-modal__header{align-items:flex-start;padding:0 0 .75rem 0}.md-modal.md-modal--dialog .md-modal__content .md-modal__title{font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:16px;line-height:1.5rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__body{margin-bottom:1.5rem;text-align:left}.md-modal.md-modal--dialog .md-modal__content .md-modal__body>*{font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:14px;line-height:1.375rem}.md-modal.md-modal--dialog .md-modal__content .md-modal__footer{display:flex;justify-content:flex-end;padding:0}.md-modal.md-modal--default,.md-modal.md-modal--dialog,.md-modal.md-modal--full,.md-modal.md-modal--large,.md-modal.md-modal--medium,.md-modal.md-modal--small{display:flex;flex-direction:column;justify-content:center}@media only screen and (max-width:40em){.md-modal.md-modal--default.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--dialog.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--large.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--medium.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--small.md-modal--dialog .md-modal__flex-container{min-height:calc(100vh - 1.5rem*2)}}@media only screen and (max-width:40em){.md-modal.md-modal--default,.md-modal.md-modal--dialog,.md-modal.md-modal--full,.md-modal.md-modal--large,.md-modal.md-modal--medium,.md-modal.md-modal--small{width:100vw;max-height:none;top:auto}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--dialog .md-modal__content,.md-modal.md-modal--full .md-modal__content,.md-modal.md-modal--large .md-modal__content,.md-modal.md-modal--medium .md-modal__content,.md-modal.md-modal--small .md-modal__content{height:100vh;min-height:0;max-height:none}.md-modal.md-modal--default .md-modal__content,.md-modal.md-modal--dialog .md-modal__content,.md-modal.md-modal--full .md-modal__content,.md-modal.md-modal--large .md-modal__content,.md-modal.md-modal--medium .md-modal__content,.md-modal.md-modal--small .md-modal__content{border-radius:0}.md-modal.md-modal--default .md-modal__flex-container,.md-modal.md-modal--dialog .md-modal__flex-container,.md-modal.md-modal--full .md-modal__flex-container,.md-modal.md-modal--large .md-modal__flex-container,.md-modal.md-modal--medium .md-modal__flex-container,.md-modal.md-modal--small .md-modal__flex-container{min-height:100vh}.md-modal.md-modal--default .md-modal__header,.md-modal.md-modal--dialog .md-modal__header,.md-modal.md-modal--full .md-modal__header,.md-modal.md-modal--large .md-modal__header,.md-modal.md-modal--medium .md-modal__header,.md-modal.md-modal--small .md-modal__header{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:.875rem;line-height:1.5rem;width:100%}.md-modal.md-modal--default .md-modal__header .md-modal__message,.md-modal.md-modal--dialog .md-modal__header .md-modal__message,.md-modal.md-modal--full .md-modal__header .md-modal__message,.md-modal.md-modal--large .md-modal__header .md-modal__message,.md-modal.md-modal--medium .md-modal__header .md-modal__message,.md-modal.md-modal--small .md-modal__header .md-modal__message{font-size:.875rem;line-height:1.5rem;padding-top:.75rem}.md-modal.md-modal--default .md-modal__header .md-modal__close,.md-modal.md-modal--dialog .md-modal__header .md-modal__close,.md-modal.md-modal--full .md-modal__header .md-modal__close,.md-modal.md-modal--large .md-modal__header .md-modal__close,.md-modal.md-modal--medium .md-modal__header .md-modal__close,.md-modal.md-modal--small .md-modal__header .md-modal__close{height:.875rem;right:.75rem;top:auto;width:.875rem}.md-modal.md-modal--default .md-modal__header .md-modal__close::before,.md-modal.md-modal--dialog .md-modal__header .md-modal__close::before,.md-modal.md-modal--full .md-modal__header .md-modal__close::before,.md-modal.md-modal--large .md-modal__header .md-modal__close::before,.md-modal.md-modal--medium .md-modal__header .md-modal__close::before,.md-modal.md-modal--small .md-modal__header .md-modal__close::before{font-size:.875rem}.md-modal.md-modal--default .md-modal__footer,.md-modal.md-modal--dialog .md-modal__footer,.md-modal.md-modal--full .md-modal__footer,.md-modal.md-modal--large .md-modal__footer,.md-modal.md-modal--medium .md-modal__footer,.md-modal.md-modal--small .md-modal__footer{padding:var(--modal-main-padding,1.5rem 1rem);padding-right:1.5rem}.md-modal.md-modal--default .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--dialog .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--full .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--large .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--medium .md-modal__footer md-button:not(:first-of-type),.md-modal.md-modal--small .md-modal__footer md-button:not(:first-of-type){margin-left:1rem}}.md-modal__backdrop{background:rgba(0,0,0,.45);bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:1040}.md-modal__backdrop .md-modal_overlay{bottom:0;position:absolute;top:0;width:100%}.md-close{color:#545454;float:right;font-size:21px;font-weight:700;line-height:1;text-shadow:0 1px 0 #fff}.md-close:focus,.md-close:hover{color:#064157;cursor:pointer;text-decoration:none}.md-close{background:rgba(0,0,0,0);border-radius:0;cursor:pointer;font-weight:400;min-width:initial;padding:0}.md-close::before{font-family:momentum-ui-icons;vertical-align:middle}.md-close:hover{color:#005e7d}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}`,c=function(d,e,m,o){var a,l=arguments.length,t=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,m):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)t=Reflect.decorate(d,e,m,o);else for(var i=d.length-1;i>=0;i--)(a=d[i])&&(t=(l<3?a(t):l>3?a(e,m,t):a(e,m))||t);return l>3&&t&&Object.defineProperty(e,m,t),t},_=function(d,e,m,o){return new(m||(m=Promise))((function(a,l){function t(d){try{n(o.next(d))}catch(d){l(d)}}function i(d){try{n(o.throw(d))}catch(d){l(d)}}function n(d){var e;d.done?a(d.value):(e=d.value,e instanceof m?e:new m((function(d){d(e)}))).then(t,i)}n((o=o.apply(d,e||[])).next())}))};const f=["default","full","large","small","dialog"];var p;!function(d){let e=class extends(Object(a.b)(i.LitElement)){constructor(){super(...arguments),this.show=!1,this.headerLabel="",this.headerMessage="",this.htmlId="",this.ariaLabel="modal",this.ariaLabelClose="Close Modal",this.ariaLabelCancel="Cancel Modal",this.ariaLabelSubmit="Submit Modal",this.ariaDescription="",this.showCloseButton=!1,this.backdropClickExit=!1,this.noExitOnEsc=!1,this.size="default",this.closeBtnName="",this.hideFooter=!1,this.hideHeader=!1,this.disableInitialFocus=!1,this.animating=!1,this.handleCloseOutside=d=>{d.code===o.b.Escape&&(d.preventDefault(),this.show&&!this.noExitOnEsc&&(this.show=!1))}}static get styles(){return[t.a,h]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleCloseOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleCloseOutside)}update(d){super.update(d),d.has("show")&&(this.show?this.modalFadeIn():!0===d.get("show")&&this.modalFadeOut())}notifyModalClose(){this.dispatchEvent(new CustomEvent("close-modal",{composed:!0,bubbles:!0}))}focusInsideModal(){var d;(null===(d=this.focusableElements)||void 0===d?void 0:d.length)&&this.setInitialFocus()}handleKeyDown(d){d.code!==o.b.Enter&&d.code!==o.b.Space||this.show&&(this.show=!0)}transitionPromise(d){return new Promise(e=>{const m=()=>{d.removeEventListener("transitionend",m),this.activateFocusTrap(),this.setFocusableElements(),requestAnimationFrame(()=>{e()})},o=()=>{d.removeEventListener("transitioncancel",o),this.deactivateFocusTrap(),this.modalFadeOut(),e()};d.addEventListener("transitionend",m),d.addEventListener("transitioncancel",o),setTimeout(()=>{this.animating=!0},13)})}modalFadeIn(){return _(this,void 0,void 0,(function*(){this.backDrop&&(yield this.transitionPromise(this.backDrop),this.disableInitialFocus||this.focusInsideModal())}))}modalFadeOut(){this.animating=!1,this.deactivateFocusTrap(),this.notifyModalClose()}handleCloseBackdrop(){this.backdropClickExit&&(this.show=!1)}hideModal(){this.animating=!1,this.show=!1}topCloseBtnTemplate(){return i.html`
|
|
2
2
|
${this.showCloseButton?i.html`
|
|
3
3
|
<md-button
|
|
4
4
|
hasRemoveStyle
|
package/dist/chunks/md-74.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[74],{121:function(t,i,e){"use strict";e.r(i),e.d(i,"Pagination",(function(){return a}));e(17),e(15);var a,n=e(6),o=e(5),r=e(0),s=e(
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[74],{121:function(t,i,e){"use strict";e.r(i),e.d(i,"Pagination",(function(){return a}));e(17),e(15);var a,n=e(6),o=e(5),r=e(0),s=e(2),l=r.css`:host(:focus){box-shadow:none;outline:0!important}:host(md-pagination) .md-pagination{color:var(--pagination-nav-color,#545454);display:flex;padding:0;position:relative}:host(md-pagination) .md-pagination-container{align-content:center;align-items:center;display:flex;flex-flow:column nowrap;justify-content:center;flex:0 1 100%}:host(md-pagination) .md-pagination-list{margin:0;padding:0;list-style:none;align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;font-size:.875rem;line-height:1;color:var(--pagination-color,#949494)}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis){align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center;border-radius:.875rem;cursor:pointer;height:1.25rem;margin:0 .125rem;min-width:1.25rem;padding:.25rem}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis):hover{background:var(--pagination-bg-hover,#007aa3);color:var(--pagination-color-current,#fff)}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis):focus{box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis)[aria-current=true]{background:var(--pagination-bg-current,#00a0d1);color:var(--pagination-color-current,#fff);cursor:default;pointer-events:none}:host(md-pagination) .md-pagination-nav{cursor:pointer}:host(md-pagination) .md-pagination-nav:disabled{cursor:default}:host(md-pagination) .md-pagination-dots{margin:0;padding:0;list-style:none;align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:center}:host(md-pagination) .md-pagination-dots li{display:block;overflow:hidden;text-indent:-9999px;background:var(--pagination-dots-color,#ccc);border-radius:50%;cursor:pointer;height:.5rem;margin:.25rem;width:.5rem}:host(md-pagination) .md-pagination-dots li:hover,:host(md-pagination) .md-pagination-dots li[aria-current=true]{background:var(--pagination-dots-color-current,#00a0d1)}:host([focus-visible]){box-shadow:0 0 0 .125rem var(--md-default-focus-outline-color,#005e7d)}@media(forced-colors:active){:host(md-pagination) .md-pagination-nav:focus,:host(md-pagination) .md-pagination-nav:hover{outline:1px solid Highlight}:host(md-pagination) .md-pagination-list li:not(.page-ellipsis):hover,:host(md-pagination) .md-pagination-list li:not(.page-ellipsis)[aria-current=true]{forced-color-adjust:none;background-color:Highlight;color:Canvas}:host(md-pagination) .md-pagination-dots li{background-color:GrayText}:host(md-pagination) .md-pagination-dots li:hover,:host(md-pagination) .md-pagination-dots li[aria-current=true]{forced-color-adjust:none;background-color:Highlight;color:Canvas}}`,g=function(t,i,e,a){var n,o=arguments.length,r=o<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,e,a);else for(var s=t.length-1;s>=0;s--)(n=t[s])&&(r=(o<3?n(r):o>3?n(i,e,r):n(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r};!function(t){let i=class extends r.LitElement{constructor(){super(...arguments),this._currentPage=1,this.hasDots=!1,this.onlyDots=!1,this.noNavigation=!1,this.totalPage=0,this.visiblePage=3}get currentPage(){return this._currentPage}set currentPage(t){const i=this._currentPage;this._currentPage=t,this.notifyPageChange(i,t),this.requestUpdate("currentPage",i)}static get styles(){return[o.a,l]}computePrevious(t){1!==t&&t!==this.currentPage&&(this.currentPage-=1)}computeNext(t){t<=this.totalPage&&t!==this.currentPage&&(this.currentPage+=1)}computeFirst(){this.currentPage>=1&&(this.currentPage=1)}computeLast(){this.currentPage>=1&&(this.currentPage=this.totalPage)}computeCurrent(t){this.currentPage=t}notifyPageChange(t,i){this.dispatchEvent(new CustomEvent("page-change",{composed:!0,bubbles:!0,detail:{oldPage:t,newPage:i}}))}get hasPreviousPage(){return this.currentPage<=1}get hasNextPage(){return this.currentPage>=this.totalPage}computePageList(t){if(this.totalPage>this.visiblePage&&t){const[t,i,e]=[this.currentPage-1,this.currentPage,this.currentPage+1];let a=[];if(i<=this.visiblePage-1)return a=[...Array(this.visiblePage)].map((t,i)=>1+i),a.push("..."),a.push(this.totalPage),a;if(this.totalPage-i<=this.visiblePage-2){a=[],a.push(1),a.push("...");const t=[...Array(this.visiblePage)].map((t,i)=>this.totalPage-this.visiblePage+1+i);return a.concat(t)}return[1,"...",t,i,e,"...",this.totalPage]}return[...Array(this.totalPage)].map((t,i)=>1+i)}pagesTemplate(t){return this.computePageList(t).map(t=>"..."===t?r.html` <li class="page-ellipsis">${t}</li> `:r.html`
|
|
2
2
|
<li @click=${()=>this.computeCurrent(t)} aria-current=${t===this.currentPage}>
|
|
3
3
|
${t}
|
|
4
4
|
</li>
|
package/dist/chunks/md-75.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[75],{122:function(t,e,o){"use strict";o.r(e),o.d(e,"PhoneInput",(function(){return i}));o(53),o(28);var i,r=o(6),n=o(5),a=o(80),l=o(81),d=o(67),p=o(0),s=o(
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[75],{122:function(t,e,o){"use strict";o.r(e),o.d(e,"PhoneInput",(function(){return i}));o(53),o(28);var i,r=o(6),n=o(5),a=o(80),l=o(81),d=o(67),p=o(0),s=o(2),h=o(82),c=p.css`.md-phone-input__container{--combo-box-contaier-width:100px;display:flex;position:relative}.md-phone-input__container span.flag-box{align-items:center;border:1px solid var(--input-default-border-color,#ccc);border-bottom-left-radius:.25rem;border-right:none;border-top-left-radius:.25rem;display:flex;height:2.125rem;justify-content:center;position:relative;width:2.25rem}.md-phone-input__container span.flag-box .flag-svg-wrapper{justify-content:center}.md-phone-input__container .flag-svg-wrapper{align-items:center;display:flex;width:2rem}.md-phone-input__container .flag-svg-wrapper img{max-height:.7rem}.md-phone-input__container md-combobox{width:var(--combo-box-contaier-width)}.md-phone-input__container md-combobox::part(combobox){position:initial}.md-phone-input__container md-combobox::part(group){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.md-phone-input__container md-combobox::part(multiwrap){overflow-x:hidden}.md-phone-input__container md-combobox::part(multiwrap-input){padding-left:0;padding-right:0;width:100%}.md-phone-input__container md-combobox::part(combobox-options){top:2.5rem}.md-phone-input__container md-combobox::part(label){width:100%}.md-phone-input__container md-input::part(input){border-bottom-left-radius:0;border-top-left-radius:0;padding-right:2.125rem}.md-phone-input__container md-input::part(message){margin-left:calc(var(--combo-box-contaier-width)*-1);width:calc(100% + var(--combo-box-contaier-width))}.md-phone-input__container .md-phone-input__option{align-items:center;display:flex;justify-content:start}.md-phone-input__container .md-phone-input__option :nth-child(3){margin-left:1rem}.md-phone-input__container md-input[disabled]::part(input){background:var(--phone-input-disabled-bg-color);border:1px solid var(--phone-input-default-border-color);color:var(--md-disabled-text-color)}.md-phone-input__container md-input[disabled]::part(input)::placeholder{border:none}`,u=function(t,e,o,i){var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};!function(t){let e=class extends p.LitElement{constructor(){super(...arguments),this.codePlaceholder="+1",this.numberPlaceholder="Enter Phone Number",this.countryCallingCode="",this.showFlags=!1,this.pill=!1,this.disabled=!1,this.value="",this.errorMessage="",this.showErrorMessage=!1,this.clearIconHeight="auto",this.countryCodeAriaLabel="",this.dialNumberAriaLabel="",this.clearAriaLabel="Clear Input",this.clearCountryCodeAriaLabel="Clear Country Code",this.id="",this.countryCode="US",this.codeList=[],this.formattedValue="",this.isValid=!0}connectedCallback(){super.connectedCallback(),this.codeList=Object(a.customArray)({name:"{countryNameEn}",value:"{countryCallingCode}",code:"{countryCode}"}),""===this.id&&(this.id="md-phone-input-"+Math.random().toString(36).substr(2,4)),this.validateInput(this.value)}getCountryFlag(t){return p.html`
|
|
2
2
|
<span class="flag-svg-wrapper">
|
|
3
3
|
<img src="${Object(l.findFlagUrlByIso2Code)(t)}" />
|
|
4
4
|
</span>
|
package/dist/chunks/md-76.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[76],{98:function(e,t,i){"use strict";i.r(t),i.d(t,"Radio",(function(){return r}));var r,a=i(7),o=i(6),d=i(5),s=i(0),l=i(
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[76],{98:function(e,t,i){"use strict";i.r(t),i.d(t,"Radio",(function(){return r}));var r,a=i(7),o=i(6),d=i(5),s=i(0),l=i(3),c=i(68),p=function(e,t,i,r){var a,o=arguments.length,d=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(d=(o<3?a(d):o>3?a(t,i,d):a(t,i))||d);return o>3&&d&&Object.defineProperty(t,i,d),d};!function(e){let t=class extends(Object(a.a)(s.LitElement)){constructor(){super(...arguments),this.tabIndex=-1,this.label="",this.value="",this.ariaLabel="",this.autofocus=!1,this._disabled=!1,this._checked=!1}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.setAttribute("aria-disabled",""+e),this.tabIndex=e?-1:0,this.requestUpdate("disabled",t)}get checked(){return this._checked}set checked(e){const t=this._checked;this._checked=e,this.setAttribute("aria-checked",""+e),this.requestUpdate("checked",t)}firstUpdated(e){super.firstUpdated(e),this.setAttribute("role","radio"),this.label&&this.setAttribute("aria-label",this.label)}static get styles(){return[d.a,c.a]}render(){return s.html`
|
|
2
2
|
<div class="md-radio-wrapper" part="radio-wrapper">
|
|
3
3
|
<input
|
|
4
4
|
class="md-radio-input"
|
package/dist/chunks/md-78.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[78],{123:function(e,t,i){"use strict";i.r(t),i.d(t,"Slider",(function(){return r}));var r,s=i(1),o=i(7),n=i(6),d=i(5),a=i(0),l=i(
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[78],{123:function(e,t,i){"use strict";i.r(t),i.d(t,"Slider",(function(){return r}));var r,s=i(1),o=i(7),n=i(6),d=i(5),a=i(0),l=i(2),h=i(3),c=i(12),m=i(8),p=a.css`:host(:focus){box-shadow:none;outline:0!important}:host(md-slider){display:flex;flex:1 1 auto;padding:1.25rem 0}:host(md-slider) .md-slider{border-radius:.25rem;display:flex;flex:1 1 auto;height:1.25rem;margin-right:1.25rem;position:relative;width:calc(100% - 1.25rem)}:host(md-slider) .md-slider__bar{position:absolute;top:50%;transform:translateY(-50%);background-color:var(--slider-background-bar,#ccc);border-radius:.125rem;cursor:pointer;height:.125rem;left:0;right:-1.25rem;z-index:0}:host(md-slider) .md-slider__selection{position:absolute;top:50%;transform:translateY(-50%);background-color:var(--slider-background-selection,#00a0d1);border-radius:.125rem;height:.125rem;left:0;transition:left 50ms,right 50ms;z-index:1}:host(md-slider) .md-slider__pointer{position:absolute;top:50%;transform:translateY(-50%);border-radius:.25rem;cursor:grabbing;height:1.25rem;transition:left 50ms,right 50ms;width:1.25rem;z-index:2}:host(md-slider) .md-slider__pointer::after{background-color:var(--slider-background-pointer,#fff);border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,.16);content:"";height:100%;position:absolute;width:100%;border:1px solid var(--slider-background-pointerBorder)}@media screen and (-ms-high-contrast:active){:host(md-slider) .md-slider__pointer::after{filter:brightness(1) contrast(1) saturate(1.5)}}:host(md-slider) .md-slider__hashlabel{align-content:center;align-items:center;display:flex;flex-flow:row nowrap;justify-content:space-between;bottom:-1.25rem;color:var(--slider-label,#545454);font-size:14px;left:0;line-height:14px;position:absolute;right:-1.25rem;white-space:nowrap}:host(md-slider) .md-slider__value{color:var(--slider-label,#545454);font-size:14px;line-height:14px;position:absolute;right:-1.25rem;top:-1.25rem}:host([disabled]) .md-slider__bar{cursor:not-allowed;background-color:var(--slider-background-disabled-bar,var(--slider-background-bar,#ccc))}:host([disabled]) .md-slider__pointer{cursor:not-allowed}:host([disabled]) .md-slider__pointer::after{background-color:var(--slider-background-disabled-pointer,#ccc)}:host([disabled]) .md-slider__selection{background-color:var(--slider-background-disabled-selection,#949494)}:host([focus-visible]:not([disabled])) .md-slider__pointer::after{box-shadow:var(--slider-background-focus-shadow,0 0 0 8px rgba(0,160,209,.4))}:host([no-pointer][focus-visible]:not([disabled])) .md-slider{box-shadow:var(--slider-background-focus-shadow,0 0 0 2px var(--slider-background-focus-selection,#007aa3),0 2px 6px rgba(0,0,0,.16))}:host(:hover:not([disabled])) .md-slider__pointer::after{background-color:var(--slider-background-hover-pointer,#c9f4ff)}:host([no-pointer]) .md-slider{margin-right:0!important}:host([no-pointer]) .md-slider__bar,:host([no-pointer]) .md-slider__value{right:0}:host([no-pointer]) .md-slider__pointer{display:none}@media(forced-colors:active){:host(md-slider) .md-slider__bar{background-color:CanvasText}:host(md-slider) .md-slider__selection{background-color:Highlight}:host(md-slider) .md-slider__pointer::after{background-color:Highlight}:host(:hover:not([disabled])) .md-slider__pointer::after{background-color:Highlight}:host([no-pointer][focus-visible]:not([disabled])) .md-slider{outline:1px solid Highlight}:host([focus-visible]:not([disabled])) .md-slider__pointer{outline:2px solid Highlight}:host([disabled]) .md-slider__pointer::after{background-color:GrayText}}`,u=function(e,t,i,r){var s,o=arguments.length,n=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var d=e.length-1;d>=0;d--)(s=e[d])&&(n=(o<3?s(n):o>3?s(t,i,n):s(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n};!function(e){let t=class extends(Object(o.a)(a.LitElement)){constructor(){super(...arguments),this._disabled=!1,this._now=0,this.min=0,this.max=100,this.hideValue=!1,this.text=0,this.label="slider",this.step=0,this.dragging=!1}get now(){return this._now}set now(e){const t=this._now;e<this.min||e>this.max?console.warn("Please select correct value"):(this._now=Math.round(e),this.requestUpdate("now",t))}get disabled(){return this._disabled}set disabled(e){const t=this._disabled;this._disabled=e,this.setAttribute("aria-disabled",""+e),this.tabIndex=e?-1:0,this.requestUpdate("disabled",t)}get pointerPosition(){const e=this.max-this.min;return(this.now-this.min)/e*100}calculateHandlePosition(e){const{width:t,left:i}=this.getBoundingClientRect(),{clientX:r}=e,s=(r-i)/t;return this.min+(this.max-this.min)*s}moveSliderTo(e){this.disabled||(e>this.max?this.now=this.max:e<this.min?this.now=this.min:this.now=e)}trackMouseEvent(){if(!this.currentMouseEvent||!this.dragging)return;const e=this.calculateHandlePosition(this.currentMouseEvent);this.moveSliderTo(e),requestAnimationFrame(()=>{this.trackMouseEvent()})}ticksTemplate(){const{min:e,max:t,step:i}=this,r=Math.round((t-e)/i),s=new Array(r+1).fill(0,0,r+1).map((t,r)=>e+r*i).filter(i=>i>=e&&i<=t);return a.html`
|
|
2
2
|
<div class="md-slider__hashlabel">${Object(c.repeat)(s,e=>a.html` <div class="tick">${e}</div> `)}</div>
|
|
3
3
|
`}displayValueTemplate(){return a.html` <span class="md-slider__value"> ${this.now} </span> `}notifyChanges(){this.dispatchEvent(new CustomEvent("slider-change",{bubbles:!0,composed:!0,detail:{value:this.now}}))}handleMouseDown(e){if(e.preventDefault(),this.disabled)return;const t=e=>{this.currentMouseEvent=e},i=e=>{this.focus(),this.currentMouseEvent=e,document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",i),requestAnimationFrame(()=>{this.dragging=!1,this.notifyChanges()})};document.addEventListener("mousemove",t),document.addEventListener("mouseup",i),this.focus(),this.dragging=!0,this.currentMouseEvent=e,requestAnimationFrame(()=>{this.trackMouseEvent()})}handleKeyDown(e){const{code:t}=e;switch(t){case s.b.ArrowLeft:case s.b.ArrowDown:this.moveSliderTo(this.now-1);break;case s.b.ArrowRight:case s.b.ArrowUp:this.moveSliderTo(this.now+1);break;case s.b.Home:this.moveSliderTo(this.min);break;case s.b.End:this.moveSliderTo(this.max)}const i=()=>{document.removeEventListener("keyup",i),this.notifyChanges()};document.addEventListener("keyup",i)}get sliderPointerStyleMap(){return{left:this.pointerPosition+"%"}}get sliderSelectionStyleMap(){return{right:`calc(100% - ${this.pointerPosition}%)`}}static get styles(){return[d.a,p]}firstUpdated(e){super.firstUpdated(e),this.setAttribute("tabindex",this.disabled?"-1":"0")}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mousedown",this.handleMouseDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mousedown",this.handleMouseDown)}render(){return a.html`
|
|
4
4
|
<div class="md-slider">
|
package/dist/chunks/md-80.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[80],{103:function(e,t,o){"use strict";o.r(t),o.d(t,"TableAdvanced",(function(){return w}));o(17),o(15),o(30);var r=o(6),i=o(34),a=o(5),l=o(0),d=o(3),s=o(4),n=o(2),c=o(83),h=o(32),p=o.n(h),b=l.css`:host{display:block}.md-table-advanced{width:100%}table{border-collapse:separate;border-spacing:0;max-width:100%;position:relative;width:100%}table.sticky-header{height:100%}table.sticky-header thead th:first-child{border-left:1px solid var(--table-advanced-border-color,#dedede)}table.sticky-header thead th{background-color:var(--table-advanced-header-bg-color,#f7f7f7);border-left:0;border-top:0;position:sticky;top:0;z-index:1}table.sticky-header thead th::before{border-top:1px solid var(--table-advanced-border-color,#dedede);bottom:0;content:" ";left:0;position:absolute;top:0;width:100%}table.sticky-header thead tr:last-child th{top:2.5rem}table.sticky-header thead tr:last-child th::before{border-bottom:1px solid var(--table-advanced-border-color,#dedede);border-top:1px solid var(--table-advanced-border-color,#dedede)}table.sticky-header thead tr:first-child th{height:calc(2.5rem + .0625rem*2);top:0}table.sticky-header thead tr:first-child th::before{border-bottom:1px solid var(--table-advanced-border-color,#dedede);border-top:1px solid var(--table-advanced-border-color,#dedede)}table.sticky-header thead tr:focus{outline:0}table.sticky-header thead tr:focus th:first-child{border-left:2px solid var(--md-focus-border-color)}table.sticky-header thead tr:focus th:last-child{border-right:2px solid var(--md-focus-border-color)}table.sticky-header thead tr:focus th::before{border-bottom:2px solid var(--md-focus-border-color);border-top:2px solid var(--md-focus-border-color)}thead th:first-child{border-left:1px solid var(--table-advanced-border-color,#dedede)}thead th{background-color:var(--table-advanced-header-bg-color,#f7f7f7);border:1px solid var(--table-advanced-border-color,#dedede);border-left:0;color:var(--md-secondary-text-color);font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:14px;height:2.5rem;max-width:0;padding:0 .375rem;position:relative;text-align:left}thead th .filter{display:inline-block;height:auto;margin-top:calc(.25rem/2)}thead th .resize{background-color:rgba(0,0,0,0);cursor:col-resize;height:100%;left:calc(-.25rem/2);position:absolute;top:0;width:.25rem;z-index:1}thead .head-inner-cell{align-items:center;display:flex;min-width:.875rem}thead .head-inner-cell .filter-wrap{align-items:center;display:inline-flex;flex:1;justify-content:flex-end}thead .head-inner-cell .filter-icon{color:var(--md-secondary-text-color);cursor:pointer;display:inline-block;height:1.5rem;min-width:1.25rem;position:relative;z-index:1}thead .head-inner-cell .filter-icon::part(button){padding:.25rem;text-align:center;width:1.5rem}thead .head-inner-cell .filter-icon:hover{background-color:var(--table-advanced-filter-hover-bg-color,#ededed)}thead .head-inner-cell .filter-icon:active{background-color:var(--table-advanced-filter-pressed-bg-color,#dedede)}thead .head-inner-cell span{display:inline-block;overflow:hidden;padding-right:calc(.25rem*1.25);text-overflow:ellipsis;white-space:nowrap;width:100%}thead .head-inner-cell .sortable{background:rgba(0,0,0,0);border:0;color:var(--md-secondary-text-color);display:inline-block;min-width:calc(1rem*2.5);overflow:hidden;padding-right:calc(.25rem*4);text-overflow:ellipsis;white-space:nowrap;width:auto}thead md-menu-overlay::part(overlay){top:-.375rem;white-space:normal}@supports(-moz-appearance:none){thead md-menu-overlay::part(overlay){top:-.25rem;white-space:normal}}thead .drag-area-col{cursor:grab;display:block;height:calc(.25rem*10);left:.25rem;position:absolute;right:.25rem;top:0;z-index:1}thead .drag-area-col.drag{border:2px dashed var(--table-advanced-filter-border-color,#ccc);opacity:1}thead .drag-area-col.over{background-color:#a87ff1;height:100%;opacity:.1}thead .sortable{cursor:pointer;position:relative;z-index:1}thead .sortable::after,thead .sortable::before{border:.25rem solid transparent;content:"";display:block;height:0;opacity:.3;position:absolute;right:.25rem;top:50%;width:0}thead .sortable::before{border-bottom-color:var(--md-secondary-text-color);margin-top:-9px}thead .sortable::after{border-top-color:var(--md-secondary-text-color);margin-top:1px}thead .sortable.ascending::after{opacity:1}thead .sortable.descending::before{opacity:1}.filter-active{display:inline-block;height:1.25rem;text-align:center;vertical-align:bottom;width:1.25rem}.filter-active::part(icon){line-height:.875rem}.filter-menu{background-color:var(--table-advanced-filter-bg-color,#fff);padding:calc(.25rem*3);position:relative;z-index:1}.filter-menu select{background-color:var(--table-advanced-filter-bg-color,#fff);border:1px solid var(--table-advanced-filter-border-color,#ccc);color:var(--md-secondary-text-color);min-height:calc(.875rem*1.8);width:100%}.filter-menu input{background-color:var(--table-advanced-filter-bg-color,#fff);border:1px solid var(--table-advanced-filter-border-color,#ccc);color:var(--md-secondary-text-color);margin-top:calc(.25rem*2);width:100%}tbody tr{position:relative}tbody tr td:first-child{border-left:1px solid var(--table-advanced-border-color,#dedede)}tbody tr td{border-bottom:1px solid var(--table-advanced-border-color,#dedede);border-right:1px solid var(--table-advanced-border-color,#dedede);font-size:14px;height:2.5rem;max-width:0;padding:calc(.25rem*1.5);position:relative}tbody tr th:first-child{border-top:1px solid var(--table-advanced-border-color,#dedede)}tbody tr th{background-color:var(--table-advanced-header-bg-color,#f7f7f7);border-bottom:1px solid var(--table-advanced-border-color,#dedede);border-right:1px solid var(--table-advanced-border-color,#dedede);font-size:14px;max-width:0;padding:0 calc(.25rem*4);position:relative;text-align:left}tbody tr .inner-cell{display:flex;white-space:nowrap;align-items:center}tbody tr .inner-cell .warn-icon{display:inline-block;margin-left:.25rem;max-height:1.25rem;position:relative;vertical-align:middle;z-index:0}tbody tr .inner-cell md-icon::part(icon){line-height:1.25rem}tbody tr .inner-cell span{align-self:center;display:inline-block;flex:1;overflow:hidden;padding:0 .25rem;text-overflow:ellipsis;vertical-align:middle}tbody tr .drag-handle{cursor:grab;float:left;margin-right:calc(.25rem*1.5)}tbody tr .drag-area{height:50%;left:0;opacity:.3;position:absolute;right:0}tbody tr .drag-area.top{top:0}tbody tr .drag-area.bottom{background-color:rgba(0,0,0,0);bottom:0}tbody tr.ghost{opacity:.3}tbody tr:hover{background-color:var(--table-advanced-hover-bg-color,#f7f7f7)}tbody tr:hover td,tbody tr:hover th{background-color:var(--table-advanced-hover-bg-color,#f7f7f7)}tbody tr.selected,tbody tr:active{background-color:var(--table-advanced-selected-bg-color,#ededed)}tbody tr.selected td,tbody tr.selected th,tbody tr:active td,tbody tr:active th{background-color:var(--table-advanced-selected-bg-color,#ededed)}button.row-collapsible{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;width:1.25rem;margin-right:calc(.25rem*1.5);background-color:rgba(0,0,0,0);border:1px solid var(--table-advanced-border-color);border-radius:2px}button.row-collapsible:hover{background-color:var(--table-advanced-filter-hover-bg-color,#ededed);border:0}button.row-collapsible:active{background-color:var(--table-advanced-filter-pressed-bg-color);border:0}`;function g(e=250){return function(t,o,r){let i;return function(e,t){if(e.descriptor=e.descriptor||Object.getOwnPropertyDescriptor(e.target,e.key),"function"!=typeof e.descriptor.value)return console.warn(e.key,"Decorator must be used on function"),e.descriptor;const o=e.descriptor.value,r=e.target.constructor.name;return e.descriptor.value=function(...e){return t.call(this,o,e,r)},e.descriptor}({target:t,key:o,descriptor:r},(function(t,o){clearTimeout(i),i=window.setTimeout(()=>{clearTimeout(i),t.apply(this,o)},e)}))}}class u{constructor(e,t){this.target=e,this.eventName=t}emit(e,t={bubbles:!0,composed:!0,cancelable:!1}){this.target.dispatchEvent(new CustomEvent(this.eventName,Object.assign({detail:e},t)))}}const m=new WeakMap,f=Object(d.directive)(e=>t=>{if(!(t instanceof d.NodePart))throw new Error("templateCallback can only be used in text bindings");const o=m.get(t);if(void 0!==o&&e.template===o.template&&t.value===o.fragment)return;const r=document.importNode(e.template.content,!0);e.cb({content:e.content,row:e.row,col:e.col,insertIndex:e.insertIndex,fragment:r}),t.setValue(r),m.set(t,{template:e.template,fragment:r})});var v;!function(e){const t={placeholder:"Filter..."};e.OPTIONS={equals:{label:"Equals",input:t,predicate:(e,t)=>e==t},notEqual:{label:"Not equal",input:t,predicate:(e,t)=>e!=t},contains:{label:"Contains",input:t,predicate:(e,t)=>e.includes(t)},notContains:{label:"Not contains",input:t,predicate:(e,t)=>!e.includes(t)},startsWith:{label:"Starts with",input:t,predicate:(e,t)=>e.startsWith(t)},endsWith:{label:"Ends with",input:t,predicate:(e,t)=>e.endsWith(t)},lessThan:{label:"Less than",input:t,predicate:(e,t)=>e<t},lessThanOrEquals:{label:"Less than or equals",input:t,predicate:(e,t)=>e<=t},greaterThan:{label:"Greater than",input:t,predicate:(e,t)=>e>t},greaterThanOrEquals:{label:"Greater than or equals",input:t,predicate:(e,t)=>e>=t}},e.optionsString=[e.OPTIONS.equals,e.OPTIONS.notEqual,e.OPTIONS.contains,e.OPTIONS.notContains,e.OPTIONS.startsWith,e.OPTIONS.endsWith],e.optionsNumber=[e.OPTIONS.equals,e.OPTIONS.notEqual,e.OPTIONS.lessThan,e.OPTIONS.lessThanOrEquals,e.OPTIONS.greaterThan,e.OPTIONS.greaterThanOrEquals]}(v||(v={}));var y=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var d=e.length-1;d>=0;d--)(i=e[d])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};const x=document.createElement("img");var w;x.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",function(e){let t=class extends(Object(i.a)(l.LitElement)){constructor(){super(...arguments),this.isRowFocusable="true",this.error="",this.COLS=[],this.ROWS=[],this.updCols=()=>this.requestUpdate("COLS"),this.updRows=()=>this.requestUpdate("ROWS"),this.dragRow=-1,this.dropRow=-1,this.drops=[],this.dragRowElem=null,this.dragCol=-1,this.dropCol=-1,this.isResizing=!1,this.isSelectable=!1,this.selected={},this.expandedRowIdx={},this.dragover=e=>e.preventDefault(),this.eX=0,this.onResize=(e,t)=>{var o;if(-1!=this.dragCol||-1!=this.dragRow)return;this.isResizing=!0;const r=e.target;null===(o=e.dataTransfer)||void 0===o||o.setDragImage(x,0,0);const i=this.COLS.map(e=>this.shadowRoot.querySelector("th.col-index-"+e.index));this.COLS.forEach((e,t)=>e.width=i[t].offsetWidth+"px"),this.updCols();const a=e.x;this.eX=e.x;let l=-1,d=-1,s=-1;const n=this.COLS[t.index-1],c=i[t.index],h=i[t.index-1],p=c.offsetWidth,b=h.offsetWidth,g=()=>{const e=this.eX;if(l!=e&&0!=e){l=e;const o=l-a;d=p-o,s=b+o,t.width=d+"px",n.width=s+"px",this.updCols()}},u=e=>this.eX=e.x,m=()=>{this.isResizing=!1,r.removeEventListener("drag",g),r.removeEventListener("dragend",m),document.removeEventListener("dragover",u)};r.addEventListener("drag",g),r.addEventListener("dragend",m),document.addEventListener("dragover",u)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("dragover",this.dragover)}connectedCallback(){super.connectedCallback(),document.addEventListener("dragover",this.dragover),this.updateTableConfig(),this.updateTableData(),this.populateTable()}update(e){super.update(e),e.has("data")&&(this.updateTableData(),this.updateDataInTable())}updateTableData(){if("string"==typeof this.data)try{this.tableData=JSON.parse(this.data)}catch(e){console.error("[INVALID_JSON_FORMAT] Please recheck the config json")}else this.tableData=Object.assign({},this.data)}updateTableConfig(){if("string"==typeof this.config)try{this.tableConfig=JSON.parse(this.config)}catch(e){console.error("[INVALID_JSON_FORMAT] Please recheck the data json")}else this.tableConfig=Object.assign({},this.config)}populateColumns(){var e;let t=0;const o=(e,o)=>{var r,i,a,l;const d=e.filters||(null===(i=null===(r=this.tableConfig.default)||void 0===r?void 0:r.col)||void 0===i?void 0:i.filters),s=d?"forString"==d?v.optionsString:"forNumber"==d?v.optionsNumber:d.length?d:null:null;this.COLS.push({options:Object.assign({},e),index:t++,group:o,sort:"default",sorter:e.sorter||(null===(l=null===(a=this.tableConfig.default)||void 0===a?void 0:a.col)||void 0===l?void 0:l.sorter),isCollapsable:this.tableConfig.cols.collapse==e.id,filter:s?{list:s,selectedIndex:0,input:"",active:!1,menuVisible:!1}:void 0})};this.tableConfig.cols.define.forEach(e=>{"children"in e?e.children.forEach(t=>o(t,{name:e.groupName,length:e.children.length})):o(e)}),this.isSelectable=!!this.tableConfig.rows&&"none"!=(null===(e=this.tableConfig.rows)||void 0===e?void 0:e.selectable)}populateData(){const e=this.COLS.length;if("csv"in this.tableData){const e=p.a.parse(this.tableData.csv,{skipEmptyLines:!0,transform:e=>e.trim()});if(e.errors)return void(this.error="PARSE ERROR:\n"+JSON.stringify(e.errors,null,2));{const t=e.data;this.ROWS=t.map(e=>e.map(e=>({text:e})))}}else if("list2d"in this.tableData)this.ROWS=this.tableData.list2d.map(e=>e.map(e=>({text:e})));else{for(;this.tableData.list.length>e;)this.ROWS.push(this.tableData.list.splice(0,e).map(e=>({text:e})));0!=this.tableData.list.length&&this.ROWS.push(this.tableData.list.map(e=>({text:e})))}0!=this.ROWS.length||(this.error="DATA ERROR: Data is empty")}validateData(){const e=this.COLS.length;this.ROWS.reduce((e,t)=>e+t.length,0)%e==0?this.ROWS.forEach((t,o)=>{const r=t.length;r!=e&&(this.error=`DATA ERROR: Total number of cols (=${e}) and data[${o}] length (=${r}) mismatch`)}):this.error=this.error="DATA ERROR: Data length mismatch. You must provide (numberOfRows * numberOfColumns) amount of data values."}populateTemplate(){const e=this.tableConfig.cellTemplates,t=Object.keys(e||{});e&&t.length&&this.ROWS.forEach((t,o)=>{t.forEach((t,r)=>{for(const i in e){const a=t.text.indexOf(i);if(-1!=a){const l=e[i],d=this.querySelector("#"+l.templateName);if(null==d){console.warn(`cellTemplates["${i}"]: Missing '${l.templateName}' template.`);continue}let s=t.text.replace(i,"");l.contentCb&&(s=l.contentCb({col:r,row:o,content:s,insertIndex:a})),this.ROWS[o][r]={text:s,template:{template:d,templateCb:l.templateCb,insertIndex:"replace"==l.contentUse?-1:a}};break}}})})}setDefaultFilterAndSort(){var e,t;const o=null===(e=this.tableConfig.default)||void 0===e?void 0:e.sort;if(o){const e=this.COLS.find(e=>e.options.id==o.colId);e?this.sort(e,o.order):console.warn(`Cant find ${o.colId} col - for sorting`)}const r=null===(t=this.tableConfig.default)||void 0===t?void 0:t.filter;if(r){const e=this.COLS.find(e=>e.options.id==r.colId);e?e.filter?(e.filter.selectedIndex=r.selectedIndex,e.filter.input=r.input,this.updCols(),this.filter(e)):console.warn(`Cant find filters on ${r.colId} col`):console.warn(`Cant find ${r.colId} col - for filtering`)}}populateTable(){this.populateColumns(),this.populateData(),this.validateData(),this.setDefaultFilterAndSort(),this.populateTemplate()}updateDataInTable(){this.populateData(),this.validateData(),this.populateTemplate()}onDropRow(){this.dragRow!=this.dropRow&&this.drops.push([this.dragRow,this.dropRow]),this.dragRow=-1,this.dropRow=-1,this.dragRowElem&&(this.dragRowElem.setAttribute("draggable","false"),this.dragRowElem=null)}onDropCol(){if(this.dragCol!=this.dropCol){const e=this.COLS[this.dragCol],t=this.COLS[this.dropCol],o=e.group,r=t.group,i=e.index,a=t.index;e.group=r,t.group=o,e.index=a,t.index=i,this.COLS[this.dragCol]=t,this.COLS[this.dropCol]=e,this.ROWS.forEach(e=>{const t=e[this.dragCol],o=e[this.dropCol];e[this.dragCol]=o,e[this.dropCol]=t}),this.updCols(),this.updRows()}this.dragCol=-1,this.dropCol=-1}sort(e,t){e.sorter&&(this.clearSelection(),this.drops=[],this.COLS.forEach(o=>{o.options.id==e.options.id?o.sort=t||("default"==o.sort?"ascending":"ascending"==o.sort?"descending":"default"):o.sort="default"}),this.updCols(),this.requestUpdate(),this["md-table-advanced-change"].emit({type:"sort",order:e.sort}))}filter(e){if(!e.filter)return;this.clearSelection(),this.drops=[];const t=e.filter.input.trim(),o=e.filter.list[e.filter.selectedIndex];e.filter.active=!!t,this.requestUpdate(),t?this["md-table-advanced-change"].emit({type:"filter-on",filter:o,input:t}):this["md-table-advanced-change"].emit({type:"filter-off",filter:e.filter.list[e.filter.selectedIndex]})}selectRow(e){var t;const o=e.row.idx,r=this.selected.hasOwnProperty(o);"multiple"==(null===(t=this.tableConfig.rows)||void 0===t?void 0:t.selectable)?(e.metaKey?r?delete this.selected[o]:this.selected[o]=!0:e.shiftKey||(this.selected={[o]:!0}),this["md-table-advanced-change"].emit({type:"multi-select",rows:Object.keys(this.selected).map(e=>+e)})):r?this.clearSelection():(this.selected={[o]:!0},this["md-table-advanced-change"].emit({type:"select",index:o})),this.requestUpdate("selected")}clearSelection(){this.selected={},this.requestUpdate("selected")}collapseToggle(e,t){e.stopPropagation(),this.expandedRowIdx[t]?(delete this.expandedRowIdx[t],this["md-table-advanced-change"].emit({type:"collapse",row:t})):(this.expandedRowIdx[t]=!0,this["md-table-advanced-change"].emit({type:"expand",row:t})),this.clearSelection(),this.requestUpdate()}render(){if(this.error)return l.html` <div>${this.error}</div> `;const{head:e}=this.tableConfig,t=Object(s.classMap)({"sticky-header":!!this.tableConfig.isStickyHeader});return l.html`
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[80],{103:function(e,t,o){"use strict";o.r(t),o.d(t,"TableAdvanced",(function(){return w}));o(17),o(15),o(30);var r=o(6),i=o(34),a=o(5),l=o(0),d=o(2),s=o(4),n=o(3),c=o(83),h=o(32),p=o.n(h),b=l.css`:host{display:block}.md-table-advanced{width:100%}table{border-collapse:separate;border-spacing:0;max-width:100%;position:relative;width:100%}table.sticky-header{height:100%}table.sticky-header thead th:first-child{border-left:1px solid var(--table-advanced-border-color,#dedede)}table.sticky-header thead th{background-color:var(--table-advanced-header-bg-color,#f7f7f7);border-left:0;border-top:0;position:sticky;top:0;z-index:1}table.sticky-header thead th::before{border-top:1px solid var(--table-advanced-border-color,#dedede);bottom:0;content:" ";left:0;position:absolute;top:0;width:100%}table.sticky-header thead tr:last-child th{top:2.5rem}table.sticky-header thead tr:last-child th::before{border-bottom:1px solid var(--table-advanced-border-color,#dedede);border-top:1px solid var(--table-advanced-border-color,#dedede)}table.sticky-header thead tr:first-child th{height:calc(2.5rem + .0625rem*2);top:0}table.sticky-header thead tr:first-child th::before{border-bottom:1px solid var(--table-advanced-border-color,#dedede);border-top:1px solid var(--table-advanced-border-color,#dedede)}table.sticky-header thead tr:focus{outline:0}table.sticky-header thead tr:focus th:first-child{border-left:2px solid var(--md-focus-border-color)}table.sticky-header thead tr:focus th:last-child{border-right:2px solid var(--md-focus-border-color)}table.sticky-header thead tr:focus th::before{border-bottom:2px solid var(--md-focus-border-color);border-top:2px solid var(--md-focus-border-color)}thead th:first-child{border-left:1px solid var(--table-advanced-border-color,#dedede)}thead th{background-color:var(--table-advanced-header-bg-color,#f7f7f7);border:1px solid var(--table-advanced-border-color,#dedede);border-left:0;color:var(--md-secondary-text-color);font-family:var(--brand-font-regular, "CiscoSansTT Regular", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:14px;height:2.5rem;max-width:0;padding:0 .375rem;position:relative;text-align:left}thead th .filter{display:inline-block;height:auto;margin-top:calc(.25rem/2)}thead th .resize{background-color:rgba(0,0,0,0);cursor:col-resize;height:100%;left:calc(-.25rem/2);position:absolute;top:0;width:.25rem;z-index:1}thead .head-inner-cell{align-items:center;display:flex;min-width:.875rem}thead .head-inner-cell .filter-wrap{align-items:center;display:inline-flex;flex:1;justify-content:flex-end}thead .head-inner-cell .filter-icon{color:var(--md-secondary-text-color);cursor:pointer;display:inline-block;height:1.5rem;min-width:1.25rem;position:relative;z-index:1}thead .head-inner-cell .filter-icon::part(button){padding:.25rem;text-align:center;width:1.5rem}thead .head-inner-cell .filter-icon:hover{background-color:var(--table-advanced-filter-hover-bg-color,#ededed)}thead .head-inner-cell .filter-icon:active{background-color:var(--table-advanced-filter-pressed-bg-color,#dedede)}thead .head-inner-cell span{display:inline-block;overflow:hidden;padding-right:calc(.25rem*1.25);text-overflow:ellipsis;white-space:nowrap;width:100%}thead .head-inner-cell .sortable{background:rgba(0,0,0,0);border:0;color:var(--md-secondary-text-color);display:inline-block;min-width:calc(1rem*2.5);overflow:hidden;padding-right:calc(.25rem*4);text-overflow:ellipsis;white-space:nowrap;width:auto}thead md-menu-overlay::part(overlay){top:-.375rem;white-space:normal}@supports(-moz-appearance:none){thead md-menu-overlay::part(overlay){top:-.25rem;white-space:normal}}thead .drag-area-col{cursor:grab;display:block;height:calc(.25rem*10);left:.25rem;position:absolute;right:.25rem;top:0;z-index:1}thead .drag-area-col.drag{border:2px dashed var(--table-advanced-filter-border-color,#ccc);opacity:1}thead .drag-area-col.over{background-color:#a87ff1;height:100%;opacity:.1}thead .sortable{cursor:pointer;position:relative;z-index:1}thead .sortable::after,thead .sortable::before{border:.25rem solid transparent;content:"";display:block;height:0;opacity:.3;position:absolute;right:.25rem;top:50%;width:0}thead .sortable::before{border-bottom-color:var(--md-secondary-text-color);margin-top:-9px}thead .sortable::after{border-top-color:var(--md-secondary-text-color);margin-top:1px}thead .sortable.ascending::after{opacity:1}thead .sortable.descending::before{opacity:1}.filter-active{display:inline-block;height:1.25rem;text-align:center;vertical-align:bottom;width:1.25rem}.filter-active::part(icon){line-height:.875rem}.filter-menu{background-color:var(--table-advanced-filter-bg-color,#fff);padding:calc(.25rem*3);position:relative;z-index:1}.filter-menu select{background-color:var(--table-advanced-filter-bg-color,#fff);border:1px solid var(--table-advanced-filter-border-color,#ccc);color:var(--md-secondary-text-color);min-height:calc(.875rem*1.8);width:100%}.filter-menu input{background-color:var(--table-advanced-filter-bg-color,#fff);border:1px solid var(--table-advanced-filter-border-color,#ccc);color:var(--md-secondary-text-color);margin-top:calc(.25rem*2);width:100%}tbody tr{position:relative}tbody tr td:first-child{border-left:1px solid var(--table-advanced-border-color,#dedede)}tbody tr td{border-bottom:1px solid var(--table-advanced-border-color,#dedede);border-right:1px solid var(--table-advanced-border-color,#dedede);font-size:14px;height:2.5rem;max-width:0;padding:calc(.25rem*1.5);position:relative}tbody tr th:first-child{border-top:1px solid var(--table-advanced-border-color,#dedede)}tbody tr th{background-color:var(--table-advanced-header-bg-color,#f7f7f7);border-bottom:1px solid var(--table-advanced-border-color,#dedede);border-right:1px solid var(--table-advanced-border-color,#dedede);font-size:14px;max-width:0;padding:0 calc(.25rem*4);position:relative;text-align:left}tbody tr .inner-cell{display:flex;white-space:nowrap;align-items:center}tbody tr .inner-cell .warn-icon{display:inline-block;margin-left:.25rem;max-height:1.25rem;position:relative;vertical-align:middle;z-index:0}tbody tr .inner-cell md-icon::part(icon){line-height:1.25rem}tbody tr .inner-cell span{align-self:center;display:inline-block;flex:1;overflow:hidden;padding:0 .25rem;text-overflow:ellipsis;vertical-align:middle}tbody tr .drag-handle{cursor:grab;float:left;margin-right:calc(.25rem*1.5)}tbody tr .drag-area{height:50%;left:0;opacity:.3;position:absolute;right:0}tbody tr .drag-area.top{top:0}tbody tr .drag-area.bottom{background-color:rgba(0,0,0,0);bottom:0}tbody tr.ghost{opacity:.3}tbody tr:hover{background-color:var(--table-advanced-hover-bg-color,#f7f7f7)}tbody tr:hover td,tbody tr:hover th{background-color:var(--table-advanced-hover-bg-color,#f7f7f7)}tbody tr.selected,tbody tr:active{background-color:var(--table-advanced-selected-bg-color,#ededed)}tbody tr.selected td,tbody tr.selected th,tbody tr:active td,tbody tr:active th{background-color:var(--table-advanced-selected-bg-color,#ededed)}button.row-collapsible{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;width:1.25rem;margin-right:calc(.25rem*1.5);background-color:rgba(0,0,0,0);border:1px solid var(--table-advanced-border-color);border-radius:2px}button.row-collapsible:hover{background-color:var(--table-advanced-filter-hover-bg-color,#ededed);border:0}button.row-collapsible:active{background-color:var(--table-advanced-filter-pressed-bg-color);border:0}`;function g(e=250){return function(t,o,r){let i;return function(e,t){if(e.descriptor=e.descriptor||Object.getOwnPropertyDescriptor(e.target,e.key),"function"!=typeof e.descriptor.value)return console.warn(e.key,"Decorator must be used on function"),e.descriptor;const o=e.descriptor.value,r=e.target.constructor.name;return e.descriptor.value=function(...e){return t.call(this,o,e,r)},e.descriptor}({target:t,key:o,descriptor:r},(function(t,o){clearTimeout(i),i=window.setTimeout(()=>{clearTimeout(i),t.apply(this,o)},e)}))}}class u{constructor(e,t){this.target=e,this.eventName=t}emit(e,t={bubbles:!0,composed:!0,cancelable:!1}){this.target.dispatchEvent(new CustomEvent(this.eventName,Object.assign({detail:e},t)))}}const m=new WeakMap,f=Object(d.directive)(e=>t=>{if(!(t instanceof d.NodePart))throw new Error("templateCallback can only be used in text bindings");const o=m.get(t);if(void 0!==o&&e.template===o.template&&t.value===o.fragment)return;const r=document.importNode(e.template.content,!0);e.cb({content:e.content,row:e.row,col:e.col,insertIndex:e.insertIndex,fragment:r}),t.setValue(r),m.set(t,{template:e.template,fragment:r})});var v;!function(e){const t={placeholder:"Filter..."};e.OPTIONS={equals:{label:"Equals",input:t,predicate:(e,t)=>e==t},notEqual:{label:"Not equal",input:t,predicate:(e,t)=>e!=t},contains:{label:"Contains",input:t,predicate:(e,t)=>e.includes(t)},notContains:{label:"Not contains",input:t,predicate:(e,t)=>!e.includes(t)},startsWith:{label:"Starts with",input:t,predicate:(e,t)=>e.startsWith(t)},endsWith:{label:"Ends with",input:t,predicate:(e,t)=>e.endsWith(t)},lessThan:{label:"Less than",input:t,predicate:(e,t)=>e<t},lessThanOrEquals:{label:"Less than or equals",input:t,predicate:(e,t)=>e<=t},greaterThan:{label:"Greater than",input:t,predicate:(e,t)=>e>t},greaterThanOrEquals:{label:"Greater than or equals",input:t,predicate:(e,t)=>e>=t}},e.optionsString=[e.OPTIONS.equals,e.OPTIONS.notEqual,e.OPTIONS.contains,e.OPTIONS.notContains,e.OPTIONS.startsWith,e.OPTIONS.endsWith],e.optionsNumber=[e.OPTIONS.equals,e.OPTIONS.notEqual,e.OPTIONS.lessThan,e.OPTIONS.lessThanOrEquals,e.OPTIONS.greaterThan,e.OPTIONS.greaterThanOrEquals]}(v||(v={}));var y=function(e,t,o,r){var i,a=arguments.length,l=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,r);else for(var d=e.length-1;d>=0;d--)(i=e[d])&&(l=(a<3?i(l):a>3?i(t,o,l):i(t,o))||l);return a>3&&l&&Object.defineProperty(t,o,l),l};const x=document.createElement("img");var w;x.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",function(e){let t=class extends(Object(i.a)(l.LitElement)){constructor(){super(...arguments),this.isRowFocusable="true",this.error="",this.COLS=[],this.ROWS=[],this.updCols=()=>this.requestUpdate("COLS"),this.updRows=()=>this.requestUpdate("ROWS"),this.dragRow=-1,this.dropRow=-1,this.drops=[],this.dragRowElem=null,this.dragCol=-1,this.dropCol=-1,this.isResizing=!1,this.isSelectable=!1,this.selected={},this.expandedRowIdx={},this.dragover=e=>e.preventDefault(),this.eX=0,this.onResize=(e,t)=>{var o;if(-1!=this.dragCol||-1!=this.dragRow)return;this.isResizing=!0;const r=e.target;null===(o=e.dataTransfer)||void 0===o||o.setDragImage(x,0,0);const i=this.COLS.map(e=>this.shadowRoot.querySelector("th.col-index-"+e.index));this.COLS.forEach((e,t)=>e.width=i[t].offsetWidth+"px"),this.updCols();const a=e.x;this.eX=e.x;let l=-1,d=-1,s=-1;const n=this.COLS[t.index-1],c=i[t.index],h=i[t.index-1],p=c.offsetWidth,b=h.offsetWidth,g=()=>{const e=this.eX;if(l!=e&&0!=e){l=e;const o=l-a;d=p-o,s=b+o,t.width=d+"px",n.width=s+"px",this.updCols()}},u=e=>this.eX=e.x,m=()=>{this.isResizing=!1,r.removeEventListener("drag",g),r.removeEventListener("dragend",m),document.removeEventListener("dragover",u)};r.addEventListener("drag",g),r.addEventListener("dragend",m),document.addEventListener("dragover",u)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("dragover",this.dragover)}connectedCallback(){super.connectedCallback(),document.addEventListener("dragover",this.dragover),this.updateTableConfig(),this.updateTableData(),this.populateTable()}update(e){super.update(e),e.has("data")&&(this.updateTableData(),this.updateDataInTable())}updateTableData(){if("string"==typeof this.data)try{this.tableData=JSON.parse(this.data)}catch(e){console.error("[INVALID_JSON_FORMAT] Please recheck the config json")}else this.tableData=Object.assign({},this.data)}updateTableConfig(){if("string"==typeof this.config)try{this.tableConfig=JSON.parse(this.config)}catch(e){console.error("[INVALID_JSON_FORMAT] Please recheck the data json")}else this.tableConfig=Object.assign({},this.config)}populateColumns(){var e;let t=0;const o=(e,o)=>{var r,i,a,l;const d=e.filters||(null===(i=null===(r=this.tableConfig.default)||void 0===r?void 0:r.col)||void 0===i?void 0:i.filters),s=d?"forString"==d?v.optionsString:"forNumber"==d?v.optionsNumber:d.length?d:null:null;this.COLS.push({options:Object.assign({},e),index:t++,group:o,sort:"default",sorter:e.sorter||(null===(l=null===(a=this.tableConfig.default)||void 0===a?void 0:a.col)||void 0===l?void 0:l.sorter),isCollapsable:this.tableConfig.cols.collapse==e.id,filter:s?{list:s,selectedIndex:0,input:"",active:!1,menuVisible:!1}:void 0})};this.tableConfig.cols.define.forEach(e=>{"children"in e?e.children.forEach(t=>o(t,{name:e.groupName,length:e.children.length})):o(e)}),this.isSelectable=!!this.tableConfig.rows&&"none"!=(null===(e=this.tableConfig.rows)||void 0===e?void 0:e.selectable)}populateData(){const e=this.COLS.length;if("csv"in this.tableData){const e=p.a.parse(this.tableData.csv,{skipEmptyLines:!0,transform:e=>e.trim()});if(e.errors)return void(this.error="PARSE ERROR:\n"+JSON.stringify(e.errors,null,2));{const t=e.data;this.ROWS=t.map(e=>e.map(e=>({text:e})))}}else if("list2d"in this.tableData)this.ROWS=this.tableData.list2d.map(e=>e.map(e=>({text:e})));else{for(;this.tableData.list.length>e;)this.ROWS.push(this.tableData.list.splice(0,e).map(e=>({text:e})));0!=this.tableData.list.length&&this.ROWS.push(this.tableData.list.map(e=>({text:e})))}0!=this.ROWS.length||(this.error="DATA ERROR: Data is empty")}validateData(){const e=this.COLS.length;this.ROWS.reduce((e,t)=>e+t.length,0)%e==0?this.ROWS.forEach((t,o)=>{const r=t.length;r!=e&&(this.error=`DATA ERROR: Total number of cols (=${e}) and data[${o}] length (=${r}) mismatch`)}):this.error=this.error="DATA ERROR: Data length mismatch. You must provide (numberOfRows * numberOfColumns) amount of data values."}populateTemplate(){const e=this.tableConfig.cellTemplates,t=Object.keys(e||{});e&&t.length&&this.ROWS.forEach((t,o)=>{t.forEach((t,r)=>{for(const i in e){const a=t.text.indexOf(i);if(-1!=a){const l=e[i],d=this.querySelector("#"+l.templateName);if(null==d){console.warn(`cellTemplates["${i}"]: Missing '${l.templateName}' template.`);continue}let s=t.text.replace(i,"");l.contentCb&&(s=l.contentCb({col:r,row:o,content:s,insertIndex:a})),this.ROWS[o][r]={text:s,template:{template:d,templateCb:l.templateCb,insertIndex:"replace"==l.contentUse?-1:a}};break}}})})}setDefaultFilterAndSort(){var e,t;const o=null===(e=this.tableConfig.default)||void 0===e?void 0:e.sort;if(o){const e=this.COLS.find(e=>e.options.id==o.colId);e?this.sort(e,o.order):console.warn(`Cant find ${o.colId} col - for sorting`)}const r=null===(t=this.tableConfig.default)||void 0===t?void 0:t.filter;if(r){const e=this.COLS.find(e=>e.options.id==r.colId);e?e.filter?(e.filter.selectedIndex=r.selectedIndex,e.filter.input=r.input,this.updCols(),this.filter(e)):console.warn(`Cant find filters on ${r.colId} col`):console.warn(`Cant find ${r.colId} col - for filtering`)}}populateTable(){this.populateColumns(),this.populateData(),this.validateData(),this.setDefaultFilterAndSort(),this.populateTemplate()}updateDataInTable(){this.populateData(),this.validateData(),this.populateTemplate()}onDropRow(){this.dragRow!=this.dropRow&&this.drops.push([this.dragRow,this.dropRow]),this.dragRow=-1,this.dropRow=-1,this.dragRowElem&&(this.dragRowElem.setAttribute("draggable","false"),this.dragRowElem=null)}onDropCol(){if(this.dragCol!=this.dropCol){const e=this.COLS[this.dragCol],t=this.COLS[this.dropCol],o=e.group,r=t.group,i=e.index,a=t.index;e.group=r,t.group=o,e.index=a,t.index=i,this.COLS[this.dragCol]=t,this.COLS[this.dropCol]=e,this.ROWS.forEach(e=>{const t=e[this.dragCol],o=e[this.dropCol];e[this.dragCol]=o,e[this.dropCol]=t}),this.updCols(),this.updRows()}this.dragCol=-1,this.dropCol=-1}sort(e,t){e.sorter&&(this.clearSelection(),this.drops=[],this.COLS.forEach(o=>{o.options.id==e.options.id?o.sort=t||("default"==o.sort?"ascending":"ascending"==o.sort?"descending":"default"):o.sort="default"}),this.updCols(),this.requestUpdate(),this["md-table-advanced-change"].emit({type:"sort",order:e.sort}))}filter(e){if(!e.filter)return;this.clearSelection(),this.drops=[];const t=e.filter.input.trim(),o=e.filter.list[e.filter.selectedIndex];e.filter.active=!!t,this.requestUpdate(),t?this["md-table-advanced-change"].emit({type:"filter-on",filter:o,input:t}):this["md-table-advanced-change"].emit({type:"filter-off",filter:e.filter.list[e.filter.selectedIndex]})}selectRow(e){var t;const o=e.row.idx,r=Object.prototype.hasOwnProperty.call(this.selected,o);"multiple"==(null===(t=this.tableConfig.rows)||void 0===t?void 0:t.selectable)?(e.metaKey?r?delete this.selected[o]:this.selected[o]=!0:e.shiftKey||(this.selected={[o]:!0}),this["md-table-advanced-change"].emit({type:"multi-select",rows:Object.keys(this.selected).map(e=>+e)})):r?this.clearSelection():(this.selected={[o]:!0},this["md-table-advanced-change"].emit({type:"select",index:o})),this.requestUpdate("selected")}clearSelection(){this.selected={},this.requestUpdate("selected")}collapseToggle(e,t){e.stopPropagation(),this.expandedRowIdx[t]?(delete this.expandedRowIdx[t],this["md-table-advanced-change"].emit({type:"collapse",row:t})):(this.expandedRowIdx[t]=!0,this["md-table-advanced-change"].emit({type:"expand",row:t})),this.clearSelection(),this.requestUpdate()}render(){if(this.error)return l.html` <div>${this.error}</div> `;const{head:e}=this.tableConfig,t=Object(s.classMap)({"sticky-header":!!this.tableConfig.isStickyHeader});return l.html`
|
|
2
2
|
<div class="md-table-advanced">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
<table class=${t} summary=${Object(n.ifDefined)(null==e?void 0:e.summary)}>
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
${this.renderRow(t,o)} ${r?t.children.map(e=>this.renderRow(e,o)):d.nothing}
|
|
114
114
|
`})}
|
|
115
115
|
</tbody>
|
|
116
|
-
`}renderRow(e,t){const o=
|
|
116
|
+
`}renderRow(e,t){const o=Object.prototype.hasOwnProperty.call(this.selected,e.idx),r=Object(s.classMap)({selected:o,selectable:this.isSelectable&&!o,ghost:e.isGhost});return l.html`
|
|
117
117
|
<tr
|
|
118
118
|
class=${r}
|
|
119
119
|
tabindex=${Object(n.ifDefined)("true"===this.isRowFocusable?"0":void 0)}
|
package/dist/chunks/md-81.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[81],{124:function(t,e,r){"use strict";r.r(e),r.d(e,"formatType",(function(){return h})),r.d(e,"Table",(function(){return m}));var o=r(6),a=r(5),l=r(0),d=r(
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[81],{124:function(t,e,r){"use strict";r.r(e),r.d(e,"formatType",(function(){return h})),r.d(e,"Table",(function(){return m}));var o=r(6),a=r(5),l=r(0),d=r(2),i=r(13),s=r(32),n=r.n(s),c=l.css`.md-table-container{width:100%}.md-table-container_stickly{height:100%;overflow-y:auto;position:relative}.md-table-container_stickly .md-table__header tr{background-color:rgba(0,0,0,0)}.md-table-container_stickly .md-table__header th{background-color:var(--table-header-bg-color,#f7f7f7);position:sticky;top:0}.md-table-container_stickly .md-table__header th:hover{background-color:var(--table-hover-bg-color,#ededed)}.md-table{border:1px solid var(--table-border-color,#dedede);border-collapse:collapse;width:100%}.md-table .md-table__header tr{background-color:var(--table-header-bg-color,#f7f7f7)}.md-table .md-table__header th{border-bottom:1px solid var(--table-border-color,#dedede);border-right:1px solid var(--table-border-color,#dedede);color:var(--table-text-color,#545454);font-size:12px;font-weight:700;padding-left:calc(.25rem*3);text-align:left}.md-table .md-table__header th:hover{background-color:var(--table-hover-bg-color,#ededed)}.md-table .md-table__header th:active{background-color:var(--table-pressed-bg-color,#dedede)}.md-table .md-table__header th a{color:var(--table-text-color,#545454)}.md-table .md-table__header th a.sortedAbc:after{content:"\\f1cc";display:inline-block;font-family:momentum-ui-icons;padding-left:.25rem;vertical-align:bottom}.md-table .md-table__header th a.sortedZyx:after{content:"\\f1cf";display:inline-block;font-family:momentum-ui-icons;padding-left:.25rem;vertical-align:bottom}.md-table .md-table__body tr{height:2.5rem}.md-table .md-table__body tr:hover{background-color:var(--table-hover-bg-color,#ededed)}.md-table .md-table__body tr:active{background-color:var(--table-pressed-bg-color,#dedede)}.md-table .md-table__body td{font-size:14px;min-width:calc(2.5rem*3.2);padding-left:calc(.25rem*3);vertical-align:middle}.md-table .md-table__body td span{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:calc(.25rem*6);width:calc(100% - .25rem)}.md-table .md-table__body td md-icon{padding-left:.25rem;vertical-align:bottom}.md-table .md-table__body td:last-child span{width:auto}.md-table tr{height:2.5rem}.md-table tr td{border-bottom:1px solid var(--table-border-color,#dedede);border-right:1px solid var(--table-border-color,#dedede);vertical-align:top}.md-table--stripped .md-table__body tr:nth-child(even){background-color:var(--table-stripped-bg-color,#ededed)}.md-table--stripped .md-table__body tr:nth-child(even):hover{background-color:var(--table-hover-bg-color,#ededed)}.md-table--clean tr td{border-right:unset}.md-table--no-borders{border:unset}.md-table--no-borders .md-table__header th,.md-table--no-borders tr td{border-bottom:unset;border-right:unset}`,b=function(t,e,r,o){var a,l=arguments.length,d=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(t,e,r,o);else for(var i=t.length-1;i>=0;i--)(a=t[i])&&(d=(l<3?a(d):l>3?a(e,r,d):a(e,r))||d);return l>3&&d&&Object.defineProperty(e,r,d),d};const h=["number","default"];var m;!function(t){let e=class extends l.LitElement{constructor(){super(...arguments),this.tabledata="",this.zebra=!1,this.clean=!1,this.sorting=!1,this.nodata="No data Loaded",this.stickheader=!1,this.label="Table",this.noBorders=!1,this.format="default",this.warning=[],this.errors=[],this.sort={columnName:"",sortting:!1},this.csvData=void 0,this.config={quoteChar:'"',escapeChar:'""',header:!1,preview:0,comments:!1,step:void 0,complete:void 0,download:!1}}connectedCallback(){super.connectedCallback(),this.results=n.a.parse(this.tabledata,this.config),this.headerRow=this.results.data[0],this.csvData=this.results.data.slice(1,this.results.data.length),this.requestUpdate("tabledata"),this.linkCellItems()}get rowItem(){return this.rowTable}linkCellItems(){const t=this.rowTable;null==t||t.forEach((t,e)=>{this.warning.forEach(r=>{if(e+1===r.row){t.querySelectorAll('td[role="cell"').forEach((t,e)=>{e+1===r.col&&(t.classList.add("warning"),t.insertAdjacentHTML("beforeend",'<md-icon name="warning-regular" size="24" iconSet="momentumDesign" color="var(--md-alert-warning-text-color)"></md-icon>'))})}}),this.errors.forEach(r=>{if(e+1===r.row){t.querySelectorAll('td[role="cell"').forEach((t,e)=>{e+1===r.col&&(t.classList.add("error"),t.insertAdjacentHTML("beforeend",'<md-icon name="clear-bold" size="24" iconSet="momentumDesign" color="var(--md-alert-error-text-color)"></md-icon>'))})}})})}sortTab(t,e){const r=t.target,o=Array.from(this.csvData),a=this.headerRow.indexOf(e);e!==this.sort.columnName||!0!==this.sort.sortting?(o.sort((function(t,e){const r=t[a].toLowerCase(),o=e[a].toLowerCase();return r>o?1:r<o?-1:0})),this.sort.sortting=!0,r.classList.remove("sortedZyx"),r.classList.add("sortedAbc")):(o.reverse(),this.sort.sortting=!1,r.classList.remove("sortedAbc"),r.classList.add("sortedZyx")),this.sort.columnName=e,this.csvData=o,this.requestUpdate("csvData")}update(t){super.update(t),t.has("tabledata")&&(this.results=n.a.parse(this.tabledata,this.config),this.headerRow=this.results.data[0],this.csvData=this.results.data.slice(1,this.results.data.length),this.linkCellItems())}static get styles(){return[a.a,c]}get tableClassMap(){return{"md-table--clean":this.clean,"md-table--no-borders":this.noBorders,"md-table--stripped":this.zebra,"md-table--sorting":this.sorting}}render(){return l.html`
|
|
2
2
|
<div class=${"md-table-container "+(this.stickheader?"md-table-container_stickly":d.nothing)}>
|
|
3
3
|
${0!=this.csvData.length?l.html`
|
|
4
4
|
<table
|
package/dist/chunks/md-83.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[83],{125:function(t,e,i){"use strict";i.r(e),i.d(e,"TaskItem",(function(){return o}));i(52),i(15);var o,a=i(6),n=i(5),s=i(0),m=i(
|
|
1
|
+
(window["momentum-web-components-[id]"]=window["momentum-web-components-[id]"]||[]).push([[83],{125:function(t,e,i){"use strict";i.r(e),i.d(e,"TaskItem",(function(){return o}));i(52),i(15);var o,a=i(6),n=i(5),s=i(0),m=i(2),r=i(4),c=s.css`:host{width:100%}.md-taskitem{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:stretch;border-radius:.5rem;color:var(--md-secondary-text-color);cursor:pointer;margin-bottom:4px;min-height:5rem;padding:.75rem;position:relative;width:auto;z-index:0}.md-taskitem.selected{background-color:var(--taskitem-pressed-bg-color,#fff);box-shadow:0 .125rem .25rem rgba(0,0,0,.16)}.md-taskitem.selected .md-taskitem__content_chat,.md-taskitem.selected .md-taskitem__content_popover_title,.md-taskitem.selected .md-taskitem__content_queue{color:var(--taskitem-selected-text-color,#121212)}.md-taskitem.selected .md-taskitem__content_title.mainTitle{color:var(--taskitem-selected-text-color,#121212)}.md-taskitem:hover{background-color:var(--taskitem-hover-bg-color,#fff)}.md-taskitem:hover .md-taskitem__content_chat,.md-taskitem:hover .md-taskitem__content_popover_title,.md-taskitem:hover .md-taskitem__content_queue{color:var(--taskitem-selected-text-color,#121212)}.md-taskitem:hover .md-taskitem__content_title.mainTitle{color:var(--taskitem-selected-text-color,#121212)}.md-taskitem:active{background-color:var(--taskitem-pressed-bg-color,#fff)}.md-taskitem:active .md-taskitem__content_chat,.md-taskitem:active .md-taskitem__content_popover_title,.md-taskitem:active .md-taskitem__content_queue{color:var(--taskitem-selected-text-color,#121212)}.md-taskitem:active .md-taskitem__content_title.mainTitle{color:var(--taskitem-selected-text-color,#121212)}.md-taskitem:focus{background:var(--taskitem-focus-bg-color,#fff);box-shadow:none;outline:0}.md-taskitem:focus::after{box-shadow:0 0 0 .125rem var(--taskitem-focus-border-color,#007aa3)}.md-taskitem::after{bottom:0;content:"";display:block;left:0;position:absolute;right:0;top:0;z-index:-1;border-radius:.5rem;margin:-.125rem}.md-taskitem__mediatype{margin-right:.5rem;position:relative;width:2.625rem}.md-taskitem__mediatype img{max-width:fit-content}.md-taskitem__mediatype .md-taskitem__status{align-items:center;display:inline-flex;justify-content:space-around;position:absolute;background:var(--taskitem-status-bg-color,#dedede);border-radius:50%;bottom:-4px;color:var(--taskitem-status-text-color,#121212);height:1.25rem;right:-4px;width:1.25rem}.md-taskitem__mediatype .md-taskitem__status md-icon{height:.75rem}.md-taskitem__mediatype .md-taskitem__status md-icon::part(icon){vertical-align:top}.md-taskitem__mediatype .md-taskitem__status.hold{background:var(--taskitem-status-pause-bg-color,#ffd98c)}.md-taskitem__content{align-content:stretch;align-items:flex-start;align-self:stretch;display:flex;flex:0 1 auto;flex-direction:column;justify-content:center;width:calc(100% - (2.625rem + 6.25rem))}.md-taskitem__content_popover_title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--taskitem-text-color,#545454);font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif);font-size:14px;line-height:.9375rem;margin-bottom:.5rem;width:100%}.md-taskitem__content_title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;line-height:1.1875rem;margin-bottom:.5rem;width:100%}.md-taskitem__content_title.mainTitle{color:var(--taskitem-text-color,#545454);font-family:var(--brand-font-bold, "CiscoSansTT Bold", "Helvetica Neue", Helvetica, Arial, sans-serif)}.md-taskitem__content_inner{display:flex;flex:0 1 auto;width:100%}.md-taskitem__content_queue{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:.875rem;width:100%}.md-taskitem__content_chat{color:var(--taskitem-chat-text-color,#545454);display:flex;font-size:12px;line-height:.875rem;margin-top:.5rem;position:relative;width:100%}.md-taskitem__content_chat .new-chat_massages{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:2.5rem;width:calc(100% - .5rem)}.md-taskitem__addition{align-items:flex-end;display:flex;flex-direction:column;margin-left:.5rem;text-align:right;width:6.25rem}.md-taskitem__addition .new-chat-quantity{background:var(--taskitem-chat-quantity-bg-color,#9df);border-radius:9px;color:var(--taskitem-chat-quantity-text-color,#103c62);display:inline-block;font-size:10px;line-height:.875rem;min-width:18px;padding:.125rem .25rem;text-align:center}@media(forced-colors:active){.md-taskitem:focus{outline:1px solid Highlight}.md-taskitem.selected,.md-taskitem:hover{forced-color-adjust:none;outline:1px solid Highlight;background-color:Highlight;color:HighlightText;box-shadow:none}.md-taskitem:active{forced-color-adjust:none;outline:1px solid HighlightText;background-color:Highlight;color:HighlightText;box-shadow:none}.md-taskitem__addition .new-chat-quantity{forced-color-adjust:auto}}`,d=function(t,e,i,o){var a,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var m=t.length-1;m>=0;m--)(a=t[m])&&(s=(n<3?a(s):n>3?a(e,i,s):a(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};!function(t){let e=class extends s.LitElement{constructor(){super(...arguments),this.mediaType="call",this.status="",this.popovertitle="",this.title="",this.queue="",this.accepted=!1,this.quantity=0,this.lastmessage="",this.selected=!1,this.customAriaLabel="",this.iconSrc="",this.tabIndexForContainer="0",this.renderTaskType=()=>{switch(this.mediaType.toLowerCase()){case"telephony":return s.html`
|
|
2
2
|
<md-badge color="green" circle>
|
|
3
3
|
<md-icon name="handset-filled" size="20" iconSet="momentumDesign"></md-icon>
|
|
4
4
|
</md-badge>
|