@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-66441.1 → 0.0.0-bugfix-dev-KB-67199.1

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.
@@ -80,7 +80,9 @@ const EzCustomFormInput = class {
80
80
  if (typeof gui === 'string') {
81
81
  gui = core.HTMLBuilder.parseElement(gui);
82
82
  }
83
- gui.setAttribute('value', this.value);
83
+ if (this.value) {
84
+ gui.setAttribute('value', typeof this.value === 'object' ? this.value.value : this.value);
85
+ }
84
86
  this.gui = index.h("div", { key: core.StringUtils.generateUUID(), ref: el => el && el.appendChild(gui) });
85
87
  }
86
88
  setValue(value) {
@@ -90,8 +92,9 @@ const EzCustomFormInput = class {
90
92
  return this.value;
91
93
  }
92
94
  handleValue(gui) {
95
+ var _a;
93
96
  //@ts-ignore
94
- gui.$children$.forEach((child) => {
97
+ (_a = gui.$children$) === null || _a === void 0 ? void 0 : _a.forEach((child) => {
95
98
  child.$attrs$.value = this.value;
96
99
  });
97
100
  }
@@ -120422,9 +120422,11 @@ class AgGridController {
120422
120422
  //Existem colunas implícitas que não tem estado, essas colunas são sempre as primeiras.
120423
120423
  //Como vamos reordenar, precisamos considerar o deslocamento provocado por elas.
120424
120424
  const columnsOffset = colDef.length - columns.length;
120425
+ this._gridConfig = state;
120425
120426
  let sort = [];
120426
120427
  state === null || state === void 0 ? void 0 : state.forEach((cfgColumn, index) => {
120427
- const colWidth = this._gridOptions.columnApi.getColumn(cfgColumn.name).getActualWidth();
120428
+ var _a;
120429
+ const colWidth = (_a = this._gridOptions.columnApi.getColumn(cfgColumn.name)) === null || _a === void 0 ? void 0 : _a.getActualWidth();
120428
120430
  this._gridOptions.columnApi.moveColumn(cfgColumn.name, index + columnsOffset);
120429
120431
  this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, colWidth);
120430
120432
  visibleColumns.push(cfgColumn.name);
@@ -120439,7 +120441,6 @@ class AgGridController {
120439
120441
  state: sort,
120440
120442
  defaultState: { sort: null },
120441
120443
  });
120442
- this._gridConfig = state;
120443
120444
  }
120444
120445
  getAdaptiveWidth(width) {
120445
120446
  const widthGrid = this._container.clientWidth;
@@ -24,6 +24,7 @@ const EzSearch = class {
24
24
  this._tabPressed = false;
25
25
  this._textEmptyList = "Nenhum resultado encontrado";
26
26
  this._textEmptySearch = "Nenhum resultado de {0} encontrado";
27
+ this._lookupMode = false;
27
28
  this._startHighlightTag = "<span class='card-item__highlight'>";
28
29
  this._endHighlightTag = "</span>";
29
30
  this._preSelection = undefined;
@@ -52,35 +53,36 @@ const EzSearch = class {
52
53
  var _a;
53
54
  if (this._textInput) {
54
55
  this._textInput.errorMessage = this.errorMessage;
55
- if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim()) && this.errorMessage) {
56
+ if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
56
57
  this.setInputValue();
57
58
  }
58
59
  }
59
60
  }
60
- validateNewValue(newValue, oldValue) {
61
- if (typeof newValue == 'string' && typeof oldValue == 'object' && newValue === (oldValue === null || oldValue === void 0 ? void 0 : oldValue.value))
62
- return false;
63
- if (typeof newValue == 'object' && typeof oldValue == 'string' && (newValue === null || newValue === void 0 ? void 0 : newValue.value) === oldValue)
64
- return false;
65
- if (typeof newValue == 'object' && typeof oldValue == 'object' && (newValue === null || newValue === void 0 ? void 0 : newValue.value) === (oldValue === null || oldValue === void 0 ? void 0 : oldValue.value))
66
- return false;
67
- return true;
68
- }
69
61
  async observeValue(newValue, oldValue) {
70
- if (this._textInput && newValue != oldValue && this.validateNewValue(newValue, oldValue)) {
71
- if (typeof newValue === "string") {
72
- await this.handleValueAsString(newValue);
73
- return;
62
+ if (this._textInput && newValue != oldValue) {
63
+ try {
64
+ if (typeof newValue === "string") {
65
+ await this.handleValueAsString(newValue);
66
+ return;
67
+ }
68
+ const newValueSelected = this.getSelectedOption(newValue);
69
+ const oldValueSelected = this.getSelectedOption(oldValue);
70
+ const currentValue = this.getSelectedOption(this.value);
71
+ if (this.isDifferentValues(currentValue, newValueSelected)) {
72
+ this.value = newValueSelected;
73
+ }
74
+ if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
75
+ this.setInputValue();
76
+ const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
77
+ if (!this._lookupMode) {
78
+ this.ezChange.emit(valueEmitted);
79
+ }
80
+ }
81
+ this.resetOptions();
74
82
  }
75
- const newValueSelected = this.getSelectedOption(newValue);
76
- const currentValue = this.getSelectedOption(this._currentValue);
77
- if (this.isDifferentValues(currentValue, newValueSelected)) {
78
- this._currentValue = newValueSelected;
79
- this.setInputValue();
80
- const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
81
- this.ezChange.emit(valueEmitted);
83
+ finally {
84
+ this._lookupMode = false;
82
85
  }
83
- this.resetOptions();
84
86
  }
85
87
  }
86
88
  observeOptions(newOptions, oldOptions) {
@@ -153,9 +155,7 @@ const EzSearch = class {
153
155
  return;
154
156
  }
155
157
  await this.loadDescriptionValue(value);
156
- this.setInputValue();
157
158
  this.ezChange.emit(this.value);
158
- this._currentValue = this.value;
159
159
  }
160
160
  updateListPosition() {
161
161
  let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
@@ -212,7 +212,7 @@ const EzSearch = class {
212
212
  return text;
213
213
  }
214
214
  getText() {
215
- const currentValue = this.getSelectedOption(this._currentValue);
215
+ const currentValue = this.getSelectedOption(this.value);
216
216
  const text = this.getFormattedText(currentValue);
217
217
  if (text == undefined) {
218
218
  return;
@@ -387,7 +387,6 @@ const EzSearch = class {
387
387
  || (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
388
388
  const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
389
389
  this.value = adjustedOpt;
390
- this._currentValue = adjustedOpt;
391
390
  }
392
391
  else {
393
392
  this.setInputValue();
@@ -408,7 +407,7 @@ const EzSearch = class {
408
407
  }
409
408
  }
410
409
  cancelPreselection() {
411
- if (!this._textInput.value && this._currentValue) {
410
+ if (!this._textInput.value && this.value) {
412
411
  this.selectOption(undefined);
413
412
  }
414
413
  else {
@@ -429,7 +428,6 @@ const EzSearch = class {
429
428
  }
430
429
  clearSearch() {
431
430
  this.value = null;
432
- this._currentValue = null;
433
431
  }
434
432
  controlListWithOnlyOne() {
435
433
  var _a, _b;
@@ -459,13 +457,13 @@ const EzSearch = class {
459
457
  if (core.StringUtils.isEmpty(this.value)) {
460
458
  return;
461
459
  }
462
- if (!this.validateNewValue(this.value, this._currentValue)) {
463
- return;
464
- }
465
460
  let value = this.value;
466
461
  if (typeof value === "object") {
467
462
  return;
468
463
  }
464
+ if (core.StringUtils.isEmpty(value)) {
465
+ return;
466
+ }
469
467
  this.loadDescriptionValue(value);
470
468
  }
471
469
  async loadDescriptionValue(argument) {
@@ -500,8 +498,8 @@ const EzSearch = class {
500
498
  this.showNoResultMessage();
501
499
  return;
502
500
  }
503
- this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
504
- this.value = this._currentValue;
501
+ this._lookupMode = true;
502
+ this.value = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
505
503
  }
506
504
  loadOptionValue(argument) {
507
505
  var _a;
@@ -71,7 +71,9 @@ export class EzCustomFormInput {
71
71
  if (typeof gui === 'string') {
72
72
  gui = HTMLBuilder.parseElement(gui);
73
73
  }
74
- gui.setAttribute('value', this.value);
74
+ if (this.value) {
75
+ gui.setAttribute('value', typeof this.value === 'object' ? this.value.value : this.value);
76
+ }
75
77
  this.gui = h("div", { key: StringUtils.generateUUID(), ref: el => el && el.appendChild(gui) });
76
78
  }
77
79
  setValue(value) {
@@ -81,8 +83,9 @@ export class EzCustomFormInput {
81
83
  return this.value;
82
84
  }
83
85
  handleValue(gui) {
86
+ var _a;
84
87
  //@ts-ignore
85
- gui.$children$.forEach((child) => {
88
+ (_a = gui.$children$) === null || _a === void 0 ? void 0 : _a.forEach((child) => {
86
89
  child.$attrs$.value = this.value;
87
90
  });
88
91
  }
@@ -576,9 +576,11 @@ export default class AgGridController {
576
576
  //Existem colunas implícitas que não tem estado, essas colunas são sempre as primeiras.
577
577
  //Como vamos reordenar, precisamos considerar o deslocamento provocado por elas.
578
578
  const columnsOffset = colDef.length - columns.length;
579
+ this._gridConfig = state;
579
580
  let sort = [];
580
581
  state === null || state === void 0 ? void 0 : state.forEach((cfgColumn, index) => {
581
- const colWidth = this._gridOptions.columnApi.getColumn(cfgColumn.name).getActualWidth();
582
+ var _a;
583
+ const colWidth = (_a = this._gridOptions.columnApi.getColumn(cfgColumn.name)) === null || _a === void 0 ? void 0 : _a.getActualWidth();
582
584
  this._gridOptions.columnApi.moveColumn(cfgColumn.name, index + columnsOffset);
583
585
  this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, colWidth);
584
586
  visibleColumns.push(cfgColumn.name);
@@ -593,7 +595,6 @@ export default class AgGridController {
593
595
  state: sort,
594
596
  defaultState: { sort: null },
595
597
  });
596
- this._gridConfig = state;
597
598
  }
598
599
  getAdaptiveWidth(width) {
599
600
  const widthGrid = this._container.clientWidth;
@@ -12,6 +12,7 @@ export class EzSearch {
12
12
  this._tabPressed = false;
13
13
  this._textEmptyList = "Nenhum resultado encontrado";
14
14
  this._textEmptySearch = "Nenhum resultado de {0} encontrado";
15
+ this._lookupMode = false;
15
16
  this._startHighlightTag = "<span class='card-item__highlight'>";
16
17
  this._endHighlightTag = "</span>";
17
18
  this._preSelection = undefined;
@@ -40,35 +41,36 @@ export class EzSearch {
40
41
  var _a;
41
42
  if (this._textInput) {
42
43
  this._textInput.errorMessage = this.errorMessage;
43
- if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim()) && this.errorMessage) {
44
+ if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
44
45
  this.setInputValue();
45
46
  }
46
47
  }
47
48
  }
48
- validateNewValue(newValue, oldValue) {
49
- if (typeof newValue == 'string' && typeof oldValue == 'object' && newValue === (oldValue === null || oldValue === void 0 ? void 0 : oldValue.value))
50
- return false;
51
- if (typeof newValue == 'object' && typeof oldValue == 'string' && (newValue === null || newValue === void 0 ? void 0 : newValue.value) === oldValue)
52
- return false;
53
- if (typeof newValue == 'object' && typeof oldValue == 'object' && (newValue === null || newValue === void 0 ? void 0 : newValue.value) === (oldValue === null || oldValue === void 0 ? void 0 : oldValue.value))
54
- return false;
55
- return true;
56
- }
57
49
  async observeValue(newValue, oldValue) {
58
- if (this._textInput && newValue != oldValue && this.validateNewValue(newValue, oldValue)) {
59
- if (typeof newValue === "string") {
60
- await this.handleValueAsString(newValue);
61
- return;
50
+ if (this._textInput && newValue != oldValue) {
51
+ try {
52
+ if (typeof newValue === "string") {
53
+ await this.handleValueAsString(newValue);
54
+ return;
55
+ }
56
+ const newValueSelected = this.getSelectedOption(newValue);
57
+ const oldValueSelected = this.getSelectedOption(oldValue);
58
+ const currentValue = this.getSelectedOption(this.value);
59
+ if (this.isDifferentValues(currentValue, newValueSelected)) {
60
+ this.value = newValueSelected;
61
+ }
62
+ if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
63
+ this.setInputValue();
64
+ const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
65
+ if (!this._lookupMode) {
66
+ this.ezChange.emit(valueEmitted);
67
+ }
68
+ }
69
+ this.resetOptions();
62
70
  }
63
- const newValueSelected = this.getSelectedOption(newValue);
64
- const currentValue = this.getSelectedOption(this._currentValue);
65
- if (this.isDifferentValues(currentValue, newValueSelected)) {
66
- this._currentValue = newValueSelected;
67
- this.setInputValue();
68
- const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
69
- this.ezChange.emit(valueEmitted);
71
+ finally {
72
+ this._lookupMode = false;
70
73
  }
71
- this.resetOptions();
72
74
  }
73
75
  }
74
76
  observeOptions(newOptions, oldOptions) {
@@ -141,9 +143,7 @@ export class EzSearch {
141
143
  return;
142
144
  }
143
145
  await this.loadDescriptionValue(value);
144
- this.setInputValue();
145
146
  this.ezChange.emit(this.value);
146
- this._currentValue = this.value;
147
147
  }
148
148
  updateListPosition() {
149
149
  let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
@@ -200,7 +200,7 @@ export class EzSearch {
200
200
  return text;
201
201
  }
202
202
  getText() {
203
- const currentValue = this.getSelectedOption(this._currentValue);
203
+ const currentValue = this.getSelectedOption(this.value);
204
204
  const text = this.getFormattedText(currentValue);
205
205
  if (text == undefined) {
206
206
  return;
@@ -375,7 +375,6 @@ export class EzSearch {
375
375
  || (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
376
376
  const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
377
377
  this.value = adjustedOpt;
378
- this._currentValue = adjustedOpt;
379
378
  }
380
379
  else {
381
380
  this.setInputValue();
@@ -396,7 +395,7 @@ export class EzSearch {
396
395
  }
397
396
  }
398
397
  cancelPreselection() {
399
- if (!this._textInput.value && this._currentValue) {
398
+ if (!this._textInput.value && this.value) {
400
399
  this.selectOption(undefined);
401
400
  }
402
401
  else {
@@ -417,7 +416,6 @@ export class EzSearch {
417
416
  }
418
417
  clearSearch() {
419
418
  this.value = null;
420
- this._currentValue = null;
421
419
  }
422
420
  controlListWithOnlyOne() {
423
421
  var _a, _b;
@@ -447,13 +445,13 @@ export class EzSearch {
447
445
  if (StringUtils.isEmpty(this.value)) {
448
446
  return;
449
447
  }
450
- if (!this.validateNewValue(this.value, this._currentValue)) {
451
- return;
452
- }
453
448
  let value = this.value;
454
449
  if (typeof value === "object") {
455
450
  return;
456
451
  }
452
+ if (StringUtils.isEmpty(value)) {
453
+ return;
454
+ }
457
455
  this.loadDescriptionValue(value);
458
456
  }
459
457
  async loadDescriptionValue(argument) {
@@ -488,8 +486,8 @@ export class EzSearch {
488
486
  this.showNoResultMessage();
489
487
  return;
490
488
  }
491
- this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
492
- this.value = this._currentValue;
489
+ this._lookupMode = true;
490
+ this.value = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
493
491
  }
494
492
  loadOptionValue(argument) {
495
493
  var _a;
@@ -3456,7 +3456,9 @@ const EzCustomFormInput$1 = class extends HTMLElement$1 {
3456
3456
  if (typeof gui === 'string') {
3457
3457
  gui = HTMLBuilder.parseElement(gui);
3458
3458
  }
3459
- gui.setAttribute('value', this.value);
3459
+ if (this.value) {
3460
+ gui.setAttribute('value', typeof this.value === 'object' ? this.value.value : this.value);
3461
+ }
3460
3462
  this.gui = h("div", { key: StringUtils$1.generateUUID(), ref: el => el && el.appendChild(gui) });
3461
3463
  }
3462
3464
  setValue(value) {
@@ -3466,8 +3468,9 @@ const EzCustomFormInput$1 = class extends HTMLElement$1 {
3466
3468
  return this.value;
3467
3469
  }
3468
3470
  handleValue(gui) {
3471
+ var _a;
3469
3472
  //@ts-ignore
3470
- gui.$children$.forEach((child) => {
3473
+ (_a = gui.$children$) === null || _a === void 0 ? void 0 : _a.forEach((child) => {
3471
3474
  child.$attrs$.value = this.value;
3472
3475
  });
3473
3476
  }
@@ -125988,9 +125991,11 @@ class AgGridController {
125988
125991
  //Existem colunas implícitas que não tem estado, essas colunas são sempre as primeiras.
125989
125992
  //Como vamos reordenar, precisamos considerar o deslocamento provocado por elas.
125990
125993
  const columnsOffset = colDef.length - columns.length;
125994
+ this._gridConfig = state;
125991
125995
  let sort = [];
125992
125996
  state === null || state === void 0 ? void 0 : state.forEach((cfgColumn, index) => {
125993
- const colWidth = this._gridOptions.columnApi.getColumn(cfgColumn.name).getActualWidth();
125997
+ var _a;
125998
+ const colWidth = (_a = this._gridOptions.columnApi.getColumn(cfgColumn.name)) === null || _a === void 0 ? void 0 : _a.getActualWidth();
125994
125999
  this._gridOptions.columnApi.moveColumn(cfgColumn.name, index + columnsOffset);
125995
126000
  this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, colWidth);
125996
126001
  visibleColumns.push(cfgColumn.name);
@@ -126005,7 +126010,6 @@ class AgGridController {
126005
126010
  state: sort,
126006
126011
  defaultState: { sort: null },
126007
126012
  });
126008
- this._gridConfig = state;
126009
126013
  }
126010
126014
  getAdaptiveWidth(width) {
126011
126015
  const widthGrid = this._container.clientWidth;
@@ -128687,6 +128691,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
128687
128691
  this._tabPressed = false;
128688
128692
  this._textEmptyList = "Nenhum resultado encontrado";
128689
128693
  this._textEmptySearch = "Nenhum resultado de {0} encontrado";
128694
+ this._lookupMode = false;
128690
128695
  this._startHighlightTag = "<span class='card-item__highlight'>";
128691
128696
  this._endHighlightTag = "</span>";
128692
128697
  this._preSelection = undefined;
@@ -128715,35 +128720,36 @@ const EzSearch$1 = class extends HTMLElement$1 {
128715
128720
  var _a;
128716
128721
  if (this._textInput) {
128717
128722
  this._textInput.errorMessage = this.errorMessage;
128718
- if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim()) && this.errorMessage) {
128723
+ if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
128719
128724
  this.setInputValue();
128720
128725
  }
128721
128726
  }
128722
128727
  }
128723
- validateNewValue(newValue, oldValue) {
128724
- if (typeof newValue == 'string' && typeof oldValue == 'object' && newValue === (oldValue === null || oldValue === void 0 ? void 0 : oldValue.value))
128725
- return false;
128726
- if (typeof newValue == 'object' && typeof oldValue == 'string' && (newValue === null || newValue === void 0 ? void 0 : newValue.value) === oldValue)
128727
- return false;
128728
- if (typeof newValue == 'object' && typeof oldValue == 'object' && (newValue === null || newValue === void 0 ? void 0 : newValue.value) === (oldValue === null || oldValue === void 0 ? void 0 : oldValue.value))
128729
- return false;
128730
- return true;
128731
- }
128732
128728
  async observeValue(newValue, oldValue) {
128733
- if (this._textInput && newValue != oldValue && this.validateNewValue(newValue, oldValue)) {
128734
- if (typeof newValue === "string") {
128735
- await this.handleValueAsString(newValue);
128736
- return;
128729
+ if (this._textInput && newValue != oldValue) {
128730
+ try {
128731
+ if (typeof newValue === "string") {
128732
+ await this.handleValueAsString(newValue);
128733
+ return;
128734
+ }
128735
+ const newValueSelected = this.getSelectedOption(newValue);
128736
+ const oldValueSelected = this.getSelectedOption(oldValue);
128737
+ const currentValue = this.getSelectedOption(this.value);
128738
+ if (this.isDifferentValues(currentValue, newValueSelected)) {
128739
+ this.value = newValueSelected;
128740
+ }
128741
+ if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
128742
+ this.setInputValue();
128743
+ const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
128744
+ if (!this._lookupMode) {
128745
+ this.ezChange.emit(valueEmitted);
128746
+ }
128747
+ }
128748
+ this.resetOptions();
128737
128749
  }
128738
- const newValueSelected = this.getSelectedOption(newValue);
128739
- const currentValue = this.getSelectedOption(this._currentValue);
128740
- if (this.isDifferentValues(currentValue, newValueSelected)) {
128741
- this._currentValue = newValueSelected;
128742
- this.setInputValue();
128743
- const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
128744
- this.ezChange.emit(valueEmitted);
128750
+ finally {
128751
+ this._lookupMode = false;
128745
128752
  }
128746
- this.resetOptions();
128747
128753
  }
128748
128754
  }
128749
128755
  observeOptions(newOptions, oldOptions) {
@@ -128816,9 +128822,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
128816
128822
  return;
128817
128823
  }
128818
128824
  await this.loadDescriptionValue(value);
128819
- this.setInputValue();
128820
128825
  this.ezChange.emit(this.value);
128821
- this._currentValue = this.value;
128822
128826
  }
128823
128827
  updateListPosition() {
128824
128828
  let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
@@ -128875,7 +128879,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
128875
128879
  return text;
128876
128880
  }
128877
128881
  getText() {
128878
- const currentValue = this.getSelectedOption(this._currentValue);
128882
+ const currentValue = this.getSelectedOption(this.value);
128879
128883
  const text = this.getFormattedText(currentValue);
128880
128884
  if (text == undefined) {
128881
128885
  return;
@@ -129050,7 +129054,6 @@ const EzSearch$1 = class extends HTMLElement$1 {
129050
129054
  || (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
129051
129055
  const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
129052
129056
  this.value = adjustedOpt;
129053
- this._currentValue = adjustedOpt;
129054
129057
  }
129055
129058
  else {
129056
129059
  this.setInputValue();
@@ -129071,7 +129074,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
129071
129074
  }
129072
129075
  }
129073
129076
  cancelPreselection() {
129074
- if (!this._textInput.value && this._currentValue) {
129077
+ if (!this._textInput.value && this.value) {
129075
129078
  this.selectOption(undefined);
129076
129079
  }
129077
129080
  else {
@@ -129092,7 +129095,6 @@ const EzSearch$1 = class extends HTMLElement$1 {
129092
129095
  }
129093
129096
  clearSearch() {
129094
129097
  this.value = null;
129095
- this._currentValue = null;
129096
129098
  }
129097
129099
  controlListWithOnlyOne() {
129098
129100
  var _a, _b;
@@ -129122,13 +129124,13 @@ const EzSearch$1 = class extends HTMLElement$1 {
129122
129124
  if (StringUtils$1.isEmpty(this.value)) {
129123
129125
  return;
129124
129126
  }
129125
- if (!this.validateNewValue(this.value, this._currentValue)) {
129126
- return;
129127
- }
129128
129127
  let value = this.value;
129129
129128
  if (typeof value === "object") {
129130
129129
  return;
129131
129130
  }
129131
+ if (StringUtils$1.isEmpty(value)) {
129132
+ return;
129133
+ }
129132
129134
  this.loadDescriptionValue(value);
129133
129135
  }
129134
129136
  async loadDescriptionValue(argument) {
@@ -129163,8 +129165,8 @@ const EzSearch$1 = class extends HTMLElement$1 {
129163
129165
  this.showNoResultMessage();
129164
129166
  return;
129165
129167
  }
129166
- this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
129167
- this.value = this._currentValue;
129168
+ this._lookupMode = true;
129169
+ this.value = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
129168
129170
  }
129169
129171
  loadOptionValue(argument) {
129170
129172
  var _a;
@@ -76,7 +76,9 @@ const EzCustomFormInput = class {
76
76
  if (typeof gui === 'string') {
77
77
  gui = HTMLBuilder.parseElement(gui);
78
78
  }
79
- gui.setAttribute('value', this.value);
79
+ if (this.value) {
80
+ gui.setAttribute('value', typeof this.value === 'object' ? this.value.value : this.value);
81
+ }
80
82
  this.gui = h("div", { key: StringUtils.generateUUID(), ref: el => el && el.appendChild(gui) });
81
83
  }
82
84
  setValue(value) {
@@ -86,8 +88,9 @@ const EzCustomFormInput = class {
86
88
  return this.value;
87
89
  }
88
90
  handleValue(gui) {
91
+ var _a;
89
92
  //@ts-ignore
90
- gui.$children$.forEach((child) => {
93
+ (_a = gui.$children$) === null || _a === void 0 ? void 0 : _a.forEach((child) => {
91
94
  child.$attrs$.value = this.value;
92
95
  });
93
96
  }
@@ -120418,9 +120418,11 @@ class AgGridController {
120418
120418
  //Existem colunas implícitas que não tem estado, essas colunas são sempre as primeiras.
120419
120419
  //Como vamos reordenar, precisamos considerar o deslocamento provocado por elas.
120420
120420
  const columnsOffset = colDef.length - columns.length;
120421
+ this._gridConfig = state;
120421
120422
  let sort = [];
120422
120423
  state === null || state === void 0 ? void 0 : state.forEach((cfgColumn, index) => {
120423
- const colWidth = this._gridOptions.columnApi.getColumn(cfgColumn.name).getActualWidth();
120424
+ var _a;
120425
+ const colWidth = (_a = this._gridOptions.columnApi.getColumn(cfgColumn.name)) === null || _a === void 0 ? void 0 : _a.getActualWidth();
120424
120426
  this._gridOptions.columnApi.moveColumn(cfgColumn.name, index + columnsOffset);
120425
120427
  this._gridOptions.columnApi.setColumnWidth(cfgColumn.name, colWidth);
120426
120428
  visibleColumns.push(cfgColumn.name);
@@ -120435,7 +120437,6 @@ class AgGridController {
120435
120437
  state: sort,
120436
120438
  defaultState: { sort: null },
120437
120439
  });
120438
- this._gridConfig = state;
120439
120440
  }
120440
120441
  getAdaptiveWidth(width) {
120441
120442
  const widthGrid = this._container.clientWidth;