@mediusinc/mng-commons 5.3.0-rc.0 → 5.3.0-rc.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.
Files changed (30) hide show
  1. package/core/components/pages/error/error.page.component.d.ts +3 -0
  2. package/core/components/pages/not-found/not-found.page.component.d.ts +3 -0
  3. package/core/enum/enum-helpers.d.ts +5 -0
  4. package/core/index.d.ts +1 -1
  5. package/core/services/{local-storage-config.service.d.ts → commons-storage.service.d.ts} +4 -3
  6. package/core/services/commons.service.d.ts +24 -0
  7. package/core/services/tokens/module-config.token.d.ts +23 -2
  8. package/esm2022/core/components/pages/error/error.page.component.mjs +4 -1
  9. package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +4 -1
  10. package/esm2022/core/enum/enum-helpers.mjs +10 -1
  11. package/esm2022/core/index.mjs +2 -2
  12. package/esm2022/core/pipes/enum.pipe.mjs +16 -5
  13. package/esm2022/core/provide.mjs +3 -3
  14. package/esm2022/core/router/route-builder.mjs +8 -1
  15. package/esm2022/core/security/permission.guard.mjs +2 -2
  16. package/esm2022/core/security/permission.service.mjs +2 -2
  17. package/esm2022/core/services/commons-storage.service.mjs +31 -0
  18. package/esm2022/core/services/commons.service.mjs +25 -1
  19. package/esm2022/core/services/tokens/module-config.token.mjs +1 -1
  20. package/esm2022/table/components/table/table.component.mjs +6 -6
  21. package/fesm2022/mediusinc-mng-commons-core.mjs +72 -14
  22. package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
  23. package/fesm2022/mediusinc-mng-commons-table.mjs +5 -5
  24. package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
  25. package/i18n/en.json +8 -0
  26. package/i18n/sl.json +8 -0
  27. package/package.json +1 -1
  28. package/table/components/table/table.component.d.ts +1 -1
  29. package/version-info.json +5 -5
  30. package/esm2022/core/services/local-storage-config.service.mjs +0 -29
@@ -24,7 +24,7 @@ import * as i4 from 'primeng/tristatecheckbox';
24
24
  import { TriStateCheckboxModule } from 'primeng/tristatecheckbox';
25
25
  import { ZIndexUtils } from 'primeng/utils';
26
26
  import { Subject, debounceTime, distinctUntilChanged, switchMap, of, combineLatest, NEVER } from 'rxjs';
27
- import { COMMONS_MODULE_CONFIG_IT, FilterMatchMode, dateToIsoString, GetterPipe, TemplatePipe, BooleanPipe, EnumPipe, ComponentDirective, toastMessage, CommonsService, LoggerService, LocalStorageService, booleanOrUndefinedAttribute, TemplateDirective, findTemplateByName, mergeDataListParamsWithDefaults, fromTableLoadToDataListParams, dataListParamsToUrlQuery, toObservable as toObservable$1, fromSubscribeError, getErrorLogLevel, fromUrlQueryToDataListParams, I18nPropertyPipe, ClassMapPipe } from '@mediusinc/mng-commons/core';
27
+ import { COMMONS_MODULE_CONFIG_IT, FilterMatchMode, dateToIsoString, GetterPipe, TemplatePipe, BooleanPipe, EnumPipe, ComponentDirective, toastMessage, CommonsService, LoggerService, CommonsStorageService, booleanOrUndefinedAttribute, TemplateDirective, findTemplateByName, mergeDataListParamsWithDefaults, fromTableLoadToDataListParams, dataListParamsToUrlQuery, toObservable as toObservable$1, fromSubscribeError, getErrorLogLevel, fromUrlQueryToDataListParams, I18nPropertyPipe, ClassMapPipe } from '@mediusinc/mng-commons/core';
28
28
  import { FilterLookupTypeEnum, FilterTypeEnum } from '@mediusinc/mng-commons/filter';
29
29
  import { DateRangeComponent, AutocompleteComponent, DropdownComponent, InputTrimDirective, NumberRangeComponent } from '@mediusinc/mng-commons/form';
30
30
  import * as i4$1 from 'primeng/button';
@@ -835,7 +835,7 @@ class TableComponent {
835
835
  this.translate = inject(TranslateService);
836
836
  this.messageService = inject(MessageService);
837
837
  this.commons = inject(CommonsService);
838
- this.localStorageService = inject(LocalStorageService);
838
+ this.storageService = inject(CommonsStorageService);
839
839
  this.dataListService = inject((DataListService));
840
840
  // metadata input
841
841
  this.descriptorInput = input.required({ alias: 'descriptor' });
@@ -929,7 +929,7 @@ class TableComponent {
929
929
  const lsKey = this.localstorageKey();
930
930
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
931
931
  const cnt = this.layoutPrefsSaveCnt(); // needed to force updates on user changes
932
- const layoutPrefs = lsKey ? this.localStorageService.getItem(this.cmpTypeName, lsKey) : undefined;
932
+ const layoutPrefs = lsKey ? this.storageService.getItem(this.cmpTypeName, lsKey) : undefined;
933
933
  return layoutPrefs ?? { columnWidths: {} };
934
934
  });
935
935
  this.columns = computed(() => this.computeColumnsWithLayout());
@@ -1215,7 +1215,7 @@ class TableComponent {
1215
1215
  saveLayoutPreferences(layoutPrefs) {
1216
1216
  const key = this.localstorageKey();
1217
1217
  if (key) {
1218
- this.localStorageService.setItem(this.cmpTypeName, key, layoutPrefs);
1218
+ this.storageService.setItem(this.cmpTypeName, key, layoutPrefs);
1219
1219
  this.layoutPrefsSaveCnt.update(v => v + 1);
1220
1220
  }
1221
1221
  }
@@ -1304,7 +1304,7 @@ class TableComponent {
1304
1304
  resetDefaultLayout() {
1305
1305
  const key = this.localstorageKey();
1306
1306
  if (key) {
1307
- this.localStorageService.removeItem(this.cmpTypeName, key);
1307
+ this.storageService.removeItem(this.cmpTypeName, key);
1308
1308
  this.layoutPrefsSaveCnt.update(v => v + 1);
1309
1309
  }
1310
1310
  }