@igo2/common 1.15.1 → 1.15.3

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 (53) hide show
  1. package/esm2020/lib/action/index.mjs +1 -1
  2. package/esm2020/lib/action/shared/action.enums.mjs +1 -1
  3. package/esm2020/lib/action/shared/index.mjs +1 -1
  4. package/esm2020/lib/backdrop/index.mjs +1 -1
  5. package/esm2020/lib/badge-icon/index.mjs +1 -1
  6. package/esm2020/lib/clickout/clickout.directive.mjs +1 -1
  7. package/esm2020/lib/clickout/index.mjs +1 -1
  8. package/esm2020/lib/clone/index.mjs +1 -1
  9. package/esm2020/lib/collapsible/index.mjs +1 -1
  10. package/esm2020/lib/confirm-dialog/index.mjs +1 -1
  11. package/esm2020/lib/context-menu/index.mjs +1 -1
  12. package/esm2020/lib/custom-html/index.mjs +1 -1
  13. package/esm2020/lib/dom/index.mjs +1 -1
  14. package/esm2020/lib/drag-drop/index.mjs +1 -1
  15. package/esm2020/lib/dynamic-component/index.mjs +1 -1
  16. package/esm2020/lib/dynamic-component/shared/dynamic-component.interfaces.mjs +1 -1
  17. package/esm2020/lib/dynamic-component/shared/index.mjs +1 -1
  18. package/esm2020/lib/entity/entity-table/entity-table.component.mjs +12 -4
  19. package/esm2020/lib/entity/index.mjs +1 -1
  20. package/esm2020/lib/entity/shared/entity.enums.mjs +1 -1
  21. package/esm2020/lib/entity/shared/index.mjs +1 -1
  22. package/esm2020/lib/entity/shared/strategies/index.mjs +1 -1
  23. package/esm2020/lib/flexible/flexible.type.mjs +1 -1
  24. package/esm2020/lib/flexible/index.mjs +1 -1
  25. package/esm2020/lib/form/form-field/index.mjs +1 -1
  26. package/esm2020/lib/form/index.mjs +1 -1
  27. package/esm2020/lib/form/shared/index.mjs +1 -1
  28. package/esm2020/lib/home-button/index.mjs +1 -1
  29. package/esm2020/lib/image/index.mjs +1 -1
  30. package/esm2020/lib/interactive-tour/index.mjs +1 -1
  31. package/esm2020/lib/json-dialog/index.mjs +1 -1
  32. package/esm2020/lib/keyvalue/index.mjs +1 -1
  33. package/esm2020/lib/list/index.mjs +1 -1
  34. package/esm2020/lib/panel/index.mjs +1 -1
  35. package/esm2020/lib/sidenav/index.mjs +1 -1
  36. package/esm2020/lib/spinner/index.mjs +1 -1
  37. package/esm2020/lib/stop-propagation/index.mjs +1 -1
  38. package/esm2020/lib/table/index.mjs +1 -1
  39. package/esm2020/lib/table/table-action-color.enum.mjs +1 -1
  40. package/esm2020/lib/tool/index.mjs +1 -1
  41. package/esm2020/lib/tool/shared/index.mjs +1 -1
  42. package/esm2020/lib/tool/shared/toolbox.enums.mjs +1 -1
  43. package/esm2020/lib/widget/index.mjs +1 -1
  44. package/esm2020/lib/widget/shared/index.mjs +1 -1
  45. package/esm2020/lib/workspace/index.mjs +1 -1
  46. package/esm2020/lib/workspace/shared/index.mjs +1 -1
  47. package/esm2020/public_api.mjs +1 -1
  48. package/fesm2015/igo2-common.mjs +11 -3
  49. package/fesm2015/igo2-common.mjs.map +1 -1
  50. package/fesm2020/igo2-common.mjs +11 -3
  51. package/fesm2020/igo2-common.mjs.map +1 -1
  52. package/lib/entity/entity-table/entity-table.component.d.ts +6 -0
  53. package/package.json +3 -3
@@ -2969,7 +2969,7 @@ class EntityTableComponent {
2969
2969
  }));
2970
2970
  let formControlValue = item[key];
2971
2971
  column.domainValues.forEach(option => {
2972
- if (typeof formControlValue === 'string' && /^\d+$/.test(formControlValue)) {
2972
+ if (this.isStringValidNumber(formControlValue)) {
2973
2973
  formControlValue = parseInt(formControlValue);
2974
2974
  }
2975
2975
  if (option.value === formControlValue || option.id === formControlValue) {
@@ -3292,7 +3292,7 @@ class EntityTableComponent {
3292
3292
  }
3293
3293
  else {
3294
3294
  column.domainValues.forEach(option => {
3295
- if (typeof value === 'string' && /^\d+$/.test(value)) {
3295
+ if (this.isStringValidNumber(value)) {
3296
3296
  value = parseInt(value);
3297
3297
  }
3298
3298
  if (option.value === value || option.id === value) {
@@ -3309,7 +3309,7 @@ class EntityTableComponent {
3309
3309
  }
3310
3310
  else {
3311
3311
  column.domainValues.forEach(option => {
3312
- if (typeof value === 'string' && /^\d+$/.test(value)) {
3312
+ if (this.isStringValidNumber(value)) {
3313
3313
  value = parseInt(value);
3314
3314
  }
3315
3315
  if (option.value === value || option.id === value) {
@@ -3442,6 +3442,14 @@ class EntityTableComponent {
3442
3442
  }
3443
3443
  return column;
3444
3444
  }
3445
+ /**
3446
+ * Check if string is a valid number
3447
+ * @param value string
3448
+ * @returns boolean
3449
+ */
3450
+ isStringValidNumber(value) {
3451
+ return typeof value === 'string' && /^\d+$/.test(value) && (value.length > 1 && value.charAt(0) !== '0');
3452
+ }
3445
3453
  }
3446
3454
  EntityTableComponent.ɵfac = function EntityTableComponent_Factory(t) { return new (t || EntityTableComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$4.UntypedFormBuilder), i0.ɵɵdirectiveInject(i2$1.FocusMonitor), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$4.NgControl, 10), i0.ɵɵdirectiveInject(i1$4.NgForm, 8), i0.ɵɵdirectiveInject(i1$4.FormControlName, 8), i0.ɵɵdirectiveInject(i3$1.ErrorStateMatcher), i0.ɵɵdirectiveInject(i3$1.DateAdapter)); };
3447
3455
  EntityTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EntityTableComponent, selectors: [["igo-entity-table"]], inputs: { store: "store", paginator: "paginator", template: "template", scrollBehavior: "scrollBehavior", sortNullsFirst: "sortNullsFirst", withPaginator: "withPaginator", paginatorOptions: "paginatorOptions" }, outputs: { entityClick: "entityClick", entitySelectChange: "entitySelectChange", entitySortChange: "entitySortChange" }, features: [i0.ɵɵProvidersFeature([{ provide: MatFormFieldControl, useExisting: EntityTableComponent }]), i0.ɵɵNgOnChangesFeature], decls: 9, vars: 11, consts: [[1, "table-container", 3, "ngStyle"], ["mat-table", "", "matSort", "", 3, "ngClass", "dataSource", "trackBy", "matSortChange"], ["matColumnDef", "selectionCheckbox", 1, "mat-cell-checkbox"], ["mat-header-cell", "", 4, "matHeaderCellDef"], ["mat-cell", "", 4, "matCellDef"], [3, "matColumnDef", 4, "ngFor", "ngForOf"], ["mat-header-row", "", 3, "ngClass", 4, "matHeaderRowDef", "matHeaderRowDefSticky"], ["mat-row", "", "igoEntityTableRow", "", 3, "scrollBehavior", "ngClass", "selection", "selected", "select", "click", 4, "matRowDef", "matRowDefColumns"], [3, "store", "paginatorOptions", "entitySortChange$", "paginatorChange", 4, "ngIf"], ["mat-header-cell", ""], [4, "ngIf"], [3, "checked", "indeterminate", "change"], ["mat-cell", ""], [3, "checked", "mousedown", "click", "change"], [3, "matColumnDef"], ["mat-header-cell", "", "mat-sort-header", "", 3, "matTooltip", 4, "matHeaderCellDef"], ["mat-header-cell", "", "mat-sort-header", "", 3, "matTooltip"], ["mat-header-cell", "", 3, "matTooltip", 4, "matHeaderCellDef"], ["mat-header-cell", "", 3, "matTooltip"], [4, "matCellDef"], ["mat-cell", "", "class", "mat-cell-text", 3, "ngClass", 4, "ngIf", "ngIfElse"], ["isAnUrlDefault", ""], ["mat-cell", "", 1, "mat-cell-text", 3, "ngClass"], ["target", "_blank", "rel", "noopener noreferrer", 3, "href", "click"], ["igoImageError", "", "width", "50", "heigth", "auto", 3, "src", 4, "ngIf", "ngIfElse"], ["notImg", ""], ["igoImageError", "", "width", "50", "heigth", "auto", 3, "src"], ["mat-cell", "", "class", "mat-cell-text", 3, "ngClass", "innerHTML", 4, "ngIf", "ngIfElse"], ["isAnUrlHTML", ""], ["mat-cell", "", 1, "mat-cell-text", 3, "ngClass", "innerHTML"], ["mat-cell", "", "class", "mat-cell-text edition", 3, "formGroup", "ngClass", 4, "ngIf", "ngIfElse"], ["isUnsanitizedHTML", ""], ["mat-cell", "", 1, "mat-cell-text", "edition", 3, "formGroup", "ngClass"], ["class", "date-picker", 4, "ngIf"], ["matInput", "", "type", "time", "step", "900", 3, "formControlName", "focus", "keypress", "blur", 4, "ngIf"], ["matInput", "", "type", "number", "class", "class_number_edition", 3, "formControlName", "step", "value", "readonly", "required", "min", "max", "input", 4, "ngIf"], ["matInput", "", "type", "text", 3, "formControlName", "value", "readonly", "required", "input", 4, "ngIf"], [3, "formControlName", "checked", "change", 4, "ngIf"], [3, "required", "formControlName", "multiple", "value", "selectionChange", 4, "ngIf"], ["matInput", "", "type", "text", 3, "formControlName", "matAutocomplete", "required", "value", "readonly", 4, "ngIf"], ["panelWidth", "430px", 3, "optionSelected"], ["auto", "matAutocomplete"], [3, "value", 4, "ngFor", "ngForOf"], [1, "date-picker"], ["matSuffix", "", 3, "for"], ["matInput", "", 3, "matDatepicker", "formControlName", "value", "dateChange"], ["picker", ""], ["matInput", "", "type", "time", "step", "900", 3, "formControlName", "focus", "keypress", "blur"], ["matInput", "", "type", "number", 1, "class_number_edition", 3, "formControlName", "step", "value", "readonly", "required", "min", "max", "input"], ["matInput", "", "type", "text", 3, "formControlName", "value", "readonly", "required", "input"], [3, "formControlName", "checked", "change"], [3, "required", "formControlName", "multiple", "value", "selectionChange"], [3, "value", "disabled", 4, "ngFor", "ngForOf"], [3, "value", "disabled"], ["matInput", "", "type", "text", 3, "formControlName", "matAutocomplete", "required", "value", "readonly"], [3, "value"], ["isAnUrlUnsanitizedHTML", ""], ["mat-cell", "", "class", "mat-cell-text", 3, "ngClass", 4, "matCellDef"], [3, "svgIcon", "click", 4, "ngIf"], [3, "svgIcon", 4, "ngIf"], [3, "svgIcon", "click"], [3, "svgIcon"], [4, "ngFor", "ngForOf"], ["igoStopPropagation", "", "mat-icon-button", "", 3, "color", "disabled", "mousedown", 4, "ngIf"], ["igoStopPropagation", "", "mat-mini-fab", "", 3, "color", "disabled", "mousedown", 4, "ngIf"], ["igoStopPropagation", "", "mat-icon-button", "", 3, "color", "disabled", "mousedown"], ["igoStopPropagation", "", "mat-mini-fab", "", 3, "color", "disabled", "mousedown"], ["mat-header-row", "", 3, "ngClass"], ["mat-row", "", "igoEntityTableRow", "", 3, "scrollBehavior", "ngClass", "selection", "selected", "select", "click"], [3, "store", "paginatorOptions", "entitySortChange$", "paginatorChange"]], template: function EntityTableComponent_Template(rf, ctx) { if (rf & 1) {