@sankhyalabs/ezui 0.0.0-feat-dev-KB-66041.0 → 0.0.0-feat-dev-KB-83343.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/{DataBinder-38d9641c.js → DataBinder-e92314c2.js} +12 -42
- package/dist/cjs/ez-check.cjs.entry.js +10 -18
- package/dist/cjs/ez-combo-box.cjs.entry.js +7 -3
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -3
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -3
- package/dist/cjs/ez-dialog.cjs.entry.js +3 -1
- package/dist/cjs/ez-form.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +4 -9
- package/dist/cjs/ez-modal-container.cjs.entry.js +5 -1
- package/dist/cjs/ez-modal.cjs.entry.js +5 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -3
- package/dist/cjs/ez-popup.cjs.entry.js +5 -1
- package/dist/cjs/ez-search.cjs.entry.js +1 -3
- package/dist/cjs/ez-text-area.cjs.entry.js +2 -19
- package/dist/cjs/ez-text-input.cjs.entry.js +2 -20
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -3
- 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 +0 -9
- package/dist/collection/components/ez-check/ez-check.js +9 -34
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +9 -39
- package/dist/collection/components/ez-date-input/ez-date-input.js +1 -38
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +1 -38
- package/dist/collection/components/ez-dialog/ez-dialog.js +3 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
- package/dist/collection/components/ez-grid/ez-grid.js +2 -7
- package/dist/collection/components/ez-modal/ez-modal.js +5 -1
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +5 -1
- package/dist/collection/components/ez-number-input/ez-number-input.js +1 -38
- package/dist/collection/components/ez-popup/ez-popup.js +5 -1
- package/dist/collection/components/ez-search/ez-search.js +1 -38
- package/dist/collection/components/ez-text-area/ez-text-area.js +2 -54
- package/dist/collection/components/ez-text-input/ez-text-input.js +2 -55
- package/dist/collection/components/ez-time-input/ez-time-input.js +1 -38
- package/dist/collection/utils/form/DataBinder.js +13 -43
- package/dist/collection/utils/form/test/DataBinder.test.js +0 -14
- package/dist/custom-elements/index.js +69 -139
- package/dist/esm/{DataBinder-6fa75348.js → DataBinder-9c877244.js} +13 -43
- package/dist/esm/ez-check.entry.js +10 -18
- package/dist/esm/ez-combo-box.entry.js +7 -3
- package/dist/esm/ez-date-input.entry.js +1 -3
- package/dist/esm/ez-date-time-input.entry.js +1 -3
- package/dist/esm/ez-dialog.entry.js +3 -1
- package/dist/esm/ez-form.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +4 -9
- package/dist/esm/ez-modal-container.entry.js +5 -1
- package/dist/esm/ez-modal.entry.js +5 -1
- package/dist/esm/ez-number-input.entry.js +1 -3
- package/dist/esm/ez-popup.entry.js +5 -1
- package/dist/esm/ez-search.entry.js +1 -3
- package/dist/esm/ez-text-area.entry.js +2 -19
- package/dist/esm/ez-text-input.entry.js +2 -20
- package/dist/esm/ez-time-input.entry.js +1 -3
- 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-03c106f6.entry.js +1 -0
- package/dist/ezui/p-13249c07.entry.js +1 -0
- package/dist/ezui/p-17de16e5.entry.js +1 -0
- package/dist/ezui/p-31b71e50.entry.js +1 -0
- package/dist/ezui/p-65027df5.entry.js +1 -0
- package/dist/ezui/p-7ba0048a.entry.js +1 -0
- package/dist/ezui/p-7fdd479f.entry.js +1 -0
- package/dist/ezui/{p-db13a384.entry.js → p-81ab1e3f.entry.js} +1 -1
- package/dist/ezui/p-9c5cd3b2.entry.js +1 -0
- package/dist/ezui/{p-f9904dc9.entry.js → p-9c92c695.entry.js} +2 -2
- package/dist/ezui/p-acddfb2e.js +1 -0
- package/dist/ezui/p-bac0f920.entry.js +1 -0
- package/dist/ezui/p-c1527804.entry.js +1 -0
- package/dist/ezui/p-cd07f8be.entry.js +1 -0
- package/dist/ezui/p-e3544d23.entry.js +1 -0
- package/dist/ezui/p-fd0a19d6.entry.js +1 -0
- package/dist/types/components/ez-check/ez-check.d.ts +2 -7
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +2 -8
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +0 -8
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +0 -8
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +1 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +2 -0
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +2 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +0 -8
- package/dist/types/components/ez-popup/ez-popup.d.ts +2 -0
- package/dist/types/components/ez-search/ez-search.d.ts +0 -8
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +0 -10
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +0 -10
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +0 -8
- package/dist/types/components.d.ts +0 -136
- package/dist/types/utils/form/DataBinder.d.ts +2 -4
- package/package.json +1 -1
- package/dist/ezui/p-248d4f54.entry.js +0 -1
- package/dist/ezui/p-3d912d9e.entry.js +0 -1
- package/dist/ezui/p-41bbb1b1.entry.js +0 -1
- package/dist/ezui/p-4e0628a7.entry.js +0 -1
- package/dist/ezui/p-6fb1562b.entry.js +0 -1
- package/dist/ezui/p-751e8bda.js +0 -1
- package/dist/ezui/p-84b1c99e.entry.js +0 -1
- package/dist/ezui/p-96481958.entry.js +0 -1
- package/dist/ezui/p-ac8039cd.entry.js +0 -1
- package/dist/ezui/p-addb4c07.entry.js +0 -1
- package/dist/ezui/p-b21a34c2.entry.js +0 -1
- package/dist/ezui/p-d105d060.entry.js +0 -1
- package/dist/ezui/p-ea54d056.entry.js +0 -1
- package/dist/ezui/p-f6a3da01.entry.js +0 -1
|
@@ -107,19 +107,15 @@ class RecordValidationProcessor {
|
|
|
107
107
|
class DataBinder {
|
|
108
108
|
constructor(dataUnit) {
|
|
109
109
|
this.onDataUnitEvent = (action) => {
|
|
110
|
-
var _a;
|
|
110
|
+
var _a, _b;
|
|
111
111
|
switch (action.type) {
|
|
112
|
-
case core.Action.MULTIPLE_EDITION_CHANGED:
|
|
113
|
-
case core.Action.SELECTION_CHANGED:
|
|
114
|
-
this.clearInvalid();
|
|
115
|
-
this.updateAllFieldsValues();
|
|
116
|
-
break;
|
|
117
112
|
case core.Action.DATA_LOADED:
|
|
118
113
|
case core.Action.DATA_SAVED:
|
|
119
114
|
case core.Action.RECORDS_REMOVED:
|
|
120
115
|
case core.Action.RECORDS_ADDED:
|
|
121
116
|
case core.Action.RECORDS_COPIED:
|
|
122
117
|
case core.Action.EDITION_CANCELED:
|
|
118
|
+
case core.Action.SELECTION_CHANGED:
|
|
123
119
|
case core.Action.NEXT_SELECTED:
|
|
124
120
|
case core.Action.PREVIOUS_SELECTED:
|
|
125
121
|
this.clearInvalid();
|
|
@@ -127,11 +123,13 @@ class DataBinder {
|
|
|
127
123
|
case core.Action.CHANGE_UNDONE:
|
|
128
124
|
case core.Action.CHANGE_REDONE:
|
|
129
125
|
case core.Action.RECORD_LOADED:
|
|
130
|
-
this.
|
|
126
|
+
(_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
|
|
127
|
+
this.updateValue(field.fieldName, field.field);
|
|
128
|
+
});
|
|
131
129
|
this.clearFieldError(Object.keys(action.payload)[0]);
|
|
132
130
|
break;
|
|
133
131
|
case core.Action.FIELD_INVALIDATED:
|
|
134
|
-
(
|
|
132
|
+
(_b = this._fields) === null || _b === void 0 ? void 0 : _b.forEach(field => {
|
|
135
133
|
this.updateErrorMessage(field.fieldName, field.field);
|
|
136
134
|
});
|
|
137
135
|
break;
|
|
@@ -229,21 +227,13 @@ class DataBinder {
|
|
|
229
227
|
this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
|
|
230
228
|
}
|
|
231
229
|
}
|
|
232
|
-
|
|
230
|
+
updateValue(fieldName, field) {
|
|
233
231
|
const bind = this._fields.get(fieldName);
|
|
234
232
|
try {
|
|
235
|
-
if (bind)
|
|
233
|
+
if (bind) {
|
|
236
234
|
bind.listen = false;
|
|
237
|
-
if (this._dataUnit.isMultipleEdition && this.hasMultipleValuesBetweenRecords(fieldName)) {
|
|
238
|
-
field['value'] = undefined;
|
|
239
|
-
field['forceLabelFloat'] = true;
|
|
240
|
-
field['alternativeLabel'] = 'Múltiplos Valores';
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
244
|
-
field['forceLabelFloat'] = false;
|
|
245
|
-
field['alternativeLabel'] = undefined;
|
|
246
235
|
}
|
|
236
|
+
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
247
237
|
this.updateErrorMessage(fieldName, field);
|
|
248
238
|
}
|
|
249
239
|
finally {
|
|
@@ -252,14 +242,6 @@ class DataBinder {
|
|
|
252
242
|
}
|
|
253
243
|
}
|
|
254
244
|
}
|
|
255
|
-
hasMultipleValuesBetweenRecords(key) {
|
|
256
|
-
var _a, _b;
|
|
257
|
-
const selectedRecords = (_b = (_a = this._dataUnit.getSelectionInfo()) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : [];
|
|
258
|
-
if (selectedRecords.length <= 1)
|
|
259
|
-
return false;
|
|
260
|
-
const firstValue = selectedRecords[0][key];
|
|
261
|
-
return !selectedRecords.every(record => core.ObjectUtils.equals(record[key], firstValue));
|
|
262
|
-
}
|
|
263
245
|
validate() {
|
|
264
246
|
return this._recordValidatorProcessor.validate();
|
|
265
247
|
}
|
|
@@ -298,7 +280,7 @@ class DataBinder {
|
|
|
298
280
|
oldBind.destroy();
|
|
299
281
|
}
|
|
300
282
|
this.bindSearchOptionsLoader(fieldName, field);
|
|
301
|
-
this.
|
|
283
|
+
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
302
284
|
this.updateErrorMessage(fieldName, field);
|
|
303
285
|
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName) => this.cancelWaitingChange(fieldName), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
304
286
|
this.applyEzUploadContext(fieldName, field);
|
|
@@ -340,14 +322,8 @@ class DataBinder {
|
|
|
340
322
|
this._dataUnit.addRecord();
|
|
341
323
|
}
|
|
342
324
|
this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
this._dataUnit.setFieldValue(fieldName, newValue, selectionInfo.recordIds);
|
|
346
|
-
}
|
|
347
|
-
else {
|
|
348
|
-
const record = this._dataUnit.getSelectedRecord();
|
|
349
|
-
this._dataUnit.setFieldValue(fieldName, newValue, record ? [record.__record__id__] : undefined);
|
|
350
|
-
}
|
|
325
|
+
const record = this._dataUnit.getSelectedRecord();
|
|
326
|
+
this._dataUnit.setFieldValue(fieldName, newValue, record ? [record.__record__id__] : undefined);
|
|
351
327
|
if (this._dataUnit.waitingForChange(fieldName)) {
|
|
352
328
|
const bind = this._fields.get(fieldName);
|
|
353
329
|
if (bind) {
|
|
@@ -378,12 +354,6 @@ class DataBinder {
|
|
|
378
354
|
field["maxFiles"] = ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.MAX_FILES) || 0;
|
|
379
355
|
}
|
|
380
356
|
}
|
|
381
|
-
updateAllFieldsValues() {
|
|
382
|
-
var _a;
|
|
383
|
-
(_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
|
|
384
|
-
this.updateFieldValue(field.fieldName, field.field);
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
357
|
interceptAction(action) {
|
|
388
358
|
if (action.type === core.Action.RECORDS_COPIED) {
|
|
389
359
|
const cleanFields = this._formMetadata.getCleanOnCopyFields();
|
|
@@ -6,14 +6,13 @@ const index = require('./index-a7b0c73d.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const CheckMode = require('./CheckMode-ecb90b87.js');
|
|
8
8
|
|
|
9
|
-
const ezCheckCss = ":host{--ez-check--box--width:20px;--ez-check--box--height:20px;--ez-check--width:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--height:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--indeterminate--image:url('data:image/svg+xml;utf8,<svg width=\"10\" height=\"2\" viewBox=\"0 0 10 2\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 1,0 h 8 c 0.554,0 1,0.446 1,1 0,0.554 -0.446,1 -1,1 H 1 C 0.446,2 0,1.554 0,1 0,0.446 0.446,0 1,0 Z\" /></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;align-items:center;margin:0;max-width:100%}input.regular-mode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative}input.compact{margin-right:0px}input.regular-mode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regular-mode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regular-mode:disabled{cursor:auto;background:none}input.regular-mode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regular-mode:disabled::before{border:var(--ez-check--disabled--border)}input.regular-mode:checked:enabled:hover,input.regular-mode:indeterminate:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regular-mode:checked:enabled:focus,input.regular-mode:indeterminate:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regular-mode:checked::before,input.regular-mode:indeterminate::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regular-mode:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regular-mode:checked::after,input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:10px;height:2px;-webkit-mask-image:var(--ez-check--indeterminate--image);mask-image:var(--ez-check--indeterminate--image)}input.regular-mode:checked:disabled::after,input.regular-mode:indeterminate:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switch-mode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switch-mode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switch-mode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switch-mode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switch-mode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switch-mode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switch-mode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;width:inherit
|
|
9
|
+
const ezCheckCss = ":host{--ez-check--box--width:20px;--ez-check--box--height:20px;--ez-check--width:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--height:calc(var(--ez-check--box--width) + var(--ez-check--outter-gap, 14px));--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url('data:image/svg+xml;utf8,<svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z\"/></svg>');--ez-check--indeterminate--image:url('data:image/svg+xml;utf8,<svg width=\"10\" height=\"2\" viewBox=\"0 0 10 2\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 1,0 h 8 c 0.554,0 1,0.446 1,1 0,0.554 -0.446,1 -1,1 H 1 C 0.446,2 0,1.554 0,1 0,0.446 0.446,0 1,0 Z\" /></svg>');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;align-items:center;margin:0;max-width:100%}input.regular-mode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative}input.compact{margin-right:0px}input.regular-mode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regular-mode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regular-mode:disabled{cursor:auto;background:none}input.regular-mode::before{box-sizing:border-box;content:\"\";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regular-mode:disabled::before{border:var(--ez-check--disabled--border)}input.regular-mode:checked:enabled:hover,input.regular-mode:indeterminate:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regular-mode:checked:enabled:focus,input.regular-mode:indeterminate:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regular-mode:checked::before,input.regular-mode:indeterminate::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regular-mode:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regular-mode:checked::after,input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regular-mode:indeterminate:after{display:flex;position:absolute;content:\"\";background-color:var(--ez-check--check--background-color);width:10px;height:2px;-webkit-mask-image:var(--ez-check--indeterminate--image);mask-image:var(--ez-check--indeterminate--image)}input.regular-mode:checked:disabled::after,input.regular-mode:indeterminate:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switch-mode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switch-mode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switch-mode::after{content:\"\";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switch-mode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode::before{display:block;content:\"\";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switch-mode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switch-mode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switch-mode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;width:inherit}.label--disabled{color:var(--ez-check--label--disabled--color)}.label--padding{padding-left:var(--space--extra-small)}";
|
|
10
10
|
|
|
11
11
|
const EzCheck = class {
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
14
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
15
15
|
this.label = undefined;
|
|
16
|
-
this.alternativeLabel = undefined;
|
|
17
16
|
this.value = undefined;
|
|
18
17
|
this.enabled = true;
|
|
19
18
|
this.indeterminate = undefined;
|
|
@@ -65,32 +64,25 @@ const EzCheck = class {
|
|
|
65
64
|
this.ezChange.emit(this.value);
|
|
66
65
|
}
|
|
67
66
|
getLabelClasses() {
|
|
68
|
-
const classes = [
|
|
67
|
+
const classes = ["label"];
|
|
69
68
|
if (!this.enabled) {
|
|
70
|
-
classes.push(
|
|
69
|
+
classes.push("label--disabled");
|
|
71
70
|
}
|
|
72
71
|
if (!this.compact) {
|
|
73
|
-
classes.push(
|
|
72
|
+
classes.push("label--padding");
|
|
74
73
|
}
|
|
75
|
-
return classes.join(
|
|
74
|
+
return classes.join(" ");
|
|
76
75
|
}
|
|
77
76
|
getInputClasses() {
|
|
78
77
|
var _a;
|
|
79
|
-
const classes = [
|
|
80
|
-
classes.push(((_a = this.mode) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === CheckMode.CheckMode.SWITCH ?
|
|
78
|
+
const classes = [""];
|
|
79
|
+
classes.push(((_a = this.mode) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === CheckMode.CheckMode.SWITCH ? "switch-mode" : "regular-mode");
|
|
81
80
|
if (this.compact)
|
|
82
|
-
classes.push(
|
|
83
|
-
return classes.join(
|
|
81
|
+
classes.push("compact");
|
|
82
|
+
return classes.join(" ");
|
|
84
83
|
}
|
|
85
84
|
render() {
|
|
86
|
-
return (index.h(index.Host, null, index.h("input", { type: "checkbox", ref: (el) => this._inputElem = el, class: this.getInputClasses(), checked: this.value === true, onChange: () => {
|
|
87
|
-
this.changeValue();
|
|
88
|
-
}, indeterminate: this.indeterminate, disabled: !this.enabled, "data-element-id": core.ElementIDUtils.getInternalIDInfo('input') }), this.renderLabel()));
|
|
89
|
-
}
|
|
90
|
-
renderLabel() {
|
|
91
|
-
if (!this.label)
|
|
92
|
-
return undefined;
|
|
93
|
-
return (index.h("label", { class: this.getLabelClasses(), onClick: () => this.changeValue(), title: this.label }, this.label, " ", this.alternativeLabel ? index.h("span", { class: "label-alternative" }, this.alternativeLabel) : undefined));
|
|
85
|
+
return (index.h(index.Host, null, index.h("input", { type: "checkbox", ref: (el) => this._inputElem = el, class: this.getInputClasses(), checked: this.value === true, onChange: () => { this.changeValue(); }, indeterminate: this.indeterminate, disabled: !this.enabled, "data-element-id": core.ElementIDUtils.getInternalIDInfo("input") }), this.label ? index.h("label", { class: this.getLabelClasses(), onClick: () => { this.changeValue(); }, title: this.label }, this.label) : undefined));
|
|
94
86
|
}
|
|
95
87
|
get _element() { return index.getElement(this); }
|
|
96
88
|
static get watchers() { return {
|
|
@@ -29,6 +29,7 @@ const EzComboBox = class {
|
|
|
29
29
|
this._startLoading = false;
|
|
30
30
|
this._showLoading = true;
|
|
31
31
|
this._criteria = undefined;
|
|
32
|
+
this._textInputReady = undefined;
|
|
32
33
|
this.limitCharsToSearch = 3;
|
|
33
34
|
this.value = undefined;
|
|
34
35
|
this.label = undefined;
|
|
@@ -47,8 +48,6 @@ const EzComboBox = class {
|
|
|
47
48
|
this.listOptionsPosition = undefined;
|
|
48
49
|
this.isTextSearch = false;
|
|
49
50
|
this.autoFocus = false;
|
|
50
|
-
this.alternativeLabel = undefined;
|
|
51
|
-
this.forceLabelFloat = false;
|
|
52
51
|
}
|
|
53
52
|
observeErrorMessage() {
|
|
54
53
|
var _a;
|
|
@@ -310,6 +309,11 @@ const EzComboBox = class {
|
|
|
310
309
|
//---------------------------------------------
|
|
311
310
|
// Lifecycle web component
|
|
312
311
|
//---------------------------------------------
|
|
312
|
+
componentDidRender() {
|
|
313
|
+
if (this._textInput) {
|
|
314
|
+
this._textInputReady = true;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
313
317
|
componentWillLoad() {
|
|
314
318
|
if (this.options === undefined) {
|
|
315
319
|
this.options = [];
|
|
@@ -453,7 +457,7 @@ const EzComboBox = class {
|
|
|
453
457
|
render() {
|
|
454
458
|
var _a;
|
|
455
459
|
core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
456
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), class: `text-input-slot-container ${this.suppressSearch ? "suppressed-search-input" : ""}`, ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode
|
|
460
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), class: `text-input-slot-container ${this.suppressSearch ? "suppressed-search-input" : ""}`, ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, index.h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, index.h("ez-icon", { iconName: "chevron-down" }))), index.h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this._textInput, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', onEzVisibilityChange: event => this.isOpen = event.detail }, index.h("ez-combo-box-list", { ref: ref => this._comboBoxList = ref, showLoading: this._showLoading, visibleOptions: this._visibleOptions, textEmptyList: this._textEmptyList, showOptionValue: this.showOptionValue, preSelection: this._preSelection, maxWidth: this._maxWidthValue, width: (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.clientWidth, onOptionSelect: (opt) => this.selectOption(opt), onOptionHover: (index) => this._preSelection = index }))));
|
|
457
461
|
}
|
|
458
462
|
get el() { return index.getElement(this); }
|
|
459
463
|
static get watchers() { return {
|
|
@@ -24,8 +24,6 @@ const EzDateInput = class {
|
|
|
24
24
|
this.mode = "regular";
|
|
25
25
|
this.canShowError = true;
|
|
26
26
|
this.autoFocus = false;
|
|
27
|
-
this.alternativeLabel = undefined;
|
|
28
|
-
this.forceLabelFloat = false;
|
|
29
27
|
}
|
|
30
28
|
observeLabel() {
|
|
31
29
|
if (this._textInput) {
|
|
@@ -176,7 +174,7 @@ const EzDateInput = class {
|
|
|
176
174
|
}
|
|
177
175
|
render() {
|
|
178
176
|
core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
179
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError
|
|
177
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }, index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => { var _a; return (_a = this._popover) === null || _a === void 0 ? void 0 : _a.showUnder(this._textInput); }, slot: "leftIcon" })), index.h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this._textInput, autoClose: true, boxWidth: 'fit-content', overlayType: 'none' }, index.h("ez-calendar", { ref: elem => this._calendar = elem, "data-element-id": core.ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); } }))));
|
|
180
178
|
}
|
|
181
179
|
get _elem() { return index.getElement(this); }
|
|
182
180
|
static get watchers() { return {
|
|
@@ -25,8 +25,6 @@ const EzDateTimeInput = class {
|
|
|
25
25
|
this.mode = "regular";
|
|
26
26
|
this.canShowError = true;
|
|
27
27
|
this.autoFocus = false;
|
|
28
|
-
this.alternativeLabel = undefined;
|
|
29
|
-
this.forceLabelFloat = false;
|
|
30
28
|
}
|
|
31
29
|
observeLabel() {
|
|
32
30
|
if (this._textInput) {
|
|
@@ -227,7 +225,7 @@ const EzDateTimeInput = class {
|
|
|
227
225
|
}
|
|
228
226
|
render() {
|
|
229
227
|
core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
230
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick(), canShowError: this.canShowError
|
|
228
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick(), canShowError: this.canShowError }, index.h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => { var _a; return (_a = this._popover) === null || _a === void 0 ? void 0 : _a.showUnder(this._textInput); }, slot: "leftIcon" })), index.h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this._textInput, autoClose: true, boxWidth: 'fit-content', overlayType: 'none' }, index.h("ez-calendar", { ref: elem => this._calendar = elem, "data-element-id": core.ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, time: true, showSeconds: this.showSeconds }))));
|
|
231
229
|
}
|
|
232
230
|
get _elem() { return index.getElement(this); }
|
|
233
231
|
static get watchers() { return {
|
|
@@ -160,7 +160,7 @@ const EzDialog = class {
|
|
|
160
160
|
}
|
|
161
161
|
componentDidLoad() {
|
|
162
162
|
core.ElementIDUtils.addIDInfo(this._element);
|
|
163
|
-
new core.KeyboardManager({ propagate: false, element: this._element })
|
|
163
|
+
this._keyboardManager = new core.KeyboardManager({ propagate: false, element: this._element })
|
|
164
164
|
.bind("Enter", () => this.handleButtonClick(true), { description: "Botão de confirmação ou OK", element: this._element })
|
|
165
165
|
.bind("Escape", () => this.handleButtonClick(false), { description: "Botão de fechar ou x", element: this._element })
|
|
166
166
|
.bind("Esc", () => this.handleButtonClick(false), { description: "Botão de fechar ou x", element: this._element });
|
|
@@ -192,8 +192,10 @@ const EzDialog = class {
|
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
disconnectedCallback() {
|
|
195
|
+
var _a;
|
|
195
196
|
FocusResolver.FocusResolver.resolveFocus(this._lastActiveElement);
|
|
196
197
|
this._lastActiveElement = undefined;
|
|
198
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
197
199
|
}
|
|
198
200
|
render() {
|
|
199
201
|
if (this.opened && this._currentMessage) {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const DataBinder = require('./DataBinder-
|
|
7
|
+
const DataBinder = require('./DataBinder-e92314c2.js');
|
|
8
8
|
const FormLayout = require('./FormLayout-c2451c7f.js');
|
|
9
9
|
require('./ApplicationUtils-c9d1205c.js');
|
|
10
10
|
require('./DialogType-2114c337.js');
|
|
@@ -11,7 +11,7 @@ require('./CheckMode-ecb90b87.js');
|
|
|
11
11
|
const ICustomRender = require('./ICustomRender-6fafffce.js');
|
|
12
12
|
require('./FormLayout-c2451c7f.js');
|
|
13
13
|
const constants = require('./constants-2714478b.js');
|
|
14
|
-
const DataBinder = require('./DataBinder-
|
|
14
|
+
const DataBinder = require('./DataBinder-e92314c2.js');
|
|
15
15
|
const FocusResolver = require('./FocusResolver-885f2173.js');
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -65337,7 +65337,7 @@ class AgGridController {
|
|
|
65337
65337
|
}
|
|
65338
65338
|
syncSelectWithDataUnit() {
|
|
65339
65339
|
const rowNode = this._gridOptions.api.getRowNode(this._dataUnit.getSelectedRecord().__record__id__);
|
|
65340
|
-
if (
|
|
65340
|
+
if ((rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex) < 0)
|
|
65341
65341
|
return;
|
|
65342
65342
|
const rowRange = this._gridOptions.api.getCellRanges().find(row => row.startRow.rowIndex === rowNode.rowIndex);
|
|
65343
65343
|
if ((rowRange === null || rowRange === void 0 ? void 0 : rowRange.columns.length) > 0) {
|
|
@@ -66619,13 +66619,8 @@ const EzGrid = class {
|
|
|
66619
66619
|
}, { description: "Avança para a próxima página.", element: this._element });
|
|
66620
66620
|
}
|
|
66621
66621
|
async removeShortcuts() {
|
|
66622
|
-
|
|
66623
|
-
|
|
66624
|
-
.unbind("ctrl + .")
|
|
66625
|
-
.unbind("ctrl + ,")
|
|
66626
|
-
.unbind("ctrl + alt + ArrowLeft")
|
|
66627
|
-
.unbind("ctrl + alt + ArrowRight");
|
|
66628
|
-
}
|
|
66622
|
+
var _a;
|
|
66623
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
66629
66624
|
}
|
|
66630
66625
|
render() {
|
|
66631
66626
|
var _a;
|
|
@@ -54,11 +54,15 @@ const EzModalContainer = class {
|
|
|
54
54
|
this.ezModalAction.emit(ModalAction$1.LOAD);
|
|
55
55
|
this._modalRef.focus();
|
|
56
56
|
});
|
|
57
|
-
new core.KeyboardManager({ propagate: false, element: this._element })
|
|
57
|
+
this._keyboardManager = new core.KeyboardManager({ propagate: false, element: this._element })
|
|
58
58
|
.bind("Enter", this.ezModalAction.emit.bind(ModalAction$1.OK))
|
|
59
59
|
.bind("Escape", () => this.closeModal())
|
|
60
60
|
.bind("Esc", () => this.closeModal());
|
|
61
61
|
}
|
|
62
|
+
disconnectedCallback() {
|
|
63
|
+
var _a;
|
|
64
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
65
|
+
}
|
|
62
66
|
closeModal() {
|
|
63
67
|
this.ezModalAction.emit("CLOSE");
|
|
64
68
|
}
|
|
@@ -36,7 +36,7 @@ const EzModal = class {
|
|
|
36
36
|
}
|
|
37
37
|
componentDidLoad() {
|
|
38
38
|
this.observeOpened();
|
|
39
|
-
new core.KeyboardManager({ propagate: false, element: this._element, enableShadowDom: true })
|
|
39
|
+
this._keyboardManager = new core.KeyboardManager({ propagate: false, element: this._element, enableShadowDom: true })
|
|
40
40
|
.bind("Enter", this.ezModalAction.emit.bind("OK"))
|
|
41
41
|
.bind("Escape", () => this.closeModal())
|
|
42
42
|
.bind("Esc", () => this.closeModal());
|
|
@@ -44,6 +44,10 @@ const EzModal = class {
|
|
|
44
44
|
componentDidRender() {
|
|
45
45
|
this.modalFocus();
|
|
46
46
|
}
|
|
47
|
+
disconnectedCallback() {
|
|
48
|
+
var _a;
|
|
49
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
50
|
+
}
|
|
47
51
|
modalFocus() {
|
|
48
52
|
if (!this.opened) {
|
|
49
53
|
return;
|
|
@@ -28,8 +28,6 @@ const EzNumberInput = class {
|
|
|
28
28
|
this.prettyPrecision = undefined;
|
|
29
29
|
this.mode = "regular";
|
|
30
30
|
this.autoFocus = false;
|
|
31
|
-
this.alternativeLabel = undefined;
|
|
32
|
-
this.forceLabelFloat = false;
|
|
33
31
|
}
|
|
34
32
|
/**
|
|
35
33
|
* Aplica o foco no campo.
|
|
@@ -188,7 +186,7 @@ const EzNumberInput = class {
|
|
|
188
186
|
if (this.allowNegative) {
|
|
189
187
|
restrict += '-';
|
|
190
188
|
}
|
|
191
|
-
return (index.h("ez-text-input", { class: "number__input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: restrict, enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError, value: this._value
|
|
189
|
+
return (index.h("ez-text-input", { class: "number__input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: restrict, enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError, value: this._value }));
|
|
192
190
|
}
|
|
193
191
|
get _elem() { return index.getElement(this); }
|
|
194
192
|
static get watchers() { return {
|
|
@@ -35,11 +35,15 @@ const EzPopup = class {
|
|
|
35
35
|
if (this.opened && this._popupRef) {
|
|
36
36
|
this._popupRef.focus();
|
|
37
37
|
}
|
|
38
|
-
new core.KeyboardManager({ propagate: false, element: this._element, enableShadowDom: true })
|
|
38
|
+
this._keyboardManager = new core.KeyboardManager({ propagate: false, element: this._element, enableShadowDom: true })
|
|
39
39
|
.bind("Enter", this.ezPopupAction.emit.bind("OK"))
|
|
40
40
|
.bind("Escape", () => this.closePopup())
|
|
41
41
|
.bind("Esc", () => this.closePopup());
|
|
42
42
|
}
|
|
43
|
+
disconnectedCallback() {
|
|
44
|
+
var _a;
|
|
45
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
46
|
+
}
|
|
43
47
|
closePopup() {
|
|
44
48
|
this.opened = false;
|
|
45
49
|
this.manageOverflow();
|
|
@@ -55,8 +55,6 @@ const EzSearch = class {
|
|
|
55
55
|
this.ensureClearButtonVisible = false;
|
|
56
56
|
this.suppressPreLoad = true;
|
|
57
57
|
this.autoFocus = false;
|
|
58
|
-
this.alternativeLabel = undefined;
|
|
59
|
-
this.forceLabelFloat = false;
|
|
60
58
|
}
|
|
61
59
|
observeErrorMessage() {
|
|
62
60
|
var _a;
|
|
@@ -611,7 +609,7 @@ const EzSearch = class {
|
|
|
611
609
|
render() {
|
|
612
610
|
var _a;
|
|
613
611
|
core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
614
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode
|
|
612
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, index.h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, this.canShowLoadSpinDescription() ? index.h("div", { class: "message__loading" }) : index.h("ez-icon", { iconName: "search" })), (((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value) || this.ensureClearButtonVisible)
|
|
615
613
|
? index.h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, index.h("ez-icon", { iconName: "close" }))
|
|
616
614
|
: undefined), index.h("ez-popover-plus", { ref: elem => this._ezPopOverPlusElement = elem, autoClose: false, overlayType: "none", useAnchorSize: true, anchorElement: [this._textInput, this.el] }, index.h("search-list", { ref: (ref) => this._searchList = ref, showLoading: this._showLoading, visibleOptions: this._visibleOptions, textEmptyList: this._textEmptyList, canShowListOptions: this.canShowListOptions(), value: this.value, showOptionValue: this.showOptionValue, preSelection: this._preSelection, onChangeValue: ({ detail }) => this.selectOption(detail), onChangePreSelection: ({ detail }) => this.onChangePreSelection(detail) }))));
|
|
617
615
|
}
|
|
@@ -23,8 +23,6 @@ const EzTextArea = class {
|
|
|
23
23
|
this.enableResize = true;
|
|
24
24
|
this.autoRows = false;
|
|
25
25
|
this.autoFocus = false;
|
|
26
|
-
this.alternativeLabel = undefined;
|
|
27
|
-
this.forceLabelFloat = false;
|
|
28
26
|
}
|
|
29
27
|
observeErrorMessage() {
|
|
30
28
|
var _a, _b, _c, _d;
|
|
@@ -123,8 +121,6 @@ const EzTextArea = class {
|
|
|
123
121
|
return this._inputElem && (this.value || "") !== this._inputElem.value;
|
|
124
122
|
}
|
|
125
123
|
adjustFloatingLabel() {
|
|
126
|
-
if (this.forceLabelFloat)
|
|
127
|
-
return;
|
|
128
124
|
if (this.label && this._labelElem) {
|
|
129
125
|
const hasValue = this.value && this.value.toString().length > 0;
|
|
130
126
|
const containsFloatedClass = this._labelElem.classList.contains("textarea__label--floated");
|
|
@@ -208,19 +204,6 @@ const EzTextArea = class {
|
|
|
208
204
|
var _a;
|
|
209
205
|
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
210
206
|
}
|
|
211
|
-
buildPlaceholder() {
|
|
212
|
-
if (this.alternativeLabel)
|
|
213
|
-
return this.alternativeLabel;
|
|
214
|
-
return (this.mode === "slim" && this.label) ? this.label : '';
|
|
215
|
-
}
|
|
216
|
-
buildLabelClass() {
|
|
217
|
-
let classList = this.enabled ? 'textarea__label' : 'textarea__label textarea__label--disabled';
|
|
218
|
-
if (this.errorMessage)
|
|
219
|
-
classList = classList + ' hasError';
|
|
220
|
-
if (this.forceLabelFloat)
|
|
221
|
-
classList = classList + ' textarea__label--floated';
|
|
222
|
-
return classList;
|
|
223
|
-
}
|
|
224
207
|
//---------------------------------------------
|
|
225
208
|
// Lifecycle web component
|
|
226
209
|
//---------------------------------------------
|
|
@@ -237,11 +220,11 @@ const EzTextArea = class {
|
|
|
237
220
|
render() {
|
|
238
221
|
core.ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
239
222
|
return (index.h(index.Host, null, index.h("div", { class: `textarea ${this.enabled ? "" : "textarea--disabled"}`, ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
|
|
240
|
-
index.h("label", { ref: (el) => this._labelElem = el, class: this.
|
|
223
|
+
index.h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "textarea__label" : "textarea__label textarea__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
241
224
|
: null, index.h("textarea", { onFocus: () => this.handleFocus(), "data-element-id": core.ElementIDUtils.getInternalIDInfo("input"), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: {
|
|
242
225
|
"textarea--slim": this.mode === "slim",
|
|
243
226
|
"textarea--resizable": this.enableResize
|
|
244
|
-
}, placeholder: this.
|
|
227
|
+
}, placeholder: this.mode === "slim" && this.label ? this.label : "", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, rows: this.rows })), this.canShowError && this.mode != "slim" &&
|
|
245
228
|
index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
|
|
246
229
|
}
|
|
247
230
|
get _hostElement() { return index.getElement(this); }
|
|
@@ -39,8 +39,6 @@ const EzTextInput = class {
|
|
|
39
39
|
index.registerInstance(this, hostRef);
|
|
40
40
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
41
41
|
this.label = undefined;
|
|
42
|
-
this.alternativeLabel = undefined;
|
|
43
|
-
this.forceLabelFloat = false;
|
|
44
42
|
this.value = undefined;
|
|
45
43
|
this.enabled = true;
|
|
46
44
|
this.errorMessage = undefined;
|
|
@@ -100,8 +98,6 @@ const EzTextInput = class {
|
|
|
100
98
|
if (this._inputElem && !this._inputElem.classList.contains("input--with--label")) {
|
|
101
99
|
this._inputElem.classList.add("input--with--label");
|
|
102
100
|
}
|
|
103
|
-
if (this.forceLabelFloat)
|
|
104
|
-
return;
|
|
105
101
|
const hasValue = this.value && this.value.toString().length > 0;
|
|
106
102
|
const containsFloatedClass = this._labelElem.classList.contains("input__label--floated");
|
|
107
103
|
if (hasValue || this.isFocused()) {
|
|
@@ -304,19 +300,6 @@ const EzTextInput = class {
|
|
|
304
300
|
});
|
|
305
301
|
this._tooltipPositioningObserver = observer;
|
|
306
302
|
}
|
|
307
|
-
buildLabelClass() {
|
|
308
|
-
let classList = this.enabled ? 'input__label' : 'input__label input__label--disabled';
|
|
309
|
-
if (this.errorMessage)
|
|
310
|
-
classList = classList + ' hasError';
|
|
311
|
-
if (this.forceLabelFloat)
|
|
312
|
-
classList = classList + ' input__label--floated';
|
|
313
|
-
return classList;
|
|
314
|
-
}
|
|
315
|
-
buildPlaceholder() {
|
|
316
|
-
if (this.alternativeLabel)
|
|
317
|
-
return this.alternativeLabel;
|
|
318
|
-
return (this.mode === "slim" && this.label) ? this.label : '';
|
|
319
|
-
}
|
|
320
303
|
//---------------------------------------------
|
|
321
304
|
// Lifecycle web component
|
|
322
305
|
//---------------------------------------------
|
|
@@ -367,7 +350,6 @@ const EzTextInput = class {
|
|
|
367
350
|
if (this._tooltipIconElem && !this._tooltipElem) {
|
|
368
351
|
this.renderGlobalTooltip();
|
|
369
352
|
}
|
|
370
|
-
this.adjustFloatingLabel();
|
|
371
353
|
}
|
|
372
354
|
componentDidUpdate() {
|
|
373
355
|
if (this._tooltipIconElem && this._tooltipElem) {
|
|
@@ -386,8 +368,8 @@ const EzTextInput = class {
|
|
|
386
368
|
render() {
|
|
387
369
|
core.ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
388
370
|
return (index.h(index.Host, { style: this._hostElement.classList.contains("grid_editor") ? { "height": "100%" } : null }, index.h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
|
|
389
|
-
index.h("label", { ref: (el) => this._labelElem = el, class: this.
|
|
390
|
-
: null, index.h("input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: `${this.mode === "slim" ? "input--slim" : ""}`, placeholder: this.
|
|
371
|
+
index.h("label", { ref: (el) => this._labelElem = el, class: `${this.enabled ? "input__label" : "input__label input__label--disabled"} ${this.errorMessage ? "hasError" : ""}`, onClick: () => this._inputElem.focus(), title: this.label }, this.label)
|
|
372
|
+
: null, index.h("input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: this.password ? "password" : "text", class: `${this.mode === "slim" ? "input--slim" : ""}`, placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.mask && this.cleanValueMask ? this.applyMask(this.value) : this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), this.canShowError && this.mode != "slim" && this.errorMessage &&
|
|
391
373
|
index.h("ez-icon", { class: `tooltip-icon ${this.errorMessage ? "hasError" : ""} ${this.hasRightSlotContent ? "rightIconSlot" : ""}`, "data-element-id": core.ElementIDUtils.getInternalIDInfo("tooltip-icon"), ref: (el) => this._tooltipIconElem = el, iconName: "alert-circle" }), index.h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }, " ")));
|
|
392
374
|
}
|
|
393
375
|
get _hostElement() { return index.getElement(this); }
|
|
@@ -22,8 +22,6 @@ const EzTimeInput = class {
|
|
|
22
22
|
this.mode = "regular";
|
|
23
23
|
this.canShowError = true;
|
|
24
24
|
this.autoFocus = false;
|
|
25
|
-
this.alternativeLabel = undefined;
|
|
26
|
-
this.forceLabelFloat = false;
|
|
27
25
|
}
|
|
28
26
|
observeErrorMessage() {
|
|
29
27
|
var _a;
|
|
@@ -161,7 +159,7 @@ const EzTimeInput = class {
|
|
|
161
159
|
}
|
|
162
160
|
render() {
|
|
163
161
|
core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
164
|
-
return (index.h(index.Host, null, index.h("ez-text-input", { class: "time__input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError
|
|
162
|
+
return (index.h(index.Host, null, index.h("ez-text-input", { class: "time__input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }, index.h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
|
|
165
163
|
}
|
|
166
164
|
static get assetsDirs() { return ["../assets"]; }
|
|
167
165
|
get _elem() { return index.getElement(this); }
|