@sankhyalabs/ezui 5.22.0-dev.118 → 5.22.0-dev.119

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.
Files changed (77) hide show
  1. package/dist/cjs/{DataBinder-c2060474.js → DataBinder-b9973a19.js} +39 -11
  2. package/dist/cjs/ez-check.cjs.entry.js +18 -10
  3. package/dist/cjs/ez-combo-box.cjs.entry.js +2 -1
  4. package/dist/cjs/ez-date-input.cjs.entry.js +2 -1
  5. package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -1
  6. package/dist/cjs/ez-form.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-grid.cjs.entry.js +2 -2
  8. package/dist/cjs/ez-number-input.cjs.entry.js +2 -1
  9. package/dist/cjs/ez-search.cjs.entry.js +2 -1
  10. package/dist/cjs/ez-text-area.cjs.entry.js +24 -3
  11. package/dist/cjs/ez-text-input.cjs.entry.js +27 -3
  12. package/dist/cjs/ez-time-input.cjs.entry.js +2 -1
  13. package/dist/cjs/ezui.cjs.js +1 -1
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/collection/components/ez-check/ez-check.css +9 -0
  16. package/dist/collection/components/ez-check/ez-check.js +34 -9
  17. package/dist/collection/components/ez-combo-box/ez-combo-box.js +19 -1
  18. package/dist/collection/components/ez-date-input/ez-date-input.js +19 -1
  19. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +19 -1
  20. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
  21. package/dist/collection/components/ez-number-input/ez-number-input.js +19 -1
  22. package/dist/collection/components/ez-search/ez-search.js +19 -1
  23. package/dist/collection/components/ez-text-area/ez-text-area.js +47 -2
  24. package/dist/collection/components/ez-text-input/ez-text-input.js +47 -3
  25. package/dist/collection/components/ez-time-input/ez-time-input.js +19 -1
  26. package/dist/collection/utils/form/DataBinder.js +40 -12
  27. package/dist/collection/utils/form/test/DataBinder.test.js +14 -0
  28. package/dist/custom-elements/index.js +131 -44
  29. package/dist/esm/{DataBinder-89946126.js → DataBinder-1035e36f.js} +40 -12
  30. package/dist/esm/ez-check.entry.js +18 -10
  31. package/dist/esm/ez-combo-box.entry.js +2 -1
  32. package/dist/esm/ez-date-input.entry.js +2 -1
  33. package/dist/esm/ez-date-time-input.entry.js +2 -1
  34. package/dist/esm/ez-form.entry.js +1 -1
  35. package/dist/esm/ez-grid.entry.js +2 -2
  36. package/dist/esm/ez-number-input.entry.js +2 -1
  37. package/dist/esm/ez-search.entry.js +2 -1
  38. package/dist/esm/ez-text-area.entry.js +24 -3
  39. package/dist/esm/ez-text-input.entry.js +27 -3
  40. package/dist/esm/ez-time-input.entry.js +2 -1
  41. package/dist/esm/ezui.js +1 -1
  42. package/dist/esm/loader.js +1 -1
  43. package/dist/ezui/ezui.esm.js +1 -1
  44. package/dist/ezui/p-15ea0c98.js +1 -0
  45. package/dist/ezui/p-3ba9565c.entry.js +1 -0
  46. package/dist/ezui/p-496f7832.entry.js +1 -0
  47. package/dist/ezui/p-4bd6dd6a.entry.js +1 -0
  48. package/dist/ezui/p-629d15ed.entry.js +1 -0
  49. package/dist/ezui/p-7019f782.entry.js +1 -0
  50. package/dist/ezui/{p-da069110.entry.js → p-91b118a7.entry.js} +2 -2
  51. package/dist/ezui/p-b81881ac.entry.js +1 -0
  52. package/dist/ezui/p-c00df4be.entry.js +1 -0
  53. package/dist/ezui/p-cb75eb46.entry.js +1 -0
  54. package/dist/ezui/p-ebd23857.entry.js +1 -0
  55. package/dist/ezui/{p-8ac8093c.entry.js → p-f6316720.entry.js} +1 -1
  56. package/dist/types/components/ez-check/ez-check.d.ts +7 -2
  57. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +4 -0
  58. package/dist/types/components/ez-date-input/ez-date-input.d.ts +4 -0
  59. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +4 -0
  60. package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
  61. package/dist/types/components/ez-search/ez-search.d.ts +4 -0
  62. package/dist/types/components/ez-text-area/ez-text-area.d.ts +8 -0
  63. package/dist/types/components/ez-text-input/ez-text-input.d.ts +9 -0
  64. package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
  65. package/dist/types/components.d.ts +72 -0
  66. package/dist/types/utils/form/DataBinder.d.ts +4 -2
  67. package/package.json +1 -1
  68. package/dist/ezui/p-17de16e5.entry.js +0 -1
  69. package/dist/ezui/p-1a060042.entry.js +0 -1
  70. package/dist/ezui/p-31b71e50.entry.js +0 -1
  71. package/dist/ezui/p-58545666.entry.js +0 -1
  72. package/dist/ezui/p-7fdd479f.entry.js +0 -1
  73. package/dist/ezui/p-9f22e1dc.entry.js +0 -1
  74. package/dist/ezui/p-a64cfcfc.js +0 -1
  75. package/dist/ezui/p-c1527804.entry.js +0 -1
  76. package/dist/ezui/p-cd07f8be.entry.js +0 -1
  77. 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, _b;
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
- (_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
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
- (_b = this._fields) === null || _b === void 0 ? void 0 : _b.forEach(field => {
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
- updateValue(fieldName, field) {
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
- field["value"] = this._dataUnit.getFieldValue(fieldName);
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
- const record = this._dataUnit.getSelectedRecord();
326
- this._dataUnit.setFieldValue(fieldName, newValue, record ? [record.__record__id__] : undefined);
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 = ["label"];
68
+ const classes = ['label'];
68
69
  if (!this.enabled) {
69
- classes.push("label--disabled");
70
+ classes.push('label--disabled');
70
71
  }
71
72
  if (!this.compact) {
72
- classes.push("label--padding");
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 ? "switch-mode" : "regular-mode");
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("compact");
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: () => { 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));
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 {
@@ -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-c2060474.js');
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-c2060474.js');
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 {
@@ -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
  }
@@ -23,6 +23,8 @@ const EzTextArea = class {
23
23
  this.enableResize = true;
24
24
  this.autoRows = false;
25
25
  this.autoFocus = false;
26
+ this.alternativePlaceholder = undefined;
27
+ this.forceLabelFloat = false;
26
28
  }
27
29
  observeErrorMessage() {
28
30
  var _a, _b, _c, _d;
@@ -73,6 +75,9 @@ const EzTextArea = class {
73
75
  (_b = this._resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
74
76
  }
75
77
  }
78
+ observeAlternativePlaceholder(newValue) {
79
+ this.forceLabelFloat = !!newValue;
80
+ }
76
81
  //---------------------------------------------
77
82
  // Public methods
78
83
  //---------------------------------------------
@@ -121,6 +126,8 @@ const EzTextArea = class {
121
126
  return this._inputElem && (this.value || "") !== this._inputElem.value;
122
127
  }
123
128
  adjustFloatingLabel() {
129
+ if (this.forceLabelFloat)
130
+ return;
124
131
  if (this.label && this._labelElem) {
125
132
  const hasValue = this.value && this.value.toString().length > 0;
126
133
  const containsFloatedClass = this._labelElem.classList.contains("textarea__label--floated");
@@ -204,6 +211,19 @@ const EzTextArea = class {
204
211
  var _a;
205
212
  (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
206
213
  }
214
+ buildPlaceholder() {
215
+ if (this.alternativePlaceholder)
216
+ return this.alternativePlaceholder;
217
+ return (this.mode === "slim" && this.label) ? this.label : '';
218
+ }
219
+ buildLabelClass() {
220
+ let classList = this.enabled ? 'textarea__label' : 'textarea__label textarea__label--disabled';
221
+ if (this.errorMessage)
222
+ classList = classList + ' hasError';
223
+ if (this.forceLabelFloat)
224
+ classList = classList + ' textarea__label--floated';
225
+ return classList;
226
+ }
207
227
  //---------------------------------------------
208
228
  // Lifecycle web component
209
229
  //---------------------------------------------
@@ -220,11 +240,11 @@ const EzTextArea = class {
220
240
  render() {
221
241
  core.ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
222
242
  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" ?
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)
243
+ index.h("label", { ref: (el) => this._labelElem = el, class: this.buildLabelClass(), onClick: () => this._inputElem.focus(), title: this.label }, this.label)
224
244
  : 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: {
225
245
  "textarea--slim": this.mode === "slim",
226
246
  "textarea--resizable": this.enableResize
227
- }, placeholder: this.mode === "slim" && this.label ? this.label : "", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, rows: this.rows })), this.canShowError && this.mode != "slim" &&
247
+ }, placeholder: this.buildPlaceholder(), onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, rows: this.rows })), this.canShowError && this.mode != "slim" &&
228
248
  index.h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
229
249
  }
230
250
  get _hostElement() { return index.getElement(this); }
@@ -233,7 +253,8 @@ const EzTextArea = class {
233
253
  "value": ["observeValue"],
234
254
  "mode": ["observeMode"],
235
255
  "rows": ["observeRows"],
236
- "autoRows": ["observeAutoRows"]
256
+ "autoRows": ["observeAutoRows"],
257
+ "alternativePlaceholder": ["observeAlternativePlaceholder"]
237
258
  }; }
238
259
  };
239
260
  EzTextArea.style = ezTextAreaCss;
@@ -13,6 +13,7 @@ const EzTextInput = class {
13
13
  this.ezChange = index.createEvent(this, "ezChange", 7);
14
14
  this._isOverflowing = false;
15
15
  this.label = undefined;
16
+ this.alternativePlaceholder = undefined;
16
17
  this.value = undefined;
17
18
  this.enabled = true;
18
19
  this.errorMessage = undefined;
@@ -26,6 +27,7 @@ const EzTextInput = class {
26
27
  this.password = false;
27
28
  this.autoFocus = false;
28
29
  this.hasRightSlotContent = false;
30
+ this.forceLabelFloat = false;
29
31
  }
30
32
  observeHasInvalid(newValue, oldValue) {
31
33
  if (newValue === oldValue) {
@@ -57,6 +59,9 @@ const EzTextInput = class {
57
59
  }
58
60
  }
59
61
  }
62
+ observeAlternativePlaceholder(newValue) {
63
+ this.forceLabelFloat = !!newValue;
64
+ }
60
65
  //---------------------------------------------
61
66
  // Private methods
62
67
  //---------------------------------------------
@@ -84,6 +89,8 @@ const EzTextInput = class {
84
89
  if (this._inputElem && !this._inputElem.classList.contains("input--with--label")) {
85
90
  this._inputElem.classList.add("input--with--label");
86
91
  }
92
+ if (this.forceLabelFloat)
93
+ return;
87
94
  const hasValue = this.value && this.value.toString().length > 0;
88
95
  const containsFloatedClass = this._labelElem.classList.contains("input__label--floated");
89
96
  if (hasValue || this.isFocused()) {
@@ -259,6 +266,19 @@ const EzTextInput = class {
259
266
  getValue() {
260
267
  return this.mask && this.cleanValueMask ? this.applyMask(this.value) : this.value;
261
268
  }
269
+ buildLabelClass() {
270
+ let classList = this.enabled ? 'input__label' : 'input__label input__label--disabled';
271
+ if (this.errorMessage)
272
+ classList = classList + ' hasError';
273
+ if (this.forceLabelFloat)
274
+ classList = classList + ' input__label--floated';
275
+ return classList;
276
+ }
277
+ buildPlaceholder() {
278
+ if (this.alternativePlaceholder)
279
+ return this.alternativePlaceholder;
280
+ return (this.mode === "slim" && this.label) ? this.label : '';
281
+ }
262
282
  checkIsOverflowing() {
263
283
  if (this._inputElem) {
264
284
  this._isOverflowing = this._inputElem.offsetWidth < this._inputElem.scrollWidth;
@@ -308,11 +328,14 @@ const EzTextInput = class {
308
328
  this._inputElem.setSelectionRange(0, (_a = this._inputElem) === null || _a === void 0 ? void 0 : _a.value.length);
309
329
  });
310
330
  }
331
+ componentDidRender() {
332
+ this.adjustFloatingLabel();
333
+ }
311
334
  render() {
312
335
  core.ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
313
336
  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" ?
314
- 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)
315
- : 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.getValue(), disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), index.h("ez-tooltip", { anchoringElement: this._hostElement, message: this.getValue(), active: this._isOverflowing, useAnchorSize: true }), this.canShowError && this.mode != "slim" && this.errorMessage &&
337
+ index.h("label", { ref: (el) => this._labelElem = el, class: this.buildLabelClass(), onClick: () => this._inputElem.focus(), title: this.label }, this.label)
338
+ : 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.buildPlaceholder(), value: this.getValue(), disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), index.h("ez-tooltip", { anchoringElement: this._hostElement, message: this.getValue(), active: this._isOverflowing, useAnchorSize: true }), this.canShowError && this.mode != "slim" && this.errorMessage &&
316
339
  index.h("ez-tooltip", { type: "error", message: this.errorMessage }, 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); } }, " ")));
317
340
  }
318
341
  get _hostElement() { return index.getElement(this); }
@@ -321,7 +344,8 @@ const EzTextInput = class {
321
344
  "errorMessage": ["observeHasInvalid"],
322
345
  "canShowError": ["observeHasInvalid"],
323
346
  "mask": ["observeMask"],
324
- "value": ["observeValue"]
347
+ "value": ["observeValue"],
348
+ "alternativePlaceholder": ["observeAlternativePlaceholder"]
325
349
  }; }
326
350
  };
327
351
  EzTextInput.style = ezTextInputCss;
@@ -22,6 +22,7 @@ const EzTimeInput = class {
22
22
  this.mode = "regular";
23
23
  this.canShowError = true;
24
24
  this.autoFocus = false;
25
+ this.alternativePlaceholder = undefined;
25
26
  }
26
27
  observeErrorMessage() {
27
28
  var _a;
@@ -159,7 +160,7 @@ const EzTimeInput = class {
159
160
  }
160
161
  render() {
161
162
  core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
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" }))));
163
+ 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, alternativePlaceholder: this.alternativePlaceholder }, index.h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
163
164
  }
164
165
  static get assetsDirs() { return ["../assets"]; }
165
166
  get _elem() { return index.getElement(this); }