@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.
- package/core/components/pages/error/error.page.component.d.ts +3 -0
- package/core/components/pages/not-found/not-found.page.component.d.ts +3 -0
- package/core/enum/enum-helpers.d.ts +5 -0
- package/core/index.d.ts +1 -1
- package/core/services/{local-storage-config.service.d.ts → commons-storage.service.d.ts} +4 -3
- package/core/services/commons.service.d.ts +24 -0
- package/core/services/tokens/module-config.token.d.ts +23 -2
- package/esm2022/core/components/pages/error/error.page.component.mjs +4 -1
- package/esm2022/core/components/pages/not-found/not-found.page.component.mjs +4 -1
- package/esm2022/core/enum/enum-helpers.mjs +10 -1
- package/esm2022/core/index.mjs +2 -2
- package/esm2022/core/pipes/enum.pipe.mjs +16 -5
- package/esm2022/core/provide.mjs +3 -3
- package/esm2022/core/router/route-builder.mjs +8 -1
- package/esm2022/core/security/permission.guard.mjs +2 -2
- package/esm2022/core/security/permission.service.mjs +2 -2
- package/esm2022/core/services/commons-storage.service.mjs +31 -0
- package/esm2022/core/services/commons.service.mjs +25 -1
- package/esm2022/core/services/tokens/module-config.token.mjs +1 -1
- package/esm2022/table/components/table/table.component.mjs +6 -6
- package/fesm2022/mediusinc-mng-commons-core.mjs +72 -14
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +5 -5
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/i18n/en.json +8 -0
- package/i18n/sl.json +8 -0
- package/package.json +1 -1
- package/table/components/table/table.component.d.ts +1 -1
- package/version-info.json +5 -5
- 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,
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
1307
|
+
this.storageService.removeItem(this.cmpTypeName, key);
|
|
1308
1308
|
this.layoutPrefsSaveCnt.update(v => v + 1);
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|