@sankhyalabs/ezui 2.0.1 → 2.0.2
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-form.cjs.entry.js +9 -15
- package/dist/cjs/ez-tabselector.cjs.entry.js +14 -4
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-form/ez-form.js +9 -15
- package/dist/collection/components/ez-form/store/form.slice.js +1 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +30 -9
- package/dist/custom-elements/index.js +24 -20
- package/dist/esm/ez-form.entry.js +10 -16
- package/dist/esm/ez-tabselector.entry.js +14 -4
- 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-9fc50d9a.entry.js +1 -0
- package/dist/ezui/p-f27c364b.entry.js +1 -0
- package/dist/types/components/ez-form/ez-form.d.ts +1 -1
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +5 -2
- package/dist/types/components.d.ts +4 -4
- package/package.json +1 -1
- package/dist/ezui/p-04a41a44.entry.js +0 -1
- package/dist/ezui/p-cd4677d4.entry.js +0 -1
|
@@ -595,7 +595,7 @@ const inicialState = {};
|
|
|
595
595
|
function formReducer(state = inicialState, action) {
|
|
596
596
|
switch (action.type) {
|
|
597
597
|
case FormActions.METADATA_LOADED:
|
|
598
|
-
return Object.assign(Object.assign({}, state), { formMetadata: action.payload });
|
|
598
|
+
return Object.assign(Object.assign({}, state), { formMetadata: action.payload, currentSheet: undefined });
|
|
599
599
|
case FormActions.CHANGE_TAB:
|
|
600
600
|
return Object.assign(Object.assign({}, state), { currentSheet: action.payload });
|
|
601
601
|
default:
|
|
@@ -915,7 +915,10 @@ let EzForm = class {
|
|
|
915
915
|
const allSheets = Array.from(formMD.getAllSheets().values());
|
|
916
916
|
const result = [];
|
|
917
917
|
if (allSheets.length > 1) {
|
|
918
|
-
|
|
918
|
+
const tabs = allSheets.map((sheet, index) => {
|
|
919
|
+
return { tabKey: sheet.name, label: sheet.label, index };
|
|
920
|
+
});
|
|
921
|
+
result.push(index.h("ez-tabselector", { tabs: tabs, onEzChange: (evt) => this._store.dispatch(changeTab(evt.detail)), selectedTab: currentSheet.name }));
|
|
919
922
|
}
|
|
920
923
|
result.push(index.h(FormSheet, { store: this._store, source: currentSheet }));
|
|
921
924
|
return result;
|
|
@@ -930,16 +933,6 @@ let EzForm = class {
|
|
|
930
933
|
var _a;
|
|
931
934
|
return ((_a = this._staticFields) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
932
935
|
}
|
|
933
|
-
getValidatedValue(value) {
|
|
934
|
-
switch (value) {
|
|
935
|
-
case "${data}":
|
|
936
|
-
return core.DateUtils.getToday();
|
|
937
|
-
case "${datahora}":
|
|
938
|
-
return core.DateUtils.getToday(true);
|
|
939
|
-
default:
|
|
940
|
-
return value;
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
936
|
interceptAction(action) {
|
|
944
937
|
if (action.type === core.Action.RECORDS_COPIED) {
|
|
945
938
|
const metadata = selectFormMetadata(this._store.getState());
|
|
@@ -968,9 +961,10 @@ let EzForm = class {
|
|
|
968
961
|
return new core.DataUnitAction(core.Action.RECORDS_ADDED, records.map(record => {
|
|
969
962
|
const newRecord = Object.assign({}, record);
|
|
970
963
|
for (const field in defaultValues) {
|
|
971
|
-
const
|
|
972
|
-
const
|
|
973
|
-
|
|
964
|
+
const value = "formattedValue" in defaultValues[field] ? defaultValues[field].formattedValue : defaultValues[field].value;
|
|
965
|
+
const defaultValue = value != undefined ? value : defaultValues[field];
|
|
966
|
+
const recordValue = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
967
|
+
newRecord[field] = this.dataUnit.valueFromString(field, recordValue);
|
|
974
968
|
}
|
|
975
969
|
return newRecord;
|
|
976
970
|
}));
|
|
@@ -62,6 +62,11 @@ let EzTabselector = class {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
+
observeTabs(newValue) {
|
|
66
|
+
if (newValue && typeof newValue !== "string") {
|
|
67
|
+
this._processedTabs = newValue;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
65
70
|
handleTabClick(tab) {
|
|
66
71
|
this.selectedIndex = tab.index;
|
|
67
72
|
this._focusedIndex = undefined;
|
|
@@ -73,10 +78,12 @@ let EzTabselector = class {
|
|
|
73
78
|
if (!this._processedTabs) {
|
|
74
79
|
this._processedTabs = [];
|
|
75
80
|
if (this.tabs) {
|
|
76
|
-
this.tabs
|
|
77
|
-
label
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
if (typeof this.tabs === "string") {
|
|
82
|
+
this.tabs.split(",").forEach((label) => {
|
|
83
|
+
label = label.trim();
|
|
84
|
+
this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
|
|
85
|
+
});
|
|
86
|
+
}
|
|
80
87
|
}
|
|
81
88
|
this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
|
|
82
89
|
const tabKey = elem.getAttribute("tabKey");
|
|
@@ -194,6 +201,9 @@ let EzTabselector = class {
|
|
|
194
201
|
})), index.h("button", { class: "forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
|
|
195
202
|
}
|
|
196
203
|
get _hostElem() { return index.getElement(this); }
|
|
204
|
+
static get watchers() { return {
|
|
205
|
+
"tabs": ["observeTabs"]
|
|
206
|
+
}; }
|
|
197
207
|
};
|
|
198
208
|
EzTabselector.style = ezTabselectorCss;
|
|
199
209
|
|
package/dist/cjs/ezui.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"closeGridConfig":[64],"openGridConfig":[64]}]]],["ez-actions-button.cjs",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"iconName":[513,"icon-name"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal-container.cjs",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"heightMode":[1537,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button.cjs",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller.cjs",[[1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-grid-config.cjs",[[2,"ez-grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-text-input.cjs",[[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],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload.cjs",[[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-text-edit.cjs",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-combo-box.cjs",[[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],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-select-box.cjs",[[1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"closeGridConfig":[64],"openGridConfig":[64]}]]],["ez-actions-button.cjs",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"iconName":[513,"icon-name"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal-container.cjs",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"heightMode":[1537,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button.cjs",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller.cjs",[[1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-grid-config.cjs",[[2,"ez-grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-text-input.cjs",[[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],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload.cjs",[[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-text-edit.cjs",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-combo-box.cjs",[[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],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-select-box.cjs",[[1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"closeGridConfig":[64],"openGridConfig":[64]}]]],["ez-actions-button.cjs",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"iconName":[513,"icon-name"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal-container.cjs",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"heightMode":[1537,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button.cjs",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller.cjs",[[1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-grid-config.cjs",[[2,"ez-grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-text-input.cjs",[[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],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload.cjs",[[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-text-edit.cjs",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-combo-box.cjs",[[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],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-select-box.cjs",[[1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"closeGridConfig":[64],"openGridConfig":[64]}]]],["ez-actions-button.cjs",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"iconName":[513,"icon-name"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal-container.cjs",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"heightMode":[1537,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button.cjs",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller.cjs",[[1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-grid-config.cjs",[[2,"ez-grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-text-input.cjs",[[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],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-upload.cjs",[[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-text-edit.cjs",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-combo-box.cjs",[[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],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-select-box.cjs",[[1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, h, Host, Prop, Element, forceUpdate, Method, Watch, Event } from "@stencil/core";
|
|
2
|
-
import { DataUnit, Action, DataUnitAction
|
|
2
|
+
import { DataUnit, Action, DataUnitAction } from "@sankhyalabs/core";
|
|
3
3
|
import { FormSheet } from "./structure/FormSheet";
|
|
4
4
|
import { buildFromConfig, buildFromDataUnit } from "./structure/FormSheetMetadata";
|
|
5
5
|
import { createStore } from "redux";
|
|
@@ -94,7 +94,10 @@ export class EzForm {
|
|
|
94
94
|
const allSheets = Array.from(formMD.getAllSheets().values());
|
|
95
95
|
const result = [];
|
|
96
96
|
if (allSheets.length > 1) {
|
|
97
|
-
|
|
97
|
+
const tabs = allSheets.map((sheet, index) => {
|
|
98
|
+
return { tabKey: sheet.name, label: sheet.label, index };
|
|
99
|
+
});
|
|
100
|
+
result.push(h("ez-tabselector", { tabs: tabs, onEzChange: (evt) => this._store.dispatch(changeTab(evt.detail)), selectedTab: currentSheet.name }));
|
|
98
101
|
}
|
|
99
102
|
result.push(h(FormSheet, { store: this._store, source: currentSheet }));
|
|
100
103
|
return result;
|
|
@@ -109,16 +112,6 @@ export class EzForm {
|
|
|
109
112
|
var _a;
|
|
110
113
|
return ((_a = this._staticFields) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
111
114
|
}
|
|
112
|
-
getValidatedValue(value) {
|
|
113
|
-
switch (value) {
|
|
114
|
-
case "${data}":
|
|
115
|
-
return DateUtils.getToday();
|
|
116
|
-
case "${datahora}":
|
|
117
|
-
return DateUtils.getToday(true);
|
|
118
|
-
default:
|
|
119
|
-
return value;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
115
|
interceptAction(action) {
|
|
123
116
|
if (action.type === Action.RECORDS_COPIED) {
|
|
124
117
|
const metadata = selectFormMetadata(this._store.getState());
|
|
@@ -147,9 +140,10 @@ export class EzForm {
|
|
|
147
140
|
return new DataUnitAction(Action.RECORDS_ADDED, records.map(record => {
|
|
148
141
|
const newRecord = Object.assign({}, record);
|
|
149
142
|
for (const field in defaultValues) {
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
|
|
143
|
+
const value = "formattedValue" in defaultValues[field] ? defaultValues[field].formattedValue : defaultValues[field].value;
|
|
144
|
+
const defaultValue = value != undefined ? value : defaultValues[field];
|
|
145
|
+
const recordValue = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
146
|
+
newRecord[field] = this.dataUnit.valueFromString(field, recordValue);
|
|
153
147
|
}
|
|
154
148
|
return newRecord;
|
|
155
149
|
}));
|
|
@@ -3,7 +3,7 @@ const inicialState = {};
|
|
|
3
3
|
export function formReducer(state = inicialState, action) {
|
|
4
4
|
switch (action.type) {
|
|
5
5
|
case FormActions.METADATA_LOADED:
|
|
6
|
-
return Object.assign(Object.assign({}, state), { formMetadata: action.payload });
|
|
6
|
+
return Object.assign(Object.assign({}, state), { formMetadata: action.payload, currentSheet: undefined });
|
|
7
7
|
case FormActions.CHANGE_TAB:
|
|
8
8
|
return Object.assign(Object.assign({}, state), { currentSheet: action.payload });
|
|
9
9
|
default:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, Event, Element, h, Prop, Host } from "@stencil/core";
|
|
1
|
+
import { Component, Event, Element, h, Prop, Host, State, Watch } from "@stencil/core";
|
|
2
2
|
export class EzTabselector {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.setFocusedParam = (ev) => {
|
|
@@ -53,6 +53,11 @@ export class EzTabselector {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
+
observeTabs(newValue) {
|
|
57
|
+
if (newValue && typeof newValue !== "string") {
|
|
58
|
+
this._processedTabs = newValue;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
56
61
|
handleTabClick(tab) {
|
|
57
62
|
this.selectedIndex = tab.index;
|
|
58
63
|
this._focusedIndex = undefined;
|
|
@@ -64,10 +69,12 @@ export class EzTabselector {
|
|
|
64
69
|
if (!this._processedTabs) {
|
|
65
70
|
this._processedTabs = [];
|
|
66
71
|
if (this.tabs) {
|
|
67
|
-
this.tabs
|
|
68
|
-
label
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
if (typeof this.tabs === "string") {
|
|
73
|
+
this.tabs.split(",").forEach((label) => {
|
|
74
|
+
label = label.trim();
|
|
75
|
+
this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
|
|
76
|
+
});
|
|
77
|
+
}
|
|
71
78
|
}
|
|
72
79
|
this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
|
|
73
80
|
const tabKey = elem.getAttribute("tabKey");
|
|
@@ -239,20 +246,30 @@ export class EzTabselector {
|
|
|
239
246
|
"type": "string",
|
|
240
247
|
"mutable": false,
|
|
241
248
|
"complexType": {
|
|
242
|
-
"original": "string",
|
|
243
|
-
"resolved": "string",
|
|
244
|
-
"references": {
|
|
249
|
+
"original": "string | Array<Tab>",
|
|
250
|
+
"resolved": "Tab[] | string",
|
|
251
|
+
"references": {
|
|
252
|
+
"Array": {
|
|
253
|
+
"location": "global"
|
|
254
|
+
},
|
|
255
|
+
"Tab": {
|
|
256
|
+
"location": "local"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
245
259
|
},
|
|
246
260
|
"required": false,
|
|
247
261
|
"optional": false,
|
|
248
262
|
"docs": {
|
|
249
263
|
"tags": [],
|
|
250
|
-
"text": "Define o nome das abas do componente, separadas por v\u00EDrgulas \",\"."
|
|
264
|
+
"text": "Define o nome das abas do componente, separadas por v\u00EDrgulas \",\".\nOpcionalmente pode-se construir um array de objetos do tipo Tab, nesse caso\no tabKey e o \u00EDndice ser\u00E3o respeitados."
|
|
251
265
|
},
|
|
252
266
|
"attribute": "tabs",
|
|
253
267
|
"reflect": false
|
|
254
268
|
}
|
|
255
269
|
}; }
|
|
270
|
+
static get states() { return {
|
|
271
|
+
"_processedTabs": {}
|
|
272
|
+
}; }
|
|
256
273
|
static get events() { return [{
|
|
257
274
|
"method": "ezChange",
|
|
258
275
|
"name": "ezChange",
|
|
@@ -274,4 +291,8 @@ export class EzTabselector {
|
|
|
274
291
|
}
|
|
275
292
|
}]; }
|
|
276
293
|
static get elementRef() { return "_hostElem"; }
|
|
294
|
+
static get watchers() { return [{
|
|
295
|
+
"propName": "tabs",
|
|
296
|
+
"methodName": "observeTabs"
|
|
297
|
+
}]; }
|
|
277
298
|
}
|
|
@@ -2569,7 +2569,7 @@ const inicialState = {};
|
|
|
2569
2569
|
function formReducer(state = inicialState, action) {
|
|
2570
2570
|
switch (action.type) {
|
|
2571
2571
|
case FormActions.METADATA_LOADED:
|
|
2572
|
-
return Object.assign(Object.assign({}, state), { formMetadata: action.payload });
|
|
2572
|
+
return Object.assign(Object.assign({}, state), { formMetadata: action.payload, currentSheet: undefined });
|
|
2573
2573
|
case FormActions.CHANGE_TAB:
|
|
2574
2574
|
return Object.assign(Object.assign({}, state), { currentSheet: action.payload });
|
|
2575
2575
|
default:
|
|
@@ -2890,7 +2890,10 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2890
2890
|
const allSheets = Array.from(formMD.getAllSheets().values());
|
|
2891
2891
|
const result = [];
|
|
2892
2892
|
if (allSheets.length > 1) {
|
|
2893
|
-
|
|
2893
|
+
const tabs = allSheets.map((sheet, index) => {
|
|
2894
|
+
return { tabKey: sheet.name, label: sheet.label, index };
|
|
2895
|
+
});
|
|
2896
|
+
result.push(h("ez-tabselector", { tabs: tabs, onEzChange: (evt) => this._store.dispatch(changeTab(evt.detail)), selectedTab: currentSheet.name }));
|
|
2894
2897
|
}
|
|
2895
2898
|
result.push(h(FormSheet, { store: this._store, source: currentSheet }));
|
|
2896
2899
|
return result;
|
|
@@ -2905,16 +2908,6 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2905
2908
|
var _a;
|
|
2906
2909
|
return ((_a = this._staticFields) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
2907
2910
|
}
|
|
2908
|
-
getValidatedValue(value) {
|
|
2909
|
-
switch (value) {
|
|
2910
|
-
case "${data}":
|
|
2911
|
-
return DateUtils$1.getToday();
|
|
2912
|
-
case "${datahora}":
|
|
2913
|
-
return DateUtils$1.getToday(true);
|
|
2914
|
-
default:
|
|
2915
|
-
return value;
|
|
2916
|
-
}
|
|
2917
|
-
}
|
|
2918
2911
|
interceptAction(action) {
|
|
2919
2912
|
if (action.type === Action.RECORDS_COPIED) {
|
|
2920
2913
|
const metadata = selectFormMetadata(this._store.getState());
|
|
@@ -2943,9 +2936,10 @@ let EzForm$1 = class extends HTMLElement$1 {
|
|
|
2943
2936
|
return new DataUnitAction(Action.RECORDS_ADDED, records.map(record => {
|
|
2944
2937
|
const newRecord = Object.assign({}, record);
|
|
2945
2938
|
for (const field in defaultValues) {
|
|
2946
|
-
const
|
|
2947
|
-
const
|
|
2948
|
-
|
|
2939
|
+
const value = "formattedValue" in defaultValues[field] ? defaultValues[field].formattedValue : defaultValues[field].value;
|
|
2940
|
+
const defaultValue = value != undefined ? value : defaultValues[field];
|
|
2941
|
+
const recordValue = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
2942
|
+
newRecord[field] = this.dataUnit.valueFromString(field, recordValue);
|
|
2949
2943
|
}
|
|
2950
2944
|
return newRecord;
|
|
2951
2945
|
}));
|
|
@@ -120060,6 +120054,11 @@ let EzTabselector$1 = class extends HTMLElement$1 {
|
|
|
120060
120054
|
}
|
|
120061
120055
|
};
|
|
120062
120056
|
}
|
|
120057
|
+
observeTabs(newValue) {
|
|
120058
|
+
if (newValue && typeof newValue !== "string") {
|
|
120059
|
+
this._processedTabs = newValue;
|
|
120060
|
+
}
|
|
120061
|
+
}
|
|
120063
120062
|
handleTabClick(tab) {
|
|
120064
120063
|
this.selectedIndex = tab.index;
|
|
120065
120064
|
this._focusedIndex = undefined;
|
|
@@ -120071,10 +120070,12 @@ let EzTabselector$1 = class extends HTMLElement$1 {
|
|
|
120071
120070
|
if (!this._processedTabs) {
|
|
120072
120071
|
this._processedTabs = [];
|
|
120073
120072
|
if (this.tabs) {
|
|
120074
|
-
this.tabs
|
|
120075
|
-
label
|
|
120076
|
-
|
|
120077
|
-
|
|
120073
|
+
if (typeof this.tabs === "string") {
|
|
120074
|
+
this.tabs.split(",").forEach((label) => {
|
|
120075
|
+
label = label.trim();
|
|
120076
|
+
this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
|
|
120077
|
+
});
|
|
120078
|
+
}
|
|
120078
120079
|
}
|
|
120079
120080
|
this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
|
|
120080
120081
|
const tabKey = elem.getAttribute("tabKey");
|
|
@@ -120192,6 +120193,9 @@ let EzTabselector$1 = class extends HTMLElement$1 {
|
|
|
120192
120193
|
})), h("button", { class: "forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
|
|
120193
120194
|
}
|
|
120194
120195
|
get _hostElem() { return this; }
|
|
120196
|
+
static get watchers() { return {
|
|
120197
|
+
"tabs": ["observeTabs"]
|
|
120198
|
+
}; }
|
|
120195
120199
|
static get style() { return ezTabselectorCss; }
|
|
120196
120200
|
};
|
|
120197
120201
|
|
|
@@ -121412,7 +121416,7 @@ const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-ra
|
|
|
121412
121416
|
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
|
|
121413
121417
|
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513]}]);
|
|
121414
121418
|
const EzSelectBox = /*@__PURE__*/proxyCustomElement(SelectBox, [1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]);
|
|
121415
|
-
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]);
|
|
121419
|
+
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
121416
121420
|
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513]}]);
|
|
121417
121421
|
const EzTextEdit = /*@__PURE__*/proxyCustomElement(EzTextEdit$1, [1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32]}]);
|
|
121418
121422
|
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],"mode":[513],"noBorder":[516,"no-border"]}]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, f as forceUpdate, H as Host, g as getElement } from './index-7bc778b3.js';
|
|
2
|
-
import { UserInterface, Action, WaitingChangeException, ApplicationContext,
|
|
2
|
+
import { UserInterface, Action, WaitingChangeException, ApplicationContext, DataUnitAction, DataUnit } from '@sankhyalabs/core';
|
|
3
3
|
import { C as CheckMode } from './CheckMode-bdb2ec19.js';
|
|
4
4
|
import { A as ApplicationUtils } from './ApplicationUtils-205ac4bc.js';
|
|
5
5
|
import './DialogType-4059dc4d.js';
|
|
@@ -591,7 +591,7 @@ const inicialState = {};
|
|
|
591
591
|
function formReducer(state = inicialState, action) {
|
|
592
592
|
switch (action.type) {
|
|
593
593
|
case FormActions.METADATA_LOADED:
|
|
594
|
-
return Object.assign(Object.assign({}, state), { formMetadata: action.payload });
|
|
594
|
+
return Object.assign(Object.assign({}, state), { formMetadata: action.payload, currentSheet: undefined });
|
|
595
595
|
case FormActions.CHANGE_TAB:
|
|
596
596
|
return Object.assign(Object.assign({}, state), { currentSheet: action.payload });
|
|
597
597
|
default:
|
|
@@ -911,7 +911,10 @@ let EzForm = class {
|
|
|
911
911
|
const allSheets = Array.from(formMD.getAllSheets().values());
|
|
912
912
|
const result = [];
|
|
913
913
|
if (allSheets.length > 1) {
|
|
914
|
-
|
|
914
|
+
const tabs = allSheets.map((sheet, index) => {
|
|
915
|
+
return { tabKey: sheet.name, label: sheet.label, index };
|
|
916
|
+
});
|
|
917
|
+
result.push(h("ez-tabselector", { tabs: tabs, onEzChange: (evt) => this._store.dispatch(changeTab(evt.detail)), selectedTab: currentSheet.name }));
|
|
915
918
|
}
|
|
916
919
|
result.push(h(FormSheet, { store: this._store, source: currentSheet }));
|
|
917
920
|
return result;
|
|
@@ -926,16 +929,6 @@ let EzForm = class {
|
|
|
926
929
|
var _a;
|
|
927
930
|
return ((_a = this._staticFields) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
928
931
|
}
|
|
929
|
-
getValidatedValue(value) {
|
|
930
|
-
switch (value) {
|
|
931
|
-
case "${data}":
|
|
932
|
-
return DateUtils.getToday();
|
|
933
|
-
case "${datahora}":
|
|
934
|
-
return DateUtils.getToday(true);
|
|
935
|
-
default:
|
|
936
|
-
return value;
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
932
|
interceptAction(action) {
|
|
940
933
|
if (action.type === Action.RECORDS_COPIED) {
|
|
941
934
|
const metadata = selectFormMetadata(this._store.getState());
|
|
@@ -964,9 +957,10 @@ let EzForm = class {
|
|
|
964
957
|
return new DataUnitAction(Action.RECORDS_ADDED, records.map(record => {
|
|
965
958
|
const newRecord = Object.assign({}, record);
|
|
966
959
|
for (const field in defaultValues) {
|
|
967
|
-
const
|
|
968
|
-
const
|
|
969
|
-
|
|
960
|
+
const value = "formattedValue" in defaultValues[field] ? defaultValues[field].formattedValue : defaultValues[field].value;
|
|
961
|
+
const defaultValue = value != undefined ? value : defaultValues[field];
|
|
962
|
+
const recordValue = typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
|
963
|
+
newRecord[field] = this.dataUnit.valueFromString(field, recordValue);
|
|
970
964
|
}
|
|
971
965
|
return newRecord;
|
|
972
966
|
}));
|
|
@@ -58,6 +58,11 @@ let EzTabselector = class {
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
+
observeTabs(newValue) {
|
|
62
|
+
if (newValue && typeof newValue !== "string") {
|
|
63
|
+
this._processedTabs = newValue;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
61
66
|
handleTabClick(tab) {
|
|
62
67
|
this.selectedIndex = tab.index;
|
|
63
68
|
this._focusedIndex = undefined;
|
|
@@ -69,10 +74,12 @@ let EzTabselector = class {
|
|
|
69
74
|
if (!this._processedTabs) {
|
|
70
75
|
this._processedTabs = [];
|
|
71
76
|
if (this.tabs) {
|
|
72
|
-
this.tabs
|
|
73
|
-
label
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
if (typeof this.tabs === "string") {
|
|
78
|
+
this.tabs.split(",").forEach((label) => {
|
|
79
|
+
label = label.trim();
|
|
80
|
+
this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
|
|
81
|
+
});
|
|
82
|
+
}
|
|
76
83
|
}
|
|
77
84
|
this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
|
|
78
85
|
const tabKey = elem.getAttribute("tabKey");
|
|
@@ -190,6 +197,9 @@ let EzTabselector = class {
|
|
|
190
197
|
})), h("button", { class: "forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
|
|
191
198
|
}
|
|
192
199
|
get _hostElem() { return getElement(this); }
|
|
200
|
+
static get watchers() { return {
|
|
201
|
+
"tabs": ["observeTabs"]
|
|
202
|
+
}; }
|
|
193
203
|
};
|
|
194
204
|
EzTabselector.style = ezTabselectorCss;
|
|
195
205
|
|
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"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"closeGridConfig":[64],"openGridConfig":[64]}]]],["ez-actions-button",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"iconName":[513,"icon-name"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal-container",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application",[[0,"ez-application"]]],["ez-card-item",[[1,"ez-card-item",{"item":[16]}]]],["ez-loading-bar",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"heightMode":[1537,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller",[[1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-grid-config",[[2,"ez-grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[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"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["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],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[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-text-edit",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[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],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["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"],"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],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-select-box",[[1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["ez-grid",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"closeGridConfig":[64],"openGridConfig":[64]}]]],["ez-actions-button",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"iconName":[513,"icon-name"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal-container",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application",[[0,"ez-application"]]],["ez-card-item",[[1,"ez-card-item",{"item":[16]}]]],["ez-loading-bar",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"heightMode":[1537,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller",[[1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-grid-config",[[2,"ez-grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[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"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["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],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[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-text-edit",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[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],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["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"],"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],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-select-box",[[1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], 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"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"closeGridConfig":[64],"openGridConfig":[64]}]]],["ez-actions-button",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"iconName":[513,"icon-name"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal-container",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application",[[0,"ez-application"]]],["ez-card-item",[[1,"ez-card-item",{"item":[16]}]]],["ez-loading-bar",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"heightMode":[1537,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller",[[1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-grid-config",[[2,"ez-grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[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"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["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],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[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-text-edit",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[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],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["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"],"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],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-select-box",[[1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["ez-grid",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"_paginationInfo":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"closeGridConfig":[64],"openGridConfig":[64]}]]],["ez-actions-button",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"iconName":[513,"icon-name"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"isOpened":[64]}]]],["ez-dialog",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-filter-input",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal-container",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]]],["ez-chip",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-application",[[0,"ez-application"]]],["ez-card-item",[[1,"ez-card-item",{"item":[16]}]]],["ez-loading-bar",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"heightMode":[1537,"height-mode"],"ezTitle":[1,"ez-title"]}]]],["ez-radio-button",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["ez-scroller",[[1,"ez-scroller",{"direction":[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["ez-toast",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["ez-grid-config",[[2,"ez-grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-collapsible-box",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[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"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-calendar",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["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],"mode":[513],"noBorder":[516,"no-border"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-input",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-date-time-input",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-time-input",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-number-input",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-modal",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-text-area",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64],"isInvalid":[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-text-edit",[[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[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],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-tabselector",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]]],["ez-check",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-icon",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["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"],"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],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["ez-select-box",[[1,"ez-select-box",{"selectedOption":[1,"selected-option"]}]]],["ez-button",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-form",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
package/dist/ezui/ezui.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-3c7ea91b.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-ae5af8f9",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],config:[1040],serverUrl:[1,"server-url"],dataUnit:[16],statusResolver:[16],_paginationInfo:[32],_popUpGridConfig:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64],quickFilter:[64],closeGridConfig:[64],openGridConfig:[64]}]]],["p-77ec47ac",[[1,"ez-actions-button",{enabled:[516],actions:[1040],size:[513],showLabel:[516,"show-label"],iconName:[513,"icon-name"],checkOption:[516,"check-option"],value:[513],isTransparent:[516,"is-transparent"],arrowActive:[516,"arrow-active"],_selectedAction:[32],hideActions:[64],isOpened:[64]}]]],["p-3987f8d8",[[1,"ez-dialog",{confirm:[1028],dialogType:[1025,"dialog-type"],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],handleButtonClick:[64],show:[64]}]]],["p-43bb6a59",[[1,"ez-filter-input",{label:[1],value:[1537],enabled:[4],loading:[516],errorMessage:[1537,"error-message"],restrict:[1],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-dfcf55e0",[[6,"ez-modal-container",{modalTitle:[1,"modal-title"],modalSubTitle:[1,"modal-sub-title"],showTitleBar:[4,"show-title-bar"],cancelButtonLabel:[1,"cancel-button-label"],okButtonLabel:[1,"ok-button-label"],cancelButtonStatus:[1,"cancel-button-status"],okButtonStatus:[1,"ok-button-status"]}]]],["p-9b9ebf95",[[1,"ez-chip",{label:[513],enabled:[516],removePosition:[513,"remove-position"],mode:[513],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-1cc11468",[[0,"ez-application"]]],["p-fe75f477",[[1,"ez-card-item",{item:[16]}]]],["p-ed2135a5",[[1,"ez-loading-bar",{_showLoading:[32],hide:[64],show:[64]}]]],["p-bffae598",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],innerElement:[1537,"inner-element"],updatePosition:[64],show:[64],hide:[64]}]]],["p-cfcc23e6",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[1540,"use-header"],heightMode:[1537,"height-mode"],ezTitle:[1,"ez-title"]}]]],["p-be06251d",[[1,"ez-radio-button",{value:[1544],options:[1040],enabled:[516],label:[513],direction:[1537]}]]],["p-e3ee814c",[[1,"ez-scroller",{direction:[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["p-482c3dd8",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],canClose:[1028,"can-close"],show:[64]}]]],["p-0c7203d5",[[0,"ez-view-stack",{show:[64],getSelectedIndex:[64]}]]],["p-2c6398b3",[[2,"ez-grid-config",{selectedTab:[1025,"selected-tab"],columns:[1040],config:[1040]}]]],["p-659616e4",[[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],stretchTitle:[516,"stretch-title"],removable:[516],editable:[516],conditionalSave:[16],_activeEditText:[32],showHide:[64],applyFocusTextEdit:[64],cancelEdition:[64]}]]],["p-56688470",[[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionLoader:[16],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressEmptyOption:[4,"suppress-empty-option"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-63d567cc",[[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}]]],["p-2ccad880",[[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],mode:[513],noBorder:[516,"no-border"],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-e230bfd2",[[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-e1f2b5da",[[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-744eb735",[[1,"ez-time-input",{label:[513],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-1d054ad5",[[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-7c227b86",[[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]],["p-e697ffd5",[[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],rows:[1538],canShowError:[516,"can-show-error"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-efa32bcc",[[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-5bdb1a41",[[1,"ez-text-edit",{value:[1],styled:[16],_newValue:[32],applyFocusSelect:[64]}]]],["p-42c6493e",[[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],clearHistory:[64],scrollToTop:[64],setSelection:[64],getSelection:[64],getList:[64]}]]],["p-
|
|
1
|
+
import{p as e,b as o}from"./p-3c7ea91b.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-ae5af8f9",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],config:[1040],serverUrl:[1,"server-url"],dataUnit:[16],statusResolver:[16],_paginationInfo:[32],_popUpGridConfig:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64],quickFilter:[64],closeGridConfig:[64],openGridConfig:[64]}]]],["p-77ec47ac",[[1,"ez-actions-button",{enabled:[516],actions:[1040],size:[513],showLabel:[516,"show-label"],iconName:[513,"icon-name"],checkOption:[516,"check-option"],value:[513],isTransparent:[516,"is-transparent"],arrowActive:[516,"arrow-active"],_selectedAction:[32],hideActions:[64],isOpened:[64]}]]],["p-3987f8d8",[[1,"ez-dialog",{confirm:[1028],dialogType:[1025,"dialog-type"],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],handleButtonClick:[64],show:[64]}]]],["p-43bb6a59",[[1,"ez-filter-input",{label:[1],value:[1537],enabled:[4],loading:[516],errorMessage:[1537,"error-message"],restrict:[1],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-dfcf55e0",[[6,"ez-modal-container",{modalTitle:[1,"modal-title"],modalSubTitle:[1,"modal-sub-title"],showTitleBar:[4,"show-title-bar"],cancelButtonLabel:[1,"cancel-button-label"],okButtonLabel:[1,"ok-button-label"],cancelButtonStatus:[1,"cancel-button-status"],okButtonStatus:[1,"ok-button-status"]}]]],["p-9b9ebf95",[[1,"ez-chip",{label:[513],enabled:[516],removePosition:[513,"remove-position"],mode:[513],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-1cc11468",[[0,"ez-application"]]],["p-fe75f477",[[1,"ez-card-item",{item:[16]}]]],["p-ed2135a5",[[1,"ez-loading-bar",{_showLoading:[32],hide:[64],show:[64]}]]],["p-bffae598",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],innerElement:[1537,"inner-element"],updatePosition:[64],show:[64],hide:[64]}]]],["p-cfcc23e6",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[1540,"use-header"],heightMode:[1537,"height-mode"],ezTitle:[1,"ez-title"]}]]],["p-be06251d",[[1,"ez-radio-button",{value:[1544],options:[1040],enabled:[516],label:[513],direction:[1537]}]]],["p-e3ee814c",[[1,"ez-scroller",{direction:[1]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["p-482c3dd8",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],canClose:[1028,"can-close"],show:[64]}]]],["p-0c7203d5",[[0,"ez-view-stack",{show:[64],getSelectedIndex:[64]}]]],["p-2c6398b3",[[2,"ez-grid-config",{selectedTab:[1025,"selected-tab"],columns:[1040],config:[1040]}]]],["p-659616e4",[[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],stretchTitle:[516,"stretch-title"],removable:[516],editable:[516],conditionalSave:[16],_activeEditText:[32],showHide:[64],applyFocusTextEdit:[64],cancelEdition:[64]}]]],["p-56688470",[[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionLoader:[16],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],suppressEmptyOption:[4,"suppress-empty-option"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-63d567cc",[[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}]]],["p-2ccad880",[[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],mode:[513],noBorder:[516,"no-border"],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-e230bfd2",[[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-e1f2b5da",[[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-744eb735",[[1,"ez-time-input",{label:[513],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-1d054ad5",[[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-7c227b86",[[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]],["p-e697ffd5",[[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],rows:[1538],canShowError:[516,"can-show-error"],mode:[513],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-efa32bcc",[[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-5bdb1a41",[[1,"ez-text-edit",{value:[1],styled:[16],_newValue:[32],applyFocusSelect:[64]}]]],["p-42c6493e",[[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],clearHistory:[64],scrollToTop:[64],setSelection:[64],getSelection:[64],getList:[64]}]]],["p-f27c364b",[[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1],_processedTabs:[32]}]]],["p-2213da1f",[[1,"ez-check",{label:[513],value:[1540],enabled:[1540],mode:[513],getMode:[64],setFocus:[64]}]]],["p-ec9decf2",[[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}]]],["p-6608b9a5",[[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],setFocus:[64],setBlur:[64],isInvalid:[64]}]]],["p-9b1700f7",[[1,"ez-select-box",{selectedOption:[1,"selected-option"]}]]],["p-333d79c4",[[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513],iconName:[513,"icon-name"],size:[513],setFocus:[64],setBlur:[64]}]]],["p-9fc50d9a",[[0,"ez-form",{dataUnit:[1040],config:[16],recordsValidator:[16],submit:[64],cancel:[64],validate:[64]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as t,c as i,f as n,H as s,g as r}from"./p-3c7ea91b.js";import{UserInterface as a,Action as l,WaitingChangeException as o,ApplicationContext as c,DataUnitAction as d,DataUnit as h}from"@sankhyalabs/core";import{C as u}from"./p-b853763b.js";import{A as f}from"./p-0b44cf1c.js";import"./p-e1148f5c.js";const b=({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-text-input",{label:i,"data-field-name":t,key:t,enabled:!n}));function p(t,i,n,s=!1){return e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large"},e("ez-check",{enabled:!n,label:i,mode:s?u.SWITCH:u.REGULAR,"data-field-name":t,key:t}))}function m(t,i,n,s,r){return e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-number-input",{enabled:!n,label:i,precision:s,prettyPrecision:r,"data-field-name":t,key:t}))}const v=new Map;v.set(a.LONGTEXT,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small",key:t},e("ez-text-area",{enabled:!n,label:i,"data-field-name":t})))),v.set(a.CHECKBOX,(e=>p(e.name,e.label,e.readOnly,!1))),v.set(a.SWITCH,(e=>p(e.name,e.label,e.readOnly,!0))),v.set(a.OPTIONSELECTOR,(({name:t,label:i,readOnly:n,required:s},r)=>{const a=null==r?void 0:r.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:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-combo-box",{enabled:!n,suppressEmptyOption:s,label:i,"data-field-name":t,key:t,options:l}))})),v.set(a.SEARCH,(({name:t,label:i,readOnly:n,required:s})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-search",{enabled:!n,suppressEmptyOption:s,label:i,"data-field-name":t,key:t})))),v.set(a.FILE,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-upload",{enabled:!n,label:i,"data-field-name":t,key:t})))),v.set(a.DATE,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-date-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),v.set(a.TIME,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-time-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),v.set(a.DATETIME,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-date-time-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),v.set(a.DECIMALNUMBER,(({name:e,label:t,readOnly:i},n)=>{const s=Number((null==n?void 0:n.precision)||2);return m(e,t,i,s,Number((null==n?void 0:n.prettyPrecision)||s))})),v.set(a.INTEGERNUMBER,(({name:e,label:t,readOnly:i})=>m(e,t,i,0,0)));const z=e=>{const t=e.descriptor,i=Object.assign({},e.config);let n,s;return t&&(i.label||(i.label=t.label),i.name||(i.name=t.name),null!=i.required&&!0!==t.required||(i.required=t.required),null!=i.readOnly&&!0!==t.readOnly||(i.readOnly=t.readOnly),s=t.properties,n=v.get(t.userInterface)),i.required&&(i.label=`${i.label} (obrigatório) *`),n||(n=b),n(i,s)},y=({source:t})=>"items"in t?e("ez-collapsible-box",{label:t.label,"header-size":"large"},t.items.map((e=>z(e)))):z(t),g=({store:t,source:i})=>e("div",{class:"dynamic-content ez-box__container"},e("div",{class:"ez-row ez-padding-vertical--small"},i.items.map((i=>e(y,{store:t,source:i})))));class _{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[],this._defaultValues={}}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),this._defaultValues=e.defaultValues}getRequiredFields(){return this._requiredFields}getCleanOnCopyFields(){return this._cleanOnCopyFields}getDefaultValues(){return this._defaultValues}}function w(e,t){return"__main"==e[0].label?-1:(e[0].order||1e4)-(t[0].order||1e4)}function O(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 E="function"==typeof Symbol&&Symbol.observable||"@@observable",A=function(){return Math.random().toString(36).substring(7).split("").join(".")},C={INIT:"@@redux/INIT"+A(),REPLACE:"@@redux/REPLACE"+A(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+A()}};function x(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 j(e,t,i){var n;if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(O(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(O(1));return i(j)(e,t)}if("function"!=typeof e)throw new Error(O(2));var s=e,r=t,a=[],l=a,o=!1;function c(){l===a&&(l=a.slice())}function d(){if(o)throw new Error(O(3));return r}function h(e){if("function"!=typeof e)throw new Error(O(4));if(o)throw new Error(O(5));var t=!0;return c(),l.push(e),function(){if(t){if(o)throw new Error(O(6));t=!1,c();var i=l.indexOf(e);l.splice(i,1),a=null}}}function u(e){if(!x(e))throw new Error(O(7));if(void 0===e.type)throw new Error(O(8));if(o)throw new Error(O(9));try{o=!0,r=s(r,e)}finally{o=!1}for(var t=a=l,i=0;i<t.length;i++)(0,t[i])();return e}function f(e){if("function"!=typeof e)throw new Error(O(10));s=e,u({type:C.REPLACE})}function b(){var e,t=h;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(O(11));function i(){e.next&&e.next(d())}return i(),{unsubscribe:t(i)}}})[E]=function(){return this},e}return u({type:C.INIT}),(n={dispatch:u,subscribe:h,getState:d,replaceReducer:f})[E]=b,n}const R={};function M(e=R,t){switch(t.type){case N.METADATA_LOADED:return Object.assign(Object.assign({},e),{formMetadata:t.payload,currentSheet:void 0});case N.CHANGE_TAB:return Object.assign(Object.assign({},e),{currentSheet:t.payload});default:return e}}function k(e){return e.formMetadata}var N;!function(e){e.METADATA_LOADED="FORM/METADATA_LOADED",e.CHANGE_TAB="FORM/CHANGE_TAB"}(N||(N={}));class P{constructor(e){this._invalidFields=new Map,this.onDataUnitEvent=e=>{var t;switch(e.type){case l.DATA_LOADED:case l.DATA_SAVED:case l.RECORDS_REMOVED:case l.RECORDS_ADDED:case l.RECORDS_COPIED:case l.EDITION_CANCELED:case l.SELECTION_CHANGED:case l.NEXT_SELECTED:case l.PREVIOUS_SELECTED:this.clearInvalid();case l.DATA_CHANGED:case l.CHANGE_UNDONE:case l.CHANGE_REDONE:case l.RECORD_LOADED:null===(t=this._fields)||void 0===t||t.forEach((e=>{this.updateValue(e.fieldName,e.field)}))}},this._fields=new Map,this._dataUnit=e,this._dataUnit.subscribe(this.onDataUnitEvent)}bind(e){e.forEach((e=>{this.updateBind(e.dataset.fieldName,e)}))}onDisconnectedCallback(){this._dataUnit.unsubscribe(this.onDataUnitEvent)}markInvalid(e){this._invalidFields.set(e.name,e),this._fields.has(e.name)&&this.updateErrorMessage(e.name,this._fields.get(e.name).field)}clearInvalid(){this._invalidFields.clear(),this._fields.forEach((e=>{this.updateErrorMessage(e.field.dataset.fieldName,e.field)}))}updateValue(e,t){const i=this._fields.get(e);try{i&&(i.listen=!1),t.value=this._dataUnit.getFieldValue(e),this.updateErrorMessage(e,t)}finally{i&&(i.listen=!0)}}updateErrorMessage(e,t){const i=this._invalidFields.get(e);t.errorMessage=i?i.message:""}updateBind(e,t){const i=this._fields.get(e);i&&i.destroy(),t.value=this._dataUnit.getFieldValue(e),this.updateErrorMessage(e,t),this._fields.set(e,S.create(e,t,((e,t)=>this.changeStarted(e,t)),(e=>this.cancelWaitingChange(e)),((e,t)=>this.setFieldValue(e,t)))),this.bindSearchOptionsLoader(e,t),this.applyEzUploadContext(e,t)}changeStarted(e,t){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),!t.blocking&&null==t.promise){const i=this._fields.get(e);i&&(t.promise=new Promise(((e,t)=>{i.waitingChangePromiseResolve=e,i.waitingChangePromiseReject=t})))}this._dataUnit.startChange(e,t)}cancelWaitingChange(e){if(this._dataUnit.waitingForChange(e)){this._dataUnit.cancelWaitingChange(e);const t=this._fields.get(e);t&&t.rejectWaitingChange(new o("Change canceled",e))}}setFieldValue(e,t){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._invalidFields.delete(e),this._dataUnit.setFieldValue(e,t),this._dataUnit.waitingForChange(e)){const t=this._fields.get(e);t&&t.acceptWaitingChange()}}bindSearchOptionsLoader(e,t){if("EZ-SEARCH"===t.nodeName&&null==t.optionLoader){const i=c.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");i&&(t.optionLoader=t=>i(t,e,this._dataUnit))}}applyEzUploadContext(e,t){var i,n;if("EZ-UPLOAD"===t.nodeName){t.urlUpload=c.getContextValue("__EZUI__UPLOAD__ADD__URL__"),t.urlDelete=c.getContextValue("__EZUI__UPLOAD__DEL__URL__");const s=this._dataUnit.getField(e),r=null===(i=s.properties)||void 0===i?void 0:i.DESTINATION;r&&(t.requestHeaders={XTRAINF:`{"destination": "${r}"}`}),t.maxFiles=(null===(n=s.properties)||void 0===n?void 0:n.MAX_FILES)||0}}}class S{constructor(){this.listen=!0,this.startChangeEventName="ezStartChange",this.cancelWaitingChangeEventName="ezCancelWaitingChange",this.changeEventName="ezChange"}destroy(){this.field.removeEventListener(this.startChangeEventName,this.startChangeListener),this.field.removeEventListener(this.cancelWaitingChangeEventName,this.cancelWaitingChangeListener),this.field.removeEventListener(this.changeEventName,this.changeListener)}acceptWaitingChange(){this.waitingChangePromiseResolve&&(this.waitingChangePromiseResolve(),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}rejectWaitingChange(e){this.waitingChangePromiseReject&&(this.waitingChangePromiseReject(e),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}static create(e,t,i,n,s){const r=new S;return r.field=t,r.fieldName=e,r.startChangeListener=t=>{r.listen&&i(e,t.detail)},r.field.addEventListener(r.startChangeEventName,r.startChangeListener),r.cancelWaitingChangeListener=()=>{r.listen&&n(e)},r.field.addEventListener(r.cancelWaitingChangeEventName,r.cancelWaitingChangeListener),r.changeListener=t=>{r.listen&&s(e,t.detail)},r.field.addEventListener(r.changeEventName,r.changeListener),r}}let D=class{constructor(e){t(this,e),this.ezReady=i(this,"ezReady",7),this.onDataUnitAction=e=>{e.type===l.METADATA_LOADED&&this.processMetadata()}}submit(){return Promise.resolve()}cancel(){return Promise.resolve()}validate(){return new Promise(((e,t)=>{var i;const n=this.dataUnit.getModifiedRecords();for(let e=0;e<n.length;e++){const s=n[e],r=[];let a=this.validateRequired(s);if(a&&!a.isValid&&r.push(a),a=null===(i=this.recordsValidator)||void 0===i?void 0:i.validateRecord(this,s),a&&!a.isValid&&r.push(a),r.length>0){this.processValidationResult(r),t();break}}e()}))}observeConfig(){this.processMetadata()}validateRequired(e){const t=k(this._store.getState()),i=this._staticFields.filter((e=>e.dataset.required)).map((e=>e.dataset.fieldName)).concat(t.getRequiredFields()),n=[];if(i.forEach((t=>{const i=e[t];null!=i&&""!==i||n.push({name:t,message:"Essa informação é obrigatória"})})),n.length>0)return{isValid:!1,invalidFields:n,infoMessage:"Há pelo menos um campo obrigatório não preenchido."}}processValidationResult(e){e.forEach((e=>{const t=e.invalidFields;if(t&&t.forEach((e=>{this._dataBinder.markInvalid(e)})),e.infoMessage&&f.info(e.infoMessage),e.errorMessage){const{errorTitle:t,errorMessage:i}=e;f.error(t,i)}}))}getDynamicContent(){var t;const i=k(this._store.getState());if(!i)return null;const n=(s=null===(t=this._store)||void 0===t?void 0:t.getState()).currentSheet?s.formMetadata.getSheet(s.currentSheet):Array.from(s.formMetadata.getAllSheets().values())[0];var s;if(!n)return null;const r=Array.from(i.getAllSheets().values()),a=[];if(r.length>1){const t=r.map(((e,t)=>({tabKey:e.name,label:e.label,index:t})));a.push(e("ez-tabselector",{tabs:t,onEzChange:e=>this._store.dispatch(function(e){return{type:N.CHANGE_TAB,payload:e.tabKey}}(e.detail)),selectedTab:n.name}))}return a.push(e(g,{store:this._store,source:n})),a}processMetadata(){if(!this.isStatic()&&this.dataUnit){const e=null!=this.config?((e,t)=>{var i,n;const s=new Map,r=new Map,a=[],l=[],o={};null===(i=null==e?void 0:e.tabs)||void 0===i||i.forEach((e=>{r.has(e.label)||!1!==e.visible||r.set(e.label,e)})),null===(n=null==e?void 0:e.fields)||void 0===n||n.forEach((e=>{var i,n,c;if(!1!==e.visible){const d=function(e,t){return("string"==typeof e?Array.from(t.keys()).find((t=>t.label===e)):e)||{label:e,visible:!0}}(e.tab||"__main",s);if(r.has(d.label))return;const h=t.getField(e.name);if(h&&d.visible){s.has(d)||s.set(d,new Map);const t=s.get(d);(null==e.required?h.required:e.required)&&a.push(e.name),((null==e.cleanOnCopy?null===(i=h.properties)||void 0===i?void 0:i.cleanOnCopy:e.cleanOnCopy)||(null===(n=h.properties)||void 0===n?void 0:n.autoNum))&&l.push(e.name),(null==e.defaultValue?null===(c=h.properties)||void 0===c?void 0:c.defaultValue:e.defaultValue)&&(o[e.name]=e.defaultValue);const r={config:e,descriptor:h},u=e.group;if(u){const e=`group::${u}`;t.has(e)?t.get(e).items.push(r):t.set(e,{label:u,items:[r]})}else t.set(e.name,r)}}}));const c=new _;return Array.from(s.entries()).sort(w).forEach((([e,t])=>{c.addSheet({label:"__main"===e.label?"Principal":e.label,name:e.label,items:Array.from(t.values()),requiredFields:a,cleanOnCopyFields:l,defaultValues:o})})),c})(this.config,this.dataUnit):(()=>{var e;const t=this.dataUnit.metadata,i=new _;if(t){const n=null===(e=t.fields)||void 0===e?void 0:e.filter((e=>!1!==e.visible));let s={};n.filter((e=>e.defaultValue)).map((e=>s[e.name]=e.defaultValue)),i.addSheet({label:t.label,name:t.name,items:n.map((e=>({descriptor:e}))),requiredFields:n.filter((e=>e.required)).map((e=>e.name)),cleanOnCopyFields:n.filter((e=>{var t,i;return(null===(t=e.properties)||void 0===t?void 0:t.cleanOnCopy)||(null===(i=e.properties)||void 0===i?void 0:i.autoNum)})).map((e=>e.name)),defaultValues:s})}return i})();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=k(this._store.getState()).getCleanOnCopyFields();if(t)return new d(l.RECORDS_COPIED,e.payload.map((e=>{const i=Object.assign({},e);return t.forEach((e=>delete i[e])),i})))}if(e.type===l.SAVING_DATA)return new Promise((t=>{this.validate().then((()=>t(e))).catch((()=>{}))}));if(e.type===l.RECORDS_ADDED){const t=k(this._store.getState()).getDefaultValues();if(t)return new d(l.RECORDS_ADDED,e.payload.map((e=>{const i=Object.assign({},e);for(const e in t){const n="formattedValue"in t[e]?t[e].formattedValue:t[e].value,s=null!=n?n:t[e],r="function"==typeof s?s():s;i[e]=this.dataUnit.valueFromString(e,r)}return i})))}return e}componentWillLoad(){void 0===this.dataUnit&&(this.dataUnit=new h("ez-form")),this.dataUnit.addInterceptor(this),this.dataUnit.subscribe(this.onDataUnitAction),this._dataBinder=new P(this.dataUnit),this._store=j(M),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]"))),this.ezReady.emit()}disconnectedCallback(){this.dataUnit.unsubscribe(this.onDataUnitAction),this.dataUnit.removeInterceptor(this),this._dataBinder.onDisconnectedCallback()}render(){return e(s,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};D.style="ez-form{display:flex;flex-direction:column;width:100%}.dynamic-content ez-collapsible-box{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";export{D as ez_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as a}from"./p-3c7ea91b.js";let o=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.setFocusedParam=t=>{if("Enter"===t.key){const i=this._processedTabs[this._focusedIndex];this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(i.index)}else if("ArrowLeft"===t.key||"ArrowRight"===t.key){let i;if("ArrowLeft"===t.key)i=!1;else{if("ArrowRight"!==t.key)return;i=!0}this._focusedIndex=void 0===this._focusedIndex?!1===i?void 0!==this.selectedIndex?this.selectedIndex-1:void 0:void 0!==this.selectedIndex?this.selectedIndex+1:void 0:!1===i?this._focusedIndex-1:this._focusedIndex+1,this._focusedIndex<0?this._focusedIndex=0:this._focusedIndex>this._processedTabs.length-1&&(this._focusedIndex=this._processedTabs.length-1),this.setFocusedBtn(!0,this._focusedIndex),this.setFocusedTab(this._focusedIndex)}else if("Tab"===t.key||"Escape"===t.key){const i=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(this.selectedIndex)}}}observeTabs(t){t&&"string"!=typeof t&&(this._processedTabs=t)}handleTabClick(t){this.selectedIndex=t.index,this._focusedIndex=void 0,this.selectedTab=t.tabKey,this.ezChange.emit(t),this.setFocusedBtn(!1,t.index)}componentWillRender(){this._processedTabs||(this._processedTabs=[],this.tabs&&"string"==typeof this.tabs&&this.tabs.split(",").forEach((t=>{t=t.trim(),this._processedTabs.push({label:t,tabKey:t,index:this._processedTabs.length})})),this._hostElem.querySelectorAll("ez-tab").forEach((t=>{const i=t.getAttribute("tabKey"),s={label:t.getAttribute("label"),tabKey:i,leftIcon:t.getAttribute("leftIcon"),rightIcon:t.getAttribute("rightIcon"),index:this._processedTabs.length},e=t.firstChild;e&&(e.setAttribute("slot","tab"+s.index),this._hostElem.appendChild(e)),this._processedTabs.push(s)})))}handleSlotChange(t){const i=t.target.assignedElements()[0];i&&(i.style.marginLeft="6px")}scrollBackward(){const t=this._scrollContainer;t&&(t.scrollLeft-=t.clientWidth)}scrollFoward(){const t=this._scrollContainer;if(t){let i=null;t.querySelectorAll(".tab").forEach((s=>{s.getBoundingClientRect().right<t.clientWidth&&(i=s)})),t.scrollLeft=i.offsetLeft+i.offsetWidth}}componentDidRender(){this.updateScroll()}updateScroll(){const t=this._scrollContainer;if(t){const{scrollWidth:i,clientWidth:s,scrollLeft:e}=t,a=i-s-Math.ceil(e);this._startHidden=t.scrollLeft>0,this._endHidden=a>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const o=["","startHidden","endHidden","middle"],r=o[Number(this._startHidden)|Number(this._endHidden)<<1];o.forEach((i=>{i!==r&&t.classList.contains(i)&&t.classList.remove(i)})),r&&!t.classList.contains(r)&&t.classList.add(r)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(t){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${t}`).scrollIntoView()}),200)}getTextWidth(t){void 0===this._textMesurement&&(this._textMesurement=this._hostElem.shadowRoot.ownerDocument.createElement("canvas"));const i=this._textMesurement.getContext("2d");return i.font="14px Sora, Algerian",Math.min(220,24+i.measureText(t).width)+"px"}setFocusedBtn(t,i){this._scrollContainer.querySelectorAll(".tab").forEach((s=>{s.classList.remove("is-focused"),s.id==="tab"+i&&t&&s.classList.add("is-focused")}))}render(){return s(e,null,s("button",{class:"backward-button",ref:t=>this._backwardButton=t,onClick:()=>this.scrollBackward()}),s("div",{class:"scroll",ref:t=>this._scrollContainer=t,onScroll:()=>this.domScrollHandler(),onKeyDown:t=>this.setFocusedParam(t)},this._processedTabs.map(((t,i)=>{const e={"min-width":this.getTextWidth(t.label)},a="tab"+i,o=i===this.selectedIndex||this.selectedTab&&t.tabKey===this.selectedTab;return o&&(this.selectedTab=t.tabKey,this.selectedIndex=i),s("button",{id:a,class:"tab"+(o?" is-active":""),onClick:()=>this.handleTabClick(t),style:e},t.leftIcon&&s("ez-icon",{iconName:t.leftIcon,class:"left-icon"}),s("span",{class:"tab-label",title:t.label},t.label),t.rightIcon&&s("ez-icon",{iconName:t.rightIcon,class:"right-icon"}),s("slot",{name:a,onSlotchange:t=>{this.handleSlotChange(t)}}))}))),s("button",{class:"forward-button",ref:t=>this._forwardButton=t,onClick:()=>this.scrollFoward()}))}get _hostElem(){return a(this)}static get watchers(){return{tabs:["observeTabs"]}}};o.style='@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--tabselector--forward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Roboto");font-size:var(--title--small, 14px)}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:"";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}.left-icon{padding-right:var(--space--small)}.right-icon{padding-left:var(--space--small)}';export{o as ez_tabselector}
|
|
@@ -30,7 +30,6 @@ export declare class EzForm implements DUActionInterceptor {
|
|
|
30
30
|
private getDynamicContent;
|
|
31
31
|
private processMetadata;
|
|
32
32
|
private isStatic;
|
|
33
|
-
private getValidatedValue;
|
|
34
33
|
interceptAction(action: DataUnitAction): DataUnitAction | Promise<DataUnitAction>;
|
|
35
34
|
componentWillLoad(): void;
|
|
36
35
|
onDataUnitAction: (action: any) => void;
|
|
@@ -52,6 +51,7 @@ export interface IFieldConfig {
|
|
|
52
51
|
export interface IDefaultConfig {
|
|
53
52
|
type?: string;
|
|
54
53
|
value?: string;
|
|
54
|
+
formattedValue?: any;
|
|
55
55
|
}
|
|
56
56
|
export interface ITabConfig {
|
|
57
57
|
label: string;
|
|
@@ -6,9 +6,9 @@ export declare class EzTabselector {
|
|
|
6
6
|
private _forwardButton;
|
|
7
7
|
private _startHidden;
|
|
8
8
|
private _endHidden;
|
|
9
|
-
private _processedTabs;
|
|
10
9
|
private _focusedIndex;
|
|
11
10
|
private _scrollCallBackTest;
|
|
11
|
+
private _processedTabs;
|
|
12
12
|
/**
|
|
13
13
|
* Define o index da aba selecionada.
|
|
14
14
|
*/
|
|
@@ -19,14 +19,17 @@ export declare class EzTabselector {
|
|
|
19
19
|
selectedTab: string;
|
|
20
20
|
/**
|
|
21
21
|
* Define o nome das abas do componente, separadas por vírgulas ",".
|
|
22
|
+
* Opcionalmente pode-se construir um array de objetos do tipo Tab, nesse caso
|
|
23
|
+
* o tabKey e o índice serão respeitados.
|
|
22
24
|
*/
|
|
23
|
-
tabs: string
|
|
25
|
+
tabs: string | Array<Tab>;
|
|
24
26
|
/**
|
|
25
27
|
* Evento emitido ao clicar para abrir o popup (ezChange).
|
|
26
28
|
* O detail desse evento carrega tanto o tabKey quanto o index da aba
|
|
27
29
|
* selecionada.
|
|
28
30
|
*/
|
|
29
31
|
ezChange: EventEmitter<Tab>;
|
|
32
|
+
observeTabs(newValue: any): void;
|
|
30
33
|
handleTabClick(tab: Tab): void;
|
|
31
34
|
componentWillRender(): void;
|
|
32
35
|
handleSlotChange(ev: Event): void;
|
|
@@ -842,9 +842,9 @@ export namespace Components {
|
|
|
842
842
|
*/
|
|
843
843
|
"selectedTab": string;
|
|
844
844
|
/**
|
|
845
|
-
* Define o nome das abas do componente, separadas por vírgulas ",".
|
|
845
|
+
* Define o nome das abas do componente, separadas por vírgulas ",". Opcionalmente pode-se construir um array de objetos do tipo Tab, nesse caso o tabKey e o índice serão respeitados.
|
|
846
846
|
*/
|
|
847
|
-
"tabs": string
|
|
847
|
+
"tabs": string | Array<Tab>;
|
|
848
848
|
}
|
|
849
849
|
interface EzTextArea {
|
|
850
850
|
/**
|
|
@@ -2109,9 +2109,9 @@ declare namespace LocalJSX {
|
|
|
2109
2109
|
*/
|
|
2110
2110
|
"selectedTab"?: string;
|
|
2111
2111
|
/**
|
|
2112
|
-
* Define o nome das abas do componente, separadas por vírgulas ",".
|
|
2112
|
+
* Define o nome das abas do componente, separadas por vírgulas ",". Opcionalmente pode-se construir um array de objetos do tipo Tab, nesse caso o tabKey e o índice serão respeitados.
|
|
2113
2113
|
*/
|
|
2114
|
-
"tabs"?: string
|
|
2114
|
+
"tabs"?: string | Array<Tab>;
|
|
2115
2115
|
}
|
|
2116
2116
|
interface EzTextArea {
|
|
2117
2117
|
/**
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,r as t,c as i,f as n,H as s,g as r}from"./p-3c7ea91b.js";import{UserInterface as a,Action as l,WaitingChangeException as o,ApplicationContext as c,DateUtils as d,DataUnitAction as h,DataUnit as u}from"@sankhyalabs/core";import{C as f}from"./p-b853763b.js";import{A as b}from"./p-0b44cf1c.js";import"./p-e1148f5c.js";const p=({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-text-input",{label:i,"data-field-name":t,key:t,enabled:!n}));function m(t,i,n,s=!1){return e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large"},e("ez-check",{enabled:!n,label:i,mode:s?f.SWITCH:f.REGULAR,"data-field-name":t,key:t}))}function v(t,i,n,s,r){return e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-number-input",{enabled:!n,label:i,precision:s,prettyPrecision:r,"data-field-name":t,key:t}))}const z=new Map;z.set(a.LONGTEXT,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small",key:t},e("ez-text-area",{enabled:!n,label:i,"data-field-name":t})))),z.set(a.CHECKBOX,(e=>m(e.name,e.label,e.readOnly,!1))),z.set(a.SWITCH,(e=>m(e.name,e.label,e.readOnly,!0))),z.set(a.OPTIONSELECTOR,(({name:t,label:i,readOnly:n,required:s},r)=>{const a=null==r?void 0:r.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:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-combo-box",{enabled:!n,suppressEmptyOption:s,label:i,"data-field-name":t,key:t,options:l}))})),z.set(a.SEARCH,(({name:t,label:i,readOnly:n,required:s})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-search",{enabled:!n,suppressEmptyOption:s,label:i,"data-field-name":t,key:t})))),z.set(a.FILE,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-padding-horizontal--small"},e("ez-upload",{enabled:!n,label:i,"data-field-name":t,key:t})))),z.set(a.DATE,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-date-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),z.set(a.TIME,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-time-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),z.set(a.DATETIME,(({name:t,label:i,readOnly:n})=>e("div",{class:"ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small"},e("ez-date-time-input",{enabled:!n,label:i,"data-field-name":t,key:t})))),z.set(a.DECIMALNUMBER,(({name:e,label:t,readOnly:i},n)=>{const s=Number((null==n?void 0:n.precision)||2);return v(e,t,i,s,Number((null==n?void 0:n.prettyPrecision)||s))})),z.set(a.INTEGERNUMBER,(({name:e,label:t,readOnly:i})=>v(e,t,i,0,0)));const y=e=>{const t=e.descriptor,i=Object.assign({},e.config);let n,s;return t&&(i.label||(i.label=t.label),i.name||(i.name=t.name),null!=i.required&&!0!==t.required||(i.required=t.required),null!=i.readOnly&&!0!==t.readOnly||(i.readOnly=t.readOnly),s=t.properties,n=z.get(t.userInterface)),i.required&&(i.label=`${i.label} (obrigatório) *`),n||(n=p),n(i,s)},g=({source:t})=>"items"in t?e("ez-collapsible-box",{label:t.label,"header-size":"large"},t.items.map((e=>y(e)))):y(t),_=({store:t,source:i})=>e("div",{class:"dynamic-content ez-box__container"},e("div",{class:"ez-row ez-padding-vertical--small"},i.items.map((i=>e(g,{store:t,source:i})))));class w{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[],this._defaultValues={}}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),this._defaultValues=e.defaultValues}getRequiredFields(){return this._requiredFields}getCleanOnCopyFields(){return this._cleanOnCopyFields}getDefaultValues(){return this._defaultValues}}function O(e,t){return"__main"==e[0].label?-1:(e[0].order||1e4)-(t[0].order||1e4)}function E(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 A="function"==typeof Symbol&&Symbol.observable||"@@observable",C=function(){return Math.random().toString(36).substring(7).split("").join(".")},j={INIT:"@@redux/INIT"+C(),REPLACE:"@@redux/REPLACE"+C(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+C()}};function x(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 R(e,t,i){var n;if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(E(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(E(1));return i(R)(e,t)}if("function"!=typeof e)throw new Error(E(2));var s=e,r=t,a=[],l=a,o=!1;function c(){l===a&&(l=a.slice())}function d(){if(o)throw new Error(E(3));return r}function h(e){if("function"!=typeof e)throw new Error(E(4));if(o)throw new Error(E(5));var t=!0;return c(),l.push(e),function(){if(t){if(o)throw new Error(E(6));t=!1,c();var i=l.indexOf(e);l.splice(i,1),a=null}}}function u(e){if(!x(e))throw new Error(E(7));if(void 0===e.type)throw new Error(E(8));if(o)throw new Error(E(9));try{o=!0,r=s(r,e)}finally{o=!1}for(var t=a=l,i=0;i<t.length;i++)(0,t[i])();return e}function f(e){if("function"!=typeof e)throw new Error(E(10));s=e,u({type:j.REPLACE})}function b(){var e,t=h;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(E(11));function i(){e.next&&e.next(d())}return i(),{unsubscribe:t(i)}}})[A]=function(){return this},e}return u({type:j.INIT}),(n={dispatch:u,subscribe:h,getState:d,replaceReducer:f})[A]=b,n}const M={};function k(e=M,t){switch(t.type){case P.METADATA_LOADED:return Object.assign(Object.assign({},e),{formMetadata:t.payload});case P.CHANGE_TAB:return Object.assign(Object.assign({},e),{currentSheet:t.payload});default:return e}}function N(e){return e.formMetadata}var P;!function(e){e.METADATA_LOADED="FORM/METADATA_LOADED",e.CHANGE_TAB="FORM/CHANGE_TAB"}(P||(P={}));class D{constructor(e){this._invalidFields=new Map,this.onDataUnitEvent=e=>{var t;switch(e.type){case l.DATA_LOADED:case l.DATA_SAVED:case l.RECORDS_REMOVED:case l.RECORDS_ADDED:case l.RECORDS_COPIED:case l.EDITION_CANCELED:case l.SELECTION_CHANGED:case l.NEXT_SELECTED:case l.PREVIOUS_SELECTED:this.clearInvalid();case l.DATA_CHANGED:case l.CHANGE_UNDONE:case l.CHANGE_REDONE:case l.RECORD_LOADED:null===(t=this._fields)||void 0===t||t.forEach((e=>{this.updateValue(e.fieldName,e.field)}))}},this._fields=new Map,this._dataUnit=e,this._dataUnit.subscribe(this.onDataUnitEvent)}bind(e){e.forEach((e=>{this.updateBind(e.dataset.fieldName,e)}))}onDisconnectedCallback(){this._dataUnit.unsubscribe(this.onDataUnitEvent)}markInvalid(e){this._invalidFields.set(e.name,e),this._fields.has(e.name)&&this.updateErrorMessage(e.name,this._fields.get(e.name).field)}clearInvalid(){this._invalidFields.clear(),this._fields.forEach((e=>{this.updateErrorMessage(e.field.dataset.fieldName,e.field)}))}updateValue(e,t){const i=this._fields.get(e);try{i&&(i.listen=!1),t.value=this._dataUnit.getFieldValue(e),this.updateErrorMessage(e,t)}finally{i&&(i.listen=!0)}}updateErrorMessage(e,t){const i=this._invalidFields.get(e);t.errorMessage=i?i.message:""}updateBind(e,t){const i=this._fields.get(e);i&&i.destroy(),t.value=this._dataUnit.getFieldValue(e),this.updateErrorMessage(e,t),this._fields.set(e,S.create(e,t,((e,t)=>this.changeStarted(e,t)),(e=>this.cancelWaitingChange(e)),((e,t)=>this.setFieldValue(e,t)))),this.bindSearchOptionsLoader(e,t),this.applyEzUploadContext(e,t)}changeStarted(e,t){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),!t.blocking&&null==t.promise){const i=this._fields.get(e);i&&(t.promise=new Promise(((e,t)=>{i.waitingChangePromiseResolve=e,i.waitingChangePromiseReject=t})))}this._dataUnit.startChange(e,t)}cancelWaitingChange(e){if(this._dataUnit.waitingForChange(e)){this._dataUnit.cancelWaitingChange(e);const t=this._fields.get(e);t&&t.rejectWaitingChange(new o("Change canceled",e))}}setFieldValue(e,t){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._invalidFields.delete(e),this._dataUnit.setFieldValue(e,t),this._dataUnit.waitingForChange(e)){const t=this._fields.get(e);t&&t.acceptWaitingChange()}}bindSearchOptionsLoader(e,t){if("EZ-SEARCH"===t.nodeName&&null==t.optionLoader){const i=c.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");i&&(t.optionLoader=t=>i(t,e,this._dataUnit))}}applyEzUploadContext(e,t){var i,n;if("EZ-UPLOAD"===t.nodeName){t.urlUpload=c.getContextValue("__EZUI__UPLOAD__ADD__URL__"),t.urlDelete=c.getContextValue("__EZUI__UPLOAD__DEL__URL__");const s=this._dataUnit.getField(e),r=null===(i=s.properties)||void 0===i?void 0:i.DESTINATION;r&&(t.requestHeaders={XTRAINF:`{"destination": "${r}"}`}),t.maxFiles=(null===(n=s.properties)||void 0===n?void 0:n.MAX_FILES)||0}}}class S{constructor(){this.listen=!0,this.startChangeEventName="ezStartChange",this.cancelWaitingChangeEventName="ezCancelWaitingChange",this.changeEventName="ezChange"}destroy(){this.field.removeEventListener(this.startChangeEventName,this.startChangeListener),this.field.removeEventListener(this.cancelWaitingChangeEventName,this.cancelWaitingChangeListener),this.field.removeEventListener(this.changeEventName,this.changeListener)}acceptWaitingChange(){this.waitingChangePromiseResolve&&(this.waitingChangePromiseResolve(),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}rejectWaitingChange(e){this.waitingChangePromiseReject&&(this.waitingChangePromiseReject(e),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}static create(e,t,i,n,s){const r=new S;return r.field=t,r.fieldName=e,r.startChangeListener=t=>{r.listen&&i(e,t.detail)},r.field.addEventListener(r.startChangeEventName,r.startChangeListener),r.cancelWaitingChangeListener=()=>{r.listen&&n(e)},r.field.addEventListener(r.cancelWaitingChangeEventName,r.cancelWaitingChangeListener),r.changeListener=t=>{r.listen&&s(e,t.detail)},r.field.addEventListener(r.changeEventName,r.changeListener),r}}let I=class{constructor(e){t(this,e),this.ezReady=i(this,"ezReady",7),this.onDataUnitAction=e=>{e.type===l.METADATA_LOADED&&this.processMetadata()}}submit(){return Promise.resolve()}cancel(){return Promise.resolve()}validate(){return new Promise(((e,t)=>{var i;const n=this.dataUnit.getModifiedRecords();for(let e=0;e<n.length;e++){const s=n[e],r=[];let a=this.validateRequired(s);if(a&&!a.isValid&&r.push(a),a=null===(i=this.recordsValidator)||void 0===i?void 0:i.validateRecord(this,s),a&&!a.isValid&&r.push(a),r.length>0){this.processValidationResult(r),t();break}}e()}))}observeConfig(){this.processMetadata()}validateRequired(e){const t=N(this._store.getState()),i=this._staticFields.filter((e=>e.dataset.required)).map((e=>e.dataset.fieldName)).concat(t.getRequiredFields()),n=[];if(i.forEach((t=>{const i=e[t];null!=i&&""!==i||n.push({name:t,message:"Essa informação é obrigatória"})})),n.length>0)return{isValid:!1,invalidFields:n,infoMessage:"Há pelo menos um campo obrigatório não preenchido."}}processValidationResult(e){e.forEach((e=>{const t=e.invalidFields;if(t&&t.forEach((e=>{this._dataBinder.markInvalid(e)})),e.infoMessage&&b.info(e.infoMessage),e.errorMessage){const{errorTitle:t,errorMessage:i}=e;b.error(t,i)}}))}getDynamicContent(){var t;const i=N(this._store.getState());if(!i)return null;const n=(s=null===(t=this._store)||void 0===t?void 0:t.getState()).currentSheet?s.formMetadata.getSheet(s.currentSheet):Array.from(s.formMetadata.getAllSheets().values())[0];var s;if(!n)return null;const r=Array.from(i.getAllSheets().values()),a=[];return r.length>1&&a.push(e("ez-tabselector",{onEzChange:e=>this._store.dispatch(function(e){return{type:P.CHANGE_TAB,payload:e.tabKey}}(e.detail)),selectedTab:n.name},r.map((t=>e("ez-tab",{tabKey:t.name,label:t.label}))))),a.push(e(_,{store:this._store,source:n})),a}processMetadata(){if(!this.isStatic()&&this.dataUnit){const e=null!=this.config?((e,t)=>{var i,n;const s=new Map,r=new Map,a=[],l=[],o={};null===(i=null==e?void 0:e.tabs)||void 0===i||i.forEach((e=>{r.has(e.label)||!1!==e.visible||r.set(e.label,e)})),null===(n=null==e?void 0:e.fields)||void 0===n||n.forEach((e=>{var i,n,c;if(!1!==e.visible){const d=function(e,t){return("string"==typeof e?Array.from(t.keys()).find((t=>t.label===e)):e)||{label:e,visible:!0}}(e.tab||"__main",s);if(r.has(d.label))return;const h=t.getField(e.name);if(h&&d.visible){s.has(d)||s.set(d,new Map);const t=s.get(d);(null==e.required?h.required:e.required)&&a.push(e.name),((null==e.cleanOnCopy?null===(i=h.properties)||void 0===i?void 0:i.cleanOnCopy:e.cleanOnCopy)||(null===(n=h.properties)||void 0===n?void 0:n.autoNum))&&l.push(e.name),(null==e.defaultValue?null===(c=h.properties)||void 0===c?void 0:c.defaultValue:e.defaultValue)&&(o[e.name]=e.defaultValue);const r={config:e,descriptor:h},u=e.group;if(u){const e=`group::${u}`;t.has(e)?t.get(e).items.push(r):t.set(e,{label:u,items:[r]})}else t.set(e.name,r)}}}));const c=new w;return Array.from(s.entries()).sort(O).forEach((([e,t])=>{c.addSheet({label:"__main"===e.label?"Principal":e.label,name:e.label,items:Array.from(t.values()),requiredFields:a,cleanOnCopyFields:l,defaultValues:o})})),c})(this.config,this.dataUnit):(()=>{var e;const t=this.dataUnit.metadata,i=new w;if(t){const n=null===(e=t.fields)||void 0===e?void 0:e.filter((e=>!1!==e.visible));let s={};n.filter((e=>e.defaultValue)).map((e=>s[e.name]=e.defaultValue)),i.addSheet({label:t.label,name:t.name,items:n.map((e=>({descriptor:e}))),requiredFields:n.filter((e=>e.required)).map((e=>e.name)),cleanOnCopyFields:n.filter((e=>{var t,i;return(null===(t=e.properties)||void 0===t?void 0:t.cleanOnCopy)||(null===(i=e.properties)||void 0===i?void 0:i.autoNum)})).map((e=>e.name)),defaultValues:s})}return i})();this._store.dispatch({type:P.METADATA_LOADED,payload:e})}}isStatic(){var e;return(null===(e=this._staticFields)||void 0===e?void 0:e.length)>0}getValidatedValue(e){switch(e){case"${data}":return d.getToday();case"${datahora}":return d.getToday(!0);default:return e}}interceptAction(e){if(e.type===l.RECORDS_COPIED){const t=N(this._store.getState()).getCleanOnCopyFields();if(t)return new h(l.RECORDS_COPIED,e.payload.map((e=>{const i=Object.assign({},e);return t.forEach((e=>delete i[e])),i})))}if(e.type===l.SAVING_DATA)return new Promise((t=>{this.validate().then((()=>t(e))).catch((()=>{}))}));if(e.type===l.RECORDS_ADDED){const t=N(this._store.getState()).getDefaultValues();if(t)return new h(l.RECORDS_ADDED,e.payload.map((e=>{const i=Object.assign({},e);for(const e in t){const n=t[e].value;i[e]=this.dataUnit.valueFromString(e,this.getValidatedValue(null!=n?n:t[e]))}return i})))}return e}componentWillLoad(){void 0===this.dataUnit&&(this.dataUnit=new u("ez-form")),this.dataUnit.addInterceptor(this),this.dataUnit.subscribe(this.onDataUnitAction),this._dataBinder=new D(this.dataUnit),this._store=R(k),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]"))),this.ezReady.emit()}disconnectedCallback(){this.dataUnit.unsubscribe(this.onDataUnitAction),this.dataUnit.removeInterceptor(this),this._dataBinder.onDisconnectedCallback()}render(){return e(s,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};I.style="ez-form{display:flex;flex-direction:column;width:100%}.dynamic-content ez-collapsible-box{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";export{I as ez_form}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as a}from"./p-3c7ea91b.js";let o=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.setFocusedParam=t=>{if("Enter"===t.key){const i=this._processedTabs[this._focusedIndex];this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(i.index)}else if("ArrowLeft"===t.key||"ArrowRight"===t.key){let i;if("ArrowLeft"===t.key)i=!1;else{if("ArrowRight"!==t.key)return;i=!0}this._focusedIndex=void 0===this._focusedIndex?!1===i?void 0!==this.selectedIndex?this.selectedIndex-1:void 0:void 0!==this.selectedIndex?this.selectedIndex+1:void 0:!1===i?this._focusedIndex-1:this._focusedIndex+1,this._focusedIndex<0?this._focusedIndex=0:this._focusedIndex>this._processedTabs.length-1&&(this._focusedIndex=this._processedTabs.length-1),this.setFocusedBtn(!0,this._focusedIndex),this.setFocusedTab(this._focusedIndex)}else if("Tab"===t.key||"Escape"===t.key){const i=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(this.selectedIndex)}}}handleTabClick(t){this.selectedIndex=t.index,this._focusedIndex=void 0,this.selectedTab=t.tabKey,this.ezChange.emit(t),this.setFocusedBtn(!1,t.index)}componentWillRender(){this._processedTabs||(this._processedTabs=[],this.tabs&&this.tabs.split(",").forEach((t=>{t=t.trim(),this._processedTabs.push({label:t,tabKey:t,index:this._processedTabs.length})})),this._hostElem.querySelectorAll("ez-tab").forEach((t=>{const i=t.getAttribute("tabKey"),s={label:t.getAttribute("label"),tabKey:i,leftIcon:t.getAttribute("leftIcon"),rightIcon:t.getAttribute("rightIcon"),index:this._processedTabs.length},e=t.firstChild;e&&(e.setAttribute("slot","tab"+s.index),this._hostElem.appendChild(e)),this._processedTabs.push(s)})))}handleSlotChange(t){const i=t.target.assignedElements()[0];i&&(i.style.marginLeft="6px")}scrollBackward(){const t=this._scrollContainer;t&&(t.scrollLeft-=t.clientWidth)}scrollFoward(){const t=this._scrollContainer;if(t){let i=null;t.querySelectorAll(".tab").forEach((s=>{s.getBoundingClientRect().right<t.clientWidth&&(i=s)})),t.scrollLeft=i.offsetLeft+i.offsetWidth}}componentDidRender(){this.updateScroll()}updateScroll(){const t=this._scrollContainer;if(t){const{scrollWidth:i,clientWidth:s,scrollLeft:e}=t,a=i-s-Math.ceil(e);this._startHidden=t.scrollLeft>0,this._endHidden=a>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const o=["","startHidden","endHidden","middle"],r=o[Number(this._startHidden)|Number(this._endHidden)<<1];o.forEach((i=>{i!==r&&t.classList.contains(i)&&t.classList.remove(i)})),r&&!t.classList.contains(r)&&t.classList.add(r)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(t){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${t}`).scrollIntoView()}),200)}getTextWidth(t){void 0===this._textMesurement&&(this._textMesurement=this._hostElem.shadowRoot.ownerDocument.createElement("canvas"));const i=this._textMesurement.getContext("2d");return i.font="14px Sora, Algerian",Math.min(220,24+i.measureText(t).width)+"px"}setFocusedBtn(t,i){this._scrollContainer.querySelectorAll(".tab").forEach((s=>{s.classList.remove("is-focused"),s.id==="tab"+i&&t&&s.classList.add("is-focused")}))}render(){return s(e,null,s("button",{class:"backward-button",ref:t=>this._backwardButton=t,onClick:()=>this.scrollBackward()}),s("div",{class:"scroll",ref:t=>this._scrollContainer=t,onScroll:()=>this.domScrollHandler(),onKeyDown:t=>this.setFocusedParam(t)},this._processedTabs.map(((t,i)=>{const e={"min-width":this.getTextWidth(t.label)},a="tab"+i,o=i===this.selectedIndex||this.selectedTab&&t.tabKey===this.selectedTab;return o&&(this.selectedTab=t.tabKey,this.selectedIndex=i),s("button",{id:a,class:"tab"+(o?" is-active":""),onClick:()=>this.handleTabClick(t),style:e},t.leftIcon&&s("ez-icon",{iconName:t.leftIcon,class:"left-icon"}),s("span",{class:"tab-label",title:t.label},t.label),t.rightIcon&&s("ez-icon",{iconName:t.rightIcon,class:"right-icon"}),s("slot",{name:a,onSlotchange:t=>{this.handleSlotChange(t)}}))}))),s("button",{class:"forward-button",ref:t=>this._forwardButton=t,onClick:()=>this.scrollFoward()}))}get _hostElem(){return a(this)}};o.style='@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--tabselector--forward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Roboto");font-size:var(--title--small, 14px)}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:"";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}.left-icon{padding-right:var(--space--small)}.right-icon{padding-left:var(--space--small)}';export{o as ez_tabselector}
|