@sankhyalabs/ezui 5.20.0-dev.10 → 5.20.0-dev.12
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/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-input.cjs.entry.js +3 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js +3 -0
- package/dist/cjs/ez-grid.cjs.entry.js +7 -0
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -10
- package/dist/cjs/ez-number-input.cjs.entry.js +3 -0
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +147 -0
- package/dist/cjs/ez-split-item.cjs.entry.js +3 -2
- package/dist/cjs/ez-split-panel.cjs.entry.js +6 -5
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +8 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -1
- 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-grid/controller/ag-grid/AgGridController.js +4 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +3 -0
- 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 -4
- 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 +0 -1
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +5 -4
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +7 -3
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +23 -2
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +174 -21
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-date-input.entry.js +3 -0
- package/dist/esm/ez-date-time-input.entry.js +3 -0
- package/dist/esm/ez-grid.entry.js +7 -0
- package/dist/esm/ez-multi-selection-list.entry.js +2 -10
- package/dist/esm/ez-number-input.entry.js +3 -0
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +143 -0
- package/dist/esm/ez-split-item.entry.js +4 -3
- package/dist/esm/ez-split-panel.entry.js +6 -5
- package/dist/esm/ezui.js +1 -1
- 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-300bf244.entry.js → p-07cbffce.entry.js} +1 -1
- package/dist/ezui/{p-c0f1715f.entry.js → p-18e7870d.entry.js} +1 -1
- package/dist/ezui/p-25ed09c6.entry.js +1 -0
- package/dist/ezui/p-50186acb.entry.js +1 -0
- package/dist/ezui/{p-ab629244.entry.js → p-661f6820.entry.js} +1 -1
- package/dist/ezui/p-672dd122.entry.js +1 -0
- package/dist/ezui/{p-40f72de4.entry.js → p-784fe207.entry.js} +1 -1
- package/dist/ezui/{p-02c8831a.entry.js → p-abc23d6f.entry.js} +1 -1
- package/dist/ezui/p-b9fbf4e7.entry.js +1 -0
- package/dist/ezui/p-e562d05e.entry.js +1 -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-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/structure/item/ez-split-item.d.ts +5 -0
- package/dist/types/components.d.ts +123 -0
- package/package.json +2 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-133fae4a.entry.js +0 -1
- package/dist/ezui/p-24d3fede.entry.js +0 -1
- package/dist/ezui/p-596634e9.entry.js +0 -1
- package/dist/ezui/p-cd0499a2.entry.js +0 -1
|
@@ -2716,7 +2716,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2716
2716
|
}
|
|
2717
2717
|
else {
|
|
2718
2718
|
window.setTimeout(() => {
|
|
2719
|
-
this.setInputValue();
|
|
2719
|
+
this.setInputValue(false);
|
|
2720
2720
|
}, this._deboucingTime);
|
|
2721
2721
|
}
|
|
2722
2722
|
this.resetOptions();
|
|
@@ -2997,6 +2997,9 @@ const EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
2997
2997
|
this._calendar.hide();
|
|
2998
2998
|
}
|
|
2999
2999
|
handleBlur() {
|
|
3000
|
+
if (!this._changePending) {
|
|
3001
|
+
return;
|
|
3002
|
+
}
|
|
3000
3003
|
try {
|
|
3001
3004
|
const strValue = this._textInput.value;
|
|
3002
3005
|
const newValue = DateUtils$1.strToDate(strValue);
|
|
@@ -3230,6 +3233,9 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
3230
3233
|
}
|
|
3231
3234
|
handleBlur() {
|
|
3232
3235
|
var _a, _b;
|
|
3236
|
+
if (!this._changePending) {
|
|
3237
|
+
return;
|
|
3238
|
+
}
|
|
3233
3239
|
try {
|
|
3234
3240
|
const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
|
|
3235
3241
|
const newValue = this.getParsedDateTime();
|
|
@@ -123736,6 +123742,9 @@ class DataSource {
|
|
|
123736
123742
|
break;
|
|
123737
123743
|
case Action.LOADING_DATA:
|
|
123738
123744
|
this._waitingForLoad = true;
|
|
123745
|
+
if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
|
|
123746
|
+
this._controller.clearFilter();
|
|
123747
|
+
}
|
|
123739
123748
|
this._controller.refresh();
|
|
123740
123749
|
break;
|
|
123741
123750
|
case Action.DATA_LOADED:
|
|
@@ -124533,6 +124542,10 @@ class AgGridController {
|
|
|
124533
124542
|
this._gridOptions.api.refreshHeader();
|
|
124534
124543
|
this._dataUnit.loadData(undefined, undefined, undefined, EZ_GRID_LOADING_SOURCE);
|
|
124535
124544
|
}
|
|
124545
|
+
clearFilter() {
|
|
124546
|
+
this._filteredColumns.clear();
|
|
124547
|
+
this._gridOptions.api.refreshHeader();
|
|
124548
|
+
}
|
|
124536
124549
|
showFilterColumn(configs) {
|
|
124537
124550
|
var _a;
|
|
124538
124551
|
(_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
|
|
@@ -126829,16 +126842,8 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
|
|
|
126829
126842
|
}
|
|
126830
126843
|
handleChangeSelectedItem(event) {
|
|
126831
126844
|
const { detail: itemCheckSelected } = event;
|
|
126832
|
-
|
|
126833
|
-
|
|
126834
|
-
return Object.assign(Object.assign({}, item), { check: itemCheckSelected.check });
|
|
126835
|
-
}
|
|
126836
|
-
return item;
|
|
126837
|
-
});
|
|
126838
|
-
this.clearInputs();
|
|
126839
|
-
}
|
|
126840
|
-
clearInputs() {
|
|
126841
|
-
this.filterInput ? (this.filterInput.value = '') : (this.searchInput.value = '');
|
|
126845
|
+
const itemSelected = this.filteredOptions.find(item => item.label === itemCheckSelected.label);
|
|
126846
|
+
itemSelected.check = itemCheckSelected.check;
|
|
126842
126847
|
}
|
|
126843
126848
|
buildViewList(hasDelete) {
|
|
126844
126849
|
return (h(Fragment, null, this.displayOptionToCheckAllItems && (h("ez-check", { ref: (element) => (this.checkInput = element), label: "Selecionar todos", class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), h("ez-list", { class: "multi-selection__list", dataSource: this.displayOptions, listMode: "check", hoverFeedback: true, onEzCheckChange: this.handleChangeSelectedItem.bind(this), itemSlotBuilder: hasDelete ? this.buildDeleteIconSlot.bind(this) : null })));
|
|
@@ -126988,6 +126993,9 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
126988
126993
|
this.ezCancelWaitingChange.emit();
|
|
126989
126994
|
}
|
|
126990
126995
|
handleBlur() {
|
|
126996
|
+
if (!this._changePending) {
|
|
126997
|
+
return;
|
|
126998
|
+
}
|
|
126991
126999
|
try {
|
|
126992
127000
|
const parsedNumber = this.getParsedNumber();
|
|
126993
127001
|
if (parsedNumber !== undefined && isNaN(parsedNumber)) {
|
|
@@ -127198,7 +127206,7 @@ const EzPopover$1 = class extends HTMLElement$1 {
|
|
|
127198
127206
|
static get style() { return ezPopoverCss; }
|
|
127199
127207
|
};
|
|
127200
127208
|
|
|
127201
|
-
const ezPopupCss = ":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;
|
|
127209
|
+
const ezPopupCss = ":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%}}";
|
|
127202
127210
|
|
|
127203
127211
|
const EzPopup$1 = class extends HTMLElement$1 {
|
|
127204
127212
|
constructor() {
|
|
@@ -128243,7 +128251,148 @@ const EzSkeleton$1 = class extends HTMLElement$1 {
|
|
|
128243
128251
|
static get style() { return ezSkeletonCss; }
|
|
128244
128252
|
};
|
|
128245
128253
|
|
|
128246
|
-
const
|
|
128254
|
+
const ezSplitButtonCss = ":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}";
|
|
128255
|
+
|
|
128256
|
+
const EzSplitButton$1 = class extends HTMLElement$1 {
|
|
128257
|
+
constructor() {
|
|
128258
|
+
super();
|
|
128259
|
+
this.__registerHost();
|
|
128260
|
+
this.__attachShadow();
|
|
128261
|
+
this.buttonClick = createEvent(this, "buttonClick", 7);
|
|
128262
|
+
this.dropdownItemClick = createEvent(this, "dropdownItemClick", 7);
|
|
128263
|
+
this.dropdownSubActionClick = createEvent(this, "dropdownSubActionClick", 7);
|
|
128264
|
+
this.rightDefaultTitle = 'Mais opções';
|
|
128265
|
+
this.show = false;
|
|
128266
|
+
this.enabled = true;
|
|
128267
|
+
this.iconName = undefined;
|
|
128268
|
+
this.image = undefined;
|
|
128269
|
+
this.items = undefined;
|
|
128270
|
+
this.label = undefined;
|
|
128271
|
+
this.leftTitle = undefined;
|
|
128272
|
+
this.rightTitle = 'Mais opções';
|
|
128273
|
+
this.mode = 'default';
|
|
128274
|
+
this.size = 'medium';
|
|
128275
|
+
}
|
|
128276
|
+
/**
|
|
128277
|
+
* Remove o foco de ambos os botões.
|
|
128278
|
+
*/
|
|
128279
|
+
async setBlur() {
|
|
128280
|
+
this.leftButton.blur();
|
|
128281
|
+
this.rightButton.blur();
|
|
128282
|
+
}
|
|
128283
|
+
/**
|
|
128284
|
+
* Aplica o foco no botão principal.
|
|
128285
|
+
*/
|
|
128286
|
+
async setLeftButtonFocus() {
|
|
128287
|
+
this.leftButton.focus();
|
|
128288
|
+
}
|
|
128289
|
+
/**
|
|
128290
|
+
* Aplica o foco no botão do dropdown.
|
|
128291
|
+
*/
|
|
128292
|
+
async setRightButtonFocus() {
|
|
128293
|
+
this.rightButton.focus();
|
|
128294
|
+
}
|
|
128295
|
+
clickListener(evt) {
|
|
128296
|
+
if (!this.enabled) {
|
|
128297
|
+
evt.preventDefault();
|
|
128298
|
+
evt.stopPropagation();
|
|
128299
|
+
evt.stopImmediatePropagation();
|
|
128300
|
+
}
|
|
128301
|
+
}
|
|
128302
|
+
getIconSize(sizeParam = 'medium') {
|
|
128303
|
+
var _a;
|
|
128304
|
+
const sizeList = ['medium', 'large'];
|
|
128305
|
+
const sizeLowerCase = (_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
128306
|
+
return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
|
|
128307
|
+
}
|
|
128308
|
+
closeDropdown() {
|
|
128309
|
+
this.show = false;
|
|
128310
|
+
}
|
|
128311
|
+
toggleDropdown() {
|
|
128312
|
+
this.show = !this.show;
|
|
128313
|
+
}
|
|
128314
|
+
handleButtonClick() {
|
|
128315
|
+
this.buttonClick.emit();
|
|
128316
|
+
}
|
|
128317
|
+
handleDropdownItemClick(evt) {
|
|
128318
|
+
this.dropdownItemClick.emit(evt.detail);
|
|
128319
|
+
evt.stopPropagation();
|
|
128320
|
+
this.closeDropdown();
|
|
128321
|
+
}
|
|
128322
|
+
handleDropdownSubActionClick(evt) {
|
|
128323
|
+
this.dropdownSubActionClick.emit(evt.detail);
|
|
128324
|
+
evt.stopPropagation();
|
|
128325
|
+
this.closeDropdown();
|
|
128326
|
+
}
|
|
128327
|
+
/**
|
|
128328
|
+
* Método responsável em posicionar o dropdown na tela.
|
|
128329
|
+
* Faz com que o dropdown se ajuste automaticamente ao espaco na tela
|
|
128330
|
+
*/
|
|
128331
|
+
positionDropdown() {
|
|
128332
|
+
const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
|
|
128333
|
+
const rightButtonRect = _rightButton.getBoundingClientRect();
|
|
128334
|
+
const dropdownParentRect = _dropdownParent.getBoundingClientRect();
|
|
128335
|
+
const spaceBelow = window.innerHeight - rightButtonRect.bottom;
|
|
128336
|
+
const spaceAbove = rightButtonRect.top;
|
|
128337
|
+
const spaceRight = window.innerWidth - rightButtonRect.right;
|
|
128338
|
+
const spaceLeft = rightButtonRect.left;
|
|
128339
|
+
const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
|
|
128340
|
+
const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
|
|
128341
|
+
let top = `${rightButtonRect.bottom + window.scrollY}px`;
|
|
128342
|
+
let left = `${rightButtonRect.left + window.scrollX}px`;
|
|
128343
|
+
let bottom = 'auto';
|
|
128344
|
+
if (hasSpaceBelow) {
|
|
128345
|
+
bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
|
|
128346
|
+
top = 'auto';
|
|
128347
|
+
_dropdownParent.style.maxHeight = `${spaceAbove}px`;
|
|
128348
|
+
}
|
|
128349
|
+
if (hasSpaceRight) {
|
|
128350
|
+
left = `${rightButtonRect.right - dropdownParentRect.width + window.scrollX}px`;
|
|
128351
|
+
}
|
|
128352
|
+
_dropdownParent.style.top = top;
|
|
128353
|
+
_dropdownParent.style.bottom = bottom;
|
|
128354
|
+
_dropdownParent.style.left = left;
|
|
128355
|
+
}
|
|
128356
|
+
setEvents() {
|
|
128357
|
+
window.removeEventListener('scroll', this.positionDropdown.bind(this));
|
|
128358
|
+
window.addEventListener('scroll', this.positionDropdown.bind(this));
|
|
128359
|
+
}
|
|
128360
|
+
componentWillLoad() {
|
|
128361
|
+
this.setEvents();
|
|
128362
|
+
}
|
|
128363
|
+
componentDidLoad() {
|
|
128364
|
+
if (this._element)
|
|
128365
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
128366
|
+
if (this.leftButton) {
|
|
128367
|
+
const dataInfo = { id: 'embedded' };
|
|
128368
|
+
ElementIDUtils.addIDInfo(this.leftButton, 'left-button', dataInfo);
|
|
128369
|
+
}
|
|
128370
|
+
if (this.rightButton) {
|
|
128371
|
+
const dataInfo = { id: 'embedded' };
|
|
128372
|
+
ElementIDUtils.addIDInfo(this.rightButton, 'right-button', dataInfo);
|
|
128373
|
+
}
|
|
128374
|
+
this.positionDropdown();
|
|
128375
|
+
}
|
|
128376
|
+
componentDidUpdate() {
|
|
128377
|
+
this.positionDropdown();
|
|
128378
|
+
}
|
|
128379
|
+
render() {
|
|
128380
|
+
const hasIconButton = this.shouldShowIconOnLeftButton();
|
|
128381
|
+
const hasLabelButton = this.shouldShowLabelOnLeftButton();
|
|
128382
|
+
const iconSize = this.getIconSize();
|
|
128383
|
+
return (h("div", { class: "label-icon" }, h("button", { class: `ez-split-button__left-button ${iconSize} ${this.mode}`, title: this.leftTitle || this.label, type: "button", disabled: !this.enabled, onClick: () => { this.handleButtonClick(); }, ref: el => (this.leftButton = el) }, hasIconButton && h("ez-icon", { href: this.image, iconName: this.iconName, size: iconSize }), hasLabelButton && h("label", { title: this.leftTitle || this.label }, this.label)), h("div", { class: "dropdown" }, h("button", { class: `ez-split-button__right-button ${iconSize} ez-split-button__right-button--${iconSize} ez-split-button__right-button--divider`, title: this.rightTitle || this.rightDefaultTitle, type: "button", disabled: !this.enabled, onClick: () => { this.toggleDropdown(); }, ref: el => (this.rightButton = el) }, h("ez-icon", { class: `ez-split-button__right-button-container ` + (iconSize ? `btn-icon--${iconSize}` : ''), iconName: 'chevron-down', size: iconSize })), h("div", { class: `dropdown-content dropdown-content--${this.size}`, ref: (ref) => (this.dropdownParent = ref) }, this.show && (h("ez-dropdown", { items: this.items, onClick: evt => { evt.stopPropagation(); }, onEzOutsideClick: () => { this.closeDropdown(); }, onEzClick: evt => { this.handleDropdownItemClick(evt); }, onEzSubActionClick: evt => { this.handleDropdownSubActionClick(evt); } }))))));
|
|
128384
|
+
}
|
|
128385
|
+
shouldShowLabelOnLeftButton() {
|
|
128386
|
+
return ['icon-left', 'default'].includes(this.mode);
|
|
128387
|
+
}
|
|
128388
|
+
shouldShowIconOnLeftButton() {
|
|
128389
|
+
return ['icon-left', 'icon-only'].includes(this.mode);
|
|
128390
|
+
}
|
|
128391
|
+
get _element() { return this; }
|
|
128392
|
+
static get style() { return ezSplitButtonCss; }
|
|
128393
|
+
};
|
|
128394
|
+
|
|
128395
|
+
const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}";
|
|
128247
128396
|
|
|
128248
128397
|
const SplitItem = class extends HTMLElement$1 {
|
|
128249
128398
|
constructor() {
|
|
@@ -128252,6 +128401,7 @@ const SplitItem = class extends HTMLElement$1 {
|
|
|
128252
128401
|
this.label = undefined;
|
|
128253
128402
|
this.enableExpand = true;
|
|
128254
128403
|
this._expanded = false;
|
|
128404
|
+
this.size = undefined;
|
|
128255
128405
|
}
|
|
128256
128406
|
/**
|
|
128257
128407
|
* Alterna a visibilidade do painel.
|
|
@@ -128260,7 +128410,7 @@ const SplitItem = class extends HTMLElement$1 {
|
|
|
128260
128410
|
this._expanded = !this._expanded;
|
|
128261
128411
|
}
|
|
128262
128412
|
render() {
|
|
128263
|
-
return (h(
|
|
128413
|
+
return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content" }, h("slot", null))));
|
|
128264
128414
|
}
|
|
128265
128415
|
static get style() { return ezSplitItemCss; }
|
|
128266
128416
|
};
|
|
@@ -128942,7 +129092,7 @@ Grid.prototype.destroy = function destroy (immediate) {
|
|
|
128942
129092
|
|
|
128943
129093
|
function index (options) { return new Grid(options); }
|
|
128944
129094
|
|
|
128945
|
-
const ezSplitPanelCss = "
|
|
129095
|
+
const ezSplitPanelCss = ".ez-split-gutter{cursor:grab;background-color:transparent}";
|
|
128946
129096
|
|
|
128947
129097
|
const SplitPanel = class extends HTMLElement$1 {
|
|
128948
129098
|
constructor() {
|
|
@@ -129016,16 +129166,17 @@ const SplitPanel = class extends HTMLElement$1 {
|
|
|
129016
129166
|
}
|
|
129017
129167
|
getGridTemplate() {
|
|
129018
129168
|
let template = '';
|
|
129019
|
-
this._items.forEach((
|
|
129169
|
+
this._items.forEach((col, index) => {
|
|
129170
|
+
const size = col.size || '1fr';
|
|
129020
129171
|
if (index === this._items.length - 1) {
|
|
129021
|
-
template += `
|
|
129172
|
+
template += ` ${size}`;
|
|
129022
129173
|
return;
|
|
129023
129174
|
}
|
|
129024
129175
|
if (index === 0) {
|
|
129025
|
-
template +=
|
|
129176
|
+
template += `${size} 5px`;
|
|
129026
129177
|
return;
|
|
129027
129178
|
}
|
|
129028
|
-
template += `
|
|
129179
|
+
template += ` ${size} 5px`;
|
|
129029
129180
|
});
|
|
129030
129181
|
return template;
|
|
129031
129182
|
}
|
|
@@ -131284,7 +131435,8 @@ const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller
|
|
|
131284
131435
|
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
131285
131436
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
131286
131437
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|
|
131287
|
-
const
|
|
131438
|
+
const EzSplitButton = /*@__PURE__*/proxyCustomElement(EzSplitButton$1, [1,"ez-split-button",{"enabled":[516],"iconName":[513,"icon-name"],"image":[513],"items":[16],"label":[513],"leftTitle":[513,"left-title"],"rightTitle":[513,"right-title"],"mode":[513],"size":[513],"show":[32]},[[2,"click","clickListener"]]]);
|
|
131439
|
+
const EzSplitItem = /*@__PURE__*/proxyCustomElement(SplitItem, [4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"size":[1],"_expanded":[32]}]);
|
|
131288
131440
|
const EzSplitPanel = /*@__PURE__*/proxyCustomElement(SplitPanel, [0,"ez-split-panel",{"direction":[1],"anchorToExpand":[4,"anchor-to-expand"]}]);
|
|
131289
131441
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
131290
131442
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"]}]);
|
|
@@ -131337,6 +131489,7 @@ const defineCustomElements = (opts) => {
|
|
|
131337
131489
|
EzSearch,
|
|
131338
131490
|
EzSidebarButton,
|
|
131339
131491
|
EzSkeleton,
|
|
131492
|
+
EzSplitButton,
|
|
131340
131493
|
EzSplitItem,
|
|
131341
131494
|
EzSplitPanel,
|
|
131342
131495
|
EzTabselector,
|
|
@@ -131358,4 +131511,4 @@ const defineCustomElements = (opts) => {
|
|
|
131358
131511
|
}
|
|
131359
131512
|
};
|
|
131360
131513
|
|
|
131361
|
-
export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
|
|
131514
|
+
export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzSplitButton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
|
|
@@ -159,6 +159,9 @@ const EzDateTimeInput = class {
|
|
|
159
159
|
}
|
|
160
160
|
handleBlur() {
|
|
161
161
|
var _a, _b;
|
|
162
|
+
if (!this._changePending) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
162
165
|
try {
|
|
163
166
|
const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
|
|
164
167
|
const newValue = this.getParsedDateTime();
|
|
@@ -118858,6 +118858,9 @@ class DataSource {
|
|
|
118858
118858
|
break;
|
|
118859
118859
|
case Action.LOADING_DATA:
|
|
118860
118860
|
this._waitingForLoad = true;
|
|
118861
|
+
if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
|
|
118862
|
+
this._controller.clearFilter();
|
|
118863
|
+
}
|
|
118861
118864
|
this._controller.refresh();
|
|
118862
118865
|
break;
|
|
118863
118866
|
case Action.DATA_LOADED:
|
|
@@ -119655,6 +119658,10 @@ class AgGridController {
|
|
|
119655
119658
|
this._gridOptions.api.refreshHeader();
|
|
119656
119659
|
this._dataUnit.loadData(undefined, undefined, undefined, EZ_GRID_LOADING_SOURCE);
|
|
119657
119660
|
}
|
|
119661
|
+
clearFilter() {
|
|
119662
|
+
this._filteredColumns.clear();
|
|
119663
|
+
this._gridOptions.api.refreshHeader();
|
|
119664
|
+
}
|
|
119658
119665
|
showFilterColumn(configs) {
|
|
119659
119666
|
var _a;
|
|
119660
119667
|
(_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
|
|
@@ -142,16 +142,8 @@ const EzMuiltiSelectionList = class {
|
|
|
142
142
|
}
|
|
143
143
|
handleChangeSelectedItem(event) {
|
|
144
144
|
const { detail: itemCheckSelected } = event;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
return Object.assign(Object.assign({}, item), { check: itemCheckSelected.check });
|
|
148
|
-
}
|
|
149
|
-
return item;
|
|
150
|
-
});
|
|
151
|
-
this.clearInputs();
|
|
152
|
-
}
|
|
153
|
-
clearInputs() {
|
|
154
|
-
this.filterInput ? (this.filterInput.value = '') : (this.searchInput.value = '');
|
|
145
|
+
const itemSelected = this.filteredOptions.find(item => item.label === itemCheckSelected.label);
|
|
146
|
+
itemSelected.check = itemCheckSelected.check;
|
|
155
147
|
}
|
|
156
148
|
buildViewList(hasDelete) {
|
|
157
149
|
return (h(Fragment, null, this.displayOptionToCheckAllItems && (h("ez-check", { ref: (element) => (this.checkInput = element), label: "Selecionar todos", class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), h("ez-list", { class: "multi-selection__list", dataSource: this.displayOptions, listMode: "check", hoverFeedback: true, onEzCheckChange: this.handleChangeSelectedItem.bind(this), itemSlotBuilder: hasDelete ? this.buildDeleteIconSlot.bind(this) : null })));
|
|
@@ -114,6 +114,9 @@ const EzNumberInput = class {
|
|
|
114
114
|
this.ezCancelWaitingChange.emit();
|
|
115
115
|
}
|
|
116
116
|
handleBlur() {
|
|
117
|
+
if (!this._changePending) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
117
120
|
try {
|
|
118
121
|
const parsedNumber = this.getParsedNumber();
|
|
119
122
|
if (parsedNumber !== undefined && isNaN(parsedNumber)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-baa5e267.js';
|
|
2
2
|
import { FloatingManager } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
|
-
const ezPopupCss = ":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;
|
|
4
|
+
const ezPopupCss = ":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%}}";
|
|
5
5
|
|
|
6
6
|
const EzPopup = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-baa5e267.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
|
|
4
|
+
const ezSplitButtonCss = ":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}";
|
|
5
|
+
|
|
6
|
+
const EzSplitButton = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.buttonClick = createEvent(this, "buttonClick", 7);
|
|
10
|
+
this.dropdownItemClick = createEvent(this, "dropdownItemClick", 7);
|
|
11
|
+
this.dropdownSubActionClick = createEvent(this, "dropdownSubActionClick", 7);
|
|
12
|
+
this.rightDefaultTitle = 'Mais opções';
|
|
13
|
+
this.show = false;
|
|
14
|
+
this.enabled = true;
|
|
15
|
+
this.iconName = undefined;
|
|
16
|
+
this.image = undefined;
|
|
17
|
+
this.items = undefined;
|
|
18
|
+
this.label = undefined;
|
|
19
|
+
this.leftTitle = undefined;
|
|
20
|
+
this.rightTitle = 'Mais opções';
|
|
21
|
+
this.mode = 'default';
|
|
22
|
+
this.size = 'medium';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Remove o foco de ambos os botões.
|
|
26
|
+
*/
|
|
27
|
+
async setBlur() {
|
|
28
|
+
this.leftButton.blur();
|
|
29
|
+
this.rightButton.blur();
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Aplica o foco no botão principal.
|
|
33
|
+
*/
|
|
34
|
+
async setLeftButtonFocus() {
|
|
35
|
+
this.leftButton.focus();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Aplica o foco no botão do dropdown.
|
|
39
|
+
*/
|
|
40
|
+
async setRightButtonFocus() {
|
|
41
|
+
this.rightButton.focus();
|
|
42
|
+
}
|
|
43
|
+
clickListener(evt) {
|
|
44
|
+
if (!this.enabled) {
|
|
45
|
+
evt.preventDefault();
|
|
46
|
+
evt.stopPropagation();
|
|
47
|
+
evt.stopImmediatePropagation();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
getIconSize(sizeParam = 'medium') {
|
|
51
|
+
var _a;
|
|
52
|
+
const sizeList = ['medium', 'large'];
|
|
53
|
+
const sizeLowerCase = (_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
54
|
+
return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
|
|
55
|
+
}
|
|
56
|
+
closeDropdown() {
|
|
57
|
+
this.show = false;
|
|
58
|
+
}
|
|
59
|
+
toggleDropdown() {
|
|
60
|
+
this.show = !this.show;
|
|
61
|
+
}
|
|
62
|
+
handleButtonClick() {
|
|
63
|
+
this.buttonClick.emit();
|
|
64
|
+
}
|
|
65
|
+
handleDropdownItemClick(evt) {
|
|
66
|
+
this.dropdownItemClick.emit(evt.detail);
|
|
67
|
+
evt.stopPropagation();
|
|
68
|
+
this.closeDropdown();
|
|
69
|
+
}
|
|
70
|
+
handleDropdownSubActionClick(evt) {
|
|
71
|
+
this.dropdownSubActionClick.emit(evt.detail);
|
|
72
|
+
evt.stopPropagation();
|
|
73
|
+
this.closeDropdown();
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Método responsável em posicionar o dropdown na tela.
|
|
77
|
+
* Faz com que o dropdown se ajuste automaticamente ao espaco na tela
|
|
78
|
+
*/
|
|
79
|
+
positionDropdown() {
|
|
80
|
+
const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
|
|
81
|
+
const rightButtonRect = _rightButton.getBoundingClientRect();
|
|
82
|
+
const dropdownParentRect = _dropdownParent.getBoundingClientRect();
|
|
83
|
+
const spaceBelow = window.innerHeight - rightButtonRect.bottom;
|
|
84
|
+
const spaceAbove = rightButtonRect.top;
|
|
85
|
+
const spaceRight = window.innerWidth - rightButtonRect.right;
|
|
86
|
+
const spaceLeft = rightButtonRect.left;
|
|
87
|
+
const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
|
|
88
|
+
const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
|
|
89
|
+
let top = `${rightButtonRect.bottom + window.scrollY}px`;
|
|
90
|
+
let left = `${rightButtonRect.left + window.scrollX}px`;
|
|
91
|
+
let bottom = 'auto';
|
|
92
|
+
if (hasSpaceBelow) {
|
|
93
|
+
bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
|
|
94
|
+
top = 'auto';
|
|
95
|
+
_dropdownParent.style.maxHeight = `${spaceAbove}px`;
|
|
96
|
+
}
|
|
97
|
+
if (hasSpaceRight) {
|
|
98
|
+
left = `${rightButtonRect.right - dropdownParentRect.width + window.scrollX}px`;
|
|
99
|
+
}
|
|
100
|
+
_dropdownParent.style.top = top;
|
|
101
|
+
_dropdownParent.style.bottom = bottom;
|
|
102
|
+
_dropdownParent.style.left = left;
|
|
103
|
+
}
|
|
104
|
+
setEvents() {
|
|
105
|
+
window.removeEventListener('scroll', this.positionDropdown.bind(this));
|
|
106
|
+
window.addEventListener('scroll', this.positionDropdown.bind(this));
|
|
107
|
+
}
|
|
108
|
+
componentWillLoad() {
|
|
109
|
+
this.setEvents();
|
|
110
|
+
}
|
|
111
|
+
componentDidLoad() {
|
|
112
|
+
if (this._element)
|
|
113
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
114
|
+
if (this.leftButton) {
|
|
115
|
+
const dataInfo = { id: 'embedded' };
|
|
116
|
+
ElementIDUtils.addIDInfo(this.leftButton, 'left-button', dataInfo);
|
|
117
|
+
}
|
|
118
|
+
if (this.rightButton) {
|
|
119
|
+
const dataInfo = { id: 'embedded' };
|
|
120
|
+
ElementIDUtils.addIDInfo(this.rightButton, 'right-button', dataInfo);
|
|
121
|
+
}
|
|
122
|
+
this.positionDropdown();
|
|
123
|
+
}
|
|
124
|
+
componentDidUpdate() {
|
|
125
|
+
this.positionDropdown();
|
|
126
|
+
}
|
|
127
|
+
render() {
|
|
128
|
+
const hasIconButton = this.shouldShowIconOnLeftButton();
|
|
129
|
+
const hasLabelButton = this.shouldShowLabelOnLeftButton();
|
|
130
|
+
const iconSize = this.getIconSize();
|
|
131
|
+
return (h("div", { class: "label-icon" }, h("button", { class: `ez-split-button__left-button ${iconSize} ${this.mode}`, title: this.leftTitle || this.label, type: "button", disabled: !this.enabled, onClick: () => { this.handleButtonClick(); }, ref: el => (this.leftButton = el) }, hasIconButton && h("ez-icon", { href: this.image, iconName: this.iconName, size: iconSize }), hasLabelButton && h("label", { title: this.leftTitle || this.label }, this.label)), h("div", { class: "dropdown" }, h("button", { class: `ez-split-button__right-button ${iconSize} ez-split-button__right-button--${iconSize} ez-split-button__right-button--divider`, title: this.rightTitle || this.rightDefaultTitle, type: "button", disabled: !this.enabled, onClick: () => { this.toggleDropdown(); }, ref: el => (this.rightButton = el) }, h("ez-icon", { class: `ez-split-button__right-button-container ` + (iconSize ? `btn-icon--${iconSize}` : ''), iconName: 'chevron-down', size: iconSize })), h("div", { class: `dropdown-content dropdown-content--${this.size}`, ref: (ref) => (this.dropdownParent = ref) }, this.show && (h("ez-dropdown", { items: this.items, onClick: evt => { evt.stopPropagation(); }, onEzOutsideClick: () => { this.closeDropdown(); }, onEzClick: evt => { this.handleDropdownItemClick(evt); }, onEzSubActionClick: evt => { this.handleDropdownSubActionClick(evt); } }))))));
|
|
132
|
+
}
|
|
133
|
+
shouldShowLabelOnLeftButton() {
|
|
134
|
+
return ['icon-left', 'default'].includes(this.mode);
|
|
135
|
+
}
|
|
136
|
+
shouldShowIconOnLeftButton() {
|
|
137
|
+
return ['icon-left', 'icon-only'].includes(this.mode);
|
|
138
|
+
}
|
|
139
|
+
get _element() { return getElement(this); }
|
|
140
|
+
};
|
|
141
|
+
EzSplitButton.style = ezSplitButtonCss;
|
|
142
|
+
|
|
143
|
+
export { EzSplitButton as ez_split_button };
|