@sankhyalabs/ezui 5.20.0-dev.2 → 5.20.0-dev.21
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/README.md +4 -5
- package/dist/cjs/{CSSVarsUtils-b136a156.js → CSSVarsUtils-10c9d5b4.js} +13 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert-list.cjs.entry.js +33 -28
- package/dist/cjs/ez-card-item_3.cjs.entry.js +6 -5
- package/dist/cjs/ez-combo-box.cjs.entry.js +8 -7
- package/dist/cjs/ez-date-input.cjs.entry.js +4 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +4 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +34 -15
- package/dist/cjs/ez-grid.cjs.entry.js +91 -30
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -10
- package/dist/cjs/ez-number-input.cjs.entry.js +4 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +7 -8
- package/dist/cjs/ez-split-button.cjs.entry.js +147 -0
- package/dist/cjs/ez-split-item.cjs.entry.js +20 -2
- package/dist/cjs/ez-split-panel.cjs.entry.js +15 -12
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +16 -5
- package/dist/cjs/index-a7b0c73d.js +8 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +33 -28
- package/dist/collection/components/ez-card-item/ez-card-item.css +39 -6
- package/dist/collection/components/ez-card-item/ez-card-item.js +22 -3
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +7 -6
- package/dist/collection/components/ez-date-input/ez-date-input.js +3 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +3 -0
- package/dist/collection/components/ez-form-view/ez-form-view.css +17 -1
- package/dist/collection/components/ez-form-view/ez-form-view.js +22 -5
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +3 -3
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +4 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +12 -11
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +15 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -3
- package/dist/collection/components/ez-grid/ez-grid.css +25 -1
- package/dist/collection/components/ez-grid/ez-grid.js +67 -10
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +16 -5
- package/dist/collection/components/ez-icon/ez-icon.css +1 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +2 -10
- package/dist/collection/components/ez-number-input/ez-number-input.js +3 -0
- package/dist/collection/components/ez-popup/ez-popup.css +2 -5
- package/dist/collection/components/ez-search/ez-search.css +2 -1
- package/dist/collection/components/ez-search/ez-search.js +5 -6
- package/dist/collection/components/ez-split-button/ez-split-button.css +229 -0
- package/dist/collection/components/ez-split-button/ez-split-button.js +436 -0
- package/dist/collection/components/ez-split-button/test/dropdownItems.js +42 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +6 -7
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +35 -14
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +47 -12
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +82 -2
- package/dist/collection/utils/CSSVarsUtils.js +13 -0
- package/dist/collection/utils/form/test/DataBinder.test.js +9 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +394 -124
- package/dist/esm/{CSSVarsUtils-a97cfa29.js → CSSVarsUtils-71ce76be.js} +13 -0
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-alert-list.entry.js +33 -28
- package/dist/esm/ez-card-item_3.entry.js +6 -5
- package/dist/esm/ez-combo-box.entry.js +8 -7
- package/dist/esm/ez-date-input.entry.js +4 -1
- package/dist/esm/ez-date-time-input.entry.js +4 -1
- package/dist/esm/ez-form-view.entry.js +35 -16
- package/dist/esm/ez-grid.entry.js +92 -31
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +2 -10
- package/dist/esm/ez-number-input.entry.js +4 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +7 -8
- package/dist/esm/ez-split-button.entry.js +143 -0
- package/dist/esm/ez-split-item.entry.js +20 -2
- package/dist/esm/ez-split-panel.entry.js +15 -12
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +16 -5
- package/dist/esm/index-baa5e267.js +8 -4
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-f56dd1da.entry.js → p-07cbffce.entry.js} +1 -1
- package/dist/ezui/p-13dbad96.entry.js +1 -0
- package/dist/ezui/p-2eb8f73b.entry.js +1 -0
- package/dist/ezui/{p-40f72de4.entry.js → p-784fe207.entry.js} +1 -1
- package/dist/ezui/p-7af81663.entry.js +1 -0
- package/dist/ezui/p-801fd0f8.entry.js +1 -0
- package/dist/ezui/p-807560f0.entry.js +1 -0
- package/dist/ezui/p-940ed30b.entry.js +1 -0
- package/dist/ezui/{p-eb36f072.entry.js → p-99ead599.entry.js} +1 -1
- package/dist/ezui/{p-7eb3e1a5.js → p-9e11fc7b.js} +1 -1
- package/dist/ezui/p-9f1e89c9.entry.js +1 -0
- package/dist/ezui/{p-6e2f8e6b.entry.js → p-a2704c1a.entry.js} +2 -2
- package/dist/ezui/{p-51c5e071.entry.js → p-abc23d6f.entry.js} +1 -1
- package/dist/ezui/p-af95cd16.entry.js +1 -0
- package/dist/ezui/{p-c0f1715f.entry.js → p-b567fa8c.entry.js} +1 -1
- package/dist/ezui/p-b9fbf4e7.entry.js +1 -0
- package/dist/ezui/p-baf80b13.entry.js +1 -0
- package/dist/ezui/p-db77a984.entry.js +1 -0
- package/dist/ezui/{p-9cad9b6e.entry.js → p-e85c48d7.entry.js} +1 -1
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +1 -1
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +4 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +3 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +15 -2
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +4 -1
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +0 -1
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +89 -0
- package/dist/types/components/ez-split-button/test/dropdownItems.d.ts +2 -0
- package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +23 -0
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +27 -0
- package/dist/types/components.d.ts +155 -0
- package/dist/types/utils/CSSVarsUtils.d.ts +1 -0
- package/dist/types/utils/form/test/DataBinder.test.d.ts +1 -0
- package/package.json +13 -5
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +0 -8
- package/dist/ezui/p-133fae4a.entry.js +0 -1
- package/dist/ezui/p-24d3fede.entry.js +0 -1
- package/dist/ezui/p-43b03119.entry.js +0 -1
- package/dist/ezui/p-4a7f113d.entry.js +0 -1
- package/dist/ezui/p-596634e9.entry.js +0 -1
- package/dist/ezui/p-76ba9d67.entry.js +0 -1
- package/dist/ezui/p-796c1a88.entry.js +0 -1
- package/dist/ezui/p-af15c277.entry.js +0 -1
- package/dist/ezui/p-ba875f37.entry.js +0 -1
- package/dist/ezui/p-d6ffe679.entry.js +0 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,F as e,H as l}from"./p-23a36bb6.js";import{FloatingManager as d}from"@sankhyalabs/core";const p=class{constructor(o){t(this,o),this.ezClosePopup=i(this,"ezClosePopup",7),this._sizeClasses={"x-small":"col--sd-3 ez-popup__size-limit--x-small",small:"col--sd-5",medium:"col--sd-6",large:"col--sd-9","x-large":"col--sd-11",default:"ez-popup__size-limit--x-small"},this.size="medium",this.opened=!1,this.useHeader=!0,this.heightMode="full",this.ezTitle=void 0}observeConfig(){this.manageOverflow()}manageOverflow(){window.document.body.style.overflow=this.opened?"hidden":""}manageOverlay(){this.opened?this._overlayId=d.subscribeOverlayControl(this._modalRef):d.unsubscribeOverlayControl(this._modalRef||this._overlayId)}getGridSize(){return this._sizeClasses[this.size]||this._sizeClasses.medium}componentDidRender(){this._container&&this._container.focus(),this.manageOverlay()}render(){return o(l,null,this.opened?o("div",{class:"overlay",ref:t=>this._modalRef=t},o("div",{class:"popup col "+this.getGridSize()},o("div",{class:"popup__container "+("auto"===this.heightMode?"popup__container--auto":""),ref:t=>this._container=t,tabIndex:-1},o("div",{class:"popup__content"},o("div",{class:"popup__header "+(this.useHeader?"popup__header--padding":"")},this.useHeader&&o(e,null,!!this.ezTitle&&o("div",{class:"popup__title"},this.ezTitle),o("button",{class:this.ezTitle?"btn-close":"btn-close btn-close--solo",onClick:()=>{this.opened=!1,this.ezClosePopup.emit()}}))),o("div",{class:"popup__expandable-content"},o("slot",null)))))):void 0)}static get watchers(){return{opened:["observeConfig"]}}};p.style=':host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, "Roboto");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url(\'data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><path d="M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z"/></svg>\')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;
|
|
1
|
+
import{r as t,c as i,h as o,F as e,H as l}from"./p-23a36bb6.js";import{FloatingManager as d}from"@sankhyalabs/core";const p=class{constructor(o){t(this,o),this.ezClosePopup=i(this,"ezClosePopup",7),this._sizeClasses={"x-small":"col--sd-3 ez-popup__size-limit--x-small",small:"col--sd-5",medium:"col--sd-6",large:"col--sd-9","x-large":"col--sd-11",default:"ez-popup__size-limit--x-small"},this.size="medium",this.opened=!1,this.useHeader=!0,this.heightMode="full",this.ezTitle=void 0}observeConfig(){this.manageOverflow()}manageOverflow(){window.document.body.style.overflow=this.opened?"hidden":""}manageOverlay(){this.opened?this._overlayId=d.subscribeOverlayControl(this._modalRef):d.unsubscribeOverlayControl(this._modalRef||this._overlayId)}getGridSize(){return this._sizeClasses[this.size]||this._sizeClasses.medium}componentDidRender(){this._container&&this._container.focus(),this.manageOverlay()}render(){return o(l,null,this.opened?o("div",{class:"overlay",ref:t=>this._modalRef=t},o("div",{class:"popup col "+this.getGridSize()},o("div",{class:"popup__container "+("auto"===this.heightMode?"popup__container--auto":""),ref:t=>this._container=t,tabIndex:-1},o("div",{class:"popup__content"},o("div",{class:"popup__header "+(this.useHeader?"popup__header--padding":"")},this.useHeader&&o(e,null,!!this.ezTitle&&o("div",{class:"popup__title"},this.ezTitle),o("button",{class:this.ezTitle?"btn-close":"btn-close btn-close--solo",onClick:()=>{this.opened=!1,this.ezClosePopup.emit()}}))),o("div",{class:"popup__expandable-content"},o("slot",null)))))):void 0)}static get watchers(){return{opened:["observeConfig"]}}};p.style=':host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, "Roboto");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url(\'data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><path d="M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z"/></svg>\')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{p as ez_popup}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as n}from"./p-23a36bb6.js";import{DateUtils as a,TimeFormatter as o,ElementIDUtils as h}from"@sankhyalabs/core";import{C as r}from"./p-9e11fc7b.js";const l=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._changePending=!1,this._focused=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.canShowError=!0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=a.validateDate(t,!0),s=a.validateDate(i,!0);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!this.getParsedDateTime(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}this._changePending=!1}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}handleKeyDown(t){const i=this._textInput.shadowRoot.querySelector("input");if(t.shiftKey&&"Tab"===t.key){if(i.selectionStart>0){let e=i.value.lastIndexOf(" ",i.selectionStart);-1!==e&&(i.setSelectionRange(0,e),t.preventDefault())}}else if("Tab"===t.key&&i.value.length!==i.selectionEnd){let e=i.value.indexOf(" ",i.selectionEnd);e=-1===e?i.selectionEnd:e+1,i.setSelectionRange(e,i.value.length),t.preventDefault()}}handleFocus(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionStart);i=-1===i?t.value.length:i,t.setSelectionRange(0,i)}}handleClick(){const t=this._textInput.shadowRoot.querySelector("input");let i=t.value.lastIndexOf(" ",t.selectionEnd);i=-1===i?0:i+1,i=i>t.selectionEnd?0:i;let e=0===i?t.value.indexOf(" "):t.value.length;t.setSelectionRange(i,e)}changeValue(t){const i=a.validateDate(this.value,!0),e=a.validateDate(t,!0);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}showCalendar(){let t;this.isFixed()?(t=29,this._calendar.fitHorizontal(0)):t=this.errorMessage||"slim"===this.mode?6:-13,this._calendar.fitVertical(t,this._elem.clientHeight),this._calendar.style.visibility="inherit"}hideCalendar(){this.changeValue(this._calendar.value),this._calendar.hide()}getParsedDateTime(t){var i,e;if(void 0===t&&(t=(null===(e=null===(i=this._textInput)||void 0===i?void 0:i.value)||void 0===e?void 0:e.trim())||""),!t)return;const s=t.split(" "),n=s.length>0?s[0]:t,h=o.prepareValue(s[1]?s[1]:"",this.showSeconds);return a.strToDate(n+(h&&" "+h))}handleBlur(){var t,i;if(this._changePending)try{const e=(null===(i=null===(t=this._textInput)||void 0===t?void 0:t.value)||void 0===i?void 0:i.trim())||"",s=this.getParsedDateTime();if(s||!e){this.errorMessage="";const t=a.validateDate(this.value,!0),i=a.validateDate(s,!0);(null==t?void 0:t.getTime())===(null==i?void 0:i.getTime())?(i&&(this._textInput.value=this.getTextValue(i)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(i)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage="O valor digitado não é uma data válida"}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}getTextValue(t){if(t)return a.formatDateTime(t,this.showSeconds)}handleInput(t){const i=this.getParsedDateTime(),e=a.validateDate(this.value,!0),s=a.validateDate(i,!0);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._changePending=!0,this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}isFixed(){return"true"===this._elem.dataset.isFixed}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue()}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e(s,null,e("ez-text-input",{"data-element-id":h.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,onKeyDown:t=>{this.handleKeyDown(t)},onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),onFocus:()=>this.handleFocus(),onClick:()=>this.handleClick(),canShowError:this.canShowError},e("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),e("ez-calendar",{ref:t=>this._calendar=t,"data-element-id":h.getInternalIDInfo("calendar"),onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},floating:!0,time:!0,showSeconds:this.showSeconds,"data-is-fixed":this._elem.dataset.isFixed}))}get _elem(){return n(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};l.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{l as ez_date_time_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,g as e}from"./p-23a36bb6.js";import{NumberUtils as h,ElementIDUtils as r}from"@sankhyalabs/core";import{C as o}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i,g as e}from"./p-23a36bb6.js";import{NumberUtils as h,ElementIDUtils as r}from"@sankhyalabs/core";import{C as o}from"./p-9e11fc7b.js";const a=class{constructor(i){t(this,i),this.ezChange=s(this,"ezChange",7),this.ezStartChange=s(this,"ezStartChange",7),this.ezCancelWaitingChange=s(this,"ezCancelWaitingChange",7),this._focused=!1,this._changePending=!1,this._valuePromiseCallbacks=[],this.label=void 0,this.value=void 0,this.enabled=!0,this.canShowError=!0,this.errorMessage=void 0,this.precision=void 0,this.prettyPrecision=void 0,this.mode="regular"}async setFocus(t){this._textInput.setFocus(t)}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async getValueAsync(){return this._changePending?new Promise((t=>{this._valuePromiseCallbacks.push(t)})):Promise.resolve(this.value)}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,s){if(this._textInput&&t!=s){const i=this.validateValue(t),e=this.validateValue(s);if(null===i&&(this._textInput.value=""),i!=e){const t=this.getTextValue(i)||"";(this._textInput.value||"")!==t&&(void 0===this.getParsedNumber(t)&&this._focused||(this._textInput.value=t,this._focused=!1,this.errorMessage="")),this.ezChange.emit(null===i?void 0:i)}}this._changePending=!1}validateValue(t){return isNaN(t)||void 0===t?null:t}getTextValue(t){if(null!=t)return this.precision>0?h.format(t.toString(),Number(this.precision),Number(this.prettyPrecision)):t.toString()}changeValue(t){this.errorMessage="",this.value!=t?this.value=void 0===t?null:t:(this.setInputValue(),this.ezCancelWaitingChange.emit())}setError(t){this.value=null,this.errorMessage=t,this.ezCancelWaitingChange.emit()}handleBlur(){if(this._changePending)try{const t=this.getParsedNumber();if(void 0!==t&&isNaN(t))this.setError("O valor digitado não é um número válido");else try{this.changeValue(t)}catch(t){return void this.setError(t.message)}}finally{for(const t of this._valuePromiseCallbacks)t(this.value);this._valuePromiseCallbacks=[]}}handleInput(){this.getParsedNumber()!==this.value&&(this._focused=!0,this._changePending=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1}))}getParsedNumber(t){var s;return void 0===t&&(t=null===(s=this._textInput)||void 0===s?void 0:s.value),(null==t?void 0:t.trim())?h.stringToNumber(t):void 0}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}componentDidLoad(){o.applyVarsTextInput(this._elem,this._textInput),this.setInputValue()}render(){return r.addIDInfoIfNotExists(this._elem,"input"),i("ez-text-input",{class:"number__input","data-element-id":r.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:()=>this.handleInput(),restrict:this.precision>0?"0123456789-,.":"0123456789-",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,canShowError:this.canShowError})}get _elem(){return e(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};a.style=":host{display:block;width:100%}.number__input{height:100%}";export{a as ez_number_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as i,g as e}from"./p-23a36bb6.js";import{ElementIDUtils as n}from"@sankhyalabs/core";const r=class{constructor(i){t(this,i),this.buttonClick=o(this,"buttonClick",7),this.dropdownItemClick=o(this,"dropdownItemClick",7),this.dropdownSubActionClick=o(this,"dropdownSubActionClick",7),this.rightDefaultTitle="Mais opções",this.show=!1,this.enabled=!0,this.iconName=void 0,this.image=void 0,this.items=void 0,this.label=void 0,this.leftTitle=void 0,this.rightTitle="Mais opções",this.mode="default",this.size="medium"}async setBlur(){this.leftButton.blur(),this.rightButton.blur()}async setLeftButtonFocus(){this.leftButton.focus()}async setRightButtonFocus(){this.rightButton.focus()}clickListener(t){this.enabled||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}getIconSize(t="medium"){var o;const i=null===(o=this.size)||void 0===o?void 0:o.toLowerCase();return["medium","large"].includes(i)?i:t}closeDropdown(){this.show=!1}toggleDropdown(){this.show=!this.show}handleButtonClick(){this.buttonClick.emit()}handleDropdownItemClick(t){this.dropdownItemClick.emit(t.detail),t.stopPropagation(),this.closeDropdown()}handleDropdownSubActionClick(t){this.dropdownSubActionClick.emit(t.detail),t.stopPropagation(),this.closeDropdown()}positionDropdown(){const{rightButton:t,dropdownParent:o}=this,i=t.getBoundingClientRect(),e=o.getBoundingClientRect(),n=window.innerHeight-i.bottom,r=i.top,l=window.innerWidth-i.right<e.width&&i.left>e.width;let s=`${i.bottom+window.scrollY}px`,d=`${i.left+window.scrollX}px`,a="auto";n<e.height&&r>e.height&&(a=window.innerHeight-i.top-window.scrollY+"px",s="auto",o.style.maxHeight=`${r}px`),l&&(d=`${i.right-e.width+window.scrollX}px`),o.style.top=s,o.style.bottom=a,o.style.left=d}setEvents(){window.removeEventListener("scroll",this.positionDropdown.bind(this)),window.addEventListener("scroll",this.positionDropdown.bind(this))}componentWillLoad(){this.setEvents()}componentDidLoad(){this._element&&n.addIDInfo(this._element),this.leftButton&&n.addIDInfo(this.leftButton,"left-button",{id:"embedded"}),this.rightButton&&n.addIDInfo(this.rightButton,"right-button",{id:"embedded"}),this.positionDropdown()}componentDidUpdate(){this.positionDropdown()}render(){const t=this.shouldShowIconOnLeftButton(),o=this.shouldShowLabelOnLeftButton(),e=this.getIconSize();return i("div",{class:"label-icon"},i("button",{class:`ez-split-button__left-button ${e} ${this.mode}`,title:this.leftTitle||this.label,type:"button",disabled:!this.enabled,onClick:()=>{this.handleButtonClick()},ref:t=>this.leftButton=t},t&&i("ez-icon",{href:this.image,iconName:this.iconName,size:e}),o&&i("label",{title:this.leftTitle||this.label},this.label)),i("div",{class:"dropdown"},i("button",{class:`ez-split-button__right-button ${e} ez-split-button__right-button--${e} ez-split-button__right-button--divider`,title:this.rightTitle||this.rightDefaultTitle,type:"button",disabled:!this.enabled,onClick:()=>{this.toggleDropdown()},ref:t=>this.rightButton=t},i("ez-icon",{class:"ez-split-button__right-button-container "+(e?`btn-icon--${e}`:""),iconName:"chevron-down",size:e})),i("div",{class:`dropdown-content dropdown-content--${this.size}`,ref:t=>this.dropdownParent=t},this.show&&i("ez-dropdown",{items:this.items,onClick:t=>{t.stopPropagation()},onEzOutsideClick:()=>{this.closeDropdown()},onEzClick:t=>{this.handleDropdownItemClick(t)},onEzSubActionClick:t=>{this.handleDropdownSubActionClick(t)}}))))}shouldShowLabelOnLeftButton(){return["icon-left","default"].includes(this.mode)}shouldShowIconOnLeftButton(){return["icon-left","icon-only"].includes(this.mode)}get _element(){return e(this)}};r.style=":host{--ez-split-button--min-width:24;--ez-split-button--width:'auto';--ez-split-button__medium--height:32px;--ez-split-button__large--height:42px;--ez-split-button__medium-icon--width:40px;--ez-split-button__large-icon--width:44px;--ez-split-button__inline__icon--gap:6px;--ez-split-button__label--padding-top:0px;--ez-split-button__label--padding-bottom:0px;--ez-split-button__right-button--padding-left:8px;--ez-split-button--color:var(--title--primary, #FFF);--ez-split-button--font-size:var(--text--medium, 14px);--ez-split-button--font-family:var(--font-pattern, Arial);--ez-split-button--font-weight:var(--text-weight--large);--ez-split-button--background-color:var(--background--medium, #008561);--ez-split-button--border-radius:var(--border--radius-large, 12px);--ez-split-button--border:none;--ez-split-button--justify-content:center;--ez-split-button--hover-color:var(--color--primary-600);--ez-split-button--hover--background-color:var(--background--medium, var(--ez-split-button--background-color));--ez-split-button--disabled-color:var(--text--disable);--ez-split-button--disabled--background-color:var(--color--disable-secondary);--ez-split-button--focus--border:var(--border--medium, 2px) var(--color--primary-300);--ez-split-button--focus--box-shadow:none;--ez-split-button--active-color:var(--color--primary-700);--ez-split-button--active--background-color:var(--background--strong)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-split-button--min-width);width:var(--ez-split-button--width);height:var(--ez-split-button__medium--height);font-family:var(--ez-split-button--font-family);font-size:var(--ez-split-button--font-size);font-weight:var(--ez-split-button--font-weight);padding:var(--ez-split-button__label--padding-top) 0 var(--ez-split-button__label--padding-bottom) 0;border-top-left-radius:var(--ez-split-button--border-radius);border-bottom-left-radius:var(--ez-split-button--border-radius);background-color:var(--ez-split-button--background-color);color:var(--ez-split-button--color);fill:var(--ez-split-button--color);border:var(--ez-split-button--border);justify-content:var(--ez-split-button--justify-content)}label{cursor:pointer}button:active{outline:none;box-shadow:none;background-color:var(--ez-split-button--active--background-color);color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.ez-split-button__left-button:focus,.ez-split-button__right-button:focus{outline:var(--ez-split-button--focus--border);box-shadow:var(--ez-split-button--focus--box-shadow)}.ez-split-button__left-button:hover,.ez-split-button__right-button:hover{outline:none;background-color:var(--ez-split-button--hover--background-color);color:var(--ez-split-button--hover-color);fill:var(--ez-split-button--hover-color);--ez-icon--color:var(--ez-split-button--hover-color)}.ez-split-button__left-button:disabled,.ez-split-button__left-button:disabled label,.ez-split-button__right-button:disabled{background-color:var(--ez-split-button--disabled--background-color);color:var(--ez-split-button--disabled-color);fill:var(--ez-split-button--disabled-color);border:none;--ez-icon--color:var(--ez-split-button--disabled-color);cursor:not-allowed}button.large{height:var(--ez-split-button__large--height)}button.medium{height:var(--ez-split-button__medium--height)}.default label{padding:var(--ez-split-button__label--padding-top) 12px var(--ez-split-button__label--padding-bottom) 20px}.icon-left{gap:var(--ez-split-button__inline__icon--gap)}.icon-left label{padding-right:12px}.icon-left ez-icon{padding-left:20px}.icon-only{padding-left:12px;padding-right:12px}.ez-split-button__right-button{border-top-right-radius:var(--ez-split-button--border-radius);border-bottom-right-radius:var(--ez-split-button--border-radius);border-top-left-radius:0;border-bottom-left-radius:0}.ez-split-button__right-button--medium{min-width:var(--ez-split-button__medium-icon--width)}.ez-split-button__right-button--large{min-width:var(--ez-split-button__large-icon--width)}.ez-split-button__right-button--divider{top:10%;bottom:10%}.ez-split-button__right-button--divider:before{content:\"\";position:absolute;left:0;border-left:1px solid rgba(0, 0, 0, 20%);border-radius:2px;height:75%}.btn-icon--medium{min-width:--ez-split-button__medium-icon--width}.btn-icon--large{min-width:--ez-split-button__large-icon--width}.ez-split-button__right-button-container{position:absolute;left:0;padding-left:var(--ez-split-button__right-button--padding-left)}.label-icon{display:flex;flex-direction:row;align-items:center;color:var(--ez-split-button--color)}.label-icon:active{color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.dropdown{display:flex}.dropdown-content{display:block;position:absolute;background-color:#f1f1f1;min-width:160px;z-index:--ez-elevation--8;border-radius:var(--ez-split-button--border-radius)}.dropdown-content>ez-dropdown{position:relative}";export{r as ez_split_button}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s}from"./p-23a36bb6.js";import{UserInterface as e}from"@sankhyalabs/core";const o=window,h=new CustomEvent("onSubmitFilter",{detail:{showToast:!0}}),l=class{constructor(s){t(this,s),this.applyFilterColumnOptions=i(this,"applyFilterColumnOptions",7),this.TOP_POSITION="65",this.TOP_POSITION_HEADER_HIDDEN="18",this.TOP_POSITION_NO_TASKBAR="32",this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN="20",this.DEFAULT_HEIGHT=430,this.FIX_MARGIN=60,this.FILTER_COLUMN_WIDTH=330,this.opened=!0,this.columnName=void 0,this.columnLabel=void 0,this.gridHeaderHidden=!1,this.noHeaderTaskBar=!1,this.dataSource=void 0,this.dataUnit=void 0,this.options=void 0,this.selectedItems=void 0,this.fieldDescriptor=void 0,this.useOptions=!1,this.isTextSearch=!1}async hide(){await this.ezPopoverElement.hide(),await this.clearConfigs()}async show(t){this.canShow(t)&&(await this.hide(),this.fieldDescriptor=this.dataUnit.getField(t.columnName),this.buildIsTextSearch(),this.columnName=t.columnName,this.columnLabel=t.columnLabel,await this.setOptions(t.filteredOptions),await this.ezPopoverElement.show(this.calcTopPosition(),this.calculateLeftPosition(t)))}calculateLeftPosition({leftPosition:t,fromIcon:i}){const s=this.calcFilterColumnLeftPosition(t);if(!i)return`${s}px`;const e=s+16-this.ezPopoverElement.getBoundingClientRect().left;return`${e>0?e:0}px`}calcFilterColumnLeftPosition(t){var i,s;const e=null===(i=this.ezPopoverElement.closest("ez-grid").getBoundingClientRect())||void 0===i?void 0:i.right,o=null===(s=this.ezPopoverElement.getBoundingClientRect())||void 0===s?void 0:s.left,h=e-(this.FILTER_COLUMN_WIDTH+o),l=t-(this.FIX_MARGIN+o);return l>h?h:l}buildIsTextSearch(){var t,i;const s=null!==(i=null===(t=this.fieldDescriptor)||void 0===t?void 0:t.userInterface)&&void 0!==i?i:e.SHORTTEXT;this.isTextSearch=!(s===e.DECIMALNUMBER||s===e.INTEGERNUMBER)}calcTopPosition(){const t=this.buildReferenceTopPosition(),i=parseInt(t)+this.DEFAULT_HEIGHT,s=Math.round(this.ezPopoverElement.getBoundingClientRect().top)+i,e=window.innerHeight;return e>s?`${t}px`:e-s+"px"}buildReferenceTopPosition(){return this.noHeaderTaskBar?this.gridHeaderHidden?this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN:this.TOP_POSITION_NO_TASKBAR:this.gridHeaderHidden?this.TOP_POSITION_HEADER_HIDDEN:this.TOP_POSITION}async clearConfigs(){var t;await(null===(t=this.ezMultiSelectionList)||void 0===t?void 0:t.clearFilteredOptions()),this.options=null,this.columnName=null}canShow(t){return!this.ezPopoverElement.opened||t.columnName!==this.columnName}submit(){this.applyFilterColumnOptions.emit({field:this.columnName,values:this.selectedItems}),o.dispatchEvent(h),this.hide()}changeSelectedItems(t){this.selectedItems=t}hasToUseOptions(){return this.fieldDescriptor.userInterface===e.OPTIONSELECTOR||this.fieldDescriptor.userInterface===e.SWITCH||this.fieldDescriptor.userInterface===e.CHECKBOX}isCheckBoxOrSwitch(){return this.fieldDescriptor.userInterface===e.SWITCH||this.fieldDescriptor.userInterface===e.CHECKBOX}async setOptions(t){const i=this.hasToUseOptions();if(i)return this.useOptions=i,void(this.options=i?this.buildOptions(t):null!=t?t:null);const s=await this.dataSource.getStaticOptions(this.columnName);if(null!=s){const i=new Set((t||[]).filter((t=>t.check)).map((t=>t.label)));return this.useOptions=!0,void(this.options=0===i.size?s:s.map((t=>Object.assign(Object.assign({},t),{check:i.has(t.label)}))))}this.useOptions=!1,this.options=null}buildOptions(t){var i,s;if(t&&t.length>0)return t;if(this.isCheckBoxOrSwitch())return[{label:"Sim",value:"true",check:!0},{label:"Não",value:"false",check:!0}];const e=JSON.parse(null===(s=null===(i=this.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===s?void 0:s.options);return Object.keys(e).map((t=>({label:e[t],value:t,check:!0})))}handleEzVisibilityChange(t){!1===t.detail&&this.clearConfigs()}render(){return s("ez-popover",{class:"filter-column__popover","overlay-type":"none",ref:t=>this.ezPopoverElement=t,autoClose:!0,onEzVisibilityChange:this.handleEzVisibilityChange.bind(this)},s("section",{class:"filter-column"},s("header",{class:"filter-column__header"},s("span",{class:"ez-text ez-text--medium filter-column__header-title"},"Filtro da coluna ",this.columnLabel),s("ez-button",{mode:"icon","icon-name":"close",class:"ez-button--tertiary",onClick:()=>this.hide()})),s("ez-multi-selection-list",{columnName:this.columnName,dataSource:this.dataSource,options:this.options,useOptions:this.useOptions,ref:t=>this.ezMultiSelectionList=t,onChangeFilteredOptions:t=>this.changeSelectedItems(t.detail),isTextSearch:this.isTextSearch}),s("footer",{class:"filter-column__footer"},s("ez-button",{label:"Aplicar",class:"ez-button--primary",onClick:this.submit.bind(this)}))))}};l.style=".filter-column{padding:var(--space--2xs, 8px);position:relative}.filter-column__header{margin-bottom:var(--space--2xs, 8px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:var(--space--xl, 32px)}.filter-column__footer{position:relative;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;bottom:0;left:0;padding-top:var(--space--2xs, 8px);border-top:var(--border--medium) var(--color--disable-secondary)}.filter-column__popover{position:absolute}.filter-column__header-title{margin-left:8px}";export{l as filter_column}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as a,c as t,g as l,H as r}from"./p-23a36bb6.js";import{ObjectUtils as n,UserInterface as o,ElementIDUtils as i}from"@sankhyalabs/core";import{R as s}from"./p-05e1f4e7.js";import{C as d}from"./p-b853763b.js";function c(a,t,l,r,n){return e("div",{class:"ez-col ez-col--sd-12 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large"},e("ez-check",{enabled:!l,label:t,mode:n?d.SWITCH:d.REGULAR,"data-field-name":a,"data-context-name":r,key:a}))}function m(a,t,l,r,n,o,i){return e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-number-input",{enabled:!l,label:t,precision:r,prettyPrecision:n,"data-field-name":a,"data-context-name":o,key:a,canShowError:i}))}const h=({name:a,label:t,readOnly:l,contextName:r,canShowError:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-text-input",{label:t,"data-field-name":a,"data-context-name":r,key:a,enabled:!l,canShowError:n})),p=new Map;p.set(o.CHECKBOX,(e=>c(e.name,e.label,e.readOnly,e.contextName,!1))),p.set(o.SWITCH,(e=>c(e.name,e.label,e.readOnly,e.contextName,!0))),p.set(o.OPTIONSELECTOR,(({name:a,label:t,readOnly:l,required:r,props:n,contextName:o,canShowError:i})=>{const s=null==n?void 0:n.options;let d;if("string"==typeof s){const e=JSON.parse(s);d=Object.keys(e).map((a=>({value:a,label:e[a]})))}else d=s;return e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-combo-box",{enabled:!l,suppressEmptyOption:r,label:t,"data-field-name":a,"data-context-name":o,key:a,options:d,canShowError:i}))})),p.set(o.DATE,(({name:a,label:t,readOnly:l,canShowError:r})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-date-input",{enabled:!l,label:t,"data-field-name":a,key:a,canShowError:r})))),p.set(o.TIME,(({name:a,label:t,readOnly:l,canShowError:r})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-time-input",{enabled:!l,label:t,"data-field-name":a,key:a,canShowError:r})))),p.set(o.DATETIME,(({name:a,label:t,readOnly:l,contextName:r,canShowError:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-date-time-input",{enabled:!l,label:t,"data-field-name":a,"data-context-name":r,key:a,canShowError:n})))),p.set(o.FILE,(({name:a,label:t,readOnly:l,contextName:r,props:o})=>{const i=n.removeEmptyValues({subTitle:o.subTitle,requestHeaders:Object.assign(Object.assign({},o.STORAGESTRATEGY&&{STORAGESTRATEGY:o.STORAGESTRATEGY}),o.INTERNAL_FILENAME&&{INTERNAL_FILENAME:o.INTERNAL_FILENAME})});return e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-upload",Object.assign({enabled:!l,label:t,"data-field-name":a,"data-context-name":r,key:a},i)))})),p.set(o.DECIMALNUMBER,(({name:e,label:a,readOnly:t,props:l,contextName:r,canShowError:n})=>{const o=Number((null==l?void 0:l.precision)||2);return m(e,a,t,o,Number((null==l?void 0:l.prettyPrecision)||o),r,n)})),p.set(o.INTEGERNUMBER,(({name:e,label:a,readOnly:t,contextName:l,canShowError:r})=>m(e,a,t,0,0,l,r))),p.set(o.SEARCH,(({name:a,label:t,readOnly:l,required:r,contextName:n,canShowError:o,optionLoader:i})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-search",{enabled:!l,suppressEmptyOption:r,label:t,"data-field-name":a,"data-context-name":n,key:a,canShowError:o,optionLoader:i})))),p.set(o.LONGTEXT,(({name:a,label:t,readOnly:l,contextName:r,rows:n,canShowError:o})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small",key:a},e("ez-text-area",{enabled:!l,label:t,"data-field-name":a,"data-context-name":r,rows:n,canShowError:o}))));class z{constructor(e){this.elem=e}addRightElement(e){this.removeRightElement(),e.classList.add("ez-padding-left--small"),e.setAttribute("data-custom-item","true"),this.elem.classList.add("ez-col--nowrap"),this.elem.appendChild(e)}removeRightElement(){Array.from(this.elem.querySelectorAll('[data-custom-item="true"]')).forEach((e=>e.remove()))}get fieldName(){return this.elem.getAttribute("data-form-item")}}class u{constructor(e,a){this.items=new Map,this.formId=a,e.forEach((e=>{const a=new z(e);this.items.set(a.fieldName,a)}))}getItem(e){return this.items.get(e)}get formName(){return this.formId}}const b=class{constructor(e){a(this,e),this.ezContentReady=t(this,"ezContentReady",7),this.formItemsReady=t(this,"formItemsReady",7),this.fields=void 0}async showUp(){this._element.scrollIntoView({behavior:"smooth",block:"start"})}groupFields(e){const a=new Map;return e.forEach((e=>{const t=e.group;if(t){let l=a.get(t);null==l&&(l=[],a.set(t,l)),l.push(e)}else a.set(e.name,e)})),a}componentDidRender(){this.ezContentReady.emit(Array.from(this._element.querySelectorAll("[data-field-name]")));const e=new u(Array.from(this._element.querySelectorAll("[data-form-item]")));this.formItemsReady.emit(e)}isItemFullWidth(e){return[o.FILE,o.LONGTEXT].includes(e)}buildFormItemElement(a,t=""){return this.isItemFullWidth(a.userInterface)&&(t+=" input-full_width"),e("div",{class:t},(e=>{const a=p.get(e.userInterface)||h,t=e.required?`${e.label}${s}`:e.label,l=a(Object.assign(Object.assign({},e),{label:t}));return l.t["data-form-item"]=e.name,l})(a))}render(){if(i.addIDInfoIfNotExists(this._element,"ezFormView"),null==this.fields)return;let a=[],t=Array.from(this.groupFields(this.fields).entries()).map((([t,l])=>{if(Array.isArray(l))return e("ez-collapsible-box",{id:`group-${t}`,label:t,"header-size":"large",key:t},e("div",{class:"form-view__content"},l.map((e=>this.buildFormItemElement(e)))));a.push(l)})),l=a.map((e=>this.buildFormItemElement(e))),n=e("div",{class:"form-view__content"},l);return e(r,null,n,t)}get _element(){return l(this)}};b.style=".sc-ez-form-view-h{display:flex;flex-wrap:wrap;width:100%;--ez-form-view__item--min-width:220px;--ez-form-view__item--sapce-width:5px}.form-view__content.sc-ez-form-view{display:grid;grid-template-columns:repeat(auto-fill, minmax(var(--ez-form-view__item--min-width), 1fr));gap:var(--ez-form-view__item--sapce-width);width:100%}.input-full_width.sc-ez-form-view{grid-column:1 / -1;width:100%}";export{b as ez_form_view}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as h}from"./p-23a36bb6.js";import{TimeFormatter as r,MaskFormatter as
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as h}from"./p-23a36bb6.js";import{TimeFormatter as r,MaskFormatter as o,NumberUtils as a,ElementIDUtils as n}from"@sankhyalabs/core";import{C as l}from"./p-9e11fc7b.js";const u=class{constructor(i){t(this,i),this.ezChange=s(this,"ezChange",7),this.ezStartChange=s(this,"ezStartChange",7),this.ezCancelWaitingChange=s(this,"ezCancelWaitingChange",7),this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.canShowError=!0}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||(this.prepareValue(this._viewValue),(this._textInput.value||"")!==this._viewValue&&(this._textInput.value=this._viewValue)))}observeShowSeconds(){this.prepareMask(this.showSeconds?"##:##:##":"##:##")}observeValue(t,s){if(this._textInput&&t!=s){let i=this.validateValue(t);i!=this.validateValue(s)&&(this._viewValue=null==i?"":i.toString(),this.prepareValue(this._viewValue),this._viewValue&&!r.validateTime(this._viewValue,this.showSeconds)?(this.setError("Favor inserir um horário válido."),i=void 0):this.setError(""),this.ezChange.emit(null===i?void 0:i))}}prepareMask(t){null==this._maskFormatter?this._maskFormatter=new o(t):this._maskFormatter.mask=t}validateValue(t){return isNaN(t)||void 0===t?null:t}setError(t){this.errorMessage=t,this._textInput&&(null==t?void 0:t.trim())&&this.ezCancelWaitingChange.emit()}getViewValue(){return this._viewValue}prepareValue(t){try{this._viewValue=r.prepareValue(t,this.showSeconds),this._textInput&&this._textInput.value!==this._viewValue&&(this._textInput.value=this._viewValue)}catch(t){this.setError(t.message)}}async setFocus({selectText:t}){this._textInput.setFocus({selectText:t})}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}handleBlur(){if(this._textInput){this._viewValue=this._textInput.value,this.prepareValue(this._viewValue);const t=a.stringToNumber(this._viewValue.replace(/\D/g,""));this.value=["string","number"].includes(typeof t)?t:null}}handleInput(){const t=this._textInput.value;["string","number"].includes(typeof t)&&a.stringToNumber(t.replace(/\D/g,""))!==this.value&&this.ezStartChange.emit({waitmessage:"",blocking:!1})}componentDidLoad(){l.applyVarsTextInput(this._elem,this._textInput)}componentWillLoad(){this.observeShowSeconds(),this.value?this.prepareValue(this.value.toString()):this._viewValue&&this.prepareValue(this._viewValue)}render(){return n.addIDInfoIfNotExists(this._elem,"input"),i(e,null,i("ez-text-input",{class:"time__input","data-element-id":n.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",value:this._viewValue,enabled:this.enabled,label:this.label,restrict:"0123456789:",onBlur:()=>this.handleBlur(),onInput:()=>this.handleInput(),errorMessage:this.errorMessage,mode:this.mode,canShowError:this.canShowError},i("ez-icon",{slot:"leftIcon",iconName:"timer-outline"})))}static get assetsDirs(){return["../assets"]}get _elem(){return h(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],showSeconds:["observeShowSeconds"],value:["observeValue"]}}};u.style=":host{display:flex;flex-wrap:wrap;position:relative;width:100%}.time__input{height:100%}";export{u as ez_time_input}
|
|
@@ -20,6 +20,10 @@ export declare class EzCardItem {
|
|
|
20
20
|
* `{title: string, key: string, details: any}`.
|
|
21
21
|
*/
|
|
22
22
|
item: CardItem;
|
|
23
|
+
/**
|
|
24
|
+
* Determina se a chave do item deve ser exibida.
|
|
25
|
+
*/
|
|
26
|
+
enableKey: boolean;
|
|
23
27
|
/**
|
|
24
28
|
* Emitido sempre que o ez-card é clicado.
|
|
25
29
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { IFormViewField } from './interfaces/IFormViewField';
|
|
3
|
+
import { UserInterface } from '@sankhyalabs/core';
|
|
3
4
|
import { FormItems } from './structure';
|
|
4
5
|
export declare class EzFormView {
|
|
5
6
|
_element: HTMLEzFormViewElement;
|
|
@@ -18,5 +19,7 @@ export declare class EzFormView {
|
|
|
18
19
|
showUp(): Promise<void>;
|
|
19
20
|
private groupFields;
|
|
20
21
|
componentDidRender(): void;
|
|
22
|
+
isItemFullWidth(userInterface: UserInterface): boolean;
|
|
23
|
+
buildFormItemElement(item: IFormViewField, classItem?: string): any;
|
|
21
24
|
render(): any;
|
|
22
25
|
}
|
|
@@ -109,6 +109,7 @@ export default interface EzGridController {
|
|
|
109
109
|
locateColumn(columnName: string): void;
|
|
110
110
|
configFilterColumn(filterColumn: FilterCollumn): any;
|
|
111
111
|
getFilter(): Array<Filter> | undefined;
|
|
112
|
+
clearFilter(): void;
|
|
112
113
|
}
|
|
113
114
|
/**
|
|
114
115
|
* Carrega as informações necessárias para contextualizar corretamente a instância.
|
|
@@ -32,6 +32,7 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
32
32
|
private _editionManager;
|
|
33
33
|
configFilterColumn(filterColumn: HTMLFilterColumnElement): void;
|
|
34
34
|
private handleFilteredColumnsChanged;
|
|
35
|
+
clearFilter(): void;
|
|
35
36
|
private showFilterColumn;
|
|
36
37
|
constructor(enterprise: boolean);
|
|
37
38
|
getGridConfig(): Array<EzGridColumnConfig>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IServerSideDatasource, IServerSideGetRowsParams } from "ag-grid-community";
|
|
2
|
-
import { DataUnit, QuickFilter } from
|
|
2
|
+
import { DataUnit, QuickFilter } from '@sankhyalabs/core';
|
|
3
3
|
import EzGridController, { EzGridColumn, EzGridOptions } from "../EzGridController";
|
|
4
4
|
export default class DataSource implements IServerSideDatasource {
|
|
5
5
|
private _controller;
|
|
@@ -10,6 +10,7 @@ export default class DataSource implements IServerSideDatasource {
|
|
|
10
10
|
quickFilter: QuickFilter;
|
|
11
11
|
readonly RECORD_ARCHIVE = "__RECORD_ARCHIVE__";
|
|
12
12
|
private duObserver;
|
|
13
|
+
private updateLoadedRecords;
|
|
13
14
|
private isSilentChange;
|
|
14
15
|
constructor(dataUnit: DataUnit, controller: EzGridController, options: EzGridOptions);
|
|
15
16
|
private updateSelection;
|
|
@@ -2,7 +2,7 @@ import { IHeaderParams } from 'ag-grid-community';
|
|
|
2
2
|
export interface IEzGridCustomHeaderParams {
|
|
3
3
|
tooltip?: string;
|
|
4
4
|
hasFilter?: () => boolean;
|
|
5
|
-
showColumnFilter?: (leftPosition:
|
|
5
|
+
showColumnFilter?: (leftPosition: number) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare class EzGridCustomHeader {
|
|
8
8
|
private params;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DataUnit } from '@sankhyalabs/core';
|
|
2
2
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
3
|
+
import { IRecordValidator } from '../../utils/form/interfaces';
|
|
3
4
|
import { IMultiSelectionListDataSource } from '../ez-multi-selection-list/interfaces/IMultiSelectionListDataSource';
|
|
4
|
-
import { EzGridColumn, EzGridColumnConfig,
|
|
5
|
+
import { EzGridColumStateEvent, EzGridColumn, EzGridColumnConfig, IGridConfig, IStatusResolver, StatusResolverFunction } from './controller/EzGridController';
|
|
5
6
|
import { ISelection, ISelectionToastConfig } from './interfaces';
|
|
6
|
-
import { IRecordValidator } from '../../utils/form/interfaces';
|
|
7
7
|
export declare class EzGrid {
|
|
8
8
|
private _container;
|
|
9
9
|
private _refPaginationControl;
|
|
@@ -13,6 +13,9 @@ export declare class EzGrid {
|
|
|
13
13
|
private _messageFilterAppliedSuccess;
|
|
14
14
|
private _gridApi;
|
|
15
15
|
private _filterColumn;
|
|
16
|
+
private _refPaginationLabel;
|
|
17
|
+
private _refPaginationLabelTooltip;
|
|
18
|
+
private _headerOverflowWatcher;
|
|
16
19
|
_element: HTMLElement;
|
|
17
20
|
private _paginationInfo;
|
|
18
21
|
private _paginationChangedByKeyboard;
|
|
@@ -123,6 +126,7 @@ export declare class EzGrid {
|
|
|
123
126
|
*/
|
|
124
127
|
filterColumns(search: string): Promise<Array<EzGridColumn>>;
|
|
125
128
|
observeConfig(config: IGridConfig): void;
|
|
129
|
+
updatePaginationTooltip(): void;
|
|
126
130
|
onSelectionChange(evt: CustomEvent): void;
|
|
127
131
|
private setSelection;
|
|
128
132
|
private onSelectAllRecords;
|
|
@@ -140,6 +144,15 @@ export declare class EzGrid {
|
|
|
140
144
|
private resetPaginationState;
|
|
141
145
|
private getPaginationControl;
|
|
142
146
|
componentDidLoad(): void;
|
|
147
|
+
private _getActualPageLabel;
|
|
148
|
+
private _getRemainingPageLabel;
|
|
149
|
+
private _getPaginationTooltip;
|
|
150
|
+
private _initHeaderOverflowWatcher;
|
|
151
|
+
private buildOverFlowWatcherParams;
|
|
152
|
+
private handleOverFlow;
|
|
153
|
+
private _hidePaginationDescription;
|
|
154
|
+
private _showPaginationDescription;
|
|
155
|
+
disconnectedCallback(): void;
|
|
143
156
|
componentWillRender(): void;
|
|
144
157
|
componentDidRender(): void;
|
|
145
158
|
componentWillLoad(): void;
|
|
@@ -8,6 +8,8 @@ export declare class FilterColumn {
|
|
|
8
8
|
private readonly TOP_POSITION_NO_TASKBAR;
|
|
9
9
|
private readonly TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN;
|
|
10
10
|
private readonly DEFAULT_HEIGHT;
|
|
11
|
+
private readonly FIX_MARGIN;
|
|
12
|
+
private readonly FILTER_COLUMN_WIDTH;
|
|
11
13
|
private ezPopoverElement;
|
|
12
14
|
private ezMultiSelectionList;
|
|
13
15
|
applyFilterColumnOptions: EventEmitter<IAppliedFilterColumnOptions>;
|
|
@@ -30,6 +32,7 @@ export declare class FilterColumn {
|
|
|
30
32
|
*/
|
|
31
33
|
show(configs: IFilterColumnConfigs): Promise<void>;
|
|
32
34
|
private calculateLeftPosition;
|
|
35
|
+
private calcFilterColumnLeftPosition;
|
|
33
36
|
private buildIsTextSearch;
|
|
34
37
|
private calcTopPosition;
|
|
35
38
|
private buildReferenceTopPosition;
|
|
@@ -47,7 +50,7 @@ export declare class FilterColumn {
|
|
|
47
50
|
export interface IFilterColumnConfigs {
|
|
48
51
|
columnName: string;
|
|
49
52
|
columnLabel: string;
|
|
50
|
-
leftPosition:
|
|
53
|
+
leftPosition: number;
|
|
51
54
|
filteredOptions?: IMultiSelectionOption[];
|
|
52
55
|
fromIcon?: boolean;
|
|
53
56
|
}
|
|
@@ -58,7 +58,6 @@ export declare class EzMuiltiSelectionList {
|
|
|
58
58
|
private handleSearchOnOption;
|
|
59
59
|
private handleChangeSelectAllItems;
|
|
60
60
|
private handleChangeSelectedItem;
|
|
61
|
-
private clearInputs;
|
|
62
61
|
private buildViewList;
|
|
63
62
|
private buildDeleteIconSlot;
|
|
64
63
|
private buildInitViewWithDataSource;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { IDropdownItem, IDropdownSubAction } from '../ez-dropdown/structure/DropdownItem';
|
|
3
|
+
export declare class EzSplitButton {
|
|
4
|
+
_element: HTMLElement;
|
|
5
|
+
private leftButton;
|
|
6
|
+
private rightButton;
|
|
7
|
+
private dropdownParent;
|
|
8
|
+
private rightDefaultTitle;
|
|
9
|
+
private show;
|
|
10
|
+
/**
|
|
11
|
+
* Se false o usuário não pode interagir com o botão.
|
|
12
|
+
*/
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Define o ícone a ser usado da biblioteca de ícones: [ez-icons](https://gilded-nasturtium-6b64dd.netlify.app/docs/components/layout-doc/icons/)
|
|
16
|
+
*/
|
|
17
|
+
iconName: string;
|
|
18
|
+
/**
|
|
19
|
+
* Define o caminho usado nos modos `icon-only` e `icon-left` para imagens não contempladas na biblioteca de ícones.
|
|
20
|
+
*/
|
|
21
|
+
image: string;
|
|
22
|
+
/**
|
|
23
|
+
* Define o conteúdo do dropdown.
|
|
24
|
+
*/
|
|
25
|
+
items: Array<IDropdownItem>;
|
|
26
|
+
/**
|
|
27
|
+
* Texto a ser apresentado como label do botão.
|
|
28
|
+
*/
|
|
29
|
+
label: string;
|
|
30
|
+
/**
|
|
31
|
+
* Texto a ser apresentado como title do botão principal
|
|
32
|
+
*/
|
|
33
|
+
leftTitle: string;
|
|
34
|
+
/**
|
|
35
|
+
* Texto a ser apresentado como title do botão dropdown
|
|
36
|
+
*/
|
|
37
|
+
rightTitle: string;
|
|
38
|
+
/**
|
|
39
|
+
* Define o modo de uso do botão.
|
|
40
|
+
*/
|
|
41
|
+
mode: 'default' | 'icon-only' | 'icon-left';
|
|
42
|
+
/**
|
|
43
|
+
* Define o tamanho do ez-split-button.
|
|
44
|
+
*/
|
|
45
|
+
size: 'medium' | 'large';
|
|
46
|
+
/**
|
|
47
|
+
* Emitido quando o botão principal é clicado
|
|
48
|
+
*/
|
|
49
|
+
buttonClick: EventEmitter<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Emitido quando um item do dropdown é clicado
|
|
52
|
+
*/
|
|
53
|
+
dropdownItemClick: EventEmitter<IDropdownItem>;
|
|
54
|
+
/**
|
|
55
|
+
* Emitido quando uma subAction de um item do dropdown é clicada
|
|
56
|
+
*/
|
|
57
|
+
dropdownSubActionClick: EventEmitter<IDropdownSubAction>;
|
|
58
|
+
/**
|
|
59
|
+
* Remove o foco de ambos os botões.
|
|
60
|
+
*/
|
|
61
|
+
setBlur(): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Aplica o foco no botão principal.
|
|
64
|
+
*/
|
|
65
|
+
setLeftButtonFocus(): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Aplica o foco no botão do dropdown.
|
|
68
|
+
*/
|
|
69
|
+
setRightButtonFocus(): Promise<void>;
|
|
70
|
+
clickListener(evt: MouseEvent): void;
|
|
71
|
+
private getIconSize;
|
|
72
|
+
private closeDropdown;
|
|
73
|
+
private toggleDropdown;
|
|
74
|
+
private handleButtonClick;
|
|
75
|
+
private handleDropdownItemClick;
|
|
76
|
+
private handleDropdownSubActionClick;
|
|
77
|
+
/**
|
|
78
|
+
* Método responsável em posicionar o dropdown na tela.
|
|
79
|
+
* Faz com que o dropdown se ajuste automaticamente ao espaco na tela
|
|
80
|
+
*/
|
|
81
|
+
private positionDropdown;
|
|
82
|
+
private setEvents;
|
|
83
|
+
componentWillLoad(): void;
|
|
84
|
+
componentDidLoad(): void;
|
|
85
|
+
componentDidUpdate(): void;
|
|
86
|
+
render(): any;
|
|
87
|
+
private shouldShowLabelOnLeftButton;
|
|
88
|
+
private shouldShowIconOnLeftButton;
|
|
89
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SplitOptions } from 'split-grid';
|
|
2
|
+
export declare class SplitPanel {
|
|
3
|
+
direction: 'row' | 'column';
|
|
4
|
+
/**
|
|
5
|
+
* Responsável por definir o painel que limita o tamanho do item expandido.
|
|
6
|
+
*/
|
|
7
|
+
anchorToExpand: boolean;
|
|
8
|
+
_element: HTMLElement;
|
|
9
|
+
_items: HTMLEzSplitItemElement[];
|
|
10
|
+
_panelID: string;
|
|
11
|
+
componentDidLoad(): void;
|
|
12
|
+
initSplit(): void;
|
|
13
|
+
getGutters(): SplitOptions;
|
|
14
|
+
addItemGutter(item: HTMLEzSplitItemElement): void;
|
|
15
|
+
getElementStyle(): {
|
|
16
|
+
display: string;
|
|
17
|
+
height: string;
|
|
18
|
+
width: string;
|
|
19
|
+
position: string;
|
|
20
|
+
};
|
|
21
|
+
getGridTemplate(): string;
|
|
22
|
+
render(): any;
|
|
23
|
+
}
|
|
@@ -1,3 +1,30 @@
|
|
|
1
1
|
export declare class SplitItem {
|
|
2
|
+
_element: HTMLElement;
|
|
3
|
+
/**
|
|
4
|
+
* Define um título para o painel.
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* Define se o item pode ser expandido
|
|
9
|
+
*/
|
|
10
|
+
enableExpand: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Define se o item está expandido
|
|
13
|
+
*/
|
|
14
|
+
private _expanded;
|
|
15
|
+
/**
|
|
16
|
+
* Alterna a visibilidade do painel.
|
|
17
|
+
*/
|
|
18
|
+
toggleExpandItem(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Define o tamanho inicial do painel.
|
|
21
|
+
* @values '%', 'fr'
|
|
22
|
+
*/
|
|
23
|
+
size?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Referência ao elemento que contém o slot.
|
|
26
|
+
**/
|
|
27
|
+
private _slot;
|
|
28
|
+
componentDidLoad(): void;
|
|
2
29
|
render(): any;
|
|
3
30
|
}
|