@sankhyalabs/ezui 1.1.95 → 1.1.98
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/{StringUtils-0ba09df4.js → AssetsUtils-69356e76.js} +22 -0
- package/dist/cjs/UnitMetadata-63c56042.js +1311 -0
- package/dist/cjs/{ez-calendar_14.cjs.entry.js → ez-calendar_16.cjs.entry.js} +235 -39
- package/dist/cjs/ez-grid.cjs.entry.js +38 -19
- package/dist/cjs/ez-modal_2.cjs.entry.js +3 -4
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-check/ez-check.css +3 -2
- package/dist/collection/components/ez-form/DataBinder.js +13 -0
- package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +2 -1
- package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +4 -0
- package/dist/collection/components/ez-form/fieldbuilder/tpl/SearchInput.tpl.js +1 -1
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +6 -3
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +2 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +4 -2
- package/dist/collection/components/ez-icon/ez-icon.css +5 -0
- package/dist/custom-elements/index.js +227 -6318
- package/dist/esm/{StringUtils-cbf10229.js → AssetsUtils-0e207bec.js} +22 -1
- package/dist/esm/UnitMetadata-109880b0.js +1305 -0
- package/dist/esm/{ez-calendar_14.entry.js → ez-calendar_16.entry.js} +202 -8
- package/dist/esm/ez-grid.entry.js +23 -4
- package/dist/esm/ez-modal_2.entry.js +2 -3
- package/dist/esm/ez-popover.entry.js +1 -1
- 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-1386e4d5.entry.js +1 -0
- package/dist/ezui/{p-6714a1b2.entry.js → p-18de871c.entry.js} +10 -10
- package/dist/ezui/p-9fab5606.js +1 -0
- package/dist/ezui/p-a30309ce.entry.js +1 -0
- package/dist/ezui/{p-2617733e.entry.js → p-afb820c1.entry.js} +1 -1
- package/dist/ezui/p-ec7c1b86.js +1 -0
- package/dist/types/components/ez-form/DataBinder.d.ts +1 -0
- package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +4 -0
- package/package.json +2 -2
- package/dist/cjs/AssetsUtils-4909c6de.js +0 -24
- package/dist/cjs/CSSVarsUtils-8fbdf2e0.js +0 -19
- package/dist/cjs/ez-icon.cjs.entry.js +0 -42
- package/dist/cjs/ez-time-input.cjs.entry.js +0 -118
- package/dist/cjs/index-6164b259.js +0 -7460
- package/dist/esm/AssetsUtils-9b1329a3.js +0 -22
- package/dist/esm/CSSVarsUtils-667e0016.js +0 -17
- package/dist/esm/ez-icon.entry.js +0 -38
- package/dist/esm/ez-time-input.entry.js +0 -114
- package/dist/esm/index-74a9c220.js +0 -7452
- package/dist/ezui/p-0a8018c2.entry.js +0 -1
- package/dist/ezui/p-2f84ba72.js +0 -1
- package/dist/ezui/p-477bb703.js +0 -1
- package/dist/ezui/p-a943d501.entry.js +0 -1
- package/dist/ezui/p-b139372f.entry.js +0 -1
- package/dist/ezui/p-c6762896.js +0 -1
- package/dist/ezui/p-d54c157f.js +0 -1
- package/dist/ezui/p-ef393d36.entry.js +0 -1
|
@@ -2,10 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index
|
|
6
|
-
const
|
|
5
|
+
const index = require('./index-88286449.js');
|
|
6
|
+
const UnitMetadata = require('./UnitMetadata-63c56042.js');
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
|
+
|
|
10
|
+
function createCommonjsModule(fn, basedir, module) {
|
|
11
|
+
return module = {
|
|
12
|
+
path: basedir,
|
|
13
|
+
exports: {},
|
|
14
|
+
require: function (path, base) {
|
|
15
|
+
return commonjsRequire();
|
|
16
|
+
}
|
|
17
|
+
}, fn(module, module.exports), module.exports;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function commonjsRequire () {
|
|
21
|
+
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var agGridCommunity_cjs = createCommonjsModule(function (module, exports) {
|
|
9
25
|
|
|
10
26
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
27
|
|
|
@@ -46307,7 +46323,7 @@ var BaseComponentWrapper = /** @class */ (function () {
|
|
|
46307
46323
|
* @link http://www.ag-grid.com/
|
|
46308
46324
|
* @license MIT
|
|
46309
46325
|
*/
|
|
46310
|
-
var globalObj = typeof
|
|
46326
|
+
var globalObj = typeof commonjsGlobal === 'undefined' ? {} : commonjsGlobal;
|
|
46311
46327
|
globalObj.HTMLElement = typeof HTMLElement === 'undefined' ? {} : HTMLElement;
|
|
46312
46328
|
globalObj.HTMLButtonElement = typeof HTMLButtonElement === 'undefined' ? {} : HTMLButtonElement;
|
|
46313
46329
|
globalObj.HTMLSelectElement = typeof HTMLSelectElement === 'undefined' ? {} : HTMLSelectElement;
|
|
@@ -50012,7 +50028,7 @@ exports.simpleHttpRequest = simpleHttpRequest;
|
|
|
50012
50028
|
exports.stringToArray = stringToArray;
|
|
50013
50029
|
});
|
|
50014
50030
|
|
|
50015
|
-
var agGridEnterprise_cjs =
|
|
50031
|
+
var agGridEnterprise_cjs = createCommonjsModule(function (module, exports) {
|
|
50016
50032
|
|
|
50017
50033
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
50018
50034
|
|
|
@@ -110051,8 +110067,8 @@ class AgGridController {
|
|
|
110051
110067
|
this._gridOptions.api.getSortModel().forEach(({ colId, sort }) => {
|
|
110052
110068
|
if (sort) {
|
|
110053
110069
|
const field = this._dataUnit.getField(colId);
|
|
110054
|
-
const mode = sort === "asc" ?
|
|
110055
|
-
const sortField = field ? { field: field.name, dataType: field.dataType, mode } : { field: colId, dataType:
|
|
110070
|
+
const mode = sort === "asc" ? UnitMetadata.SortMode.ASC : UnitMetadata.SortMode.DESC;
|
|
110071
|
+
const sortField = field ? { field: field.name, dataType: field.dataType, mode } : { field: colId, dataType: UnitMetadata.DataType.TEXT, mode };
|
|
110056
110072
|
sortedColumns.push(sortField);
|
|
110057
110073
|
}
|
|
110058
110074
|
});
|
|
@@ -110133,9 +110149,11 @@ class AgGridController {
|
|
|
110133
110149
|
headerName: "",
|
|
110134
110150
|
checkboxSelection: true,
|
|
110135
110151
|
headerCheckboxSelection: false,
|
|
110136
|
-
width:
|
|
110152
|
+
width: 28,
|
|
110137
110153
|
suppressMovable: true,
|
|
110138
|
-
|
|
110154
|
+
suppressAutoSize: true,
|
|
110155
|
+
suppressMenu: true,
|
|
110156
|
+
lockPosition: true
|
|
110139
110157
|
});
|
|
110140
110158
|
}
|
|
110141
110159
|
cols.forEach(c => {
|
|
@@ -110311,7 +110329,7 @@ class DataUnitBridge {
|
|
|
110311
110329
|
}
|
|
110312
110330
|
processAction(action) {
|
|
110313
110331
|
switch (action.type) {
|
|
110314
|
-
case
|
|
110332
|
+
case UnitMetadata.Action.METADATA_LOADED:
|
|
110315
110333
|
this._gridController.setColumnsDef(this.buildColumnDefs(), true);
|
|
110316
110334
|
break;
|
|
110317
110335
|
}
|
|
@@ -110320,8 +110338,9 @@ class DataUnitBridge {
|
|
|
110320
110338
|
const columnDefs = [];
|
|
110321
110339
|
if (this._dataUnit.metadata) {
|
|
110322
110340
|
this._dataUnit.metadata.fields.forEach(f => {
|
|
110341
|
+
var _a;
|
|
110323
110342
|
if (f.visible !== false) {
|
|
110324
|
-
columnDefs.push({ label: f.label, name: f.name, userInterface: f.userInterface, options: this._dataUnit.getField(f.name).properties.options });
|
|
110343
|
+
columnDefs.push({ label: f.label, name: f.name, userInterface: f.userInterface, options: (_a = this._dataUnit.getField(f.name).properties) === null || _a === void 0 ? void 0 : _a.options });
|
|
110325
110344
|
}
|
|
110326
110345
|
});
|
|
110327
110346
|
}
|
|
@@ -110333,10 +110352,10 @@ const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;h
|
|
|
110333
110352
|
|
|
110334
110353
|
let EzGrid = class {
|
|
110335
110354
|
constructor(hostRef) {
|
|
110336
|
-
index
|
|
110337
|
-
this.ezColumnStateChange = index
|
|
110338
|
-
this.ezSelectionChange = index
|
|
110339
|
-
this.ezDoubleClick = index
|
|
110355
|
+
index.registerInstance(this, hostRef);
|
|
110356
|
+
this.ezColumnStateChange = index.createEvent(this, "ezColumnStateChange", 7);
|
|
110357
|
+
this.ezSelectionChange = index.createEvent(this, "ezSelectionChange", 7);
|
|
110358
|
+
this.ezDoubleClick = index.createEvent(this, "ezDoubleClick", 7);
|
|
110340
110359
|
this._gridController = new AgGridController(false);
|
|
110341
110360
|
this._popUpVisible = false;
|
|
110342
110361
|
/**
|
|
@@ -110422,9 +110441,9 @@ let EzGrid = class {
|
|
|
110422
110441
|
return null;
|
|
110423
110442
|
}
|
|
110424
110443
|
return [
|
|
110425
|
-
index
|
|
110426
|
-
index
|
|
110427
|
-
index
|
|
110444
|
+
index.h("div", { class: "text text--primary text--medium margin-right--medium" }, index.h("strong", { class: "text text--primary text--medium" }, `${this._navigationFirstRow}-${this._navigationLastRow}`), ` de ${this._navigationTotalRows}`),
|
|
110445
|
+
index.h("ez-button", { size: "small", iconName: "chevron-left", class: "margin-right--medium", mode: "icon", enabled: this._navigationHasPrevious, onClick: () => this._gridController.previousPage(), label: "P\u00E1gina anterior" }),
|
|
110446
|
+
index.h("ez-button", { size: "small", iconName: "chevron-right", class: "margin-right--medium", mode: "icon", enabled: this._navigationHasNext, onClick: () => this._gridController.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })
|
|
110428
110447
|
];
|
|
110429
110448
|
}
|
|
110430
110449
|
applyConfig(cols) {
|
|
@@ -110440,7 +110459,7 @@ let EzGrid = class {
|
|
|
110440
110459
|
this._popUpVisible = true;
|
|
110441
110460
|
}
|
|
110442
110461
|
render() {
|
|
110443
|
-
return (index
|
|
110462
|
+
return (index.h(index.Host, null, index.h("div", { class: "box box--shadow padding--medium grid-header" }, index.h("div", { class: "grid-header__container" }, index.h("slot", { name: "leftButtons" })), index.h("div", { class: "grid-header__container" }, this.getPaginationControl(), index.h("ez-button", { size: "small", iconName: "settings", class: "button--secondary", mode: "icon", onClick: () => { this.openConfig(); } }))), index.h("div", { class: "grid__container ag-sankhya-theme", ref: elem => this._container = elem }), index.h("div", { class: "grid__footer" }), index.h("ez-modal", { modalSize: "small", closeEsc: true, closeOutsideClick: true, opened: this._popUpVisible, onEzCloseModal: () => this._popUpVisible = false }, index.h("grid-config", { ref: ref => this._gridConfig = ref, selectedTab: "Colunas", onConfigFinish: evt => this.applyConfig(evt.detail), onConfigCancel: _evt => this.closeConfig() }))));
|
|
110444
110463
|
}
|
|
110445
110464
|
static get assetsDirs() { return ["../assets"]; }
|
|
110446
110465
|
};
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
const AssetsUtils = require('./AssetsUtils-
|
|
7
|
-
|
|
8
|
-
require('./index-6164b259.js');
|
|
6
|
+
const AssetsUtils = require('./AssetsUtils-69356e76.js');
|
|
7
|
+
require('./UnitMetadata-63c56042.js');
|
|
9
8
|
|
|
10
9
|
const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
11
10
|
|
|
@@ -264,7 +263,7 @@ let GridConfig = class {
|
|
|
264
263
|
}
|
|
265
264
|
}
|
|
266
265
|
compareWords(column, searchingText) {
|
|
267
|
-
if (
|
|
266
|
+
if (AssetsUtils.StringUtils.replaceAccentuatedChars(column.label).indexOf(AssetsUtils.StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
|
|
268
267
|
return true;
|
|
269
268
|
}
|
|
270
269
|
return false;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
require('./
|
|
6
|
+
require('./UnitMetadata-63c56042.js');
|
|
7
7
|
const FloatingManager = require('./FloatingManager-6cfeb947.js');
|
|
8
8
|
|
|
9
9
|
const ezPopoverCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--more-visible, 1);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";
|
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"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-
|
|
18
|
+
return index.bootstrapLazy([["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[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],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-calendar_16.cjs",[[0,"test-du"],[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}],[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}],[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"]}],[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}],[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[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]}],[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"_preSelection":[32],"_visibleOptions":[32]}],[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-button_3.cjs",[[1,"select-box",{"selectedOption":[1,"selected-option"]}],[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}]]],["ez-modal_2.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}],[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]]], 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"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-
|
|
17
|
+
return index.bootstrapLazy([["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-action-chip.cjs",[[1,"ez-action-chip",{"label":[513],"enabled":[516]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-label-chip.cjs",[[1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540],"setFocus":[64],"setBlur":[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],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"show":[64]}]]],["ez-calendar_16.cjs",[[0,"test-du"],[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}],[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"]}],[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}],[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"]}],[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"setFocus":[64],"setBlur":[64]}],[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"]}],[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"showHide":[64]}],[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"setFocus":[64],"setBlur":[64]}],[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]}],[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}],[1,"ez-check",{"label":[513],"value":[1540],"enabled":[516],"mode":[513],"getMode":[64],"setFocus":[64]}],[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}],[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"_preSelection":[32],"_visibleOptions":[32]}],[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}],[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"setFocus":[64],"setBlur":[64]}]]],["ez-button_3.cjs",[[1,"select-box",{"selectedOption":[1,"selected-option"]}],[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"setSelection":[64],"getSelection":[64],"getList":[64]}],[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}]]],["ez-modal_2.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}],[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -218,7 +218,7 @@ input.switchMode {
|
|
|
218
218
|
outline: none;
|
|
219
219
|
cursor: pointer;
|
|
220
220
|
border-radius: 20px;
|
|
221
|
-
border: var(--border--small
|
|
221
|
+
border: var(--border--small, 1px solid) var(--text--secondary, #a2abb9);
|
|
222
222
|
transition: background-color var(--transition);
|
|
223
223
|
|
|
224
224
|
/*public*/
|
|
@@ -257,10 +257,11 @@ input.switchMode:disabled::after {
|
|
|
257
257
|
/*-------------------------------ON---------------------------------*/
|
|
258
258
|
input.switchMode:checked {
|
|
259
259
|
/*private*/
|
|
260
|
-
transition: background-color var(--transition) border var(--
|
|
260
|
+
transition: background-color var(--transition), border var(--transition);
|
|
261
261
|
|
|
262
262
|
/*public*/
|
|
263
263
|
background-color: var(--ez-switch--checked--background-color);
|
|
264
|
+
border: var(--border--small, 1px solid) var(--color--primary, #008561);
|
|
264
265
|
}
|
|
265
266
|
|
|
266
267
|
input.switchMode::before {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApplicationContext } from "@sankhyalabs/core";
|
|
1
2
|
export default class DataBinder {
|
|
2
3
|
constructor(dataUnit) {
|
|
3
4
|
this._fields = new Map();
|
|
@@ -25,6 +26,7 @@ export default class DataBinder {
|
|
|
25
26
|
oldBind.destroy();
|
|
26
27
|
}
|
|
27
28
|
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
29
|
+
this.bindSearchOptionsLoader(fieldName, field);
|
|
28
30
|
}
|
|
29
31
|
setFieldValue(fieldName, newValue) {
|
|
30
32
|
if (this._dataUnit.records.length === 0) {
|
|
@@ -32,6 +34,17 @@ export default class DataBinder {
|
|
|
32
34
|
}
|
|
33
35
|
this._dataUnit.setFieldValue(fieldName, newValue);
|
|
34
36
|
}
|
|
37
|
+
bindSearchOptionsLoader(fieldName, field) {
|
|
38
|
+
if (field.nodeName === "EZ-SEARCH" && field["optionLoader"] === undefined) {
|
|
39
|
+
const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
|
|
40
|
+
if (loader) {
|
|
41
|
+
const fm = this._dataUnit.getField(fieldName);
|
|
42
|
+
field["optionLoader"] = (arg) => {
|
|
43
|
+
loader(arg, fm.properties, this._dataUnit);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
35
48
|
}
|
|
36
49
|
class Bind {
|
|
37
50
|
destroy() {
|
|
@@ -5,7 +5,7 @@ import { buildCheckBox, buildSwitch } from "./tpl/CheckBox.tpl";
|
|
|
5
5
|
import { buildComboBox } from "./tpl/ComboBox.tpl";
|
|
6
6
|
import { buildSearch } from "./tpl/SearchInput.tpl";
|
|
7
7
|
import { buildFile } from "./tpl/FileInput.tpl";
|
|
8
|
-
import { buildDate, buildTimeDate } from "./tpl/DateInput.tpl";
|
|
8
|
+
import { buildDate, buildTimeDate, buildTime } from "./tpl/DateInput.tpl";
|
|
9
9
|
import { buildInteger, buildDecimal } from "./tpl/NumberInput.tpl";
|
|
10
10
|
const uiBuilders = new Map();
|
|
11
11
|
uiBuilders.set(UserInterface.LONGTEXT, buildTextArea);
|
|
@@ -15,6 +15,7 @@ uiBuilders.set(UserInterface.OPTIONSELECTOR, buildComboBox);
|
|
|
15
15
|
uiBuilders.set(UserInterface.SEARCH, buildSearch);
|
|
16
16
|
uiBuilders.set(UserInterface.FILE, buildFile);
|
|
17
17
|
uiBuilders.set(UserInterface.DATE, buildDate);
|
|
18
|
+
uiBuilders.set(UserInterface.TIME, buildTime);
|
|
18
19
|
uiBuilders.set(UserInterface.DATETIME, buildTimeDate);
|
|
19
20
|
uiBuilders.set(UserInterface.DECIMALNUMBER, buildDecimal);
|
|
20
21
|
uiBuilders.set(UserInterface.INTEGERNUMBER, buildInteger);
|
|
@@ -3,6 +3,10 @@ export const buildDate = ({ name, label, readOnly }) => {
|
|
|
3
3
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
|
|
4
4
|
h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
5
5
|
};
|
|
6
|
+
export const buildTime = ({ name, label }) => {
|
|
7
|
+
return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
|
|
8
|
+
h("ez-time-input", { label: label, "data-field-name": name, key: name })));
|
|
9
|
+
};
|
|
6
10
|
export const buildTimeDate = ({ name, label }) => {
|
|
7
11
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
|
|
8
12
|
h("ez-date-time-input", { label: label, "data-field-name": name, key: name })));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export const buildSearch = ({ name, label, readOnly }) => {
|
|
3
3
|
return (h("div", { class: "col col--sd-12 col--tb-3 padding--small" },
|
|
4
|
-
h("ez-search", { enabled: !readOnly, label: label,
|
|
4
|
+
h("ez-search", { enabled: !readOnly, label: label, "data-field-name": name, key: name })));
|
|
5
5
|
};
|
|
@@ -42,6 +42,10 @@ export const buildFromDataUnit = (dataUnit) => {
|
|
|
42
42
|
}
|
|
43
43
|
return metadata;
|
|
44
44
|
};
|
|
45
|
+
function getTabConfig(tab, sheets) {
|
|
46
|
+
const tabConfig = (typeof tab === "string" ? Array.from(sheets.keys()).find(t => t.label === tab) : tab);
|
|
47
|
+
return tabConfig || { label: tab, visible: true };
|
|
48
|
+
}
|
|
45
49
|
export const buildFromConfig = (fields, dataUnit) => {
|
|
46
50
|
const sheets = new Map();
|
|
47
51
|
const requiredFields = [];
|
|
@@ -49,13 +53,13 @@ export const buildFromConfig = (fields, dataUnit) => {
|
|
|
49
53
|
fields.forEach(config => {
|
|
50
54
|
var _a;
|
|
51
55
|
if (config.visible !== false) {
|
|
52
|
-
const
|
|
53
|
-
const tabConfig = (typeof tab === "string" ? { label: tab, visible: true } : tab);
|
|
56
|
+
const tabConfig = getTabConfig(config.tab || "Geral", sheets);
|
|
54
57
|
const descriptor = dataUnit.getField(config.name);
|
|
55
58
|
if (descriptor && tabConfig.visible) {
|
|
56
59
|
if (!sheets.has(tabConfig)) {
|
|
57
60
|
sheets.set(tabConfig, new Map());
|
|
58
61
|
}
|
|
62
|
+
const tabItens = sheets.get(tabConfig);
|
|
59
63
|
const isRequired = config.required === undefined ? descriptor.required : config.required;
|
|
60
64
|
if (isRequired) {
|
|
61
65
|
requiredFields.push(config.name);
|
|
@@ -64,7 +68,6 @@ export const buildFromConfig = (fields, dataUnit) => {
|
|
|
64
68
|
if (clearOnCopy) {
|
|
65
69
|
cleanOnCopyFields.push(config.name);
|
|
66
70
|
}
|
|
67
|
-
const tabItens = sheets.get(tabConfig);
|
|
68
71
|
const fieldMD = { config, descriptor };
|
|
69
72
|
const group = config.group;
|
|
70
73
|
if (group) {
|
|
@@ -16,8 +16,9 @@ export default class DataUnitBridge {
|
|
|
16
16
|
const columnDefs = [];
|
|
17
17
|
if (this._dataUnit.metadata) {
|
|
18
18
|
this._dataUnit.metadata.fields.forEach(f => {
|
|
19
|
+
var _a;
|
|
19
20
|
if (f.visible !== false) {
|
|
20
|
-
columnDefs.push({ label: f.label, name: f.name, userInterface: f.userInterface, options: this._dataUnit.getField(f.name).properties.options });
|
|
21
|
+
columnDefs.push({ label: f.label, name: f.name, userInterface: f.userInterface, options: (_a = this._dataUnit.getField(f.name).properties) === null || _a === void 0 ? void 0 : _a.options });
|
|
21
22
|
}
|
|
22
23
|
});
|
|
23
24
|
}
|
|
@@ -97,9 +97,11 @@ export default class AgGridController {
|
|
|
97
97
|
headerName: "",
|
|
98
98
|
checkboxSelection: true,
|
|
99
99
|
headerCheckboxSelection: false,
|
|
100
|
-
width:
|
|
100
|
+
width: 28,
|
|
101
101
|
suppressMovable: true,
|
|
102
|
-
|
|
102
|
+
suppressAutoSize: true,
|
|
103
|
+
suppressMenu: true,
|
|
104
|
+
lockPosition: true
|
|
103
105
|
});
|
|
104
106
|
}
|
|
105
107
|
cols.forEach(c => {
|
|
@@ -37,6 +37,11 @@ svg {
|
|
|
37
37
|
width: 30px;
|
|
38
38
|
height: 30px;
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
[class^="ez-icon-"], [class*=" ez-icon-"] {
|
|
42
|
+
color: var(--ez-icon--color);
|
|
43
|
+
}
|
|
44
|
+
|
|
40
45
|
/*
|
|
41
46
|
START CSS GENERATED BY EZ-DESIGN ICONS, SEE MORE AT ez-design\scripts\fontsGenerator.js.
|
|
42
47
|
WHEN ADD NEW ICONS THIS CSS NEED TO BE UPDATED
|