@sankhyalabs/ezui 4.5.1 → 4.6.1
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/{constants-5d588e38.js → constants-5a75e2f3.js} +0 -2
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +4 -2
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +0 -1
- package/dist/cjs/ez-grid.cjs.entry.js +112 -213
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +31 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +20 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +86 -84
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +5 -16
- package/dist/collection/components/ez-grid/ez-grid.js +21 -110
- package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +3 -5
- package/dist/collection/utils/form/DataBinder.js +0 -1
- package/dist/custom-elements/index.js +118 -218
- package/dist/esm/constants-ca136201.js +3 -0
- package/dist/esm/ez-collapsible-box.entry.js +4 -2
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +0 -1
- package/dist/esm/ez-grid.entry.js +112 -213
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-03164b9f.entry.js +1 -0
- package/dist/ezui/p-3f4ae3a3.js +1 -0
- package/dist/ezui/{p-878646a0.entry.js → p-50883460.entry.js} +1 -1
- package/dist/ezui/{p-ef705232.entry.js → p-8654802d.entry.js} +2 -2
- package/dist/ezui/p-b483b61f.entry.js +1 -0
- package/dist/ezui/{p-b7ea9791.entry.js → p-e748b5d3.entry.js} +1 -1
- package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +6 -10
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +3 -5
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +0 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +2 -9
- package/dist/types/components/ez-grid/subcomponents/selection-counter.d.ts +2 -2
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +0 -73
- package/dist/esm/constants-76d2e931.js +0 -4
- package/dist/ezui/p-1f841f3c.entry.js +0 -1
- package/dist/ezui/p-b01e3085.js +0 -1
- package/dist/ezui/p-bbccda3f.entry.js +0 -1
- package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +0 -11
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
3
|
import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, NumberUtils as NumberUtils$1, DataType, SortMode, MaskFormatter } from '@sankhyalabs/core';
|
|
4
|
+
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
4
5
|
|
|
5
6
|
var DialogType;
|
|
6
7
|
(function (DialogType) {
|
|
@@ -356,7 +357,6 @@ class DataBinder {
|
|
|
356
357
|
case Action.RECORDS_COPIED:
|
|
357
358
|
case Action.EDITION_CANCELED:
|
|
358
359
|
case Action.SELECTION_CHANGED:
|
|
359
|
-
case Action.SELECTION_REMOVED:
|
|
360
360
|
case Action.NEXT_SELECTED:
|
|
361
361
|
case Action.PREVIOUS_SELECTED:
|
|
362
362
|
this.clearInvalid();
|
|
@@ -1837,7 +1837,7 @@ var ChipSize;
|
|
|
1837
1837
|
ChipSize[ChipSize["CHAR_LIMIT"] = 28] = "CHAR_LIMIT";
|
|
1838
1838
|
})(ChipSize || (ChipSize = {}));
|
|
1839
1839
|
|
|
1840
|
-
const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.collapsible-box__label ez-icon{visibility:hidden;transition:0.25s linear}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
|
|
1840
|
+
const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--subtitle--font-size:var(--text--medium, 14px);--ez-collapsible-box--subtitle--font-family:var(--font-pattern, 'Roboto');--ez-collapsible-box--subtitle--font-weight:var(--text-weight--medium, 400);--ez-collapsible-box--subtitle--color:var(--text--primary);--ez-collapsible-box--subtitle--margin-bottom:var(--space--medium, 12px);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.subtitle-box__label{display:flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;font-family:var(--ez-collapsible-box--subtitle--font-family);font-size:var(--ez-collapsible-box--subtitle--font-size);font-weight:var(--ez-collapsible-box--subtitle--font-weight);color:var(--ez-collapsible-box--subtitle--color);margin-bottom:var(--ez-collapsible-box--subtitle--margin-bottom)}.subtitle-box__content{width:100%}.collapsible-box__label ez-icon{visibility:hidden;transition:0.25s linear}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
|
|
1841
1841
|
|
|
1842
1842
|
const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
1843
1843
|
constructor() {
|
|
@@ -1851,6 +1851,7 @@ const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
1851
1851
|
this._activeEditText = false;
|
|
1852
1852
|
this.value = false;
|
|
1853
1853
|
this.label = undefined;
|
|
1854
|
+
this.subtitle = undefined;
|
|
1854
1855
|
this.headerSize = "small";
|
|
1855
1856
|
this.iconPlacement = "left";
|
|
1856
1857
|
this.headerAlign = "left";
|
|
@@ -1949,7 +1950,8 @@ const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
1949
1950
|
h("label", { class: "collapsible-box__label font--" + this.getHeaderSize(), title: this.label, ref: elem => this._refLabel = elem }, h("span", null, this.label), this.editable &&
|
|
1950
1951
|
h("ez-icon", { slot: "icon", "icon-name": "edit", onClick: (evt) => this.editLabel(evt), title: "Editar" }), this.removable &&
|
|
1951
1952
|
h("ez-icon", { slot: "icon", "icon-name": "delete", onClick: (evt) => this.confirmRemove(evt), title: "Remover" })) :
|
|
1952
|
-
h("ez-text-edit", { class: "collapsible-box__text-edit", ref: ref => this._refTextEdit = ref, value: this.label, styled: this.getStyledLabel(), onSaveEdition: (ev) => this.saveEditionText(ev), onCancelEdition: () => this.cancelEdition() }))), h("div", { class: "collapsible-box__content" + (this.value ? "" : " collapsible-box__content--show") },
|
|
1953
|
+
h("ez-text-edit", { class: "collapsible-box__text-edit", ref: ref => this._refTextEdit = ref, value: this.label, styled: this.getStyledLabel(), onSaveEdition: (ev) => this.saveEditionText(ev), onCancelEdition: () => this.cancelEdition() }))), h("div", { class: "collapsible-box__content" + (this.value ? "" : " collapsible-box__content--show") }, this.subtitle &&
|
|
1954
|
+
h("div", { class: "subtitle-box__content" }, h("label", { class: "subtitle-box__label", title: this.subtitle }, h("span", null, this.subtitle))), h("slot", null))));
|
|
1953
1955
|
}
|
|
1954
1956
|
get _hostElement() { return this; }
|
|
1955
1957
|
static get watchers() { return {
|
|
@@ -1959,7 +1961,6 @@ const EzCollapsibleBox$1 = class extends HTMLElement$1 {
|
|
|
1959
1961
|
};
|
|
1960
1962
|
|
|
1961
1963
|
const REQUIRED_INFO = " (obrigatório) *";
|
|
1962
|
-
const ALL_RECORD = "ALL_RECORD";
|
|
1963
1964
|
|
|
1964
1965
|
const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
|
|
1965
1966
|
|
|
@@ -123246,6 +123247,7 @@ class DataSource {
|
|
|
123246
123247
|
if (this._options) {
|
|
123247
123248
|
this._options.onPaginationChange(this._dataUnit.getPaginationInfo());
|
|
123248
123249
|
}
|
|
123250
|
+
this.updateSelection();
|
|
123249
123251
|
break;
|
|
123250
123252
|
case Action.RECORDS_REMOVED:
|
|
123251
123253
|
case Action.DATA_SAVED:
|
|
@@ -123254,7 +123256,6 @@ class DataSource {
|
|
|
123254
123256
|
this._controller.refresh();
|
|
123255
123257
|
break;
|
|
123256
123258
|
case Action.SELECTION_CHANGED:
|
|
123257
|
-
case Action.SELECTION_REMOVED:
|
|
123258
123259
|
case Action.NEXT_SELECTED:
|
|
123259
123260
|
case Action.PREVIOUS_SELECTED:
|
|
123260
123261
|
this.updateSelection();
|
|
@@ -123268,25 +123269,14 @@ class DataSource {
|
|
|
123268
123269
|
this._dataUnit.subscribe(this.duObserver);
|
|
123269
123270
|
}
|
|
123270
123271
|
updateSelection() {
|
|
123271
|
-
|
|
123272
|
-
if (
|
|
123273
|
-
|
|
123274
|
-
}
|
|
123275
|
-
const dataSelection = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getSelection();
|
|
123276
|
-
if ((dataSelection === null || dataSelection === void 0 ? void 0 : dataSelection.length) > 0) {
|
|
123277
|
-
this._controller.selectRows(dataSelection);
|
|
123272
|
+
const selectionInfo = this._dataUnit.getSelectionInfo();
|
|
123273
|
+
if (selectionInfo.isAllRecords()) {
|
|
123274
|
+
this._controller.selectAll(true);
|
|
123278
123275
|
}
|
|
123279
123276
|
else {
|
|
123280
|
-
this._controller.
|
|
123277
|
+
this._controller.selectRows(selectionInfo.recordIds, true);
|
|
123281
123278
|
}
|
|
123282
123279
|
}
|
|
123283
|
-
isSelectionEquals() {
|
|
123284
|
-
var _a, _b;
|
|
123285
|
-
const dataSelection = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getSelection();
|
|
123286
|
-
const controlSelection = (_b = this._controller) === null || _b === void 0 ? void 0 : _b.getSelection();
|
|
123287
|
-
return ObjectUtils$1.objectToString(dataSelection || []) ===
|
|
123288
|
-
ObjectUtils$1.objectToString(controlSelection || []);
|
|
123289
|
-
}
|
|
123290
123280
|
getRows(params) {
|
|
123291
123281
|
if (this.needReload(params)) {
|
|
123292
123282
|
this._lastLoadingParams = params;
|
|
@@ -123487,9 +123477,12 @@ class AgGridController {
|
|
|
123487
123477
|
else {
|
|
123488
123478
|
this._grid = new Grid(container, this._gridOptions);
|
|
123489
123479
|
}
|
|
123490
|
-
const selection = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.
|
|
123491
|
-
if (selection) {
|
|
123492
|
-
this.
|
|
123480
|
+
const selection = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectionInfo();
|
|
123481
|
+
if (selection === null || selection === void 0 ? void 0 : selection.isAllRecords()) {
|
|
123482
|
+
this.selectAll(true);
|
|
123483
|
+
}
|
|
123484
|
+
else {
|
|
123485
|
+
this.selectRows((selection === null || selection === void 0 ? void 0 : selection.recordIds) || [], true);
|
|
123493
123486
|
}
|
|
123494
123487
|
this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
|
|
123495
123488
|
}
|
|
@@ -123553,7 +123546,7 @@ class AgGridController {
|
|
|
123553
123546
|
opt.onColumnPinned = e => this.onCallStateChange("columnPinned", e);
|
|
123554
123547
|
opt.onColumnMoved = e => this.onCallStateChange("columnMoved", e);
|
|
123555
123548
|
opt.onColumnVisible = e => this.onCallStateChange("visibleChange", e);
|
|
123556
|
-
opt.onSelectionChanged =
|
|
123549
|
+
opt.onSelectionChanged = e => this.onSelectionChange(e);
|
|
123557
123550
|
opt.onRowDoubleClicked = evt => this.onRowDoubleClick(evt);
|
|
123558
123551
|
opt.onDragStopped = evt => this.onCallStateChange("columnMovedEnd", evt);
|
|
123559
123552
|
}
|
|
@@ -123561,72 +123554,31 @@ class AgGridController {
|
|
|
123561
123554
|
opt.suppressDragLeaveHidesColumns = true;
|
|
123562
123555
|
opt.suppressMenuHide = true;
|
|
123563
123556
|
}
|
|
123564
|
-
isAllRecordSetted(allSelection) {
|
|
123565
|
-
return allSelection === null || allSelection === void 0 ? void 0 : allSelection.some((selectedRecord) => {
|
|
123566
|
-
return selectedRecord.__record__id__ === ALL_RECORD;
|
|
123567
|
-
});
|
|
123568
|
-
}
|
|
123569
123557
|
getSelectionHeaderStatus() {
|
|
123570
123558
|
const records = this._dataUnit.records;
|
|
123571
123559
|
if (records && records.length === 0) {
|
|
123572
123560
|
return false;
|
|
123573
123561
|
}
|
|
123574
|
-
const
|
|
123575
|
-
if (
|
|
123576
|
-
return false;
|
|
123577
|
-
}
|
|
123578
|
-
if (this.isAllRecordSetted(allSelection)) {
|
|
123562
|
+
const selectionInfo = this._dataUnit.getSelectionInfo();
|
|
123563
|
+
if (selectionInfo.isAllRecords()) {
|
|
123579
123564
|
return true;
|
|
123580
123565
|
}
|
|
123581
|
-
|
|
123582
|
-
|
|
123583
|
-
|
|
123584
|
-
const selectedRecords = this._dataUnit.getSelectedRecords();
|
|
123585
|
-
if (selectedRecords.length < allSelection.length) {
|
|
123586
|
-
return undefined;
|
|
123566
|
+
const selection = selectionInfo.recordIds;
|
|
123567
|
+
if (selection == undefined || selection.length === 0) {
|
|
123568
|
+
return false;
|
|
123587
123569
|
}
|
|
123588
123570
|
let status = undefined;
|
|
123589
123571
|
for (let i = 0; i < records.length; i++) {
|
|
123590
|
-
const current =
|
|
123591
|
-
return selectedRecord.__record__id__ === records[i].__record__id__;
|
|
123592
|
-
});
|
|
123572
|
+
const current = selection.includes(records[i].__record__id__);
|
|
123593
123573
|
if (status != undefined && current !== status) {
|
|
123594
|
-
return;
|
|
123574
|
+
return undefined;
|
|
123595
123575
|
}
|
|
123596
123576
|
status = current;
|
|
123597
123577
|
}
|
|
123598
123578
|
return status;
|
|
123599
123579
|
}
|
|
123600
|
-
|
|
123601
|
-
|
|
123602
|
-
return;
|
|
123603
|
-
}
|
|
123604
|
-
let allSelection = this._dataUnit.getSelection();
|
|
123605
|
-
if (allSelection === null || allSelection === void 0 ? void 0 : allSelection.some((sel) => sel.__record__id__ === ALL_RECORD)) {
|
|
123606
|
-
await this._dataUnit.clearSelection();
|
|
123607
|
-
}
|
|
123608
|
-
let updateSelection = [];
|
|
123609
|
-
const records = this._dataUnit.records;
|
|
123610
|
-
const selectedRecords = this._dataUnit.getSelectedRecords();
|
|
123611
|
-
allSelection = this._dataUnit.getSelection();
|
|
123612
|
-
if (selectAll && selectedRecords.length < records.length) {
|
|
123613
|
-
updateSelection = records;
|
|
123614
|
-
allSelection.forEach((selectedRecord) => {
|
|
123615
|
-
const recordIds = updateSelection.map((record) => record.__record__id__);
|
|
123616
|
-
if (!recordIds.includes(selectedRecord.__record__id__)) {
|
|
123617
|
-
updateSelection.push(selectedRecord);
|
|
123618
|
-
}
|
|
123619
|
-
});
|
|
123620
|
-
}
|
|
123621
|
-
else {
|
|
123622
|
-
updateSelection = allSelection.filter((selectedRecord) => {
|
|
123623
|
-
return !(records || [])
|
|
123624
|
-
.some((record) => {
|
|
123625
|
-
return record.__record__id__ === selectedRecord.__record__id__;
|
|
123626
|
-
});
|
|
123627
|
-
});
|
|
123628
|
-
}
|
|
123629
|
-
this._dataUnit.setSelection(updateSelection);
|
|
123580
|
+
updateSelectionForAll(selectAll) {
|
|
123581
|
+
this._dataUnit.updatePageSelection(selectAll ? this._dataUnit.records.map(r => r.__record__id__) : []);
|
|
123630
123582
|
}
|
|
123631
123583
|
setData(data) {
|
|
123632
123584
|
if (this._grid === undefined) {
|
|
@@ -123644,21 +123596,55 @@ class AgGridController {
|
|
|
123644
123596
|
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
123645
123597
|
}
|
|
123646
123598
|
}
|
|
123647
|
-
|
|
123648
|
-
|
|
123649
|
-
|
|
123599
|
+
selectAll(quietly = false) {
|
|
123600
|
+
try {
|
|
123601
|
+
this._gridOptions.context.selectionChangeQuietly = quietly;
|
|
123602
|
+
this._gridOptions.api.forEachNode(node => {
|
|
123603
|
+
if (!node.isSelected()) {
|
|
123604
|
+
node.setSelected(true);
|
|
123605
|
+
}
|
|
123606
|
+
});
|
|
123650
123607
|
}
|
|
123651
|
-
|
|
123652
|
-
|
|
123653
|
-
|
|
123654
|
-
|
|
123655
|
-
|
|
123608
|
+
finally {
|
|
123609
|
+
const newContext = Object.assign({}, this._gridOptions.context);
|
|
123610
|
+
delete newContext.selectionChangeQuietly;
|
|
123611
|
+
this._gridOptions.context = newContext;
|
|
123612
|
+
}
|
|
123613
|
+
}
|
|
123614
|
+
selectRows(rowIds, quietly = false) {
|
|
123615
|
+
var _a;
|
|
123616
|
+
try {
|
|
123617
|
+
this._gridOptions.context.selectionChangeQuietly = quietly;
|
|
123618
|
+
if (this._grid === undefined) {
|
|
123619
|
+
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
123656
123620
|
}
|
|
123657
|
-
|
|
123658
|
-
|
|
123621
|
+
let lastSelected;
|
|
123622
|
+
this._gridOptions.api.forEachNode(node => {
|
|
123623
|
+
if (rowIds && rowIds.includes(node.id)) {
|
|
123624
|
+
if (!node.isSelected()) {
|
|
123625
|
+
node.setSelected(true);
|
|
123626
|
+
lastSelected = node;
|
|
123627
|
+
}
|
|
123628
|
+
}
|
|
123629
|
+
else {
|
|
123630
|
+
if (node.isSelected()) {
|
|
123631
|
+
node.setSelected(false);
|
|
123632
|
+
}
|
|
123633
|
+
}
|
|
123634
|
+
});
|
|
123635
|
+
const selectionHeader = this._gridOptions.context.selectionHeader;
|
|
123636
|
+
if (selectionHeader) {
|
|
123637
|
+
selectionHeader.updateCheckbox();
|
|
123659
123638
|
}
|
|
123660
|
-
|
|
123661
|
-
|
|
123639
|
+
if (lastSelected) {
|
|
123640
|
+
(_a = this._gridOptions.api) === null || _a === void 0 ? void 0 : _a.ensureNodeVisible(lastSelected);
|
|
123641
|
+
}
|
|
123642
|
+
}
|
|
123643
|
+
finally {
|
|
123644
|
+
const newContext = Object.assign({}, this._gridOptions.context);
|
|
123645
|
+
delete newContext.selectionChangeQuietly;
|
|
123646
|
+
this._gridOptions.context = newContext;
|
|
123647
|
+
}
|
|
123662
123648
|
}
|
|
123663
123649
|
removeRows() {
|
|
123664
123650
|
if (this._grid === undefined) {
|
|
@@ -123841,19 +123827,6 @@ class AgGridController {
|
|
|
123841
123827
|
var _a;
|
|
123842
123828
|
(_a = this._gridOptions.api.getDisplayedRowAtIndex(index)) === null || _a === void 0 ? void 0 : _a.setSelected(true);
|
|
123843
123829
|
}
|
|
123844
|
-
deselectAll() {
|
|
123845
|
-
var _a, _b;
|
|
123846
|
-
(_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.deselectAll();
|
|
123847
|
-
this.updateCheckbox();
|
|
123848
|
-
}
|
|
123849
|
-
updateCheckbox() {
|
|
123850
|
-
var _a, _b;
|
|
123851
|
-
const selectionHeader = (_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.selectionHeader;
|
|
123852
|
-
if (selectionHeader == undefined) {
|
|
123853
|
-
return;
|
|
123854
|
-
}
|
|
123855
|
-
selectionHeader.updateCheckbox();
|
|
123856
|
-
}
|
|
123857
123830
|
buildColDef(source) {
|
|
123858
123831
|
var _a, _b, _c;
|
|
123859
123832
|
let tooltip = undefined;
|
|
@@ -123974,13 +123947,33 @@ class AgGridController {
|
|
|
123974
123947
|
}
|
|
123975
123948
|
return false;
|
|
123976
123949
|
}
|
|
123977
|
-
onSelectionChange() {
|
|
123950
|
+
onSelectionChange(event) {
|
|
123978
123951
|
if (this._selectionChangeCallback) {
|
|
123979
123952
|
clearTimeout(this._selectionChangeDeboucing);
|
|
123980
123953
|
this._selectionChangeDeboucing = window.setTimeout(() => {
|
|
123981
|
-
this.
|
|
123982
|
-
|
|
123983
|
-
|
|
123954
|
+
if (this._dataUnit) {
|
|
123955
|
+
if (event.context.selectionChangeQuietly) {
|
|
123956
|
+
const selectionInfo = this._dataUnit;
|
|
123957
|
+
this._selectionChangeCallback({
|
|
123958
|
+
selection: selectionInfo.records,
|
|
123959
|
+
selectionHeaderStatus: this.getSelectionHeaderStatus()
|
|
123960
|
+
});
|
|
123961
|
+
}
|
|
123962
|
+
else {
|
|
123963
|
+
this._dataUnit.updatePageSelection(this._gridOptions.api.getSelectedRows().map((r) => r.__record__id__)).then(selectionInfo => {
|
|
123964
|
+
this._selectionChangeCallback({
|
|
123965
|
+
selection: selectionInfo.records,
|
|
123966
|
+
selectionHeaderStatus: this.getSelectionHeaderStatus()
|
|
123967
|
+
});
|
|
123968
|
+
});
|
|
123969
|
+
}
|
|
123970
|
+
}
|
|
123971
|
+
else {
|
|
123972
|
+
this._selectionChangeCallback({
|
|
123973
|
+
selection: this._gridOptions.api.getSelectedRows(),
|
|
123974
|
+
selectionHeaderStatus: this.getSelectionHeaderStatus()
|
|
123975
|
+
});
|
|
123976
|
+
}
|
|
123984
123977
|
}, 0);
|
|
123985
123978
|
}
|
|
123986
123979
|
}
|
|
@@ -124012,16 +124005,14 @@ class AgGridController {
|
|
|
124012
124005
|
}
|
|
124013
124006
|
|
|
124014
124007
|
const SelectionCounter = (props) => {
|
|
124015
|
-
const { selectionCount,
|
|
124016
|
-
const pageSelectedRecords = selectionPageCount === recordsLength;
|
|
124017
|
-
const allSelectedRecords = selectionCount === total;
|
|
124008
|
+
const { selectionCount, currentPageSelected, total, allRecordSelected, onSelectAll, onSelectPage, onClearAll, onClose } = props;
|
|
124018
124009
|
return (h("div", Object.assign({ class: "ez-box ez-box--shadow-small" }, getElementID("ezGridSelectionCounter")),
|
|
124019
124010
|
h("div", { class: "ez-flex ez-flex--align-items-center ez-size-width--full ez-padding-horizontal--medium" },
|
|
124020
124011
|
h("div", { class: "ez-flex ez-flex--wrap ez-flex--align-items-baseline ez-flex--justify-center" },
|
|
124021
|
-
h("label", Object.assign({ innerHTML: getText(selectionCount,
|
|
124012
|
+
h("label", Object.assign({ innerHTML: getText(selectionCount, allRecordSelected), class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium ez-margin-top--medium" }, getElementID("ezGridSelectionCounter_label"))),
|
|
124022
124013
|
h("div", { class: "ez-flex ez-margin-right--medium" },
|
|
124023
|
-
(
|
|
124024
|
-
h("ez-button", Object.assign({ class: "ez-margin-right--medium", label: `Selecionar ${
|
|
124014
|
+
(currentPageSelected || allRecordSelected) &&
|
|
124015
|
+
h("ez-button", Object.assign({ class: "ez-margin-right--medium", label: `Selecionar ${allRecordSelected ? "apenas a página atual" : `todos os ${total} registros`}`, mode: "link", onClick: allRecordSelected ? onSelectPage : onSelectAll }, getElementID(`ezGridSelectionCounter_select${allRecordSelected ? "Page" : "All"}`))),
|
|
124025
124016
|
h("ez-button", Object.assign({ class: "grid__btn-clear", label: "Limpar", mode: "link", onClick: onClearAll }, getElementID("ezGridSelectionCounter_clearAll"))))),
|
|
124026
124017
|
h("button", Object.assign({ class: "grid__btn-close", title: "Fechar", onClick: onClose }, getElementID("ezGridSelectionCounter_close")),
|
|
124027
124018
|
h("ez-icon", { iconName: "close" })))));
|
|
@@ -124052,13 +124043,12 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124052
124043
|
this.ezDoubleClick = createEvent(this, "ezDoubleClick", 7);
|
|
124053
124044
|
this.configChange = createEvent(this, "configChange", 7);
|
|
124054
124045
|
this._gridController = new AgGridController(false);
|
|
124055
|
-
this._debounceTimer = 500;
|
|
124056
|
-
this._selectionAll = false;
|
|
124057
124046
|
this._paginationInfo = undefined;
|
|
124058
124047
|
this._paginationChangedByKeyboard = true;
|
|
124059
124048
|
this._showSelectionCounter = false;
|
|
124060
|
-
this.
|
|
124061
|
-
this.
|
|
124049
|
+
this._isAllSelection = false;
|
|
124050
|
+
this._currentPageSelected = undefined;
|
|
124051
|
+
this._selectionCount = undefined;
|
|
124062
124052
|
this.multipleSelection = undefined;
|
|
124063
124053
|
this.config = undefined;
|
|
124064
124054
|
this.serverUrl = undefined;
|
|
@@ -124117,117 +124107,29 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124117
124107
|
this._gridController.setColumnsState(config.columns);
|
|
124118
124108
|
}
|
|
124119
124109
|
onSelectionChange(evt) {
|
|
124120
|
-
|
|
124121
|
-
if (
|
|
124122
|
-
|
|
124123
|
-
}
|
|
124124
|
-
if (this.isAllRecordSetted()) {
|
|
124125
|
-
this.updateSelectionPage(selection);
|
|
124126
|
-
return;
|
|
124127
|
-
}
|
|
124128
|
-
this.setSelection(selection);
|
|
124129
|
-
}
|
|
124130
|
-
updateSelectionPage(selection) {
|
|
124131
|
-
if (this._selectionAll) {
|
|
124132
|
-
this._selectionAll = false;
|
|
124133
|
-
}
|
|
124134
|
-
else {
|
|
124135
|
-
this.dataUnit.clearSelection()
|
|
124136
|
-
.then(() => {
|
|
124137
|
-
const records = this.dataUnit.records;
|
|
124138
|
-
const selectionPage = selection.filter((selectedRecord) => {
|
|
124139
|
-
return records.some((record) => {
|
|
124140
|
-
return record.__record__id__ === selectedRecord.__record__id__;
|
|
124141
|
-
});
|
|
124142
|
-
});
|
|
124143
|
-
this._gridController.selectRows(selectionPage);
|
|
124144
|
-
});
|
|
124145
|
-
}
|
|
124146
|
-
}
|
|
124147
|
-
isAllRecordSetted() {
|
|
124148
|
-
var _a;
|
|
124149
|
-
const allSelection = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelection();
|
|
124150
|
-
return allSelection === null || allSelection === void 0 ? void 0 : allSelection.some((selectedRecord) => {
|
|
124151
|
-
return selectedRecord.__record__id__ === ALL_RECORD;
|
|
124152
|
-
});
|
|
124153
|
-
}
|
|
124154
|
-
setSelection(selection) {
|
|
124155
|
-
if ((selection === null || selection === void 0 ? void 0 : selection.length) > 0) {
|
|
124156
|
-
this.dataUnit.setSelection(selection)
|
|
124157
|
-
.then(this.controlSelectionCounter.bind(this));
|
|
124158
|
-
}
|
|
124159
|
-
else {
|
|
124160
|
-
this.dataUnit.clearSelection()
|
|
124161
|
-
.then(this.controlSelectionCounter.bind(this));
|
|
124162
|
-
}
|
|
124163
|
-
}
|
|
124164
|
-
setAutoSelectAll() {
|
|
124165
|
-
var _a, _b, _c, _d;
|
|
124166
|
-
const { total } = (_a = this._paginationInfo) !== null && _a !== void 0 ? _a : {};
|
|
124167
|
-
if (total == undefined) {
|
|
124168
|
-
return;
|
|
124169
|
-
}
|
|
124170
|
-
this._selectionCount = total;
|
|
124171
|
-
this._selectionAll = true;
|
|
124172
|
-
this._showSelectionCounter = true;
|
|
124173
|
-
(_b = this._gridController) === null || _b === void 0 ? void 0 : _b.selectRows((_d = (_c = this.dataUnit) === null || _c === void 0 ? void 0 : _c.records) !== null && _d !== void 0 ? _d : []);
|
|
124174
|
-
}
|
|
124175
|
-
controlSelectionCounter() {
|
|
124176
|
-
var _a, _b;
|
|
124177
|
-
const allSelection = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelection();
|
|
124178
|
-
const counter = (_b = allSelection === null || allSelection === void 0 ? void 0 : allSelection.length) !== null && _b !== void 0 ? _b : 0;
|
|
124179
|
-
if (this.isAllRecordSetted()) {
|
|
124180
|
-
this.setAutoSelectAll();
|
|
124181
|
-
return;
|
|
124182
|
-
}
|
|
124183
|
-
if (!this.multipleSelection || !this.isPaginationActived()) {
|
|
124184
|
-
this._showSelectionCounter = false;
|
|
124185
|
-
setTimeout(this.setSelectionCount.bind(this), this._debounceTimer);
|
|
124186
|
-
return;
|
|
124187
|
-
}
|
|
124188
|
-
if (counter > 1) {
|
|
124189
|
-
setTimeout(() => {
|
|
124190
|
-
this.setSelectionCount(counter);
|
|
124191
|
-
this._showSelectionCounter = true;
|
|
124192
|
-
}, this._debounceTimer);
|
|
124193
|
-
}
|
|
124194
|
-
else {
|
|
124195
|
-
this._showSelectionCounter = false;
|
|
124196
|
-
setTimeout(this.setSelectionCount.bind(this, counter), this._debounceTimer);
|
|
124110
|
+
this._currentPageSelected = evt.detail.selectionHeaderStatus === true;
|
|
124111
|
+
if (this.dataUnit) {
|
|
124112
|
+
this.setSelection(this.dataUnit.getSelectionInfo());
|
|
124197
124113
|
}
|
|
124198
124114
|
}
|
|
124199
|
-
|
|
124200
|
-
var _a, _b;
|
|
124201
|
-
this._selectionCount = value;
|
|
124202
|
-
const selectPageRecords = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecords();
|
|
124203
|
-
this._selectionPageCount = (_b = selectPageRecords === null || selectPageRecords === void 0 ? void 0 : selectPageRecords.length) !== null && _b !== void 0 ? _b : 0;
|
|
124204
|
-
}
|
|
124205
|
-
isPaginationActived() {
|
|
124115
|
+
setSelection(selectionInfo) {
|
|
124206
124116
|
var _a;
|
|
124207
|
-
|
|
124208
|
-
|
|
124209
|
-
|
|
124210
|
-
}
|
|
124211
|
-
return Math.ceil(total / (lastRecord - firstRecord + 1)) > 1;
|
|
124117
|
+
this._selectionCount = (_a = selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.length) !== null && _a !== void 0 ? _a : 0;
|
|
124118
|
+
this._isAllSelection = selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.isAllRecords();
|
|
124119
|
+
this._showSelectionCounter = this._selectionCount > 1 || this._isAllSelection;
|
|
124212
124120
|
}
|
|
124213
124121
|
onSelectAllRecords() {
|
|
124214
|
-
|
|
124215
|
-
|
|
124216
|
-
filter: this.dataUnit.getFilters(),
|
|
124217
|
-
sort: this.dataUnit.getSort()
|
|
124218
|
-
};
|
|
124219
|
-
this.setSelection([allRecord]);
|
|
124122
|
+
var _a;
|
|
124123
|
+
(_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.setSelection(SelectionMode.ALL_RECORDS).then(selection => this.setSelection(selection));
|
|
124220
124124
|
}
|
|
124221
124125
|
onSelectPageRecords() {
|
|
124222
124126
|
var _a;
|
|
124223
|
-
(_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.
|
|
124224
|
-
var _a, _b, _c;
|
|
124225
|
-
(_a = this._gridController) === null || _a === void 0 ? void 0 : _a.selectRows((_c = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.records) !== null && _c !== void 0 ? _c : []);
|
|
124226
|
-
});
|
|
124127
|
+
(_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.setSelection(this.dataUnit.records.map(record => record.__record__id__)).then(selection => this.setSelection(selection));
|
|
124227
124128
|
}
|
|
124228
124129
|
onClearSelectedRecords() {
|
|
124229
124130
|
var _a;
|
|
124230
124131
|
(_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.clearSelection();
|
|
124132
|
+
this.setSelection(undefined);
|
|
124231
124133
|
}
|
|
124232
124134
|
createConfigFromState(state) {
|
|
124233
124135
|
let newConfig = { columns: [] };
|
|
@@ -124377,8 +124279,6 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124377
124279
|
this._paginationChangedByKeyboard = true;
|
|
124378
124280
|
}
|
|
124379
124281
|
this._paginationInfo = paginationInfo;
|
|
124380
|
-
this._gridController.updateCheckbox();
|
|
124381
|
-
this.controlSelectionCounter();
|
|
124382
124282
|
},
|
|
124383
124283
|
onDoubleClick: (row) => {
|
|
124384
124284
|
this.ezDoubleClick.emit(row);
|
|
@@ -124398,10 +124298,10 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
124398
124298
|
this.configSelectionCounter();
|
|
124399
124299
|
}
|
|
124400
124300
|
render() {
|
|
124401
|
-
var _a
|
|
124301
|
+
var _a;
|
|
124402
124302
|
return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container", ref: ref => this._refPaginationControl = ref }, this.getPaginationControl())), h("div", { ref: (ref) => this._gridSelectionCounter = ref, class: `grid__selection-counter
|
|
124403
124303
|
${this._showSelectionCounter ? "grid__selection-counter--opened" : ""}
|
|
124404
|
-
` }, h(SelectionCounter, { selectionCount: this._selectionCount,
|
|
124304
|
+
` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, total: (_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.total, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => this._showSelectionCounter = false })), h("div", { class: "grid__container ez-grid", ref: elem => this._container = elem }), h("div", { class: "grid__footer" }, h("slot", { name: "footer" }))));
|
|
124405
124305
|
}
|
|
124406
124306
|
static get assetsDirs() { return ["../assets"]; }
|
|
124407
124307
|
get _element() { return this; }
|
|
@@ -127861,7 +127761,7 @@ const EzCalendar = /*@__PURE__*/proxyCustomElement(EzCalendar$1, [1,"ez-calendar
|
|
|
127861
127761
|
const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-item",{"item":[16]}]);
|
|
127862
127762
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513]}]);
|
|
127863
127763
|
const EzChip = /*@__PURE__*/proxyCustomElement(EzChip$1, [1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540]}]);
|
|
127864
|
-
const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32]}]);
|
|
127764
|
+
const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32]}]);
|
|
127865
127765
|
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]}]);
|
|
127866
127766
|
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513]}]);
|
|
127867
127767
|
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513]}]);
|
|
@@ -127871,7 +127771,7 @@ const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-ite
|
|
|
127871
127771
|
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"]}]);
|
|
127872
127772
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16]}]);
|
|
127873
127773
|
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16]}]);
|
|
127874
|
-
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"
|
|
127774
|
+
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
|
|
127875
127775
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
127876
127776
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
127877
127777
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
@@ -4,7 +4,7 @@ import { A as ApplicationUtils } from './ApplicationUtils-79bf1d95.js';
|
|
|
4
4
|
import './DialogType-54a62731.js';
|
|
5
5
|
import './CheckMode-bdb2ec19.js';
|
|
6
6
|
|
|
7
|
-
const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.collapsible-box__label ez-icon{visibility:hidden;transition:0.25s linear}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
|
|
7
|
+
const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--subtitle--font-size:var(--text--medium, 14px);--ez-collapsible-box--subtitle--font-family:var(--font-pattern, 'Roboto');--ez-collapsible-box--subtitle--font-weight:var(--text-weight--medium, 400);--ez-collapsible-box--subtitle--color:var(--text--primary);--ez-collapsible-box--subtitle--margin-bottom:var(--space--medium, 12px);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.subtitle-box__label{display:flex;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;font-family:var(--ez-collapsible-box--subtitle--font-family);font-size:var(--ez-collapsible-box--subtitle--font-size);font-weight:var(--ez-collapsible-box--subtitle--font-weight);color:var(--ez-collapsible-box--subtitle--color);margin-bottom:var(--ez-collapsible-box--subtitle--margin-bottom)}.subtitle-box__content{width:100%}.collapsible-box__label ez-icon{visibility:hidden;transition:0.25s linear}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
|
|
8
8
|
|
|
9
9
|
const EzCollapsibleBox = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -16,6 +16,7 @@ const EzCollapsibleBox = class {
|
|
|
16
16
|
this._activeEditText = false;
|
|
17
17
|
this.value = false;
|
|
18
18
|
this.label = undefined;
|
|
19
|
+
this.subtitle = undefined;
|
|
19
20
|
this.headerSize = "small";
|
|
20
21
|
this.iconPlacement = "left";
|
|
21
22
|
this.headerAlign = "left";
|
|
@@ -114,7 +115,8 @@ const EzCollapsibleBox = class {
|
|
|
114
115
|
h("label", { class: "collapsible-box__label font--" + this.getHeaderSize(), title: this.label, ref: elem => this._refLabel = elem }, h("span", null, this.label), this.editable &&
|
|
115
116
|
h("ez-icon", { slot: "icon", "icon-name": "edit", onClick: (evt) => this.editLabel(evt), title: "Editar" }), this.removable &&
|
|
116
117
|
h("ez-icon", { slot: "icon", "icon-name": "delete", onClick: (evt) => this.confirmRemove(evt), title: "Remover" })) :
|
|
117
|
-
h("ez-text-edit", { class: "collapsible-box__text-edit", ref: ref => this._refTextEdit = ref, value: this.label, styled: this.getStyledLabel(), onSaveEdition: (ev) => this.saveEditionText(ev), onCancelEdition: () => this.cancelEdition() }))), h("div", { class: "collapsible-box__content" + (this.value ? "" : " collapsible-box__content--show") },
|
|
118
|
+
h("ez-text-edit", { class: "collapsible-box__text-edit", ref: ref => this._refTextEdit = ref, value: this.label, styled: this.getStyledLabel(), onSaveEdition: (ev) => this.saveEditionText(ev), onCancelEdition: () => this.cancelEdition() }))), h("div", { class: "collapsible-box__content" + (this.value ? "" : " collapsible-box__content--show") }, this.subtitle &&
|
|
119
|
+
h("div", { class: "subtitle-box__content" }, h("label", { class: "subtitle-box__label", title: this.subtitle }, h("span", null, this.subtitle))), h("slot", null))));
|
|
118
120
|
}
|
|
119
121
|
get _hostElement() { return getElement(this); }
|
|
120
122
|
static get watchers() { return {
|