wt-front-shared 1.0.47 → 1.0.50

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 (27) hide show
  1. package/esm2020/lib/core/+state/static-data/behavios/static-data-patch-update-behavior.mjs +39 -0
  2. package/esm2020/lib/core/+state/static-data/static-data.actions.mjs +4 -1
  3. package/esm2020/lib/core/+state/static-data/static-data.effects.mjs +15 -19
  4. package/esm2020/lib/core/+state/static-data/static-data.facade.mjs +13 -2
  5. package/esm2020/lib/core/+state/static-data/static-data.reducer.mjs +26 -2
  6. package/esm2020/lib/core/components/static-data/components/static-data-list-items/static-data-list-items.component.mjs +16 -11
  7. package/esm2020/lib/core/components/static-data/containers/static-data-details/static-data-details.component.mjs +2 -2
  8. package/esm2020/lib/core/services/static-data/static-data.service.mjs +4 -1
  9. package/esm2020/lib/models/endpoints/http/request/index.mjs +2 -1
  10. package/esm2020/lib/models/endpoints/http/request/patch-request.mjs +9 -0
  11. package/esm2020/lib/models/endpoints/http/request/request-method.mjs +2 -1
  12. package/esm2020/lib/models/endpoints/static-data/static-data-endpoint-types.mjs +2 -1
  13. package/fesm2015/wt-front-shared.mjs +99 -28
  14. package/fesm2015/wt-front-shared.mjs.map +1 -1
  15. package/fesm2020/wt-front-shared.mjs +114 -28
  16. package/fesm2020/wt-front-shared.mjs.map +1 -1
  17. package/lib/core/+state/static-data/behavios/static-data-patch-update-behavior.d.ts +10 -0
  18. package/lib/core/+state/static-data/static-data.actions.d.ts +23 -0
  19. package/lib/core/+state/static-data/static-data.effects.d.ts +1 -0
  20. package/lib/core/+state/static-data/static-data.facade.d.ts +1 -0
  21. package/lib/core/components/static-data/components/static-data-list-items/static-data-list-items.component.d.ts +2 -2
  22. package/lib/core/services/static-data/static-data.service.d.ts +1 -0
  23. package/lib/models/endpoints/http/request/index.d.ts +1 -0
  24. package/lib/models/endpoints/http/request/patch-request.d.ts +6 -0
  25. package/lib/models/endpoints/http/request/request-method.d.ts +2 -1
  26. package/lib/models/endpoints/static-data/static-data-endpoint-types.d.ts +2 -1
  27. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ import { Request } from './request';
2
+ import { RequestMethod } from './request-method';
3
+ export class PatchRequest extends Request {
4
+ constructor() {
5
+ super(...arguments);
6
+ this.httpMethod = RequestMethod.PATCH;
7
+ }
8
+ }
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0Y2gtcmVxdWVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3d0LWZyb250LXNoYXJlZC9zcmMvbGliL21vZGVscy9lbmRwb2ludHMvaHR0cC9yZXF1ZXN0L3BhdGNoLXJlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFdBQVcsQ0FBQztBQUNwQyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFakQsTUFBTSxPQUFnQixZQUFhLFNBQVEsT0FBTztJQUFsRDs7UUFDRSxlQUFVLEdBQUcsYUFBYSxDQUFDLEtBQUssQ0FBQztJQUduQyxDQUFDO0NBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBSZXF1ZXN0IH0gZnJvbSAnLi9yZXF1ZXN0JztcbmltcG9ydCB7IFJlcXVlc3RNZXRob2QgfSBmcm9tICcuL3JlcXVlc3QtbWV0aG9kJztcblxuZXhwb3J0IGFic3RyYWN0IGNsYXNzIFBhdGNoUmVxdWVzdCBleHRlbmRzIFJlcXVlc3Qge1xuICBodHRwTWV0aG9kID0gUmVxdWVzdE1ldGhvZC5QQVRDSDtcblxuICBhYnN0cmFjdCBnZXQgYm9keSgpOiBhbnk7XG59XG4iXX0=
@@ -4,5 +4,6 @@ export var RequestMethod;
4
4
  RequestMethod["POST"] = "post";
5
5
  RequestMethod["PUT"] = "put";
6
6
  RequestMethod["DELETE"] = "delete";
7
+ RequestMethod["PATCH"] = "patch";
7
8
  })(RequestMethod || (RequestMethod = {}));
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdC1tZXRob2QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93dC1mcm9udC1zaGFyZWQvc3JjL2xpYi9tb2RlbHMvZW5kcG9pbnRzL2h0dHAvcmVxdWVzdC9yZXF1ZXN0LW1ldGhvZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxhQUtYO0FBTEQsV0FBWSxhQUFhO0lBQ3ZCLDRCQUFXLENBQUE7SUFDWCw4QkFBYSxDQUFBO0lBQ2IsNEJBQVcsQ0FBQTtJQUNYLGtDQUFpQixDQUFBO0FBQ25CLENBQUMsRUFMVyxhQUFhLEtBQWIsYUFBYSxRQUt4QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIFJlcXVlc3RNZXRob2Qge1xuICBHRVQgPSAnZ2V0JyxcbiAgUE9TVCA9ICdwb3N0JyxcbiAgUFVUID0gJ3B1dCcsXG4gIERFTEVURSA9ICdkZWxldGUnXG59XG4iXX0=
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdC1tZXRob2QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93dC1mcm9udC1zaGFyZWQvc3JjL2xpYi9tb2RlbHMvZW5kcG9pbnRzL2h0dHAvcmVxdWVzdC9yZXF1ZXN0LW1ldGhvZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxhQU1YO0FBTkQsV0FBWSxhQUFhO0lBQ3ZCLDRCQUFXLENBQUE7SUFDWCw4QkFBYSxDQUFBO0lBQ2IsNEJBQVcsQ0FBQTtJQUNYLGtDQUFpQixDQUFBO0lBQ2pCLGdDQUFlLENBQUE7QUFDakIsQ0FBQyxFQU5XLGFBQWEsS0FBYixhQUFhLFFBTXhCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gUmVxdWVzdE1ldGhvZCB7XG4gIEdFVCA9ICdnZXQnLFxuICBQT1NUID0gJ3Bvc3QnLFxuICBQVVQgPSAncHV0JyxcbiAgREVMRVRFID0gJ2RlbGV0ZScsXG4gIFBBVENIID0gJ3BhdGNoJyxcbn1cbiJdfQ==
@@ -7,5 +7,6 @@ export var StaticDataEndpointTypes;
7
7
  StaticDataEndpointTypes["GET_LIST_CATEGORIES"] = "getListCategories";
8
8
  StaticDataEndpointTypes["GET"] = "get";
9
9
  StaticDataEndpointTypes["UPDATE"] = "update";
10
+ StaticDataEndpointTypes["PATCH_UPDATE"] = "patchUpdate";
10
11
  })(StaticDataEndpointTypes || (StaticDataEndpointTypes = {}));
11
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdGljLWRhdGEtZW5kcG9pbnQtdHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93dC1mcm9udC1zaGFyZWQvc3JjL2xpYi9tb2RlbHMvZW5kcG9pbnRzL3N0YXRpYy1kYXRhL3N0YXRpYy1kYXRhLWVuZHBvaW50LXR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLHVCQVFYO0FBUkQsV0FBWSx1QkFBdUI7SUFDakMsNENBQWlCLENBQUE7SUFDakIsNENBQWlCLENBQUE7SUFDakIsK0NBQW9CLENBQUE7SUFDcEIsNERBQWlDLENBQUE7SUFDakMsb0VBQXlDLENBQUE7SUFDekMsc0NBQVcsQ0FBQTtJQUNYLDRDQUFpQixDQUFBO0FBQ25CLENBQUMsRUFSVyx1QkFBdUIsS0FBdkIsdUJBQXVCLFFBUWxDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gU3RhdGljRGF0YUVuZHBvaW50VHlwZXMge1xuICBDUkVBVEUgPSAnY3JlYXRlJyxcbiAgREVMRVRFID0gJ2RlbGV0ZScsXG4gIEdFVF9MSVNUID0gJ2dldExpc3QnLFxuICBHRVRfU1VCX1JPVVRJTkcgPSAnZ2V0U3ViUm91dGluZycsXG4gIEdFVF9MSVNUX0NBVEVHT1JJRVMgPSAnZ2V0TGlzdENhdGVnb3JpZXMnLFxuICBHRVQgPSAnZ2V0JyxcbiAgVVBEQVRFID0gJ3VwZGF0ZSdcbn1cbiJdfQ==
12
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdGljLWRhdGEtZW5kcG9pbnQtdHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy93dC1mcm9udC1zaGFyZWQvc3JjL2xpYi9tb2RlbHMvZW5kcG9pbnRzL3N0YXRpYy1kYXRhL3N0YXRpYy1kYXRhLWVuZHBvaW50LXR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLHVCQVNYO0FBVEQsV0FBWSx1QkFBdUI7SUFDakMsNENBQWlCLENBQUE7SUFDakIsNENBQWlCLENBQUE7SUFDakIsK0NBQW9CLENBQUE7SUFDcEIsNERBQWlDLENBQUE7SUFDakMsb0VBQXlDLENBQUE7SUFDekMsc0NBQVcsQ0FBQTtJQUNYLDRDQUFpQixDQUFBO0lBQ2pCLHVEQUE0QixDQUFBO0FBQzlCLENBQUMsRUFUVyx1QkFBdUIsS0FBdkIsdUJBQXVCLFFBU2xDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gU3RhdGljRGF0YUVuZHBvaW50VHlwZXMge1xuICBDUkVBVEUgPSAnY3JlYXRlJyxcbiAgREVMRVRFID0gJ2RlbGV0ZScsXG4gIEdFVF9MSVNUID0gJ2dldExpc3QnLFxuICBHRVRfU1VCX1JPVVRJTkcgPSAnZ2V0U3ViUm91dGluZycsXG4gIEdFVF9MSVNUX0NBVEVHT1JJRVMgPSAnZ2V0TGlzdENhdGVnb3JpZXMnLFxuICBHRVQgPSAnZ2V0JyxcbiAgVVBEQVRFID0gJ3VwZGF0ZScsXG4gIFBBVENIX1VQREFURSA9ICdwYXRjaFVwZGF0ZSdcbn1cbiJdfQ==
@@ -483,6 +483,7 @@ var RequestMethod;
483
483
  RequestMethod["POST"] = "post";
484
484
  RequestMethod["PUT"] = "put";
485
485
  RequestMethod["DELETE"] = "delete";
486
+ RequestMethod["PATCH"] = "patch";
486
487
  })(RequestMethod || (RequestMethod = {}));
487
488
 
488
489
  class GetRequest extends Request {
@@ -535,6 +536,13 @@ class PutRequest extends Request {
535
536
  }
536
537
  }
537
538
 
539
+ class PatchRequest extends Request {
540
+ constructor() {
541
+ super(...arguments);
542
+ this.httpMethod = RequestMethod.PATCH;
543
+ }
544
+ }
545
+
538
546
  class PostRequest extends Request {
539
547
  constructor() {
540
548
  super(...arguments);
@@ -1057,6 +1065,7 @@ var StaticDataEndpointTypes;
1057
1065
  StaticDataEndpointTypes["GET_LIST_CATEGORIES"] = "getListCategories";
1058
1066
  StaticDataEndpointTypes["GET"] = "get";
1059
1067
  StaticDataEndpointTypes["UPDATE"] = "update";
1068
+ StaticDataEndpointTypes["PATCH_UPDATE"] = "patchUpdate";
1060
1069
  })(StaticDataEndpointTypes || (StaticDataEndpointTypes = {}));
1061
1070
 
1062
1071
  class StaticDataCreateRequest extends PostRequest {
@@ -4681,6 +4690,9 @@ const StaticDataDeleteFail = createAction('[StaticData] StaticData Delete Error'
4681
4690
  const StaticDataUpdate = createAction('[StaticData] StaticData Update', props());
4682
4691
  const StaticDataUpdateSuccess = createAction('[StaticData] StaticData Update Success', props());
4683
4692
  const StaticDataUpdateFail = createAction('[StaticData] StaticData Update Fail', props());
4693
+ const StaticDataPatchUpdate = createAction('[StaticData] StaticData Patch Update', props());
4694
+ const StaticDataPatchUpdateSuccess = createAction('[StaticData] StaticData Patch Update Success', props());
4695
+ const StaticDataPatchUpdateFail = createAction('[StaticData] StaticData Patch Update Fail', props());
4684
4696
  const StaticDataGet = createAction('[StaticData] FGet StaticData', props());
4685
4697
  const StaticDataGetSuccess = createAction('[StaticData] Get StaticData Success', props());
4686
4698
  const StaticDataGetFail = createAction('[StaticData] Get StaticData Fail', props());
@@ -4885,6 +4897,43 @@ class StaticDataGetListCategoriesBehavior extends Behavior {
4885
4897
  }
4886
4898
  }
4887
4899
 
4900
+ class StaticDataPatchUpdateBehavior extends Behavior {
4901
+ constructor(action, result) {
4902
+ super(action);
4903
+ this.action = action;
4904
+ this.result = result;
4905
+ }
4906
+ resolve() {
4907
+ var _a, _b, _c, _d;
4908
+ const status = (_a = this.result.data) === null || _a === void 0 ? void 0 : _a.status;
4909
+ let returnedActions;
4910
+ const error = (_b = this.result.data.body) === null || _b === void 0 ? void 0 : _b.error;
4911
+ switch (status) {
4912
+ case ResponseStatus.STATUS_200:
4913
+ case ResponseStatus.STATUS_201: {
4914
+ const response = this.result.data;
4915
+ const { data, meta } = response.body;
4916
+ returnedActions = [
4917
+ StaticDataPatchUpdateSuccess({ payload: { data, contentType: meta === null || meta === void 0 ? void 0 : meta.staticDataType, itemId: data.id } })
4918
+ ];
4919
+ break;
4920
+ }
4921
+ default: {
4922
+ returnedActions = [
4923
+ StaticDataPatchUpdateFail({
4924
+ payload: {
4925
+ error,
4926
+ contentType: (_c = error === null || error === void 0 ? void 0 : error.payload) === null || _c === void 0 ? void 0 : _c.contentType,
4927
+ itemId: (_d = error === null || error === void 0 ? void 0 : error.payload) === null || _d === void 0 ? void 0 : _d.itemId
4928
+ }
4929
+ })
4930
+ ];
4931
+ }
4932
+ }
4933
+ return [...returnedActions];
4934
+ }
4935
+ }
4936
+
4888
4937
  var IFormFieldFormat;
4889
4938
  (function (IFormFieldFormat) {
4890
4939
  IFormFieldFormat["Date"] = "date";
@@ -5452,6 +5501,9 @@ class StaticDataService extends BaseAPIService {
5452
5501
  update(config) {
5453
5502
  return this.doRequest(config, StaticDataEndpointTypes.UPDATE);
5454
5503
  }
5504
+ patchUpdate(config) {
5505
+ return this.doRequest(config, StaticDataEndpointTypes.PATCH_UPDATE);
5506
+ }
5455
5507
  }
5456
5508
  StaticDataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataService, deps: [{ token: i1$1.HttpClient }, { token: CORE_CONFIG }, { token: RequestsFacade }, { token: FormsFacade }], target: i0.ɵɵFactoryTarget.Injectable });
5457
5509
  StaticDataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataService, providedIn: 'root' });
@@ -5749,23 +5801,12 @@ class StaticDataEffects extends BaseEffects {
5749
5801
  return this.staticDataService.update(config)
5750
5802
  .pipe(flatMap((r) => new StaticDataUpdateBehavior(action, r).resolve()));
5751
5803
  })));
5752
- /*
5753
-
5754
- @Effect({dispatch: false})
5755
- staticDataUpdateSuccess$ = this.actions$.pipe(
5756
- ofType(StaticDataUpdateSuccess),
5757
- tap((action) => {
5758
- const {contentType, itemId} = action.payload;
5759
- this.notificationsFacade.addNotifications({
5760
- id: `form-message-update-${contentType}-${itemId}`,
5761
- type: 'success',
5762
- text: MESSAGES.update.text,
5763
- title: MESSAGES.update.title,
5764
- timeout: NOTIFICATION_TIMEOUT
5765
- });
5766
- })
5767
- );
5768
- */
5804
+ this.staticDataPatchUpdate$ = createEffect(() => this.actions$.pipe(ofType(StaticDataPatchUpdate), switchMap$1((action) => {
5805
+ const headers = this.authenticationService.loadAuthDataFromLocalStore();
5806
+ const config = Object.assign(Object.assign({}, action.payload), { headers: { token: headers.token, uid: headers.id }, formId: action.payload.formId, contentType: action.payload.contentType, itemId: action.payload.itemId });
5807
+ return this.staticDataService.patchUpdate(config)
5808
+ .pipe(flatMap((r) => new StaticDataPatchUpdateBehavior(action, r).resolve()));
5809
+ })));
5769
5810
  this.staticDataGetListCategories$ = createEffect(() => this.actions$.pipe(ofType(StaticDataGetListCategories), switchMap$1((action) => {
5770
5811
  const { contentTypes } = action.payload;
5771
5812
  const config = {
@@ -5903,6 +5944,18 @@ const _staticDataReducer$2 = createReducer(initialState$3, on(StaticDataGetList,
5903
5944
  const key = getFormKey$1(contentType, itemId);
5904
5945
  const newList = ((_b = (_a = state.list[contentType]) === null || _a === void 0 ? void 0 : _a.list) === null || _b === void 0 ? void 0 : _b.filter(item => item.id !== Number(itemId))) || [];
5905
5946
  return Object.assign(Object.assign({}, state), { list: Object.assign(Object.assign({}, state.list), { [contentType]: { list: [...newList, data] } }), meta: Object.assign(Object.assign({}, state.meta), { [key]: Object.assign(Object.assign({}, state.meta[key]), { list: { status: StaticDataMetaStatus$1.LOADED } }) }) });
5947
+ }), on(StaticDataPatchUpdateSuccess, (state, action) => {
5948
+ var _a, _b;
5949
+ const { contentType, itemId, data } = action.payload;
5950
+ const key = getFormKey$1(contentType, itemId);
5951
+ const newList = ((_b = (_a = state.list[contentType]) === null || _a === void 0 ? void 0 : _a.list) === null || _b === void 0 ? void 0 : _b.map(item => {
5952
+ let newItem = Object.assign({}, item);
5953
+ if (newItem.id === Number(itemId)) {
5954
+ newItem = Object.assign(Object.assign({}, newItem), data);
5955
+ }
5956
+ return Object.assign({}, newItem);
5957
+ })) || [];
5958
+ return Object.assign(Object.assign({}, state), { list: Object.assign(Object.assign({}, state.list), { [contentType]: { list: [...newList, data] } }), meta: Object.assign(Object.assign({}, state.meta), { [key]: Object.assign(Object.assign({}, state.meta[key]), { list: { status: StaticDataMetaStatus$1.LOADED } }) }) });
5906
5959
  }), on(StaticDataGetListCategories, (state, action) => {
5907
5960
  const { contentTypes } = action.payload;
5908
5961
  const newState = Object.assign(Object.assign({}, state), { meta: Object.assign({}, state.meta) });
@@ -6559,6 +6612,17 @@ class StaticDataFacade {
6559
6612
  }
6560
6613
  }));
6561
6614
  }
6615
+ patchUpdate(formId, contentType, itemId, data, publicApi = false) {
6616
+ this.store.dispatch(StaticDataPatchUpdate({
6617
+ payload: {
6618
+ formId,
6619
+ contentType,
6620
+ itemId,
6621
+ data,
6622
+ publicApi
6623
+ }
6624
+ }));
6625
+ }
6562
6626
  staticDataLoadCategories(contentTypes) {
6563
6627
  this.store.dispatch(StaticDataGetListCategories({
6564
6628
  payload: {
@@ -10243,7 +10307,7 @@ class StaticDataListItemsComponent {
10243
10307
  this.queryParams = null;
10244
10308
  }
10245
10309
  ngOnInit() {
10246
- this.preparingData();
10310
+ // this.preparingData();
10247
10311
  }
10248
10312
  // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
10249
10313
  ngOnDestroy() {
@@ -10273,7 +10337,7 @@ class StaticDataListItemsComponent {
10273
10337
  if (this.parentSection && this.parentItemId) {
10274
10338
  this.queryParams = {
10275
10339
  parentSection: this.parentSection,
10276
- parentItemId: this.parentItemId,
10340
+ parentItemId: this.parentItemId
10277
10341
  };
10278
10342
  if (this.parentSectionHashtag) {
10279
10343
  this.queryParams['parentHashTag'] = this.parentSectionHashtag;
@@ -10292,12 +10356,17 @@ class StaticDataListItemsComponent {
10292
10356
  loadData() {
10293
10357
  var _a;
10294
10358
  this.staticSection = this.staticDataConfiguration[this.contentType];
10295
- this.userRights$ = this.rightService.getUserRoleRightsForSection('static-data', this.contentType);
10296
10359
  if (this.staticSection) {
10297
- this.title = this.customTitle || ((_a = this.staticSection) === null || _a === void 0 ? void 0 : _a.title) || '';
10298
- this.loadStaticData();
10299
- this.loadStaticDataMeta();
10300
- this.changeDetectorRef.markForCheck();
10360
+ this.userRights$ = this.rightService.getUserRoleRightsForSection('static-data', this.contentType);
10361
+ if (this.staticSection) {
10362
+ this.title = this.customTitle || ((_a = this.staticSection) === null || _a === void 0 ? void 0 : _a.title) || '';
10363
+ this.loadStaticData();
10364
+ this.loadStaticDataMeta();
10365
+ this.changeDetectorRef.markForCheck();
10366
+ }
10367
+ }
10368
+ else {
10369
+ console.error('[ wt-front-shared ][ static-data-items ][ loadData ]', 'NOT_FOUND_STATIC_DATA_SECTION', { contentType: this.contentType });
10301
10370
  }
10302
10371
  }
10303
10372
  loadStaticData(pageIndex = 1, perPage = this.perPage, searchValue = '') {
@@ -10380,7 +10449,7 @@ class StaticDataListItemsComponent {
10380
10449
  trueButtonTitle: 'Удалить',
10381
10450
  falseButtonTitle: 'Отменить',
10382
10451
  messageType: 'error',
10383
- size: 'middle',
10452
+ size: 'middle'
10384
10453
  }
10385
10454
  });
10386
10455
  dialogRef.afterClosed().subscribe((result) => {
@@ -10390,7 +10459,8 @@ class StaticDataListItemsComponent {
10390
10459
  });
10391
10460
  }
10392
10461
  preLoadSections() {
10393
- const preLoadSections = this.staticDataConfiguration[this.contentType].preLoadSections;
10462
+ var _a;
10463
+ const preLoadSections = (_a = this.staticDataConfiguration[this.contentType]) === null || _a === void 0 ? void 0 : _a.preLoadSections;
10394
10464
  if (preLoadSections) {
10395
10465
  this.staticDataFacade.staticDataLoadCategories(preLoadSections);
10396
10466
  }
@@ -10722,7 +10792,8 @@ class StaticDataDetailsComponent {
10722
10792
  }
10723
10793
  }
10724
10794
  preLoadSections() {
10725
- const preLoadSections = this.staticDataConfiguration[this.contentType].preLoadSections;
10795
+ var _a;
10796
+ const preLoadSections = (_a = this.staticDataConfiguration[this.contentType]) === null || _a === void 0 ? void 0 : _a.preLoadSections;
10726
10797
  if (preLoadSections) {
10727
10798
  this.staticDataFacade.staticDataLoadCategories(preLoadSections);
10728
10799
  }
@@ -12292,5 +12363,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
12292
12363
  * Generated bundle index. Do not edit.
12293
12364
  */
12294
12365
 
12295
- export { AccessDeniedComponent, AccessDeniedModule, ActionsEndpointTypes, ActionsFacade, ActionsMetaStatus, ActionsModel, ActionsSendRequest, ActionsService, AsyncValidators, AsyncValidatorsMessages, AsyncValidatorsType, AuthEndpointTypes, AuthenticationService, AutoFormMainComponent, AutoFormModule, AutoFormService, AutoFormShowComponent, Back, BaseAPI, BaseAPIService, BaseAutoFormService, BaseErrors, BaseModelAdapter, BaseResponseFactory, BreadCrumbsComponent, BreadCrumbsModule, ButtonComponent, ButtonModule, CORE_CONFIG, CacheDataEndpointTypes, CacheDataFacade, CacheDataModel, CacheDataService, ChipsInputComponent, ChipsInputModule, ClearStaticData, CommonDialogComponent, CookiesService, CoreFacade, CoreLoadError, CoreLoaded, CountFormatPipe, CreateRequestListener, DateFormatPipe, DeleteComponent, DeleteRequest, DeleteRequestWaiter, DialogService, DialogsModule, EntitiesReportsRequest, Entity, EntityQueryFieldNames, EntitySortType, EntityType, FieldType, FileFieldNames, FileModel, FileUpdateModel, FilesDeleteRequest, FilesDeleteResponseFactory, FilesEndpointTypes, FilesFacade, FilesLoadRequest, FilesLoadResponseFactory, FilesService, FilesSortRequest, FilesSortResponseFactory, FilesUpdateRequest, FilesUpdateResponseFactory, FilesUploadComponent, FilesUploadModule, FormDeleteFileBaseEndpointTypes, FormDeleteFileFacade, FormDeleteFileRequest, FormDeleteFileService, FormErrorModel, FormErrorsFacade, FormFieldErrorComponent, FormFieldErrorModule, FormFieldPublishErrorComponent, FormFieldPublishErrorModule, FormValidationCheckRequest, FormValidationEndpointTypes, FormValidationFacade, FormValidationService, FormsFacade, Forward, GetCacheDataRequest, GetRequest, GlobalErrorMessages, GlobalEvent, Go, GoFail, HeaderComponent, HeaderModule, HeadersInterceptor, IFormFieldFormat, IconComponent, ImageComponent, ImageModule, InputTagsComponent, InputTagsModule, JwtInterceptor, LoadCore, LoadUsers, LoadUsersFail, LoadUsersSuccess, LoginSend, LoginSendCreateRequest, LoginSendCreateResponseFactory, LoginSendFail, LoginSendSuccess, MainConst, MainFacade, MapperRegistry, MapperUtil, MetaModel, NOTIFICATION_LONG_TIMEOUT, NOTIFICATION_TIMEOUT, NotificationAdd, NotificationAddFail, NotificationModel, NotificationShowingType, NotificationsEffects, NotificationsFacade, PaginationComponent, PaginationModule, PagingModel, PanelComponent, PanelHeaderComponent, PanelHeaderModule, PanelModule, PasswordRules, PhonePipe, PipesModule, PostRequest, PublicationMessageFieldNames, PublicationMessagesFacade, PublishDataModel, PublishEndpointTypes, PublishErrors, PublishPostRequest, PublishResultModel, PublishService, PutRequest, QueryFieldsAdapter, ReducerService, RefreshToken, RefreshTokenFail, RefreshTokenSuccess, ReportsEndpointTypes, ReportsFacade, ReportsModel, ReportsService, Request, RequestMethods, RequestStatus, RequestsEffects, RequestsFacade, ResponseStatus, RouterEffects, RouterFacade, RouterService, STICKY_SIDEBAR_OPTIONS, SafePipe, SequelizeUniqueConstraintError, SetLoaded, SetRouterQueryParams, SharedFormErrors, SharedIconModule, SharedReducer, SharedSpinnerModule, SiteHelperComponent, SiteHelperModule, SmartProgressBarComponent, SmartProgressBarModule, SocialAuthService, SpinnerComponent, StarRatingComponent, StarRatingModule, StaticDataCreate, StaticDataCreateFail, StaticDataCreateRequest, StaticDataCreateSuccess, StaticDataDelete, StaticDataDeleteFail, StaticDataDeleteRequest, StaticDataDeleteSuccess, StaticDataEffects, StaticDataEndpointTypes, StaticDataFacade, StaticDataGet, StaticDataGetFail, StaticDataGetList, StaticDataGetListCategories, StaticDataGetListCategoriesFail, StaticDataGetListCategoriesRequest, StaticDataGetListCategoriesSuccess, StaticDataGetListFail, StaticDataGetListRequest, StaticDataGetListSuccess, StaticDataGetRequest, StaticDataGetSubRouting, StaticDataGetSubRoutingFail, StaticDataGetSubRoutingSuccess, StaticDataGetSuccess, StaticDataMetaStatus, StaticDataModel, StaticDataModule, StaticDataPartUpdate, StaticDataService, StaticDataSubRoutingGetRequest, StaticDataUpdate, StaticDataUpdateFail, StaticDataUpdateRequest, StaticDataUpdateSuccess, StickySidebarDirective, StickySidebarInnerDirective, StickySidebarModule, StorageProvider, StorageService, TableMenuComponent, TableMenuModule, TagCloudComponent, TagCloudModule, TagEntitiesRequest, TagEntityModel, TagModel, TagsEndpointTypes, TagsFacade, TagsLoadRequest, TagsLoadResponseFactory, TagsService, TextWithLinkMoreComponent, TextWithLinkMoreModule, USERS_FEATURE_KEY, UiUnitIds, UiUnitsEffects, UiUnitsFacade, UnPublishPostRequest, UpdateRequestData, UserFieldNames, UserModel, UserRole, UserSectionRightModel, UsersEffects, UsersFacade, UsersService, ValidatorsType, VersionsModel, WebsocketMessageSubTypes, WebsocketMessageTypes, WebsocketService, WtFrontSharedModule, appearFromLeft, appearFromLeftHideToRight, appearFromLeftWithDelay, appearFromRight, appearFromRightWithDelay, appearOpacity, appearOpacity2, componentDestroyed, coreQuery, defaultStickySidebarOptions, entityScheme, expandCollapse, fileMapper, fileScheme, getAll, getAllUiUnits, getRequestInfo, getRouterLastRoute, getRouterLastRouteParams, getRouterQueryParams, getRouterRoot, getRouterUrl, getUIUnit, getUiUnitDataById, getUserAuthData, guid, hideToTopOpacity, initialState$b as initialState, mappet, notificationQuery, publicationMessageMapper, publicationMessageScheme, requestsQuery, sharedEffects, sharedFacades, staticDataQuery, trackById, uiUnitsQuery, untilComponentDestroyed, userMapper, userReducer, userScheme, usersQuery };
12366
+ export { AccessDeniedComponent, AccessDeniedModule, ActionsEndpointTypes, ActionsFacade, ActionsMetaStatus, ActionsModel, ActionsSendRequest, ActionsService, AsyncValidators, AsyncValidatorsMessages, AsyncValidatorsType, AuthEndpointTypes, AuthenticationService, AutoFormMainComponent, AutoFormModule, AutoFormService, AutoFormShowComponent, Back, BaseAPI, BaseAPIService, BaseAutoFormService, BaseErrors, BaseModelAdapter, BaseResponseFactory, BreadCrumbsComponent, BreadCrumbsModule, ButtonComponent, ButtonModule, CORE_CONFIG, CacheDataEndpointTypes, CacheDataFacade, CacheDataModel, CacheDataService, ChipsInputComponent, ChipsInputModule, ClearStaticData, CommonDialogComponent, CookiesService, CoreFacade, CoreLoadError, CoreLoaded, CountFormatPipe, CreateRequestListener, DateFormatPipe, DeleteComponent, DeleteRequest, DeleteRequestWaiter, DialogService, DialogsModule, EntitiesReportsRequest, Entity, EntityQueryFieldNames, EntitySortType, EntityType, FieldType, FileFieldNames, FileModel, FileUpdateModel, FilesDeleteRequest, FilesDeleteResponseFactory, FilesEndpointTypes, FilesFacade, FilesLoadRequest, FilesLoadResponseFactory, FilesService, FilesSortRequest, FilesSortResponseFactory, FilesUpdateRequest, FilesUpdateResponseFactory, FilesUploadComponent, FilesUploadModule, FormDeleteFileBaseEndpointTypes, FormDeleteFileFacade, FormDeleteFileRequest, FormDeleteFileService, FormErrorModel, FormErrorsFacade, FormFieldErrorComponent, FormFieldErrorModule, FormFieldPublishErrorComponent, FormFieldPublishErrorModule, FormValidationCheckRequest, FormValidationEndpointTypes, FormValidationFacade, FormValidationService, FormsFacade, Forward, GetCacheDataRequest, GetRequest, GlobalErrorMessages, GlobalEvent, Go, GoFail, HeaderComponent, HeaderModule, HeadersInterceptor, IFormFieldFormat, IconComponent, ImageComponent, ImageModule, InputTagsComponent, InputTagsModule, JwtInterceptor, LoadCore, LoadUsers, LoadUsersFail, LoadUsersSuccess, LoginSend, LoginSendCreateRequest, LoginSendCreateResponseFactory, LoginSendFail, LoginSendSuccess, MainConst, MainFacade, MapperRegistry, MapperUtil, MetaModel, NOTIFICATION_LONG_TIMEOUT, NOTIFICATION_TIMEOUT, NotificationAdd, NotificationAddFail, NotificationModel, NotificationShowingType, NotificationsEffects, NotificationsFacade, PaginationComponent, PaginationModule, PagingModel, PanelComponent, PanelHeaderComponent, PanelHeaderModule, PanelModule, PasswordRules, PatchRequest, PhonePipe, PipesModule, PostRequest, PublicationMessageFieldNames, PublicationMessagesFacade, PublishDataModel, PublishEndpointTypes, PublishErrors, PublishPostRequest, PublishResultModel, PublishService, PutRequest, QueryFieldsAdapter, ReducerService, RefreshToken, RefreshTokenFail, RefreshTokenSuccess, ReportsEndpointTypes, ReportsFacade, ReportsModel, ReportsService, Request, RequestMethods, RequestStatus, RequestsEffects, RequestsFacade, ResponseStatus, RouterEffects, RouterFacade, RouterService, STICKY_SIDEBAR_OPTIONS, SafePipe, SequelizeUniqueConstraintError, SetLoaded, SetRouterQueryParams, SharedFormErrors, SharedIconModule, SharedReducer, SharedSpinnerModule, SiteHelperComponent, SiteHelperModule, SmartProgressBarComponent, SmartProgressBarModule, SocialAuthService, SpinnerComponent, StarRatingComponent, StarRatingModule, StaticDataCreate, StaticDataCreateFail, StaticDataCreateRequest, StaticDataCreateSuccess, StaticDataDelete, StaticDataDeleteFail, StaticDataDeleteRequest, StaticDataDeleteSuccess, StaticDataEffects, StaticDataEndpointTypes, StaticDataFacade, StaticDataGet, StaticDataGetFail, StaticDataGetList, StaticDataGetListCategories, StaticDataGetListCategoriesFail, StaticDataGetListCategoriesRequest, StaticDataGetListCategoriesSuccess, StaticDataGetListFail, StaticDataGetListRequest, StaticDataGetListSuccess, StaticDataGetRequest, StaticDataGetSubRouting, StaticDataGetSubRoutingFail, StaticDataGetSubRoutingSuccess, StaticDataGetSuccess, StaticDataMetaStatus, StaticDataModel, StaticDataModule, StaticDataPartUpdate, StaticDataPatchUpdate, StaticDataPatchUpdateFail, StaticDataPatchUpdateSuccess, StaticDataService, StaticDataSubRoutingGetRequest, StaticDataUpdate, StaticDataUpdateFail, StaticDataUpdateRequest, StaticDataUpdateSuccess, StickySidebarDirective, StickySidebarInnerDirective, StickySidebarModule, StorageProvider, StorageService, TableMenuComponent, TableMenuModule, TagCloudComponent, TagCloudModule, TagEntitiesRequest, TagEntityModel, TagModel, TagsEndpointTypes, TagsFacade, TagsLoadRequest, TagsLoadResponseFactory, TagsService, TextWithLinkMoreComponent, TextWithLinkMoreModule, USERS_FEATURE_KEY, UiUnitIds, UiUnitsEffects, UiUnitsFacade, UnPublishPostRequest, UpdateRequestData, UserFieldNames, UserModel, UserRole, UserSectionRightModel, UsersEffects, UsersFacade, UsersService, ValidatorsType, VersionsModel, WebsocketMessageSubTypes, WebsocketMessageTypes, WebsocketService, WtFrontSharedModule, appearFromLeft, appearFromLeftHideToRight, appearFromLeftWithDelay, appearFromRight, appearFromRightWithDelay, appearOpacity, appearOpacity2, componentDestroyed, coreQuery, defaultStickySidebarOptions, entityScheme, expandCollapse, fileMapper, fileScheme, getAll, getAllUiUnits, getRequestInfo, getRouterLastRoute, getRouterLastRouteParams, getRouterQueryParams, getRouterRoot, getRouterUrl, getUIUnit, getUiUnitDataById, getUserAuthData, guid, hideToTopOpacity, initialState$b as initialState, mappet, notificationQuery, publicationMessageMapper, publicationMessageScheme, requestsQuery, sharedEffects, sharedFacades, staticDataQuery, trackById, uiUnitsQuery, untilComponentDestroyed, userMapper, userReducer, userScheme, usersQuery };
12296
12367
  //# sourceMappingURL=wt-front-shared.mjs.map