@sankhyalabs/ezui 1.1.112 → 1.1.115
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 +7 -2
- package/dist/cjs/ez-form.cjs.entry.js +4 -4
- package/dist/cjs/ez-grid.cjs.entry.js +74 -12
- package/dist/cjs/ez-search.cjs.entry.js +5 -1
- package/dist/cjs/ez-toast.cjs.entry.js +3 -2
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +7 -2
- package/dist/collection/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.js +2 -2
- package/dist/collection/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.js +2 -2
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +14 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +60 -11
- package/dist/collection/components/ez-search/ez-search.js +24 -2
- package/dist/collection/components/ez-toast/ez-toast.css +1 -1
- package/dist/collection/components/ez-toast/ez-toast.js +2 -1
- package/dist/custom-elements/index.js +94 -22
- package/dist/esm/ez-combo-box.entry.js +7 -2
- package/dist/esm/ez-form.entry.js +4 -4
- package/dist/esm/ez-grid.entry.js +74 -12
- package/dist/esm/ez-search.entry.js +5 -1
- package/dist/esm/ez-toast.entry.js +3 -2
- 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-3602ab8c.entry.js +1 -0
- package/dist/ezui/{p-a038e7a5.entry.js → p-3cd17150.entry.js} +1 -1
- package/dist/ezui/p-7247379d.entry.js +1 -0
- package/dist/ezui/p-8248690a.entry.js +1 -0
- package/dist/ezui/p-fb73f557.entry.js +1 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/ComboBox.tpl.d.ts +2 -1
- package/dist/types/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +16 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +5 -0
- package/dist/types/components/ez-search/ez-search.d.ts +4 -0
- package/dist/types/components/ez-toast/ez-toast.d.ts +1 -0
- package/dist/types/components.d.ts +10 -2
- package/package.json +6 -5
- package/dist/ezui/p-3662c09e.entry.js +0 -1
- package/dist/ezui/p-3c954800.entry.js +0 -1
- package/dist/ezui/p-65893e25.entry.js +0 -1
- package/dist/ezui/p-9ea5b22e.entry.js +0 -1
|
@@ -619,8 +619,13 @@ let EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
619
619
|
this.updateVisibleOptions();
|
|
620
620
|
}
|
|
621
621
|
else {
|
|
622
|
-
|
|
623
|
-
|
|
622
|
+
if (Array.isArray(source)) {
|
|
623
|
+
this._source = source;
|
|
624
|
+
this.updateVisibleOptions();
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
this.value = source;
|
|
628
|
+
}
|
|
624
629
|
}
|
|
625
630
|
}
|
|
626
631
|
loadOptions(mode, argument = "") {
|
|
@@ -1074,7 +1079,7 @@ function buildField$1(fieldName, fieldLabel, readOnly, switchMode = false) {
|
|
|
1074
1079
|
h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? "switch" : "regular", "data-field-name": fieldName, key: fieldName })));
|
|
1075
1080
|
}
|
|
1076
1081
|
|
|
1077
|
-
const buildComboBox = ({ name, label, readOnly }, properties) => {
|
|
1082
|
+
const buildComboBox = ({ name, label, readOnly, required }, properties) => {
|
|
1078
1083
|
const prop = properties === null || properties === void 0 ? void 0 : properties.options;
|
|
1079
1084
|
let options;
|
|
1080
1085
|
if (typeof prop === "string") {
|
|
@@ -1085,12 +1090,12 @@ const buildComboBox = ({ name, label, readOnly }, properties) => {
|
|
|
1085
1090
|
options = prop;
|
|
1086
1091
|
}
|
|
1087
1092
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
|
|
1088
|
-
h("ez-combo-box", { enabled: !readOnly, label: label, "data-field-name": name, key: name, options: options })));
|
|
1093
|
+
h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name, options: options })));
|
|
1089
1094
|
};
|
|
1090
1095
|
|
|
1091
|
-
const buildSearch = ({ name, label, readOnly }) => {
|
|
1096
|
+
const buildSearch = ({ name, label, readOnly, required }) => {
|
|
1092
1097
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
|
|
1093
|
-
h("ez-search", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
1098
|
+
h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name })));
|
|
1094
1099
|
};
|
|
1095
1100
|
|
|
1096
1101
|
const buildFile = ({ name, label, readOnly }) => {
|
|
@@ -111921,11 +111926,14 @@ class DataSource {
|
|
|
111921
111926
|
class AgGridController {
|
|
111922
111927
|
constructor(enterprise) {
|
|
111923
111928
|
this._menuItems = [];
|
|
111929
|
+
this._idAttribName = "__record__id__";
|
|
111924
111930
|
this._enterprise = enterprise;
|
|
111925
111931
|
}
|
|
111926
111932
|
getSort() {
|
|
111927
111933
|
const sortedColumns = [];
|
|
111928
|
-
this._gridOptions.
|
|
111934
|
+
this._gridOptions.columnApi.getColumnState()
|
|
111935
|
+
.sort((colA, colB) => colA.sortIndex - colB.sortIndex)
|
|
111936
|
+
.forEach(({ colId, sort }) => {
|
|
111929
111937
|
if (sort) {
|
|
111930
111938
|
const field = this._dataUnit.getField(colId);
|
|
111931
111939
|
const mode = sort === "asc" ? SortMode.ASC : SortMode.DESC;
|
|
@@ -111950,10 +111958,9 @@ class AgGridController {
|
|
|
111950
111958
|
this._gridOptions = {
|
|
111951
111959
|
localeText: gridTerms,
|
|
111952
111960
|
rowModelType: "serverSide",
|
|
111953
|
-
serverSideStoreType: "partial",
|
|
111954
111961
|
rowSelection: this._multipleSelection ? "multiple" : "single",
|
|
111955
111962
|
serverSideDatasource: new DataSource(this._dataUnit, this._serverURL),
|
|
111956
|
-
getRowNodeId: (params) => params.
|
|
111963
|
+
getRowNodeId: (params) => typeof params === "string" ? params : params[this._idAttribName],
|
|
111957
111964
|
getMainMenuItems: (params) => {
|
|
111958
111965
|
const column = params.column;
|
|
111959
111966
|
const items = [column.isPinned() ? "clearPinned" : "pinLeft", "separator"];
|
|
@@ -111963,14 +111970,9 @@ class AgGridController {
|
|
|
111963
111970
|
}));
|
|
111964
111971
|
return items;
|
|
111965
111972
|
},
|
|
111966
|
-
onViewportChanged: (
|
|
111967
|
-
if (this.
|
|
111968
|
-
|
|
111969
|
-
this._dataUnit.getSelection().forEach(id => {
|
|
111970
|
-
let node = evt.api.getRowNode(id);
|
|
111971
|
-
node.setSelected(true);
|
|
111972
|
-
});
|
|
111973
|
-
}
|
|
111973
|
+
onViewportChanged: () => {
|
|
111974
|
+
if (this._dataUnit) {
|
|
111975
|
+
this.selectRows(this._dataUnit.getSelection());
|
|
111974
111976
|
}
|
|
111975
111977
|
}
|
|
111976
111978
|
};
|
|
@@ -112011,6 +112013,58 @@ class AgGridController {
|
|
|
112011
112013
|
}
|
|
112012
112014
|
this._gridOptions.api.setRowData(data);
|
|
112013
112015
|
}
|
|
112016
|
+
addRows(rows) {
|
|
112017
|
+
if (this._grid === undefined) {
|
|
112018
|
+
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
112019
|
+
}
|
|
112020
|
+
this._gridOptions.api.applyServerSideTransaction({ add: rows });
|
|
112021
|
+
}
|
|
112022
|
+
selectRows(rowIds) {
|
|
112023
|
+
if (this._grid === undefined) {
|
|
112024
|
+
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
112025
|
+
}
|
|
112026
|
+
if (rowIds && rowIds.length > 0) {
|
|
112027
|
+
rowIds.forEach(rowId => {
|
|
112028
|
+
const row = this._gridOptions.api.getRowNode(rowId);
|
|
112029
|
+
if (row) {
|
|
112030
|
+
row.setSelected(true);
|
|
112031
|
+
}
|
|
112032
|
+
});
|
|
112033
|
+
}
|
|
112034
|
+
}
|
|
112035
|
+
removeRows(rowIds) {
|
|
112036
|
+
if (this._grid === undefined) {
|
|
112037
|
+
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
112038
|
+
}
|
|
112039
|
+
this._gridOptions.api.applyServerSideTransaction({ remove: rowIds });
|
|
112040
|
+
}
|
|
112041
|
+
changeValues(changes, rowIds) {
|
|
112042
|
+
if (this._grid === undefined) {
|
|
112043
|
+
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
112044
|
+
}
|
|
112045
|
+
if (changes) {
|
|
112046
|
+
let rowNodes;
|
|
112047
|
+
if (rowIds) {
|
|
112048
|
+
rowNodes = [];
|
|
112049
|
+
rowIds.forEach(id => {
|
|
112050
|
+
const rowNode = this._gridOptions.api.getRowNode(id);
|
|
112051
|
+
if (rowNode) {
|
|
112052
|
+
rowNodes.push(rowNode);
|
|
112053
|
+
}
|
|
112054
|
+
});
|
|
112055
|
+
}
|
|
112056
|
+
else {
|
|
112057
|
+
rowNodes = this._gridOptions.api.getSelectedNodes();
|
|
112058
|
+
}
|
|
112059
|
+
rowNodes.forEach(r => {
|
|
112060
|
+
const data = r.data;
|
|
112061
|
+
Object.entries(changes).forEach(([field, value]) => {
|
|
112062
|
+
data[field] = value;
|
|
112063
|
+
});
|
|
112064
|
+
r.setData(data);
|
|
112065
|
+
});
|
|
112066
|
+
}
|
|
112067
|
+
}
|
|
112014
112068
|
refresh() {
|
|
112015
112069
|
if (this._grid === undefined) {
|
|
112016
112070
|
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
@@ -112218,12 +112272,25 @@ class DataUnitBridge {
|
|
|
112218
112272
|
this._gridController.setColumnsDef(this.buildColumnDefs(), true);
|
|
112219
112273
|
break;
|
|
112220
112274
|
case Action.RECORDS_REMOVED:
|
|
112221
|
-
|
|
112275
|
+
const { records } = action.payload;
|
|
112276
|
+
this._gridController.removeRows(records);
|
|
112277
|
+
break;
|
|
112222
112278
|
case Action.RECORDS_ADDED:
|
|
112223
112279
|
case Action.RECORDS_COPIED:
|
|
112280
|
+
this._gridController.addRows(action.payload);
|
|
112281
|
+
break;
|
|
112282
|
+
case Action.EDITION_CANCELED:
|
|
112224
112283
|
case Action.DATA_SAVED:
|
|
112225
112284
|
this._gridController.refresh();
|
|
112226
112285
|
break;
|
|
112286
|
+
case Action.SELECTION_CHANGED:
|
|
112287
|
+
const { selection } = action.payload;
|
|
112288
|
+
this._gridController.selectRows(selection);
|
|
112289
|
+
break;
|
|
112290
|
+
case Action.DATA_CHANGED:
|
|
112291
|
+
const changes = Object.assign({}, action.payload);
|
|
112292
|
+
delete changes.records;
|
|
112293
|
+
this._gridController.changeValues(changes, action.payload.records);
|
|
112227
112294
|
}
|
|
112228
112295
|
}
|
|
112229
112296
|
buildColumnDefs() {
|
|
@@ -113305,6 +113372,10 @@ let EzSearch$1 = class extends HTMLElement$1 {
|
|
|
113305
113372
|
* Ajusta a opção de mostrar o "value" para cada opção.
|
|
113306
113373
|
*/
|
|
113307
113374
|
this.showOptionValue = true;
|
|
113375
|
+
/**
|
|
113376
|
+
* Remove a opção vazia da lista de opções
|
|
113377
|
+
*/
|
|
113378
|
+
this.suppressEmptyOption = false;
|
|
113308
113379
|
}
|
|
113309
113380
|
updateValue() {
|
|
113310
113381
|
if (this._comboElement) {
|
|
@@ -113332,7 +113403,7 @@ let EzSearch$1 = class extends HTMLElement$1 {
|
|
|
113332
113403
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
|
|
113333
113404
|
}
|
|
113334
113405
|
render() {
|
|
113335
|
-
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: evt => this.onComboChange(evt), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue }));
|
|
113406
|
+
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: evt => this.onComboChange(evt), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption }));
|
|
113336
113407
|
}
|
|
113337
113408
|
;
|
|
113338
113409
|
get _elem() { return this; }
|
|
@@ -113968,13 +114039,14 @@ let EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
113968
114039
|
static get style() { return ezTimeInputCss; }
|
|
113969
114040
|
};
|
|
113970
114041
|
|
|
113971
|
-
const ezToastCss = ":host{--ez-toast__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--ez-toast__container-z-index:var(--more-visible, 2);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;bottom:100px;z-index:var(--ez-toast__container-z-index);left:100px;width:280px;box-sizing:border-box;background-color:var(--ez-toast__container--background-color);border-radius:6px;align-items:center;padding:12px;visibility:hidden}.message__container{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;
|
|
114042
|
+
const ezToastCss = ":host{--ez-toast__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--ez-toast__container-z-index:var(--more-visible, 2);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;bottom:100px;z-index:var(--ez-toast__container-z-index);left:100px;width:280px;box-sizing:border-box;background-color:var(--ez-toast__container--background-color);border-radius:6px;align-items:center;padding:12px;visibility:hidden}.message__container{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis}.message__conteiner--icon{padding-left:var(--ez-toast__icon--padding-left);width:80%}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--oppened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@-webkit-keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}@keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}";
|
|
113972
114043
|
|
|
113973
114044
|
let EzToast$1 = class extends HTMLElement$1 {
|
|
113974
114045
|
constructor() {
|
|
113975
114046
|
super();
|
|
113976
114047
|
this.__registerHost();
|
|
113977
114048
|
this.__attachShadow();
|
|
114049
|
+
this._lang = "pt"; // Controla qual idioma será usado para definir a regras de hifenização.
|
|
113978
114050
|
/**
|
|
113979
114051
|
* Controla o tempo de exibição do componente em milissegundos.
|
|
113980
114052
|
*/
|
|
@@ -114001,7 +114073,7 @@ let EzToast$1 = class extends HTMLElement$1 {
|
|
|
114001
114073
|
}
|
|
114002
114074
|
render() {
|
|
114003
114075
|
return (h("div", { ref: (el) => this.container = el, class: "toast__container" }, this.useIcon &&
|
|
114004
|
-
h("slot", { name: "icon" }), h("div", { class: this.useIcon ? "message__container message__conteiner--icon" : "message__container", title: this.message, innerHTML: this.message }), this.canClose &&
|
|
114076
|
+
h("slot", { name: "icon" }), h("div", { lang: this._lang, class: this.useIcon ? "message__container message__conteiner--icon" : "message__container", title: this.message, innerHTML: this.message }), this.canClose &&
|
|
114005
114077
|
h("button", { class: "btn-close", onClick: () => { this.container.classList.remove("toast__container--oppened"); this.container.style.animation = `none`; } })));
|
|
114006
114078
|
}
|
|
114007
114079
|
static get style() { return ezToastCss; }
|
|
@@ -114711,7 +114783,7 @@ const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modal
|
|
|
114711
114783
|
const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"]}]);
|
|
114712
114784
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540]}]);
|
|
114713
114785
|
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]);
|
|
114714
|
-
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"]}]);
|
|
114786
|
+
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"]}]);
|
|
114715
114787
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]);
|
|
114716
114788
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538]}]);
|
|
114717
114789
|
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1]}]);
|
|
@@ -154,8 +154,13 @@ let EzComboBox = class {
|
|
|
154
154
|
this.updateVisibleOptions();
|
|
155
155
|
}
|
|
156
156
|
else {
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
if (Array.isArray(source)) {
|
|
158
|
+
this._source = source;
|
|
159
|
+
this.updateVisibleOptions();
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
this.value = source;
|
|
163
|
+
}
|
|
159
164
|
}
|
|
160
165
|
}
|
|
161
166
|
loadOptions(mode, argument = "") {
|
|
@@ -23,7 +23,7 @@ function buildField$1(fieldName, fieldLabel, readOnly, switchMode = false) {
|
|
|
23
23
|
h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? "switch" : "regular", "data-field-name": fieldName, key: fieldName })));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const buildComboBox = ({ name, label, readOnly }, properties) => {
|
|
26
|
+
const buildComboBox = ({ name, label, readOnly, required }, properties) => {
|
|
27
27
|
const prop = properties === null || properties === void 0 ? void 0 : properties.options;
|
|
28
28
|
let options;
|
|
29
29
|
if (typeof prop === "string") {
|
|
@@ -34,12 +34,12 @@ const buildComboBox = ({ name, label, readOnly }, properties) => {
|
|
|
34
34
|
options = prop;
|
|
35
35
|
}
|
|
36
36
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
|
|
37
|
-
h("ez-combo-box", { enabled: !readOnly, label: label, "data-field-name": name, key: name, options: options })));
|
|
37
|
+
h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name, options: options })));
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
const buildSearch = ({ name, label, readOnly }) => {
|
|
40
|
+
const buildSearch = ({ name, label, readOnly, required }) => {
|
|
41
41
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding-horizontal--small" },
|
|
42
|
-
h("ez-search", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
42
|
+
h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, key: name })));
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
const buildFile = ({ name, label, readOnly }) => {
|
|
@@ -110057,11 +110057,14 @@ class DataSource {
|
|
|
110057
110057
|
class AgGridController {
|
|
110058
110058
|
constructor(enterprise) {
|
|
110059
110059
|
this._menuItems = [];
|
|
110060
|
+
this._idAttribName = "__record__id__";
|
|
110060
110061
|
this._enterprise = enterprise;
|
|
110061
110062
|
}
|
|
110062
110063
|
getSort() {
|
|
110063
110064
|
const sortedColumns = [];
|
|
110064
|
-
this._gridOptions.
|
|
110065
|
+
this._gridOptions.columnApi.getColumnState()
|
|
110066
|
+
.sort((colA, colB) => colA.sortIndex - colB.sortIndex)
|
|
110067
|
+
.forEach(({ colId, sort }) => {
|
|
110065
110068
|
if (sort) {
|
|
110066
110069
|
const field = this._dataUnit.getField(colId);
|
|
110067
110070
|
const mode = sort === "asc" ? SortMode.ASC : SortMode.DESC;
|
|
@@ -110086,10 +110089,9 @@ class AgGridController {
|
|
|
110086
110089
|
this._gridOptions = {
|
|
110087
110090
|
localeText: gridTerms,
|
|
110088
110091
|
rowModelType: "serverSide",
|
|
110089
|
-
serverSideStoreType: "partial",
|
|
110090
110092
|
rowSelection: this._multipleSelection ? "multiple" : "single",
|
|
110091
110093
|
serverSideDatasource: new DataSource(this._dataUnit, this._serverURL),
|
|
110092
|
-
getRowNodeId: (params) => params.
|
|
110094
|
+
getRowNodeId: (params) => typeof params === "string" ? params : params[this._idAttribName],
|
|
110093
110095
|
getMainMenuItems: (params) => {
|
|
110094
110096
|
const column = params.column;
|
|
110095
110097
|
const items = [column.isPinned() ? "clearPinned" : "pinLeft", "separator"];
|
|
@@ -110099,14 +110101,9 @@ class AgGridController {
|
|
|
110099
110101
|
}));
|
|
110100
110102
|
return items;
|
|
110101
110103
|
},
|
|
110102
|
-
onViewportChanged: (
|
|
110103
|
-
if (this.
|
|
110104
|
-
|
|
110105
|
-
this._dataUnit.getSelection().forEach(id => {
|
|
110106
|
-
let node = evt.api.getRowNode(id);
|
|
110107
|
-
node.setSelected(true);
|
|
110108
|
-
});
|
|
110109
|
-
}
|
|
110104
|
+
onViewportChanged: () => {
|
|
110105
|
+
if (this._dataUnit) {
|
|
110106
|
+
this.selectRows(this._dataUnit.getSelection());
|
|
110110
110107
|
}
|
|
110111
110108
|
}
|
|
110112
110109
|
};
|
|
@@ -110147,6 +110144,58 @@ class AgGridController {
|
|
|
110147
110144
|
}
|
|
110148
110145
|
this._gridOptions.api.setRowData(data);
|
|
110149
110146
|
}
|
|
110147
|
+
addRows(rows) {
|
|
110148
|
+
if (this._grid === undefined) {
|
|
110149
|
+
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
110150
|
+
}
|
|
110151
|
+
this._gridOptions.api.applyServerSideTransaction({ add: rows });
|
|
110152
|
+
}
|
|
110153
|
+
selectRows(rowIds) {
|
|
110154
|
+
if (this._grid === undefined) {
|
|
110155
|
+
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
110156
|
+
}
|
|
110157
|
+
if (rowIds && rowIds.length > 0) {
|
|
110158
|
+
rowIds.forEach(rowId => {
|
|
110159
|
+
const row = this._gridOptions.api.getRowNode(rowId);
|
|
110160
|
+
if (row) {
|
|
110161
|
+
row.setSelected(true);
|
|
110162
|
+
}
|
|
110163
|
+
});
|
|
110164
|
+
}
|
|
110165
|
+
}
|
|
110166
|
+
removeRows(rowIds) {
|
|
110167
|
+
if (this._grid === undefined) {
|
|
110168
|
+
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
110169
|
+
}
|
|
110170
|
+
this._gridOptions.api.applyServerSideTransaction({ remove: rowIds });
|
|
110171
|
+
}
|
|
110172
|
+
changeValues(changes, rowIds) {
|
|
110173
|
+
if (this._grid === undefined) {
|
|
110174
|
+
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
110175
|
+
}
|
|
110176
|
+
if (changes) {
|
|
110177
|
+
let rowNodes;
|
|
110178
|
+
if (rowIds) {
|
|
110179
|
+
rowNodes = [];
|
|
110180
|
+
rowIds.forEach(id => {
|
|
110181
|
+
const rowNode = this._gridOptions.api.getRowNode(id);
|
|
110182
|
+
if (rowNode) {
|
|
110183
|
+
rowNodes.push(rowNode);
|
|
110184
|
+
}
|
|
110185
|
+
});
|
|
110186
|
+
}
|
|
110187
|
+
else {
|
|
110188
|
+
rowNodes = this._gridOptions.api.getSelectedNodes();
|
|
110189
|
+
}
|
|
110190
|
+
rowNodes.forEach(r => {
|
|
110191
|
+
const data = r.data;
|
|
110192
|
+
Object.entries(changes).forEach(([field, value]) => {
|
|
110193
|
+
data[field] = value;
|
|
110194
|
+
});
|
|
110195
|
+
r.setData(data);
|
|
110196
|
+
});
|
|
110197
|
+
}
|
|
110198
|
+
}
|
|
110150
110199
|
refresh() {
|
|
110151
110200
|
if (this._grid === undefined) {
|
|
110152
110201
|
throw new Error("Erro interno: Grid ainda não inicializado.");
|
|
@@ -110354,12 +110403,25 @@ class DataUnitBridge {
|
|
|
110354
110403
|
this._gridController.setColumnsDef(this.buildColumnDefs(), true);
|
|
110355
110404
|
break;
|
|
110356
110405
|
case Action.RECORDS_REMOVED:
|
|
110357
|
-
|
|
110406
|
+
const { records } = action.payload;
|
|
110407
|
+
this._gridController.removeRows(records);
|
|
110408
|
+
break;
|
|
110358
110409
|
case Action.RECORDS_ADDED:
|
|
110359
110410
|
case Action.RECORDS_COPIED:
|
|
110411
|
+
this._gridController.addRows(action.payload);
|
|
110412
|
+
break;
|
|
110413
|
+
case Action.EDITION_CANCELED:
|
|
110360
110414
|
case Action.DATA_SAVED:
|
|
110361
110415
|
this._gridController.refresh();
|
|
110362
110416
|
break;
|
|
110417
|
+
case Action.SELECTION_CHANGED:
|
|
110418
|
+
const { selection } = action.payload;
|
|
110419
|
+
this._gridController.selectRows(selection);
|
|
110420
|
+
break;
|
|
110421
|
+
case Action.DATA_CHANGED:
|
|
110422
|
+
const changes = Object.assign({}, action.payload);
|
|
110423
|
+
delete changes.records;
|
|
110424
|
+
this._gridController.changeValues(changes, action.payload.records);
|
|
110363
110425
|
}
|
|
110364
110426
|
}
|
|
110365
110427
|
buildColumnDefs() {
|
|
@@ -20,6 +20,10 @@ let EzSearch = class {
|
|
|
20
20
|
* Ajusta a opção de mostrar o "value" para cada opção.
|
|
21
21
|
*/
|
|
22
22
|
this.showOptionValue = true;
|
|
23
|
+
/**
|
|
24
|
+
* Remove a opção vazia da lista de opções
|
|
25
|
+
*/
|
|
26
|
+
this.suppressEmptyOption = false;
|
|
23
27
|
}
|
|
24
28
|
updateValue() {
|
|
25
29
|
if (this._comboElement) {
|
|
@@ -47,7 +51,7 @@ let EzSearch = class {
|
|
|
47
51
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._comboElement);
|
|
48
52
|
}
|
|
49
53
|
render() {
|
|
50
|
-
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: evt => this.onComboChange(evt), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue }));
|
|
54
|
+
return (h("ez-combo-box", { ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: evt => this.onComboChange(evt), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption }));
|
|
51
55
|
}
|
|
52
56
|
;
|
|
53
57
|
get _elem() { return getElement(this); }
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-6b8bfbeb.js';
|
|
2
2
|
|
|
3
|
-
const ezToastCss = ":host{--ez-toast__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--ez-toast__container-z-index:var(--more-visible, 2);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;bottom:100px;z-index:var(--ez-toast__container-z-index);left:100px;width:280px;box-sizing:border-box;background-color:var(--ez-toast__container--background-color);border-radius:6px;align-items:center;padding:12px;visibility:hidden}.message__container{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;
|
|
3
|
+
const ezToastCss = ":host{--ez-toast__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--ez-toast__container-z-index:var(--more-visible, 2);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;bottom:100px;z-index:var(--ez-toast__container-z-index);left:100px;width:280px;box-sizing:border-box;background-color:var(--ez-toast__container--background-color);border-radius:6px;align-items:center;padding:12px;visibility:hidden}.message__container{font-family:\"Sora\", \"Algerian\";text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis}.message__conteiner--icon{padding-left:var(--ez-toast__icon--padding-left);width:80%}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--oppened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@-webkit-keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}@keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}";
|
|
4
4
|
|
|
5
5
|
let EzToast = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
+
this._lang = "pt"; // Controla qual idioma será usado para definir a regras de hifenização.
|
|
8
9
|
/**
|
|
9
10
|
* Controla o tempo de exibição do componente em milissegundos.
|
|
10
11
|
*/
|
|
@@ -31,7 +32,7 @@ let EzToast = class {
|
|
|
31
32
|
}
|
|
32
33
|
render() {
|
|
33
34
|
return (h("div", { ref: (el) => this.container = el, class: "toast__container" }, this.useIcon &&
|
|
34
|
-
h("slot", { name: "icon" }), h("div", { class: this.useIcon ? "message__container message__conteiner--icon" : "message__container", title: this.message, innerHTML: this.message }), this.canClose &&
|
|
35
|
+
h("slot", { name: "icon" }), h("div", { lang: this._lang, class: this.useIcon ? "message__container message__conteiner--icon" : "message__container", title: this.message, innerHTML: this.message }), this.canClose &&
|
|
35
36
|
h("button", { class: "btn-close", onClick: () => { this.container.classList.remove("toast__container--oppened"); this.container.style.animation = `none`; } })));
|
|
36
37
|
}
|
|
37
38
|
};
|
package/dist/esm/ezui.js
CHANGED
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["ez-grid",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-action-chip",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application",[[0,"ez-application"]]],["ez-label-chip",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["grid-config",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-input",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-search",[[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"],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["select-box",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"setFocus":[64],"setBlur":[64]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}]]],["ez-list",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}]]],["ez-upload",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-combo-box",[[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"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"_preSelection":[32],"_visibleOptions":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["test-du",[[0,"test-du"]]]], options);
|
|
16
|
+
return bootstrapLazy([["ez-grid",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-action-chip",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application",[[0,"ez-application"]]],["ez-label-chip",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["grid-config",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-input",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-search",[[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"],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["select-box",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"setFocus":[64],"setBlur":[64]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}]]],["ez-list",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}]]],["ez-upload",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-combo-box",[[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"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"_preSelection":[32],"_visibleOptions":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["test-du",[[0,"test-du"]]]], options);
|
|
17
17
|
});
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["ez-grid",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-action-chip",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application",[[0,"ez-application"]]],["ez-label-chip",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["grid-config",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-input",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-search",[[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"],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["select-box",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"setFocus":[64],"setBlur":[64]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}]]],["ez-list",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}]]],["ez-upload",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-combo-box",[[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"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"_preSelection":[32],"_visibleOptions":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["test-du",[[0,"test-du"]]]], options);
|
|
13
|
+
return bootstrapLazy([["ez-grid",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-action-chip",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application",[[0,"ez-application"]]],["ez-label-chip",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["grid-config",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-input",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["ez-search",[[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"],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}]]],["select-box",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"setFocus":[64],"setBlur":[64]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}]]],["ez-list",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}]]],["ez-upload",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-combo-box",[[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"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"_preSelection":[32],"_visibleOptions":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]],["test-du",[[0,"test-du"]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
package/dist/ezui/ezui.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as s}from"./p-89a57641.js";(()=>{const s=import.meta.url,a={};return""!==s&&(a.resourcesUrl=new URL(".",s).href),e(a)})().then((e=>s([["p-
|
|
1
|
+
import{p as e,b as s}from"./p-89a57641.js";(()=>{const s=import.meta.url,a={};return""!==s&&(a.resourcesUrl=new URL(".",s).href),e(a)})().then((e=>s([["p-3cd17150",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],pageSize:[2,"page-size"],serverUrl:[1,"server-url"],dataUnit:[16],_navigationHasPrevious:[32],_navigationHasNext:[32],_navigationFirstRow:[32],_navigationLastRow:[32],_navigationTotalRows:[32],_popUpVisible:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64]}]]],["p-24ff7d92",[[1,"ez-dialog",{confirm:[1028],critical:[1028],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],handleButtonClick:[64],show:[64]}]]],["p-b8678ee6",[[1,"ez-action-chip",{label:[513],enabled:[516]}]]],["p-95fc543c",[[0,"ez-application"]]],["p-542d3d29",[[1,"ez-label-chip",{label:[513],enabled:[516],removable:[516],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-080045a0",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],updatePosition:[64],show:[64],hide:[64]}]]],["p-502d7e0d",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[1540,"use-header"],ezTitle:[1,"ez-title"]}]]],["p-7247379d",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],canClose:[1028,"can-close"],show:[64]}]]],["p-363fc3af",[[2,"grid-config",{selectedTab:[1025,"selected-tab"],columns:[1040]}]]],["p-f78c7ec9",[[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]],["p-bc2834fa",[[1,"ez-text-input",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],mask:[1],canShowError:[516,"can-show-error"],restrict:[1],setFocus:[64],setBlur:[64]}]]],["p-c27495d9",[[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],setFocus:[64],setBlur:[64]}]]],["p-3a8bf0a8",[[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],setFocus:[64],setBlur:[64]}]]],["p-fb73f557",[[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"],setFocus:[64],setBlur:[64]}]]],["p-9aecc079",[[1,"ez-time-input",{label:[513],viewValue:[1537,"view-value"],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],setFocus:[64],setBlur:[64]}]]],["p-31b0e21a",[[1,"select-box",{selectedOption:[1,"selected-option"]}]]],["p-44d4f8d6",[[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"],setFocus:[64],setBlur:[64]}]]],["p-a5f1f9c4",[[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],showHide:[64]}]]],["p-c6f2aa6c",[[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],setSelection:[64],getSelection:[64],getList:[64]}]]],["p-25e87823",[[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],rows:[1538],setFocus:[64],setBlur:[64]}]]],["p-f26f6d67",[[1,"ez-upload",{label:[1],enabled:[4],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],requestHeaders:[8,"request-headers"],urlUpload:[1,"url-upload"],urlDelete:[1,"url-delete"],value:[1040],addFiles:[64],setFocus:[64],setBlur:[64]}]]],["p-73d45b12",[[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513],iconName:[513,"icon-name"],size:[513],setFocus:[64],setBlur:[64]}]]],["p-804c118a",[[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}]]],["p-f3f9c7e6",[[1,"ez-check",{label:[513],value:[1540],enabled:[516],mode:[513],getMode:[64],setFocus:[64]}]]],["p-97f77023",[[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1]}]]],["p-8248690a",[[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"],optionLoader:[16],suppressEmptyOption:[4,"suppress-empty-option"],canShowError:[516,"can-show-error"],_preSelection:[32],_visibleOptions:[32],setFocus:[64],setBlur:[64]}]]],["p-59a8448a",[[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}]]],["p-3602ab8c",[[0,"ez-form",{dataUnit:[1040],config:[16],submit:[64],cancel:[64],validate:[64]}]]],["p-73d3f767",[[0,"test-du"]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as t,f as n,H as r,g as i}from"./p-89a57641.js";import{UserInterface as o,ApplicationContext as a,Action as l,DataUnitAction as s,DataUnit as c}from"@sankhyalabs/core";import{A as d}from"./p-62daf508.js";const u=({name:t,label:n})=>e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-text-input",{label:n,"data-field-name":t,key:t}));function h(t,n,r,i=!1){return e("div",{class:"col col--sd-12 col--tb-3 align--middle padding-horizontal--small padding-bottom--large"},e("ez-check",{enabled:!r,label:n,mode:i?"switch":"regular","data-field-name":t,key:t}))}function f(t,n,r,i,o){return e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-number-input",{enabled:!r,label:n,precision:i,prettyPrecision:o,"data-field-name":t,key:t}))}const b=new Map;b.set(o.LONGTEXT,(({name:t,label:n,readOnly:r})=>e("div",{class:"col col--sd-12 padding-horizontal--small",key:t},e("ez-text-area",{enabled:!r,label:n,"data-field-name":t})))),b.set(o.CHECKBOX,(e=>h(e.name,e.label,e.readOnly,!1))),b.set(o.SWITCH,(e=>h(e.name,e.label,e.readOnly,!0))),b.set(o.OPTIONSELECTOR,(({name:t,label:n,readOnly:r,required:i},o)=>{const a=null==o?void 0:o.options;let l;if("string"==typeof a){const e=JSON.parse(a);l=Object.keys(e).map((t=>({value:t,label:e[t]})))}else l=a;return e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-combo-box",{enabled:!r,suppressEmptyOption:i,label:n,"data-field-name":t,key:t,options:l}))})),b.set(o.SEARCH,(({name:t,label:n,readOnly:r,required:i})=>e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-search",{enabled:!r,suppressEmptyOption:i,label:n,"data-field-name":t,key:t})))),b.set(o.FILE,(({name:t,label:n,readOnly:r})=>e("div",{class:"col col--sd-12 padding-horizontal--small"},e("ez-upload",{enabled:!r,label:n,urlUpload:"",requestHeaders:"",maxFiles:10,"data-field-name":t,key:t})))),b.set(o.DATE,(({name:t,label:n,readOnly:r})=>e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-date-input",{enabled:!r,label:n,"data-field-name":t,key:t})))),b.set(o.TIME,(({name:t,label:n})=>e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-time-input",{label:n,"data-field-name":t,key:t})))),b.set(o.DATETIME,(({name:t,label:n})=>e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-date-time-input",{label:n,"data-field-name":t,key:t})))),b.set(o.DECIMALNUMBER,(({name:e,label:t,readOnly:n},r)=>{const i=Number((null==r?void 0:r.precision)||2);return f(e,t,n,i,Number((null==r?void 0:r.prettyPrecision)||i))})),b.set(o.INTEGERNUMBER,(({name:e,label:t,readOnly:n})=>f(e,t,n,0,0)));const p=e=>{const t=e.descriptor,n=Object.assign({},e.config);let r,i;return t&&(n.label||(n.label=t.label),n.name||(n.name=t.name),void 0===n.required&&(n.required=t.required),void 0===n.readOnly&&(n.readOnly=t.readOnly),i=t.properties,r=b.get(t.userInterface)),n.required&&(n.label=`* ${n.label} (obrigatório)`),r||(r=u),r(n,i)},m=({source:t})=>"items"in t?e("ez-collapsible-box",{label:t.label},t.items.map((e=>p(e)))):p(t),v=({store:t,source:n})=>e("div",{class:"box__container"},e("div",{class:"row padding-vertical--small"},n.items.map((n=>e(m,{store:t,source:n})))));class y{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[]}getSheet(e){return this._sheets.get(e)}getAllSheets(){return this._sheets}addSheet(e){this._sheets.set(e.name,e),this._requiredFields=this._requiredFields.concat(e.requiredFields),this._cleanOnCopyFields=this._cleanOnCopyFields.concat(e.cleanOnCopyFields)}getRequiredFields(){return this._requiredFields}getCleanOnCopyFields(){return this._cleanOnCopyFields}}function w(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var g="function"==typeof Symbol&&Symbol.observable||"@@observable",O=function(){return Math.random().toString(36).substring(7).split("").join(".")},E={INIT:"@@redux/INIT"+O(),REPLACE:"@@redux/REPLACE"+O(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+O()}};function z(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function A(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(w(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(w(1));return n(A)(e,t)}if("function"!=typeof e)throw new Error(w(2));var i=e,o=t,a=[],l=a,s=!1;function c(){l===a&&(l=a.slice())}function d(){if(s)throw new Error(w(3));return o}function u(e){if("function"!=typeof e)throw new Error(w(4));if(s)throw new Error(w(5));var t=!0;return c(),l.push(e),function(){if(t){if(s)throw new Error(w(6));t=!1,c();var n=l.indexOf(e);l.splice(n,1),a=null}}}function h(e){if(!z(e))throw new Error(w(7));if(void 0===e.type)throw new Error(w(8));if(s)throw new Error(w(9));try{s=!0,o=i(o,e)}finally{s=!1}for(var t=a=l,n=0;n<t.length;n++)(0,t[n])();return e}function f(e){if("function"!=typeof e)throw new Error(w(10));i=e,h({type:E.REPLACE})}function b(){var e,t=u;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(w(11));function n(){e.next&&e.next(d())}return n(),{unsubscribe:t(n)}}})[g]=function(){return this},e}return h({type:E.INIT}),(r={dispatch:h,subscribe:u,getState:d,replaceReducer:f})[g]=b,r}const _={};function C(e=_,t){switch(t.type){case N.METADATA_LOADED:return Object.assign(Object.assign({},e),{formMetadata:t.payload});case N.CHANGE_TAB:return Object.assign(Object.assign({},e),{currentSheet:t.payload});default:return e}}function j(e){return e.formMetadata}var N;!function(e){e.METADATA_LOADED="FORM/METADATA_LOADED",e.CHANGE_TAB="FORM/CHANGE_TAB"}(N||(N={}));class x{constructor(e){this._fields=new Map,this._dataUnit=e,this._dataUnit.subscribe((()=>{var e;null===(e=this._fields)||void 0===e||e.forEach((e=>{this.updateValue(e.fieldName,e.field)}))}))}bind(e){e.forEach((e=>{const t=e.dataset.fieldName;this.updateBind(t,e),this.updateValue(t,e)}))}updateValue(e,t){t.value=this._dataUnit.getFieldValue(e)}updateBind(e,t){const n=this._fields.get(e);n&&n.destroy(),this._fields.set(e,R.create(e,t,((e,t)=>this.setFieldValue(e,t)))),this.bindSearchOptionsLoader(e,t)}setFieldValue(e,t){0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._dataUnit.setFieldValue(e,t)}bindSearchOptionsLoader(e,t){if("EZ-SEARCH"===t.nodeName&&void 0===t.optionLoader){const n=a.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");n&&(t.optionLoader=t=>n(t,e,this._dataUnit))}}}class R{destroy(){this.field.removeEventListener(this.eventName,this.eventListener)}static create(e,t,n){const r=new R;return r.fieldName=e,r.field=t,r.eventListener=t=>{n(e,t.detail)},r.eventName="ezChange",r.field.addEventListener(r.eventName,r.eventListener),r}}let k=class{constructor(e){t(this,e)}submit(){return Promise.resolve()}cancel(){return Promise.resolve()}validate(){return new Promise(((e,t)=>{const n=j(this._store.getState()),r=this._staticFields.filter((e=>e.dataset.required)).map((e=>e.dataset.fieldName)).concat(n.getRequiredFields()),i=this.dataUnit.records;for(let e=0;e<i.length;e++)if(!this.validateRequired(r,i[e])){t();break}e()}))}configChanged(){this.processMetadata()}validateRequired(e,t){const n=[];e.forEach((e=>{const r=t[e],i=this._element.querySelector(`[data-field-name=${e}]`);null==r||""===r?(n.push(e),i.errorMessage="Essa informação é obrigatória"):i.errorMessage=""}));const r=0===n.length;return r||d.info("Há pelo menos um campo obrigatório não preenchido."),r}getDynamicContent(){var t;const n=j(this._store.getState());if(!n)return null;const r=(i=null===(t=this._store)||void 0===t?void 0:t.getState()).currentSheet?i.formMetadata.getSheet(i.currentSheet):Array.from(i.formMetadata.getAllSheets().values())[0];var i;if(!r)return null;const o=Array.from(n.getAllSheets().values()),a=[];return o.length>1&&a.push(e("ez-tabselector",{onEzChange:e=>this._store.dispatch(function(e){return{type:N.CHANGE_TAB,payload:e.tabKey}}(e.detail)),selectedTab:r.name},o.map((t=>e("ez-tab",{tabKey:t.name,label:t.label}))))),a.push(e(v,{store:this._store,source:r})),a}processMetadata(){if(!this.isStatic()){const e=this.config&&this.config.length>0?((e,t)=>{const n=new Map,r=[],i=[];e.forEach((e=>{var o;if(!1!==e.visible){const a=function(e,t){return("string"==typeof e?Array.from(t.keys()).find((t=>t.label===e)):e)||{label:e,visible:!0}}(e.tab||"Geral",n),l=t.getField(e.name);if(l&&a.visible){n.has(a)||n.set(a,new Map);const t=n.get(a);(void 0===e.required?l.required:e.required)&&r.push(e.name),(void 0===e.cleanOnCopy?null===(o=l.properties)||void 0===o?void 0:o.cleanOnCopy:e.cleanOnCopy)&&i.push(e.name);const s={config:e,descriptor:l},c=e.group;if(c){const e=`group::${c}`;t.has(e)?t.get(e).items.push(s):t.set(e,{label:c,items:[s]})}else t.set(e.name,s)}}}));const o=new y;return Array.from(n.entries()).sort(((e,t)=>(e[0].order||1e4)-(t[0].order||1e4))).forEach((([e,t])=>{o.addSheet({label:e.label,name:e.label,items:Array.from(t.values()),requiredFields:r,cleanOnCopyFields:i})})),o})(this.config,this.dataUnit):(()=>{var e;const t=this.dataUnit.metadata,n=new y;if(t){const r=null===(e=t.fields)||void 0===e?void 0:e.filter((e=>!1!==e.visible));n.addSheet({label:t.label,name:t.name,items:r.map((e=>({descriptor:e}))),requiredFields:r.filter((e=>e.required)).map((e=>e.name)),cleanOnCopyFields:r.filter((e=>{var t;return null===(t=e.properties)||void 0===t?void 0:t.cleanOnCopy})).map((e=>e.name))})}return n})();this._store.dispatch({type:N.METADATA_LOADED,payload:e})}}isStatic(){var e;return(null===(e=this._staticFields)||void 0===e?void 0:e.length)>0}interceptAction(e){if(e.type===l.RECORDS_COPIED){const t=j(this._store.getState()).getCleanOnCopyFields();if(t)return new s(l.RECORDS_COPIED,e.payload.map((e=>{const n=Object.assign({},e);return t.forEach((e=>delete n[e])),n})))}return e}componentWillLoad(){void 0===this.dataUnit&&(this.dataUnit=new c("ez-form")),this.dataUnit.addInterceptor(this),this.dataUnit.subscribe((e=>{e.type===l.METADATA_LOADED&&this.processMetadata()})),this._dataBinder=new x(this.dataUnit),this._store=A(C),this._store.subscribe((()=>n(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata()}componentDidRender(){this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")))}render(){return e(r,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return i(this)}static get watchers(){return{config:["configChanged"]}}};k.style="ez-form{display:flex;flex-direction:column;width:100%}";export{k as ez_form}
|