@sankhyalabs/ezui 0.0.0-feat-dev-KB-82936.0 → 0.0.0-feat-dev-KB-66041.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-c2060474.js → DataBinder-b9973a19.js} +39 -11
- package/dist/cjs/ez-check.cjs.entry.js +18 -10
- package/dist/cjs/ez-combo-box.cjs.entry.js +2 -1
- package/dist/cjs/ez-date-input.cjs.entry.js +2 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -1
- package/dist/cjs/{ez-dropdown.cjs.entry.js → ez-dropdown_2.cjs.entry.js} +61 -0
- package/dist/cjs/ez-form.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +2 -2
- package/dist/cjs/ez-number-input.cjs.entry.js +2 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +11 -36
- package/dist/cjs/ez-search-result-list.cjs.entry.js +3 -2
- package/dist/cjs/ez-search.cjs.entry.js +2 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +24 -3
- package/dist/cjs/ez-text-input.cjs.entry.js +49 -42
- package/dist/cjs/ez-time-input.cjs.entry.js +2 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +3 -8
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +2 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-check/ez-check.css +9 -0
- package/dist/collection/components/ez-check/ez-check.js +34 -9
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +19 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +19 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +19 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
- package/dist/collection/components/ez-number-input/ez-number-input.js +19 -1
- package/dist/collection/components/ez-search/ez-search.js +19 -1
- package/dist/collection/components/ez-search-plus/ez-search-plus.css +1 -1
- package/dist/collection/components/ez-search-plus/ez-search-plus.js +16 -44
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css +10 -4
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js +2 -1
- package/dist/collection/components/ez-text-area/ez-text-area.js +47 -2
- package/dist/collection/components/ez-text-input/ez-text-input.css +1 -3
- package/dist/collection/components/ez-text-input/ez-text-input.js +68 -41
- package/dist/collection/components/ez-time-input/ez-time-input.js +19 -1
- package/dist/collection/components/ez-tooltip/ez-tooltip.css +0 -1
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +6 -29
- package/dist/collection/utils/form/DataBinder.js +40 -12
- package/dist/collection/utils/form/test/DataBinder.test.js +14 -0
- package/dist/custom-elements/index.js +172 -131
- package/dist/esm/{DataBinder-89946126.js → DataBinder-1035e36f.js} +40 -12
- package/dist/esm/ez-check.entry.js +18 -10
- package/dist/esm/ez-combo-box.entry.js +2 -1
- package/dist/esm/ez-date-input.entry.js +2 -1
- package/dist/esm/ez-date-time-input.entry.js +2 -1
- package/dist/esm/{ez-dropdown.entry.js → ez-dropdown_2.entry.js} +61 -1
- package/dist/esm/ez-form.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +2 -2
- package/dist/esm/ez-number-input.entry.js +2 -1
- package/dist/esm/ez-search-plus.entry.js +11 -36
- package/dist/esm/ez-search-result-list.entry.js +3 -2
- package/dist/esm/ez-search.entry.js +2 -1
- package/dist/esm/ez-text-area.entry.js +24 -3
- package/dist/esm/ez-text-input.entry.js +49 -42
- package/dist/esm/ez-time-input.entry.js +2 -1
- package/dist/esm/ez-tooltip.entry.js +3 -8
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +2 -6
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-15ea0c98.js +1 -0
- package/dist/ezui/p-2f45506d.entry.js +1 -0
- package/dist/ezui/p-3176a6ef.entry.js +1 -0
- package/dist/ezui/p-3ba9565c.entry.js +1 -0
- package/dist/ezui/p-496f7832.entry.js +1 -0
- package/dist/ezui/p-4bd6dd6a.entry.js +1 -0
- package/dist/ezui/p-629d15ed.entry.js +1 -0
- package/dist/ezui/p-7019f782.entry.js +1 -0
- package/dist/ezui/p-81145609.entry.js +1 -0
- package/dist/ezui/{p-1ec8bdd2.entry.js → p-8cf78590.entry.js} +2 -2
- package/dist/ezui/p-9142b27a.entry.js +1 -0
- package/dist/ezui/p-b81881ac.entry.js +1 -0
- package/dist/ezui/p-cb75eb46.entry.js +1 -0
- package/dist/ezui/p-d47d8fe6.entry.js +1 -0
- package/dist/ezui/p-ebd23857.entry.js +1 -0
- package/dist/ezui/{p-8ac8093c.entry.js → p-f6316720.entry.js} +1 -1
- package/dist/types/components/ez-check/ez-check.d.ts +7 -2
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +4 -0
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +4 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +4 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
- package/dist/types/components/ez-search/ez-search.d.ts +4 -0
- package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +4 -6
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +8 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +11 -7
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
- package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +2 -6
- package/dist/types/components.d.ts +83 -19
- package/dist/types/utils/form/DataBinder.d.ts +4 -2
- package/package.json +1 -1
- package/dist/cjs/ez-skeleton.cjs.entry.js +0 -67
- package/dist/esm/ez-skeleton.entry.js +0 -63
- package/dist/ezui/p-17de16e5.entry.js +0 -1
- package/dist/ezui/p-1a060042.entry.js +0 -1
- package/dist/ezui/p-2b4df33d.entry.js +0 -1
- package/dist/ezui/p-31b71e50.entry.js +0 -1
- package/dist/ezui/p-4cf0aaeb.entry.js +0 -1
- package/dist/ezui/p-67182f08.entry.js +0 -1
- package/dist/ezui/p-6825bdc7.entry.js +0 -1
- package/dist/ezui/p-7742802c.entry.js +0 -1
- package/dist/ezui/p-7fdd479f.entry.js +0 -1
- package/dist/ezui/p-9f22e1dc.entry.js +0 -1
- package/dist/ezui/p-a64cfcfc.js +0 -1
- package/dist/ezui/p-c1527804.entry.js +0 -1
- package/dist/ezui/p-cd07f8be.entry.js +0 -1
- package/dist/ezui/p-d9e4a85a.entry.js +0 -1
- package/dist/ezui/p-e3544d23.entry.js +0 -1
|
@@ -107,8 +107,12 @@ class RecordValidationProcessor {
|
|
|
107
107
|
class DataBinder {
|
|
108
108
|
constructor(dataUnit) {
|
|
109
109
|
this.onDataUnitEvent = (action) => {
|
|
110
|
-
var _a
|
|
110
|
+
var _a;
|
|
111
111
|
switch (action.type) {
|
|
112
|
+
case core.Action.MULTIPLE_EDITION_CHANGED:
|
|
113
|
+
this.clearInvalid();
|
|
114
|
+
this.updateAllFieldsValues();
|
|
115
|
+
break;
|
|
112
116
|
case core.Action.DATA_LOADED:
|
|
113
117
|
case core.Action.DATA_SAVED:
|
|
114
118
|
case core.Action.RECORDS_REMOVED:
|
|
@@ -123,13 +127,11 @@ class DataBinder {
|
|
|
123
127
|
case core.Action.CHANGE_UNDONE:
|
|
124
128
|
case core.Action.CHANGE_REDONE:
|
|
125
129
|
case core.Action.RECORD_LOADED:
|
|
126
|
-
|
|
127
|
-
this.updateValue(field.fieldName, field.field);
|
|
128
|
-
});
|
|
130
|
+
this.updateAllFieldsValues();
|
|
129
131
|
this.clearFieldError(Object.keys(action.payload)[0]);
|
|
130
132
|
break;
|
|
131
133
|
case core.Action.FIELD_INVALIDATED:
|
|
132
|
-
(
|
|
134
|
+
(_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
|
|
133
135
|
this.updateErrorMessage(field.fieldName, field.field);
|
|
134
136
|
});
|
|
135
137
|
break;
|
|
@@ -227,13 +229,19 @@ class DataBinder {
|
|
|
227
229
|
this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
|
|
228
230
|
}
|
|
229
231
|
}
|
|
230
|
-
|
|
232
|
+
updateFieldValue(fieldName, field) {
|
|
231
233
|
const bind = this._fields.get(fieldName);
|
|
232
234
|
try {
|
|
233
|
-
if (bind)
|
|
235
|
+
if (bind)
|
|
234
236
|
bind.listen = false;
|
|
237
|
+
if (this._dataUnit.isMultipleEdition && this.hasMultipleValuesBetweenRecords(fieldName)) {
|
|
238
|
+
field['value'] = undefined;
|
|
239
|
+
field['alternativePlaceholder'] = 'Múltiplos Valores';
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
243
|
+
field['alternativePlaceholder'] = undefined;
|
|
235
244
|
}
|
|
236
|
-
field["value"] = this._dataUnit.getFieldValue(fieldName);
|
|
237
245
|
this.updateErrorMessage(fieldName, field);
|
|
238
246
|
}
|
|
239
247
|
finally {
|
|
@@ -242,6 +250,14 @@ class DataBinder {
|
|
|
242
250
|
}
|
|
243
251
|
}
|
|
244
252
|
}
|
|
253
|
+
hasMultipleValuesBetweenRecords(key) {
|
|
254
|
+
var _a, _b;
|
|
255
|
+
const selectedRecords = (_b = (_a = this._dataUnit.getSelectionInfo()) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : [];
|
|
256
|
+
if (selectedRecords.length <= 1)
|
|
257
|
+
return false;
|
|
258
|
+
const firstValue = selectedRecords[0][key];
|
|
259
|
+
return !selectedRecords.every(record => core.ObjectUtils.equals(record[key], firstValue));
|
|
260
|
+
}
|
|
245
261
|
validate() {
|
|
246
262
|
return this._recordValidatorProcessor.validate();
|
|
247
263
|
}
|
|
@@ -280,7 +296,7 @@ class DataBinder {
|
|
|
280
296
|
oldBind.destroy();
|
|
281
297
|
}
|
|
282
298
|
this.bindSearchOptionsLoader(fieldName, field);
|
|
283
|
-
|
|
299
|
+
this.updateFieldValue(fieldName, field);
|
|
284
300
|
this.updateErrorMessage(fieldName, field);
|
|
285
301
|
this._fields.set(fieldName, Bind.create(fieldName, field, (fieldName, waitingChange) => this.changeStarted(fieldName, waitingChange), (fieldName) => this.cancelWaitingChange(fieldName), (fieldName, newValue) => this.setFieldValue(fieldName, newValue)));
|
|
286
302
|
this.applyEzUploadContext(fieldName, field);
|
|
@@ -322,8 +338,14 @@ class DataBinder {
|
|
|
322
338
|
this._dataUnit.addRecord();
|
|
323
339
|
}
|
|
324
340
|
this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
|
|
325
|
-
|
|
326
|
-
|
|
341
|
+
if (this._dataUnit.isMultipleEdition) {
|
|
342
|
+
const selectionInfo = this._dataUnit.getSelectionInfo();
|
|
343
|
+
this._dataUnit.setFieldValue(fieldName, newValue, selectionInfo.recordIds);
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
const record = this._dataUnit.getSelectedRecord();
|
|
347
|
+
this._dataUnit.setFieldValue(fieldName, newValue, record ? [record.__record__id__] : undefined);
|
|
348
|
+
}
|
|
327
349
|
if (this._dataUnit.waitingForChange(fieldName)) {
|
|
328
350
|
const bind = this._fields.get(fieldName);
|
|
329
351
|
if (bind) {
|
|
@@ -355,6 +377,12 @@ class DataBinder {
|
|
|
355
377
|
field["maxFiles"] = ((_b = descriptor.properties) === null || _b === void 0 ? void 0 : _b.MAX_FILES) || 0;
|
|
356
378
|
}
|
|
357
379
|
}
|
|
380
|
+
updateAllFieldsValues() {
|
|
381
|
+
var _a;
|
|
382
|
+
(_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
|
|
383
|
+
this.updateFieldValue(field.fieldName, field.field);
|
|
384
|
+
});
|
|
385
|
+
}
|
|
358
386
|
interceptAction(action) {
|
|
359
387
|
if (action.type === core.Action.RECORDS_COPIED) {
|
|
360
388
|
const cleanFields = this._formMetadata.getCleanOnCopyFields();
|
|
@@ -6,13 +6,14 @@ 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}.label--disabled{color:var(--ez-check--label--disabled--color)}.label--padding{padding-left:var(--space--extra-small)}";
|
|
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;display:flex;align-content:center;gap:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}.label--padding{padding-left:var(--space--extra-small)}.label-alternative{font-size:var(--text--small);color:var(--text--secondary);padding-top:2px}";
|
|
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.alternativePlaceholder = undefined;
|
|
16
17
|
this.value = undefined;
|
|
17
18
|
this.enabled = true;
|
|
18
19
|
this.indeterminate = undefined;
|
|
@@ -64,25 +65,32 @@ const EzCheck = class {
|
|
|
64
65
|
this.ezChange.emit(this.value);
|
|
65
66
|
}
|
|
66
67
|
getLabelClasses() {
|
|
67
|
-
const classes = [
|
|
68
|
+
const classes = ['label'];
|
|
68
69
|
if (!this.enabled) {
|
|
69
|
-
classes.push(
|
|
70
|
+
classes.push('label--disabled');
|
|
70
71
|
}
|
|
71
72
|
if (!this.compact) {
|
|
72
|
-
classes.push(
|
|
73
|
+
classes.push('label--padding');
|
|
73
74
|
}
|
|
74
|
-
return classes.join(
|
|
75
|
+
return classes.join(' ');
|
|
75
76
|
}
|
|
76
77
|
getInputClasses() {
|
|
77
78
|
var _a;
|
|
78
|
-
const classes = [
|
|
79
|
-
classes.push(((_a = this.mode) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === CheckMode.CheckMode.SWITCH ?
|
|
79
|
+
const classes = [''];
|
|
80
|
+
classes.push(((_a = this.mode) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === CheckMode.CheckMode.SWITCH ? 'switch-mode' : 'regular-mode');
|
|
80
81
|
if (this.compact)
|
|
81
|
-
classes.push(
|
|
82
|
-
return classes.join(
|
|
82
|
+
classes.push('compact');
|
|
83
|
+
return classes.join(' ');
|
|
83
84
|
}
|
|
84
85
|
render() {
|
|
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: () => {
|
|
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.alternativePlaceholder ? index.h("span", { class: "label-alternative" }, this.alternativePlaceholder) : undefined));
|
|
86
94
|
}
|
|
87
95
|
get _element() { return index.getElement(this); }
|
|
88
96
|
static get watchers() { return {
|
|
@@ -47,6 +47,7 @@ const EzComboBox = class {
|
|
|
47
47
|
this.listOptionsPosition = undefined;
|
|
48
48
|
this.isTextSearch = false;
|
|
49
49
|
this.autoFocus = false;
|
|
50
|
+
this.alternativePlaceholder = undefined;
|
|
50
51
|
}
|
|
51
52
|
observeErrorMessage() {
|
|
52
53
|
var _a;
|
|
@@ -451,7 +452,7 @@ const EzComboBox = class {
|
|
|
451
452
|
render() {
|
|
452
453
|
var _a;
|
|
453
454
|
core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
454
|
-
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 }))));
|
|
455
|
+
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, alternativePlaceholder: this.alternativePlaceholder }, 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 }))));
|
|
455
456
|
}
|
|
456
457
|
get el() { return index.getElement(this); }
|
|
457
458
|
static get watchers() { return {
|
|
@@ -24,6 +24,7 @@ const EzDateInput = class {
|
|
|
24
24
|
this.mode = "regular";
|
|
25
25
|
this.canShowError = true;
|
|
26
26
|
this.autoFocus = false;
|
|
27
|
+
this.alternativePlaceholder = undefined;
|
|
27
28
|
}
|
|
28
29
|
observeLabel() {
|
|
29
30
|
if (this._textInput) {
|
|
@@ -174,7 +175,7 @@ const EzDateInput = class {
|
|
|
174
175
|
}
|
|
175
176
|
render() {
|
|
176
177
|
core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
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(); } }))));
|
|
178
|
+
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, alternativePlaceholder: this.alternativePlaceholder }, 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(); } }))));
|
|
178
179
|
}
|
|
179
180
|
get _elem() { return index.getElement(this); }
|
|
180
181
|
static get watchers() { return {
|
|
@@ -25,6 +25,7 @@ const EzDateTimeInput = class {
|
|
|
25
25
|
this.mode = "regular";
|
|
26
26
|
this.canShowError = true;
|
|
27
27
|
this.autoFocus = false;
|
|
28
|
+
this.alternativePlaceholder = undefined;
|
|
28
29
|
}
|
|
29
30
|
observeLabel() {
|
|
30
31
|
if (this._textInput) {
|
|
@@ -225,7 +226,7 @@ const EzDateTimeInput = class {
|
|
|
225
226
|
}
|
|
226
227
|
render() {
|
|
227
228
|
core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
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 }))));
|
|
229
|
+
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, alternativePlaceholder: this.alternativePlaceholder }, 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 }))));
|
|
229
230
|
}
|
|
230
231
|
get _elem() { return index.getElement(this); }
|
|
231
232
|
static get watchers() { return {
|
|
@@ -524,4 +524,65 @@ const EzDropdown = class {
|
|
|
524
524
|
};
|
|
525
525
|
EzDropdown.style = ezDropdownCss;
|
|
526
526
|
|
|
527
|
+
const ALLOWED_ANIMATIONS = ['progress', 'progress-dark', 'pulse', 'false'];
|
|
528
|
+
|
|
529
|
+
const ezSkeletonCss = ".skeleton {\n\tbackground: var(--skeleton-background, #eff1f6) no-repeat;\n\n\tborder-radius: var(--skeleton-border-radius, 4px);\n\twidth: var(--skeleton-width, 100%);\n\theight: var(--skeleton-height, 20px);\n\tdisplay: inline-block;\n\tmargin-bottom: var(--skeleton-margin-bottom, 0px);\t\n\tbox-sizing: border-box;\n\toutline: none;\n\toverflow: hidden;\n\tposition: relative;\n\t-webkit-will-change: transform;\n -moz-will-change: transform;\n\twill-change: transform;\n\n\t&:after,\n\t&:before {\n\t\tbox-sizing: border-box;\n\t}\n\n\t&.circle {\n\t\twidth: var(--skeleton-width, 40px);\n\t\theight: var(--skeleton-height, 40px);\n\t\tmargin-bottom: var(--skeleton-margin-bottom, 5px);\n\t\tborder-radius: var(--skeleton-border-radius, 50%);\n\t}\n\n\t&.rect {\n\t\tborder-radius: var(--skeleton-border-radius, 0px);\n\t}\n\n\t&.progress,\n\t&.progress-dark {\n\t\t-webkit-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -moz-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -ms-animation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tbackground-size: 200px 100%;\n\t}\n\n\t&.progress {\n\t\tbackground-image: -webkit-linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n background-image: -moz-linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n background-image: -ms-linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));\n\t}\n\n\t&.progress-dark {\n\t\tbackground-image: -webkit-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);\n background-image: -moz-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);\n background-image: -ms-linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent); \n\t\tbackground-image: linear-gradient(90deg,transparent,rgba(0, 0, 0, 0.2),transparent);\n\t}\n\n\t&.pulse {\n\t\t-webkit-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -moz-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n -ms-animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation-delay: 0.5s;\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t&.pulse,\n\t\t&.progress-dark,\n\t\t&.progress {\n\t\t\tanimation: none;\n\t\t}\n\n\t\t&.progress,\n\t\t&.progress-dark {\n\t\t\tbackground-image: none;\n\t\t}\n\t}\n}\n\n@-webkit-keyframes progress {\n 0% { background-position: -200px 0; }\n 100% { background-position: calc(200px + 100%) 0; }\n}\n@-moz-keyframes progress {\n 0% { background-position: -200px 0; }\n 100% { background-position: calc(200px + 100%) 0; }\n}\n@-ms-keyframes progress {\n 0% { background-position: -200px 0; }\n 100% { background-position: calc(200px + 100%) 0; }\n}\n@keyframes progress {\n\t0% { background-position: -200px 0; }\n\t100% { background-position: calc(200px + 100%) 0; }\n}\n\n@-webkit-keyframes pulse {\n 0% { opacity: 1; }\n 50% { opacity: 0.4; }\n 100% { opacity: 1; }\n}\n@-moz-keyframes pulse {\n 0% { opacity: 1; }\n 50% { opacity: 0.4; }\n 100% { opacity: 1; }\n}\n@-ms-keyframes pulse {\n 0% { opacity: 1; }\n 50% { opacity: 0.4; }\n 100% { opacity: 1; }\n}\n@keyframes pulse {\n\t0% { opacity: 1; }\n\t50% { opacity: 0.4; }\n\t100% { opacity: 1; }\n}";
|
|
530
|
+
|
|
531
|
+
const EzSkeleton = class {
|
|
532
|
+
constructor(hostRef) {
|
|
533
|
+
index.registerInstance(this, hostRef);
|
|
534
|
+
this.items = [];
|
|
535
|
+
this.count = 1;
|
|
536
|
+
this.variant = 'text';
|
|
537
|
+
this.width = null;
|
|
538
|
+
this.height = null;
|
|
539
|
+
this.marginBottom = null;
|
|
540
|
+
this.animation = 'progress';
|
|
541
|
+
}
|
|
542
|
+
componentWillLoad() {
|
|
543
|
+
this.init();
|
|
544
|
+
}
|
|
545
|
+
componentWillUpdate() {
|
|
546
|
+
this.init();
|
|
547
|
+
}
|
|
548
|
+
init() {
|
|
549
|
+
this.items.length = this.count;
|
|
550
|
+
this.items.fill(1);
|
|
551
|
+
if (!ALLOWED_ANIMATIONS.includes(this.animation)) {
|
|
552
|
+
this.animation = 'progress';
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
get style() {
|
|
556
|
+
let dimenssionsStyles = {
|
|
557
|
+
width: null,
|
|
558
|
+
height: null,
|
|
559
|
+
marginBottom: null
|
|
560
|
+
};
|
|
561
|
+
if (this.width) {
|
|
562
|
+
dimenssionsStyles.width = this.width;
|
|
563
|
+
}
|
|
564
|
+
if (this.height) {
|
|
565
|
+
dimenssionsStyles.height = this.height;
|
|
566
|
+
}
|
|
567
|
+
if (this.marginBottom) {
|
|
568
|
+
dimenssionsStyles.marginBottom = this.marginBottom;
|
|
569
|
+
}
|
|
570
|
+
return dimenssionsStyles;
|
|
571
|
+
}
|
|
572
|
+
render() {
|
|
573
|
+
return this.items.map((_, index$1) => {
|
|
574
|
+
return (index.h("span", { key: index$1, class: {
|
|
575
|
+
circle: this.variant === 'circle',
|
|
576
|
+
rect: this.variant === 'rect',
|
|
577
|
+
progress: this.animation === 'progress',
|
|
578
|
+
'progress-dark': this.animation === 'progress-dark',
|
|
579
|
+
pulse: this.animation === 'pulse',
|
|
580
|
+
skeleton: true
|
|
581
|
+
}, "data-busy": "true", "data-valuemin": "0", "data-valuemax": "100", "data-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
EzSkeleton.style = ezSkeletonCss;
|
|
586
|
+
|
|
527
587
|
exports.ez_dropdown = EzDropdown;
|
|
588
|
+
exports.ez_skeleton = EzSkeleton;
|
|
@@ -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-b9973a19.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 types = require('./types-6a5df0c7.js');
|
|
12
12
|
require('./FormLayout-c2451c7f.js');
|
|
13
13
|
const constants = require('./constants-569271bc.js');
|
|
14
|
-
const DataBinder = require('./DataBinder-
|
|
14
|
+
const DataBinder = require('./DataBinder-b9973a19.js');
|
|
15
15
|
const FocusResolver = require('./FocusResolver-885f2173.js');
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -65394,7 +65394,7 @@ class AgGridController {
|
|
|
65394
65394
|
}
|
|
65395
65395
|
syncSelectWithDataUnit() {
|
|
65396
65396
|
const rowNode = this._gridOptions.api.getRowNode(this._dataUnit.getSelectedRecord().__record__id__);
|
|
65397
|
-
if ((rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex) < 0)
|
|
65397
|
+
if (!rowNode || (rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex) < 0)
|
|
65398
65398
|
return;
|
|
65399
65399
|
const rowRange = this._gridOptions.api.getCellRanges().find(row => row.startRow.rowIndex === rowNode.rowIndex);
|
|
65400
65400
|
if ((rowRange === null || rowRange === void 0 ? void 0 : rowRange.columns.length) > 0) {
|
|
@@ -28,6 +28,7 @@ const EzNumberInput = class {
|
|
|
28
28
|
this.prettyPrecision = undefined;
|
|
29
29
|
this.mode = "regular";
|
|
30
30
|
this.autoFocus = false;
|
|
31
|
+
this.alternativePlaceholder = undefined;
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
33
34
|
* Aplica o foco no campo.
|
|
@@ -186,7 +187,7 @@ const EzNumberInput = class {
|
|
|
186
187
|
if (this.allowNegative) {
|
|
187
188
|
restrict += '-';
|
|
188
189
|
}
|
|
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 }));
|
|
190
|
+
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, alternativePlaceholder: this.alternativePlaceholder }));
|
|
190
191
|
}
|
|
191
192
|
get _elem() { return index.getElement(this); }
|
|
192
193
|
static get watchers() { return {
|
|
@@ -11,7 +11,7 @@ require('./CheckMode-ecb90b87.js');
|
|
|
11
11
|
const types = require('./types-6a5df0c7.js');
|
|
12
12
|
require('./FormLayout-c2451c7f.js');
|
|
13
13
|
|
|
14
|
-
const ezSearchPlusCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{
|
|
14
|
+
const ezSearchPlusCss = ":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{width:107px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%}";
|
|
15
15
|
|
|
16
16
|
const EzSearchPlus = class {
|
|
17
17
|
constructor(hostRef) {
|
|
@@ -70,8 +70,7 @@ const EzSearchPlus = class {
|
|
|
70
70
|
console.warn("[EzSearchPlus] Erro ao obter descrição do registro.", err);
|
|
71
71
|
throw err;
|
|
72
72
|
}
|
|
73
|
-
this.
|
|
74
|
-
this.ezChange.emit(this.value);
|
|
73
|
+
this.ezChange.emit(this.buildCurrentValue());
|
|
75
74
|
}
|
|
76
75
|
canShowLoadSpinDescription() {
|
|
77
76
|
return this.isLoadingDescription;
|
|
@@ -205,9 +204,6 @@ const EzSearchPlus = class {
|
|
|
205
204
|
if (!loadedOption) {
|
|
206
205
|
return "";
|
|
207
206
|
}
|
|
208
|
-
if (Array.isArray(loadedOption)) {
|
|
209
|
-
return loadedOption[0].label;
|
|
210
|
-
}
|
|
211
207
|
return loadedOption.label;
|
|
212
208
|
}
|
|
213
209
|
finally {
|
|
@@ -249,7 +245,7 @@ const EzSearchPlus = class {
|
|
|
249
245
|
}
|
|
250
246
|
async handleTextInputChangeHandler(event) {
|
|
251
247
|
if (!this.searchDescriptionIsOpen) {
|
|
252
|
-
this._popover.
|
|
248
|
+
this._popover.show();
|
|
253
249
|
}
|
|
254
250
|
const argument = event.target.value;
|
|
255
251
|
await this.debounceLoaderOptions(argument);
|
|
@@ -264,31 +260,11 @@ const EzSearchPlus = class {
|
|
|
264
260
|
}, this.SEARCH_DESCRIPTION_TIMEOUT);
|
|
265
261
|
});
|
|
266
262
|
}
|
|
267
|
-
updateKeyOption(option) {
|
|
268
|
-
return (Object.assign(Object.assign({}, option), { presentationValue: option.value, presentationLabel: option.label }));
|
|
269
|
-
}
|
|
270
|
-
parseSearchOptions(options = []) {
|
|
271
|
-
if (Array.isArray(options)) {
|
|
272
|
-
const firstOption = options[0];
|
|
273
|
-
if (!firstOption) {
|
|
274
|
-
return [];
|
|
275
|
-
}
|
|
276
|
-
if ("label" in firstOption || "value" in firstOption) {
|
|
277
|
-
return options.map((option) => this.updateKeyOption(option));
|
|
278
|
-
}
|
|
279
|
-
return options;
|
|
280
|
-
}
|
|
281
|
-
if ("label" in options || "value" in options) {
|
|
282
|
-
[this.updateKeyOption(options)];
|
|
283
|
-
}
|
|
284
|
-
return [options];
|
|
285
|
-
}
|
|
286
263
|
async processOptionsLoader(argument) {
|
|
287
264
|
try {
|
|
288
265
|
this.showLoading = true;
|
|
289
266
|
const searchArgument = { mode: types.SearchMode.PREDICTIVE, argument };
|
|
290
|
-
|
|
291
|
-
this.visibleOptions = this.parseSearchOptions(options);
|
|
267
|
+
this.visibleOptions = await this.optionLoader(searchArgument);
|
|
292
268
|
}
|
|
293
269
|
finally {
|
|
294
270
|
this.showLoading = false;
|
|
@@ -320,13 +296,12 @@ const EzSearchPlus = class {
|
|
|
320
296
|
await ((_a = this._searchList) === null || _a === void 0 ? void 0 : _a.selectCurrentItem());
|
|
321
297
|
}
|
|
322
298
|
async cancelSelection() {
|
|
323
|
-
var _a, _b, _c;
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
this._textInputDescriptionValue.value = label;
|
|
299
|
+
var _a, _b, _c, _d;
|
|
300
|
+
if (this._textInputDescriptionValue && this._textInputDescriptionValue.value != ((_a = this.value) === null || _a === void 0 ? void 0 : _a.label)) {
|
|
301
|
+
this._textInputDescriptionValue.value = (_b = this.value) === null || _b === void 0 ? void 0 : _b.label;
|
|
327
302
|
}
|
|
328
|
-
await ((
|
|
329
|
-
(
|
|
303
|
+
await ((_c = this._searchList) === null || _c === void 0 ? void 0 : _c.cancelSelection());
|
|
304
|
+
(_d = this._popover) === null || _d === void 0 ? void 0 : _d.hide();
|
|
330
305
|
}
|
|
331
306
|
async handleInputTab() {
|
|
332
307
|
await this.cancelSelection();
|
|
@@ -379,10 +354,10 @@ const EzSearchPlus = class {
|
|
|
379
354
|
render() {
|
|
380
355
|
core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
381
356
|
return (index.h(index.Host, null, index.h("div", { class: "ez-search-plus__container" }, index.h("ez-text-input", { ref: elem => this._textInputCodeValue = elem, class: {
|
|
382
|
-
"ez-search-plus__code-input":
|
|
357
|
+
"ez-search-plus__code-input": true,
|
|
383
358
|
"ez-search-plus__code-input-no-border": !this.hideDescriptionInput,
|
|
384
359
|
"ez-search-plus__code-input-full": this.hideDescriptionInput
|
|
385
|
-
}, "data-element-id": core.ElementIDUtils.getInternalIDInfo("codeInput"), "data-slave-mode": "true", enabled: !this.disableCodeInput && this.enabled, mode: this.mode, label: this.getCodLabel(), hasInvalid: !core.StringUtils.isEmpty(this.errorMessage), errorMessage: this.hideDescriptionInput ? this.errorMessage : "", value: this.codeValue, onFocusout: () => this.handleCodeInputFocusOut(), onFocus: () => this.handleCodeInputFocus() }, this.getLeftIconElement()), !this.hideDescriptionInput &&
|
|
360
|
+
}, "data-element-id": core.ElementIDUtils.getInternalIDInfo("codeInput"), "data-slave-mode": "true", enabled: !this.disableCodeInput && this.enabled, mode: this.mode, label: this.getCodLabel(), hasInvalid: !core.StringUtils.isEmpty(this.errorMessage), errorMessage: this.hideDescriptionInput ? this.errorMessage : "", value: this.codeValue, onFocusout: () => this.handleCodeInputFocusOut(), onFocus: () => this.handleCodeInputFocus() }, this.getLeftIconElement()), !this.hideDescriptionInput && index.h("div", { class: "description-input-container" }, index.h("ez-text-input", { ref: elem => this._textInputDescriptionValue = elem, tabIndex: -1, class: "ez-search-plus__text-input", "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), "data-slave-mode": "true", enabled: !this.disableDescriptionInput && this.enabled, label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, value: this.descriptionValue, onInput: event => this.handleTextInputChangeHandler(event), onFocus: () => this.handleDescriptionInputFocus() }, this.getRightIconElement()), index.h("ez-popover-plus", { ref: elem => this._popover = elem, anchorElement: this._textInputDescriptionValue, autoClose: true, boxWidth: 'fit-content', overlayType: 'none', useAnchorSize: true, onEzVisibilityChange: event => this.searchDescriptionIsOpen = event.detail }, index.h("ez-search-result-list", { ref: (ref) => this._searchList = ref, showLoading: this.showLoading, visibleOptions: this.visibleOptions, value: this.value, showOptionValue: this.showOptionValue, onChangeValue: (evt) => this.handleSelectItem(evt) }))))));
|
|
386
361
|
}
|
|
387
362
|
get el() { return index.getElement(this); }
|
|
388
363
|
static get watchers() { return {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezSearchResultListCss = ":host{--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--small, 6px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px)}.list-options{position:relative;z-index:var(--more-visible, 2);margin:var(--space--small) 0px;padding:0px;padding-inline-start:0px;box-sizing:border-box;width:100%;height:100%;max-height:350px;min-width:150px;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;margin:var(--space--medium) 0px;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.
|
|
8
|
+
const ezSearchResultListCss = ":host{--ez-search__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--small, 6px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px)}.list-options{position:relative;z-index:var(--more-visible, 2);margin:var(--space--small) 0px;padding:0px;padding-inline-start:0px;box-sizing:border-box;width:100%;height:100%;max-height:350px;min-width:150px;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;margin:var(--space--medium) 0px;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.preselected{background-color:var(--background--medium)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}";
|
|
9
9
|
|
|
10
10
|
const EzSearchResultList = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -89,7 +89,8 @@ const EzSearchResultList = class {
|
|
|
89
89
|
render() {
|
|
90
90
|
return (index.h(index.Host, null, index.h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this.showLoading
|
|
91
91
|
&& this.visibleOptions.length === 0
|
|
92
|
-
&& index.h("div", { class: "message" }, index.h("span", { class: "message__no-result" }, this._textEmptyList)), this.showLoading
|
|
92
|
+
&& index.h("div", { class: "message" }, index.h("span", { class: "message__no-result" }, this._textEmptyList)), this.showLoading
|
|
93
|
+
&& index.h("div", { class: "message" }, index.h("div", { class: "message__loading" })), this.canShowListOptions() && this.visibleOptions.map((opt, index) => this.buildItem(opt, index)))));
|
|
93
94
|
}
|
|
94
95
|
};
|
|
95
96
|
EzSearchResultList.style = ezSearchResultListCss;
|
|
@@ -55,6 +55,7 @@ const EzSearch = class {
|
|
|
55
55
|
this.ensureClearButtonVisible = false;
|
|
56
56
|
this.suppressPreLoad = true;
|
|
57
57
|
this.autoFocus = false;
|
|
58
|
+
this.alternativePlaceholder = undefined;
|
|
58
59
|
}
|
|
59
60
|
observeErrorMessage() {
|
|
60
61
|
var _a;
|
|
@@ -609,7 +610,7 @@ const EzSearch = class {
|
|
|
609
610
|
render() {
|
|
610
611
|
var _a;
|
|
611
612
|
core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
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)
|
|
613
|
+
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, alternativePlaceholder: this.alternativePlaceholder }, 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)
|
|
613
614
|
? index.h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, index.h("ez-icon", { iconName: "close" }))
|
|
614
615
|
: 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) }))));
|
|
615
616
|
}
|