wt-front-shared 1.0.64 → 1.0.66

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 (40) hide show
  1. package/esm2020/lib/core/+state/static-data/behavios/static-data-get-list-behavior.mjs +2 -2
  2. package/esm2020/lib/core/+state/static-data/static-data.actions.mjs +3 -1
  3. package/esm2020/lib/core/+state/static-data/static-data.effects.mjs +13 -4
  4. package/esm2020/lib/core/+state/static-data/static-data.facade.mjs +72 -23
  5. package/esm2020/lib/core/+state/static-data/static-data.reducer.mjs +34 -3
  6. package/esm2020/lib/core/+state/static-data/static-data.selectors.mjs +33 -3
  7. package/esm2020/lib/core/components/static-data/components/static-data-list-items/static-data-list-items.component.mjs +7 -9
  8. package/esm2020/lib/core/services/static-data/static-data-api.mjs +5 -1
  9. package/esm2020/lib/core/services/static-data/static-data.service.mjs +4 -1
  10. package/esm2020/lib/core/services/websocket.service.mjs +17 -11
  11. package/esm2020/lib/models/endpoints/http/request/request.mjs +3 -3
  12. package/esm2020/lib/models/endpoints/static-data/static-data-endpoint-types.mjs +2 -1
  13. package/esm2020/lib/models/endpoints/static-data/static-data-get-list/request/static-data-get-list-request-config.mjs +1 -1
  14. package/esm2020/lib/models/endpoints/static-data/static-data-get-list/request/static-data-get-list-request.mjs +4 -1
  15. package/esm2020/lib/models/endpoints/static-data/static-data-get-list-categories/request/static-data-get-list-categories-request-config.mjs +1 -1
  16. package/esm2020/lib/models/endpoints/static-data/static-data-get-list-categories/request/static-data-get-list-categories-request.mjs +3 -2
  17. package/esm2020/lib/models/endpoints/static-data/static-data-load-revisions/index.mjs +2 -0
  18. package/esm2020/lib/models/endpoints/static-data/static-data-load-revisions/request/index.mjs +2 -0
  19. package/esm2020/lib/models/endpoints/static-data/static-data-load-revisions/request/static-data-load-revisions-request-config.mjs +2 -0
  20. package/esm2020/lib/models/endpoints/static-data/static-data-load-revisions/request/static-data-load-revisions-request.mjs +21 -0
  21. package/fesm2015/wt-front-shared.mjs +563 -404
  22. package/fesm2015/wt-front-shared.mjs.map +1 -1
  23. package/fesm2020/wt-front-shared.mjs +558 -404
  24. package/fesm2020/wt-front-shared.mjs.map +1 -1
  25. package/lib/core/+state/index.d.ts +1 -1
  26. package/lib/core/+state/static-data/static-data.actions.d.ts +18 -0
  27. package/lib/core/+state/static-data/static-data.effects.d.ts +1 -0
  28. package/lib/core/+state/static-data/static-data.facade.d.ts +10 -3
  29. package/lib/core/+state/static-data/static-data.reducer.d.ts +3 -0
  30. package/lib/core/+state/static-data/static-data.selectors.d.ts +3 -0
  31. package/lib/core/services/static-data/static-data.service.d.ts +2 -0
  32. package/lib/core/services/websocket.service.d.ts +4 -2
  33. package/lib/models/endpoints/static-data/static-data-endpoint-types.d.ts +1 -0
  34. package/lib/models/endpoints/static-data/static-data-get-list/request/static-data-get-list-request-config.d.ts +1 -0
  35. package/lib/models/endpoints/static-data/static-data-get-list-categories/request/static-data-get-list-categories-request-config.d.ts +1 -0
  36. package/lib/models/endpoints/static-data/static-data-load-revisions/index.d.ts +1 -0
  37. package/lib/models/endpoints/static-data/static-data-load-revisions/request/index.d.ts +2 -0
  38. package/lib/models/endpoints/static-data/static-data-load-revisions/request/static-data-load-revisions-request-config.d.ts +4 -0
  39. package/lib/models/endpoints/static-data/static-data-load-revisions/request/static-data-load-revisions-request.d.ts +11 -0
  40. package/package.json +1 -1
@@ -467,10 +467,10 @@ class Request {
467
467
  convertPagingToString(paging) {
468
468
  let res = '';
469
469
  if (paging) {
470
- if (paging.page) {
470
+ if (paging?.page) {
471
471
  res = `page=${paging.page}`;
472
472
  }
473
- if (paging.perPage) {
473
+ if (paging?.perPage) {
474
474
  res += `${res ? '&' : ''}per_page=${paging.perPage}`;
475
475
  }
476
476
  }
@@ -1061,6 +1061,7 @@ var StaticDataEndpointTypes;
1061
1061
  (function (StaticDataEndpointTypes) {
1062
1062
  StaticDataEndpointTypes["CREATE"] = "create";
1063
1063
  StaticDataEndpointTypes["DELETE"] = "delete";
1064
+ StaticDataEndpointTypes["LOAD_REVISION"] = "loadRevision";
1064
1065
  StaticDataEndpointTypes["GET_LIST"] = "getList";
1065
1066
  StaticDataEndpointTypes["GET_SUB_ROUTING"] = "getSubRouting";
1066
1067
  StaticDataEndpointTypes["GET_LIST_CATEGORIES"] = "getListCategories";
@@ -1172,6 +1173,9 @@ class StaticDataGetListRequest extends GetRequest {
1172
1173
  if (this.config.search) {
1173
1174
  url += `${url ? '&' : ''}search=${this.config.search}`;
1174
1175
  }
1176
+ if (this.config.revision) {
1177
+ url += `${url ? '&' : ''}revision=${this.config.revision}`;
1178
+ }
1175
1179
  return `${this.domain}/api/static-data/${this.config.contentType}/${this.config.subSection || 'list'}/${url ? '?' : ''}${url}`;
1176
1180
  }
1177
1181
  get headers() {
@@ -1193,7 +1197,8 @@ class StaticDataGetListCategoriesRequest extends GetRequest {
1193
1197
  }
1194
1198
  get url() {
1195
1199
  const contentTypes = this.config.contentTypes;
1196
- return `${this.domain}/api/static-data/list/?types=${contentTypes.join(',')}`;
1200
+ const revisions = this.config.revisions;
1201
+ return `${this.domain}/api/static-data/list/?types=${contentTypes.join(',')}${revisions ? '&revisions=' + revisions.join(':') : ''}`;
1197
1202
  }
1198
1203
  get headers() {
1199
1204
  return null;
@@ -4795,6 +4800,8 @@ const ClearStaticData = createAction('[StaticData] Clear StaticData', props());
4795
4800
  const StaticDataGetSubRouting = createAction('[StaticData] StaticData Get Sub routing', props());
4796
4801
  const StaticDataGetSubRoutingSuccess = createAction('[StaticData] StaticData Get Sub routing Success', props());
4797
4802
  const StaticDataGetSubRoutingFail = createAction('[StaticData] StaticData Get Sub routing Fail', props());
4803
+ const StaticDataNewRevisions = createAction('[StaticData] StaticDataNewRevisions', props());
4804
+ const StaticDataLoadRevisions = createAction('[StaticData] StaticDataLoadRevisions', props());
4798
4805
 
4799
4806
  class StaticDataGetListBehavior extends Behavior {
4800
4807
  constructor(action, result) {
@@ -4813,7 +4820,7 @@ class StaticDataGetListBehavior extends Behavior {
4813
4820
  if (data) {
4814
4821
  returnedActions = [
4815
4822
  StaticDataGetListSuccess({
4816
- payload: { data, meta, keepState: actionPayload.keepState }
4823
+ payload: { data, meta, keepState: actionPayload?.keepState }
4817
4824
  })
4818
4825
  ];
4819
4826
  }
@@ -5537,6 +5544,26 @@ class StaticDataPatchUpdateRequest extends PatchRequest {
5537
5544
  }
5538
5545
  }
5539
5546
 
5547
+ class StaticDataLoadRevisionsRequest extends GetRequest {
5548
+ constructor(domain, config) {
5549
+ super(domain);
5550
+ this.domain = domain;
5551
+ this.config = config;
5552
+ }
5553
+ get url() {
5554
+ return `${this.domain}/api/static-data/revisions`;
5555
+ }
5556
+ get headers() {
5557
+ return this.addAuthHeaders(this.config.headers);
5558
+ }
5559
+ get params() {
5560
+ return null;
5561
+ }
5562
+ get body() {
5563
+ return null;
5564
+ }
5565
+ }
5566
+
5540
5567
  class StaticDataApi extends BaseAPI {
5541
5568
  constructor(domain) {
5542
5569
  super(domain);
@@ -5545,6 +5572,9 @@ class StaticDataApi extends BaseAPI {
5545
5572
  createRequest(paramsConfig, endPointType) {
5546
5573
  let request;
5547
5574
  switch (endPointType) {
5575
+ case StaticDataEndpointTypes.LOAD_REVISION:
5576
+ request = new StaticDataLoadRevisionsRequest(this.domain, paramsConfig);
5577
+ break;
5548
5578
  case StaticDataEndpointTypes.GET_LIST:
5549
5579
  request = new StaticDataGetListRequest(this.domain, paramsConfig);
5550
5580
  break;
@@ -5588,6 +5618,9 @@ class StaticDataService extends BaseAPIService {
5588
5618
  this.formsFacade = formsFacade;
5589
5619
  this.api = new StaticDataApi(this.config.apiUrl);
5590
5620
  }
5621
+ loadRevision(config) {
5622
+ return this.doRequest(config, StaticDataEndpointTypes.LOAD_REVISION);
5623
+ }
5591
5624
  getList(config) {
5592
5625
  return this.doRequest(config, StaticDataEndpointTypes.GET_LIST);
5593
5626
  }
@@ -5735,234 +5768,6 @@ const StorageProvider = {
5735
5768
  useFactory: cookiesProviderFactory,
5736
5769
  };
5737
5770
 
5738
- var WebsocketMessageTypes;
5739
- (function (WebsocketMessageTypes) {
5740
- WebsocketMessageTypes["USER_ACTIVITY"] = "user-activity";
5741
- })(WebsocketMessageTypes || (WebsocketMessageTypes = {}));
5742
- var WebsocketMessageSubTypes;
5743
- (function (WebsocketMessageSubTypes) {
5744
- WebsocketMessageSubTypes["CHANGE_PAGE"] = "change-page";
5745
- WebsocketMessageSubTypes["OPEN_BOOKING_FORM"] = "open-booking-form";
5746
- WebsocketMessageSubTypes["OPEN_FIRM_CONTACT"] = "open-firm-contact";
5747
- })(WebsocketMessageSubTypes || (WebsocketMessageSubTypes = {}));
5748
- class WebsocketService {
5749
- constructor(config) {
5750
- this.config = config;
5751
- this.wsIsLoaded = false;
5752
- this.maxNumbersOfReloads = 10;
5753
- this.numbersOfReloads = 0;
5754
- this.connectToWebSocket();
5755
- }
5756
- connectToWebSocket() {
5757
- if ("WebSocket" in window) {
5758
- this.ws = new WebSocket(this.config.websocketUrl);
5759
- this.ws.onopen = () => {
5760
- this.numbersOfReloads = 0;
5761
- console.info('[ document ][ WS ][ Connection opened ]', this.sessionKey || '', this.config.websocketUrl);
5762
- this.wsIsLoaded = true;
5763
- };
5764
- this.ws.onmessage = (event) => {
5765
- let message;
5766
- try {
5767
- message = JSON.parse(event.data);
5768
- }
5769
- catch (e) {
5770
- console.info('[ document ][ WS ][ Incorrect message ]', { message: event.data, error: e });
5771
- }
5772
- if (message && !this.sessionKey) {
5773
- if (message?.sessionKey) {
5774
- this.sessionKey = message.sessionKey;
5775
- }
5776
- console.info('[ document ][ WS ][ Message received ]', this.sessionKey, message);
5777
- }
5778
- };
5779
- this.ws.onclose = () => {
5780
- console.info('[ document ][ WS ][ Connection closed ]');
5781
- this.wsIsLoaded = false;
5782
- setTimeout(() => {
5783
- if (this.numbersOfReloads < this.maxNumbersOfReloads) {
5784
- this.numbersOfReloads++;
5785
- this.connectToWebSocket();
5786
- }
5787
- }, 10000);
5788
- };
5789
- }
5790
- }
5791
- wsSentMessage(type, subType, message) {
5792
- if (this.wsIsLoaded) {
5793
- this.ws.send(JSON.stringify({ type, subType, message, sessionKey: this.sessionKey }));
5794
- }
5795
- }
5796
- }
5797
- WebsocketService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, deps: [{ token: CORE_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
5798
- WebsocketService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, providedIn: 'root' });
5799
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, decorators: [{
5800
- type: Injectable,
5801
- args: [{
5802
- providedIn: 'root'
5803
- }]
5804
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
5805
- type: Inject,
5806
- args: [CORE_CONFIG]
5807
- }] }]; } });
5808
-
5809
- class RouterFacade {
5810
- constructor(store) {
5811
- this.store = store;
5812
- }
5813
- goTo(path, extras = null) {
5814
- console.info('[ router.facade.navigation ]', path, extras);
5815
- return this.store.dispatch(Go({ payload: { path, extras } }));
5816
- }
5817
- }
5818
- RouterFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RouterFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
5819
- RouterFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RouterFacade, providedIn: "root" });
5820
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RouterFacade, decorators: [{
5821
- type: Injectable,
5822
- args: [{ providedIn: "root" }]
5823
- }], ctorParameters: function () { return [{ type: i1.Store }]; } });
5824
-
5825
- /*const MESSAGES = {
5826
- delete: {
5827
- title: 'Внимание',
5828
- text: 'Запись успешно удаленна'
5829
- },
5830
- update: {
5831
- title: 'Внимание',
5832
- text: 'Запись успешно обновлена'
5833
- },
5834
- create: {
5835
- title: 'Внимание',
5836
- text: 'Запись успешно создана'
5837
- }
5838
- };*/
5839
- class StaticDataEffects extends BaseEffects {
5840
- constructor(actions$, store, authenticationService, staticDataService, routerService, notificationsFacade) {
5841
- super(actions$, store);
5842
- this.actions$ = actions$;
5843
- this.store = store;
5844
- this.authenticationService = authenticationService;
5845
- this.staticDataService = staticDataService;
5846
- this.routerService = routerService;
5847
- this.notificationsFacade = notificationsFacade;
5848
- this.staticDataGetList$ = createEffect(() => this.actions$.pipe(ofType(StaticDataGetList), mergeMap((action) => {
5849
- const headers = this.authenticationService.loadAuthDataFromLocalStore();
5850
- const config = {
5851
- ...action.payload,
5852
- headers: { token: headers.token, uid: headers.id },
5853
- contentType: action.payload.contentType,
5854
- };
5855
- return this.staticDataService.getList(config)
5856
- .pipe(flatMap((r) => new StaticDataGetListBehavior(action, r).resolve()));
5857
- })));
5858
- this.staticDataGetSubRouting$ = createEffect(() => this.actions$.pipe(ofType(StaticDataGetSubRouting), mergeMap((action) => {
5859
- const headers = this.authenticationService.loadAuthDataFromLocalStore();
5860
- const config = {
5861
- ...action.payload,
5862
- headers: { token: headers.token, uid: headers.id },
5863
- contentType: action.payload.contentType,
5864
- routing: action.payload.routing,
5865
- };
5866
- return this.staticDataService.getSubRouting(config)
5867
- .pipe(flatMap((r) => new StaticDataGetListBehavior(action, r).resolve()));
5868
- })));
5869
- this.staticDataDelete$ = createEffect(() => this.actions$.pipe(ofType(StaticDataDelete), switchMap$1((action) => {
5870
- const headers = this.authenticationService.loadAuthDataFromLocalStore();
5871
- const config = {
5872
- ...action.payload,
5873
- headers: { token: headers.token, uid: headers.id },
5874
- contentType: action.payload.contentType,
5875
- itemId: action.payload.itemId,
5876
- };
5877
- return this.staticDataService.delete(config)
5878
- .pipe(flatMap((r) => new StaticDataDeleteBehavior(action, r).resolve()));
5879
- })));
5880
- /* @Effect({dispatch: false})
5881
- StaticDataDeleteSuccess$ = this.actions$.pipe(
5882
- ofType(StaticDataDeleteSuccess),
5883
- tap((action) => {
5884
- const {contentType, itemId} = action.payload;
5885
- this.routerService.goTo(['/static-data', contentType]);
5886
- this.notificationsFacade.addNotifications({
5887
- id: `form-message-delete-${contentType}-${itemId}`,
5888
- type: 'success',
5889
- text: MESSAGES.delete.text,
5890
- title: MESSAGES.delete.title,
5891
- timeout: NOTIFICATION_TIMEOUT
5892
- });
5893
- })
5894
- );*/
5895
- this.staticDataCreate$ = createEffect(() => this.actions$.pipe(ofType(StaticDataCreate), switchMap$1((action) => {
5896
- const headers = this.authenticationService.loadAuthDataFromLocalStore();
5897
- const config = {
5898
- ...action.payload,
5899
- headers: { token: headers.token, uid: headers.id },
5900
- formId: action.payload.formId,
5901
- contentType: action.payload.contentType,
5902
- publicApi: action.payload.publicApi,
5903
- };
5904
- return this.staticDataService.create(config)
5905
- .pipe(flatMap((r) => new StaticDataCreateBehavior(action, r).resolve()));
5906
- })));
5907
- /* @Effect({dispatch: false})
5908
- staticDataCreateSuccess$ = this.actions$.pipe(
5909
- ofType(StaticDataCreateSuccess),
5910
- tap((action) => {
5911
- const {contentType, itemId} = action.payload;
5912
- this.routerService.goTo(['/static-data', contentType, itemId]);
5913
- this.notificationsFacade.addNotifications({
5914
- id: `form-message-create-${contentType}-${itemId}`,
5915
- type: 'success',
5916
- text: MESSAGES.create.text,
5917
- title: MESSAGES.create.title,
5918
- timeout: NOTIFICATION_TIMEOUT
5919
- });
5920
- })
5921
- );*/
5922
- this.staticDataUpdate$ = createEffect(() => this.actions$.pipe(ofType(StaticDataUpdate), switchMap$1((action) => {
5923
- const headers = this.authenticationService.loadAuthDataFromLocalStore();
5924
- const config = {
5925
- ...action.payload,
5926
- headers: { token: headers.token, uid: headers.id },
5927
- formId: action.payload.formId,
5928
- contentType: action.payload.contentType,
5929
- itemId: action.payload.itemId,
5930
- };
5931
- return this.staticDataService.update(config)
5932
- .pipe(flatMap((r) => new StaticDataUpdateBehavior(action, r).resolve()));
5933
- })));
5934
- this.staticDataPatchUpdate$ = createEffect(() => this.actions$.pipe(ofType(StaticDataPatchUpdate), switchMap$1((action) => {
5935
- const headers = this.authenticationService.loadAuthDataFromLocalStore();
5936
- const config = {
5937
- ...action.payload,
5938
- headers: { token: headers.token, uid: headers.id },
5939
- formId: action.payload.formId,
5940
- contentType: action.payload.contentType,
5941
- itemId: action.payload.itemId,
5942
- };
5943
- return this.staticDataService.patchUpdate(config)
5944
- .pipe(flatMap((r) => new StaticDataPatchUpdateBehavior(action, r).resolve()));
5945
- })));
5946
- this.staticDataGetListCategories$ = createEffect(() => this.actions$.pipe(ofType(StaticDataGetListCategories), switchMap$1((action) => {
5947
- const { contentTypes } = action.payload;
5948
- const config = {
5949
- contentTypes
5950
- };
5951
- return this.staticDataService.getListCategories(config)
5952
- .pipe(flatMap((r) => new StaticDataGetListCategoriesBehavior(action, r).resolve()), catchError(error => of(StaticDataGetListCategoriesFail({
5953
- payload: {
5954
- contentTypes: action.payload.contentTypes,
5955
- }
5956
- }))));
5957
- })));
5958
- }
5959
- }
5960
- StaticDataEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataEffects, deps: [{ token: i1$2.Actions }, { token: i1.Store }, { token: AuthenticationService }, { token: StaticDataService }, { token: RouterFacade }, { token: NotificationsFacade }], target: i0.ɵɵFactoryTarget.Injectable });
5961
- StaticDataEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataEffects });
5962
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataEffects, decorators: [{
5963
- type: Injectable
5964
- }], ctorParameters: function () { return [{ type: i1$2.Actions }, { type: i1.Store }, { type: AuthenticationService }, { type: StaticDataService }, { type: RouterFacade }, { type: NotificationsFacade }]; } });
5965
-
5966
5771
  const STATIC_DATA_FEATURE_KEY$1 = 'staticData';
5967
5772
  var StaticDataMetaStatus$1;
5968
5773
  (function (StaticDataMetaStatus) {
@@ -5971,7 +5776,8 @@ var StaticDataMetaStatus$1;
5971
5776
  })(StaticDataMetaStatus$1 || (StaticDataMetaStatus$1 = {}));
5972
5777
  const initialState$3 = {
5973
5778
  list: {},
5974
- meta: {}
5779
+ meta: {},
5780
+ revisions: null
5975
5781
  };
5976
5782
  const _staticDataReducer$2 = createReducer(initialState$3, on(StaticDataGetList, (state, action) => {
5977
5783
  const { contentType, subSection } = action.payload;
@@ -6282,6 +6088,36 @@ const _staticDataReducer$2 = createReducer(initialState$3, on(StaticDataGetList,
6282
6088
  };
6283
6089
  });
6284
6090
  return newState;
6091
+ }), on(StaticDataNewRevisions, (state, action) => {
6092
+ const { data } = action.payload;
6093
+ const newState = {
6094
+ list: { ...state.list },
6095
+ meta: { ...state.meta }
6096
+ };
6097
+ const newDataKeys = data.map(item => item.staticDataKey);
6098
+ if (data?.length) {
6099
+ if (!newState.list?.revisions) {
6100
+ newState.list['revisions'] = { list: [] };
6101
+ }
6102
+ else {
6103
+ if (newState.list['revisions']?.list) {
6104
+ const newList = newState.list['revisions'].list
6105
+ .filter(item => !newDataKeys.includes(item.staticDataKey));
6106
+ if (newList) {
6107
+ newState.list['revisions'] = { list: [...newList] };
6108
+ }
6109
+ }
6110
+ }
6111
+ data.forEach(item => {
6112
+ const contentType = item.staticDataKey;
6113
+ newState.list['revisions'].list.push({
6114
+ slug: contentType,
6115
+ staticDataKey: contentType,
6116
+ revision: item.revision
6117
+ });
6118
+ });
6119
+ }
6120
+ return newState;
6285
6121
  }));
6286
6122
  function staticDataReducer(state, action) {
6287
6123
  return _staticDataReducer$2(state, action);
@@ -6290,8 +6126,482 @@ function getFormKey$1(contentType, itemId) {
6290
6126
  return `${contentType}-${itemId || '*'}`;
6291
6127
  }
6292
6128
 
6293
- const ActionsSend = createAction('[Actions] Actions Create', props());
6294
- const ActionsSendSuccess = createAction('[Actions] Actions Create Success', props());
6129
+ const getStaticDataState = createFeatureSelector(STATIC_DATA_FEATURE_KEY$1);
6130
+ const getStatus$1 = (contentType, subSection) => createSelector(getStaticDataState, (state) => state?.meta?.[contentType]?.[subSection]?.status);
6131
+ const getLoaded$1 = (contentType, subSection) => createSelector(getStaticDataState, (state) => state?.meta?.[contentType]?.[subSection]?.status === StaticDataMetaStatus$1.LOADED);
6132
+ const getError$1 = (contentType) => createSelector(getStaticDataState, (state) => state?.meta?.[contentType]?.error);
6133
+ const getStaticDataMeta = (contentType, subSection) => createSelector(getStaticDataState, (state) => {
6134
+ return state.meta?.[contentType]?.[subSection];
6135
+ });
6136
+ const getStaticDataRevisions = () => createSelector(getStaticDataState, (state) => {
6137
+ let result = [];
6138
+ if (state.list['revisions']?.['list']) {
6139
+ result = state.list['revisions']?.['list'];
6140
+ }
6141
+ return result;
6142
+ });
6143
+ const getStaticDataRevision = (contentType) => createSelector(getStaticDataState, (state) => {
6144
+ let result = null;
6145
+ if (state.list?.revisions?.list) {
6146
+ result = state.list?.revisions?.list.find(item => item.slug === contentType);
6147
+ }
6148
+ return result;
6149
+ });
6150
+ const getStaticDataRevisionsList = (contentTypes) => createSelector(getStaticDataState, (state) => {
6151
+ const preparedContentTypes = contentTypes.map(item => {
6152
+ const itemParameters = item.split('(');
6153
+ return itemParameters[0];
6154
+ });
6155
+ let result = null;
6156
+ if (state.list?.revisions?.list) {
6157
+ result = state.list?.revisions?.list.filter(item => preparedContentTypes.includes(item.slug));
6158
+ }
6159
+ return result;
6160
+ });
6161
+ const getStaticData = (contentType, subSection, where) => createSelector(getStaticDataState, getLoaded$1(contentType, subSection), (state, isLoaded) => {
6162
+ let list = isLoaded ? state.list[contentType]?.[subSection] : null;
6163
+ if (where && list?.length) {
6164
+ list = list.filter(item => {
6165
+ let result = true;
6166
+ Object.keys(where)
6167
+ .forEach(whereItem => {
6168
+ if (item[whereItem] !== where[whereItem]) {
6169
+ result = false;
6170
+ }
6171
+ });
6172
+ return result;
6173
+ });
6174
+ }
6175
+ return list;
6176
+ });
6177
+ const getStaticDataForListContentTypes = (contentTypes) => createSelector(getStaticDataState, (state) => {
6178
+ let result = {};
6179
+ contentTypes.forEach(contentType => {
6180
+ result[contentType] = state.list[contentType]?.list || [];
6181
+ });
6182
+ return result;
6183
+ });
6184
+ const getStaticDataItem = (contentType, subSection, itemIdOrSlug) => createSelector(getStaticDataState, (state) => {
6185
+ const foundItem = state.list[contentType]?.[subSection]?.find(item => {
6186
+ return Number(item.id) === Number(itemIdOrSlug) || item?.slug === itemIdOrSlug || item?.slug + '.html' === itemIdOrSlug;
6187
+ }); //
6188
+ return foundItem || {};
6189
+ });
6190
+ const staticDataQuery = {
6191
+ getStatus: getStatus$1,
6192
+ getLoaded: getLoaded$1,
6193
+ getError: getError$1,
6194
+ getStaticData,
6195
+ getStaticDataItem,
6196
+ getStaticDataMeta,
6197
+ getStaticDataForListContentTypes,
6198
+ getStaticDataRevision,
6199
+ getStaticDataRevisions,
6200
+ getStaticDataRevisionsList
6201
+ };
6202
+
6203
+ class StaticDataFacade {
6204
+ constructor(store) {
6205
+ this.store = store;
6206
+ }
6207
+ getStatus$(contentType, subSection = 'list') {
6208
+ return this.store.pipe(select(staticDataQuery.getStatus(contentType, subSection)));
6209
+ }
6210
+ getStaticDataMeta$(contentType, subSection = 'list') {
6211
+ return this.store.pipe(select(staticDataQuery.getStaticDataMeta(contentType, subSection)));
6212
+ }
6213
+ getStaticData$(contentType, subSection = 'list', options, where) {
6214
+ return this.store.pipe(select(staticDataQuery.getStaticData(contentType, subSection, where)));
6215
+ }
6216
+ getStaticDataForListContentTypes$(contentTypes) {
6217
+ return this.store.pipe(select(staticDataQuery.getStaticDataForListContentTypes(contentTypes)));
6218
+ }
6219
+ getStaticDataItem$(contentType, subSection = 'list', itemIdOrSlug) {
6220
+ return this.store.pipe(select(staticDataQuery.getStaticDataItem(contentType, subSection, itemIdOrSlug)));
6221
+ }
6222
+ getStaticDataRevision(contentType) {
6223
+ return new Promise((resolve, reject) => {
6224
+ if (!contentType) {
6225
+ return resolve(null);
6226
+ }
6227
+ this.store.pipe(select(staticDataQuery.getStaticDataRevision(contentType)))
6228
+ .pipe(take(1))
6229
+ .subscribe(revisionData => {
6230
+ resolve(revisionData?.revision || null);
6231
+ });
6232
+ });
6233
+ }
6234
+ getStaticDataRevisions(contentTypes) {
6235
+ return new Promise((resolve, reject) => {
6236
+ if (!contentTypes?.length) {
6237
+ return resolve(null);
6238
+ }
6239
+ this.store.pipe(select(staticDataQuery.getStaticDataRevisionsList(contentTypes)))
6240
+ .pipe(take(1))
6241
+ .subscribe(revisions => {
6242
+ if (revisions?.length) {
6243
+ const revisionList = revisions.map(item => item.revision);
6244
+ resolve(revisionList || null);
6245
+ }
6246
+ else {
6247
+ resolve(null);
6248
+ }
6249
+ });
6250
+ });
6251
+ }
6252
+ loadStaticData(contentType, params, subSection = 'list') {
6253
+ const { where, fields, paging, sort, forPanel, search, keepState } = params;
6254
+ this.getStaticDataRevision(contentType)
6255
+ .then(revision => {
6256
+ this.store.dispatch(StaticDataGetList({
6257
+ payload: {
6258
+ contentType,
6259
+ subSection,
6260
+ where,
6261
+ fields,
6262
+ paging,
6263
+ sort,
6264
+ forPanel,
6265
+ search,
6266
+ keepState,
6267
+ revision
6268
+ }
6269
+ }));
6270
+ });
6271
+ }
6272
+ loadStaticDataSubRouting(contentType, routing) {
6273
+ this.store.dispatch(StaticDataGetSubRouting({
6274
+ payload: {
6275
+ contentType,
6276
+ routing
6277
+ }
6278
+ }));
6279
+ }
6280
+ loadStaticDataRevisions() {
6281
+ this.store.dispatch(StaticDataLoadRevisions({
6282
+ payload: null
6283
+ }));
6284
+ }
6285
+ clearStaticData(contentType) {
6286
+ return this.store.dispatch(ClearStaticData({ payload: { contentType } }));
6287
+ }
6288
+ delete(contentType, itemId) {
6289
+ this.store.dispatch(StaticDataDelete({
6290
+ payload: {
6291
+ contentType,
6292
+ itemId
6293
+ }
6294
+ }));
6295
+ }
6296
+ newRevisions(newRevisions) {
6297
+ this.store.dispatch(StaticDataNewRevisions({
6298
+ payload: { data: newRevisions }
6299
+ }));
6300
+ }
6301
+ create(formId, contentType, data, publicApi = false) {
6302
+ this.store.dispatch(StaticDataCreate({
6303
+ payload: {
6304
+ formId,
6305
+ contentType,
6306
+ data,
6307
+ publicApi
6308
+ }
6309
+ }));
6310
+ }
6311
+ update(formId, contentType, itemId, data, publicApi = false) {
6312
+ this.store.dispatch(StaticDataUpdate({
6313
+ payload: {
6314
+ formId,
6315
+ contentType,
6316
+ itemId,
6317
+ data,
6318
+ publicApi
6319
+ }
6320
+ }));
6321
+ }
6322
+ updateSuccess(contentType, itemId, data) {
6323
+ this.store.dispatch(StaticDataUpdateSuccess({
6324
+ payload: {
6325
+ contentType,
6326
+ itemId,
6327
+ data
6328
+ }
6329
+ }));
6330
+ }
6331
+ patchUpdate(formId, contentType, itemId, data, publicApi = false) {
6332
+ this.store.dispatch(StaticDataPatchUpdate({
6333
+ payload: {
6334
+ formId,
6335
+ contentType,
6336
+ itemId,
6337
+ data,
6338
+ publicApi
6339
+ }
6340
+ }));
6341
+ }
6342
+ staticDataLoadCategories(contentTypes) {
6343
+ this.getStaticDataRevisions(contentTypes)
6344
+ .then(revisions => {
6345
+ this.store.dispatch(StaticDataGetListCategories({
6346
+ payload: {
6347
+ contentTypes,
6348
+ revisions
6349
+ }
6350
+ }));
6351
+ });
6352
+ }
6353
+ }
6354
+ StaticDataFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
6355
+ StaticDataFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataFacade, providedIn: 'root' });
6356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataFacade, decorators: [{
6357
+ type: Injectable,
6358
+ args: [{ providedIn: 'root' }]
6359
+ }], ctorParameters: function () { return [{ type: i1.Store }]; } });
6360
+
6361
+ var WebsocketMessageTypes;
6362
+ (function (WebsocketMessageTypes) {
6363
+ WebsocketMessageTypes["USER_ACTIVITY"] = "user-activity";
6364
+ })(WebsocketMessageTypes || (WebsocketMessageTypes = {}));
6365
+ var WebsocketMessageSubTypes;
6366
+ (function (WebsocketMessageSubTypes) {
6367
+ WebsocketMessageSubTypes["CHANGE_PAGE"] = "change-page";
6368
+ WebsocketMessageSubTypes["OPEN_BOOKING_FORM"] = "open-booking-form";
6369
+ WebsocketMessageSubTypes["OPEN_FIRM_CONTACT"] = "open-firm-contact";
6370
+ })(WebsocketMessageSubTypes || (WebsocketMessageSubTypes = {}));
6371
+ class WebsocketService {
6372
+ constructor(config, staticDataFacade) {
6373
+ this.config = config;
6374
+ this.staticDataFacade = staticDataFacade;
6375
+ this.wsIsLoaded = false;
6376
+ this.maxNumbersOfReloads = 10;
6377
+ this.numbersOfReloads = 0;
6378
+ this.connectToWebSocket();
6379
+ }
6380
+ connectToWebSocket() {
6381
+ if ('WebSocket' in window) {
6382
+ this.ws = new WebSocket(this.config.websocketUrl);
6383
+ this.ws.onopen = () => {
6384
+ this.numbersOfReloads = 0;
6385
+ console.info('[ WS ][ Connection opened ]', this.sessionKey || '', this.config.websocketUrl);
6386
+ this.wsIsLoaded = true;
6387
+ };
6388
+ this.ws.onmessage = (event) => {
6389
+ let message;
6390
+ try {
6391
+ message = JSON.parse(event.data);
6392
+ }
6393
+ catch (e) {
6394
+ console.error('[ WS ][ Incorrect message ]', { message: event.data, error: e });
6395
+ }
6396
+ if (message?.revisions) {
6397
+ console.info('[ WS ][ New revisions ]', message.revisions);
6398
+ this.staticDataFacade.newRevisions(message.revisions);
6399
+ }
6400
+ if (message && !this.sessionKey) {
6401
+ if (message?.sessionKey) {
6402
+ this.sessionKey = message.sessionKey;
6403
+ }
6404
+ console.info('[ WS ][ Message received ]', this.sessionKey, message);
6405
+ }
6406
+ };
6407
+ this.ws.onclose = () => {
6408
+ console.info('[ WS ][ Connection closed ]');
6409
+ this.wsIsLoaded = false;
6410
+ setTimeout(() => {
6411
+ if (this.numbersOfReloads < this.maxNumbersOfReloads) {
6412
+ this.numbersOfReloads++;
6413
+ this.connectToWebSocket();
6414
+ }
6415
+ }, 10000);
6416
+ };
6417
+ }
6418
+ }
6419
+ wsSentMessage(type, subType, message) {
6420
+ if (this.wsIsLoaded) {
6421
+ this.ws.send(JSON.stringify({ type, subType, message, sessionKey: this.sessionKey }));
6422
+ }
6423
+ }
6424
+ }
6425
+ WebsocketService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, deps: [{ token: CORE_CONFIG }, { token: StaticDataFacade }], target: i0.ɵɵFactoryTarget.Injectable });
6426
+ WebsocketService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, providedIn: 'root' });
6427
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: WebsocketService, decorators: [{
6428
+ type: Injectable,
6429
+ args: [{
6430
+ providedIn: 'root'
6431
+ }]
6432
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
6433
+ type: Inject,
6434
+ args: [CORE_CONFIG]
6435
+ }] }, { type: StaticDataFacade }]; } });
6436
+
6437
+ class RouterFacade {
6438
+ constructor(store) {
6439
+ this.store = store;
6440
+ }
6441
+ goTo(path, extras = null) {
6442
+ console.info('[ router.facade.navigation ]', path, extras);
6443
+ return this.store.dispatch(Go({ payload: { path, extras } }));
6444
+ }
6445
+ }
6446
+ RouterFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RouterFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
6447
+ RouterFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RouterFacade, providedIn: "root" });
6448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RouterFacade, decorators: [{
6449
+ type: Injectable,
6450
+ args: [{ providedIn: "root" }]
6451
+ }], ctorParameters: function () { return [{ type: i1.Store }]; } });
6452
+
6453
+ /*const MESSAGES = {
6454
+ delete: {
6455
+ title: 'Внимание',
6456
+ text: 'Запись успешно удаленна'
6457
+ },
6458
+ update: {
6459
+ title: 'Внимание',
6460
+ text: 'Запись успешно обновлена'
6461
+ },
6462
+ create: {
6463
+ title: 'Внимание',
6464
+ text: 'Запись успешно создана'
6465
+ }
6466
+ };*/
6467
+ class StaticDataEffects extends BaseEffects {
6468
+ constructor(actions$, store, authenticationService, staticDataService, routerService, notificationsFacade) {
6469
+ super(actions$, store);
6470
+ this.actions$ = actions$;
6471
+ this.store = store;
6472
+ this.authenticationService = authenticationService;
6473
+ this.staticDataService = staticDataService;
6474
+ this.routerService = routerService;
6475
+ this.notificationsFacade = notificationsFacade;
6476
+ this.staticDataLoadRevision$ = createEffect(() => this.actions$.pipe(ofType(StaticDataLoadRevisions), mergeMap((action) => {
6477
+ const headers = this.authenticationService.loadAuthDataFromLocalStore();
6478
+ const config = {
6479
+ headers: { token: headers.token, uid: headers.id },
6480
+ };
6481
+ return this.staticDataService.loadRevision(config)
6482
+ .pipe(flatMap((r) => new StaticDataGetListBehavior(action, r).resolve()));
6483
+ })));
6484
+ this.staticDataGetList$ = createEffect(() => this.actions$.pipe(ofType(StaticDataGetList), mergeMap((action) => {
6485
+ const headers = this.authenticationService.loadAuthDataFromLocalStore();
6486
+ const config = {
6487
+ ...action.payload,
6488
+ headers: { token: headers.token, uid: headers.id },
6489
+ contentType: action.payload.contentType,
6490
+ };
6491
+ return this.staticDataService.getList(config)
6492
+ .pipe(flatMap((r) => new StaticDataGetListBehavior(action, r).resolve()));
6493
+ })));
6494
+ this.staticDataGetSubRouting$ = createEffect(() => this.actions$.pipe(ofType(StaticDataGetSubRouting), mergeMap((action) => {
6495
+ const headers = this.authenticationService.loadAuthDataFromLocalStore();
6496
+ const config = {
6497
+ ...action.payload,
6498
+ headers: { token: headers.token, uid: headers.id },
6499
+ contentType: action.payload.contentType,
6500
+ routing: action.payload.routing,
6501
+ };
6502
+ return this.staticDataService.getSubRouting(config)
6503
+ .pipe(flatMap((r) => new StaticDataGetListBehavior(action, r).resolve()));
6504
+ })));
6505
+ this.staticDataDelete$ = createEffect(() => this.actions$.pipe(ofType(StaticDataDelete), switchMap$1((action) => {
6506
+ const headers = this.authenticationService.loadAuthDataFromLocalStore();
6507
+ const config = {
6508
+ ...action.payload,
6509
+ headers: { token: headers.token, uid: headers.id },
6510
+ contentType: action.payload.contentType,
6511
+ itemId: action.payload.itemId,
6512
+ };
6513
+ return this.staticDataService.delete(config)
6514
+ .pipe(flatMap((r) => new StaticDataDeleteBehavior(action, r).resolve()));
6515
+ })));
6516
+ /* @Effect({dispatch: false})
6517
+ StaticDataDeleteSuccess$ = this.actions$.pipe(
6518
+ ofType(StaticDataDeleteSuccess),
6519
+ tap((action) => {
6520
+ const {contentType, itemId} = action.payload;
6521
+ this.routerService.goTo(['/static-data', contentType]);
6522
+ this.notificationsFacade.addNotifications({
6523
+ id: `form-message-delete-${contentType}-${itemId}`,
6524
+ type: 'success',
6525
+ text: MESSAGES.delete.text,
6526
+ title: MESSAGES.delete.title,
6527
+ timeout: NOTIFICATION_TIMEOUT
6528
+ });
6529
+ })
6530
+ );*/
6531
+ this.staticDataCreate$ = createEffect(() => this.actions$.pipe(ofType(StaticDataCreate), switchMap$1((action) => {
6532
+ const headers = this.authenticationService.loadAuthDataFromLocalStore();
6533
+ const config = {
6534
+ ...action.payload,
6535
+ headers: { token: headers.token, uid: headers.id },
6536
+ formId: action.payload.formId,
6537
+ contentType: action.payload.contentType,
6538
+ publicApi: action.payload.publicApi,
6539
+ };
6540
+ return this.staticDataService.create(config)
6541
+ .pipe(flatMap((r) => new StaticDataCreateBehavior(action, r).resolve()));
6542
+ })));
6543
+ /* @Effect({dispatch: false})
6544
+ staticDataCreateSuccess$ = this.actions$.pipe(
6545
+ ofType(StaticDataCreateSuccess),
6546
+ tap((action) => {
6547
+ const {contentType, itemId} = action.payload;
6548
+ this.routerService.goTo(['/static-data', contentType, itemId]);
6549
+ this.notificationsFacade.addNotifications({
6550
+ id: `form-message-create-${contentType}-${itemId}`,
6551
+ type: 'success',
6552
+ text: MESSAGES.create.text,
6553
+ title: MESSAGES.create.title,
6554
+ timeout: NOTIFICATION_TIMEOUT
6555
+ });
6556
+ })
6557
+ );*/
6558
+ this.staticDataUpdate$ = createEffect(() => this.actions$.pipe(ofType(StaticDataUpdate), switchMap$1((action) => {
6559
+ const headers = this.authenticationService.loadAuthDataFromLocalStore();
6560
+ const config = {
6561
+ ...action.payload,
6562
+ headers: { token: headers.token, uid: headers.id },
6563
+ formId: action.payload.formId,
6564
+ contentType: action.payload.contentType,
6565
+ itemId: action.payload.itemId,
6566
+ };
6567
+ return this.staticDataService.update(config)
6568
+ .pipe(flatMap((r) => new StaticDataUpdateBehavior(action, r).resolve()));
6569
+ })));
6570
+ this.staticDataPatchUpdate$ = createEffect(() => this.actions$.pipe(ofType(StaticDataPatchUpdate), switchMap$1((action) => {
6571
+ const headers = this.authenticationService.loadAuthDataFromLocalStore();
6572
+ const config = {
6573
+ ...action.payload,
6574
+ headers: { token: headers.token, uid: headers.id },
6575
+ formId: action.payload.formId,
6576
+ contentType: action.payload.contentType,
6577
+ itemId: action.payload.itemId,
6578
+ };
6579
+ return this.staticDataService.patchUpdate(config)
6580
+ .pipe(flatMap((r) => new StaticDataPatchUpdateBehavior(action, r).resolve()));
6581
+ })));
6582
+ this.staticDataGetListCategories$ = createEffect(() => this.actions$.pipe(ofType(StaticDataGetListCategories), switchMap$1((action) => {
6583
+ const { contentTypes, revisions } = action.payload;
6584
+ const config = {
6585
+ contentTypes,
6586
+ revisions
6587
+ };
6588
+ return this.staticDataService.getListCategories(config)
6589
+ .pipe(flatMap((r) => new StaticDataGetListCategoriesBehavior(action, r).resolve()), catchError(error => of(StaticDataGetListCategoriesFail({
6590
+ payload: {
6591
+ contentTypes: action.payload.contentTypes,
6592
+ }
6593
+ }))));
6594
+ })));
6595
+ }
6596
+ }
6597
+ StaticDataEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataEffects, deps: [{ token: i1$2.Actions }, { token: i1.Store }, { token: AuthenticationService }, { token: StaticDataService }, { token: RouterFacade }, { token: NotificationsFacade }], target: i0.ɵɵFactoryTarget.Injectable });
6598
+ StaticDataEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataEffects });
6599
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataEffects, decorators: [{
6600
+ type: Injectable
6601
+ }], ctorParameters: function () { return [{ type: i1$2.Actions }, { type: i1.Store }, { type: AuthenticationService }, { type: StaticDataService }, { type: RouterFacade }, { type: NotificationsFacade }]; } });
6602
+
6603
+ const ActionsSend = createAction('[Actions] Actions Create', props());
6604
+ const ActionsSendSuccess = createAction('[Actions] Actions Create Success', props());
6295
6605
  const ActionsSendFail = createAction('[Actions] Actions Create Error', props());
6296
6606
 
6297
6607
  class ActionsSendBehavior extends Behavior {
@@ -6676,17 +6986,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
6676
6986
  }], ctorParameters: function () { return [{ type: i1$2.Actions }, { type: i1.Store }, { type: AuthenticationService }, { type: ReportsService }]; } });
6677
6987
 
6678
6988
  const getActionsState = createFeatureSelector(STATIC_DATA_FEATURE_KEY);
6679
- const getStatus$1 = (action, actionId) => createSelector(getActionsState, (state) => state?.meta?.[`${action}-${actionId}`]?.status);
6680
- const getLoaded$1 = (action, actionId) => createSelector(getActionsState, (state) => state?.meta?.[`${action}-${actionId}`]?.status);
6681
- const getError$1 = (action) => createSelector(getActionsState, (state) => state?.meta?.[action]?.error);
6989
+ const getStatus = (action, actionId) => createSelector(getActionsState, (state) => state?.meta?.[`${action}-${actionId}`]?.status);
6990
+ const getLoaded = (action, actionId) => createSelector(getActionsState, (state) => state?.meta?.[`${action}-${actionId}`]?.status);
6991
+ const getError = (action) => createSelector(getActionsState, (state) => state?.meta?.[action]?.error);
6682
6992
  const getActionMeta = (action, actionId) => createSelector(getActionsState, (state) => state.meta?.[`${action}-${actionId}`]);
6683
6993
  const getActionItem = (action, actionId) => createSelector(getActionsState, (state) => {
6684
6994
  return state.list[`${action}-${actionId}`] || {};
6685
6995
  });
6686
6996
  const actionsQuery = {
6687
- getStatus: getStatus$1,
6688
- getLoaded: getLoaded$1,
6689
- getError: getError$1,
6997
+ getStatus,
6998
+ getLoaded,
6999
+ getError,
6690
7000
  getActionItem,
6691
7001
  getActionMeta
6692
7002
  };
@@ -6846,160 +7156,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
6846
7156
  args: [{ providedIn: "root" }]
6847
7157
  }], ctorParameters: function () { return [{ type: i1.Store }]; } });
6848
7158
 
6849
- const getStaticDataState = createFeatureSelector(STATIC_DATA_FEATURE_KEY$1);
6850
- const getStatus = (contentType, subSection) => createSelector(getStaticDataState, (state) => state?.meta?.[contentType]?.[subSection]?.status);
6851
- const getLoaded = (contentType, subSection) => createSelector(getStaticDataState, (state) => state?.meta?.[contentType]?.[subSection]?.status === StaticDataMetaStatus$1.LOADED);
6852
- const getError = (contentType) => createSelector(getStaticDataState, (state) => state?.meta?.[contentType]?.error);
6853
- const getStaticDataMeta = (contentType, subSection) => createSelector(getStaticDataState, (state) => state.meta?.[contentType]?.[subSection]);
6854
- const getStaticData = (contentType, subSection, where) => createSelector(getStaticDataState, getLoaded(contentType, subSection), (state, isLoaded) => {
6855
- let list = isLoaded ? state.list[contentType]?.[subSection] : null;
6856
- if (where && list?.length) {
6857
- list = list.filter(item => {
6858
- let result = true;
6859
- Object.keys(where)
6860
- .forEach(whereItem => {
6861
- if (item[whereItem] !== where[whereItem]) {
6862
- result = false;
6863
- }
6864
- });
6865
- return result;
6866
- });
6867
- }
6868
- return list;
6869
- });
6870
- const getStaticDataForListContentTypes = (contentTypes) => createSelector(getStaticDataState, (state) => {
6871
- let result = {};
6872
- contentTypes.forEach(contentType => {
6873
- result[contentType] = state.list[contentType]?.list || [];
6874
- });
6875
- return result;
6876
- });
6877
- const getStaticDataItem = (contentType, subSection, itemIdOrSlug) => createSelector(getStaticDataState, (state) => {
6878
- const foundItem = state.list[contentType]?.[subSection]?.find(item => {
6879
- return Number(item.id) === Number(itemIdOrSlug) || item?.slug === itemIdOrSlug || item?.slug + '.html' === itemIdOrSlug;
6880
- }); //
6881
- return foundItem || {};
6882
- });
6883
- const staticDataQuery = {
6884
- getStatus,
6885
- getLoaded,
6886
- getError,
6887
- getStaticData,
6888
- getStaticDataItem,
6889
- getStaticDataMeta,
6890
- getStaticDataForListContentTypes
6891
- };
6892
-
6893
- class StaticDataFacade {
6894
- constructor(store) {
6895
- this.store = store;
6896
- }
6897
- getStatus$(contentType, subSection = 'list') {
6898
- return this.store.pipe(select(staticDataQuery.getStatus(contentType, subSection)));
6899
- }
6900
- getStaticDataMeta$(contentType, subSection = 'list') {
6901
- return this.store.pipe(select(staticDataQuery.getStaticDataMeta(contentType, subSection)));
6902
- }
6903
- getStaticData$(contentType, subSection = 'list', options, where) {
6904
- return this.store.pipe(select(staticDataQuery.getStaticData(contentType, subSection, where)));
6905
- }
6906
- getStaticDataForListContentTypes$(contentTypes) {
6907
- return this.store.pipe(select(staticDataQuery.getStaticDataForListContentTypes(contentTypes)));
6908
- }
6909
- getStaticDataItem$(contentType, subSection = 'list', itemIdOrSlug) {
6910
- return this.store.pipe(select(staticDataQuery.getStaticDataItem(contentType, subSection, itemIdOrSlug)));
6911
- }
6912
- loadStaticData(contentType, params, subSection = 'list') {
6913
- const { where, fields, paging, sort, forPanel, search, keepState } = params;
6914
- this.store.dispatch(StaticDataGetList({
6915
- payload: {
6916
- contentType,
6917
- subSection,
6918
- where,
6919
- fields,
6920
- paging,
6921
- sort,
6922
- forPanel,
6923
- search,
6924
- keepState
6925
- }
6926
- }));
6927
- }
6928
- loadStaticDataSubRouting(contentType, routing) {
6929
- this.store.dispatch(StaticDataGetSubRouting({
6930
- payload: {
6931
- contentType,
6932
- routing
6933
- }
6934
- }));
6935
- }
6936
- clearStaticData(contentType) {
6937
- return this.store.dispatch(ClearStaticData({ payload: { contentType } }));
6938
- }
6939
- delete(contentType, itemId) {
6940
- this.store.dispatch(StaticDataDelete({
6941
- payload: {
6942
- contentType,
6943
- itemId
6944
- }
6945
- }));
6946
- }
6947
- create(formId, contentType, data, publicApi = false) {
6948
- this.store.dispatch(StaticDataCreate({
6949
- payload: {
6950
- formId,
6951
- contentType,
6952
- data,
6953
- publicApi
6954
- }
6955
- }));
6956
- }
6957
- update(formId, contentType, itemId, data, publicApi = false) {
6958
- this.store.dispatch(StaticDataUpdate({
6959
- payload: {
6960
- formId,
6961
- contentType,
6962
- itemId,
6963
- data,
6964
- publicApi
6965
- }
6966
- }));
6967
- }
6968
- updateSuccess(contentType, itemId, data) {
6969
- this.store.dispatch(StaticDataUpdateSuccess({
6970
- payload: {
6971
- contentType,
6972
- itemId,
6973
- data
6974
- }
6975
- }));
6976
- }
6977
- patchUpdate(formId, contentType, itemId, data, publicApi = false) {
6978
- this.store.dispatch(StaticDataPatchUpdate({
6979
- payload: {
6980
- formId,
6981
- contentType,
6982
- itemId,
6983
- data,
6984
- publicApi
6985
- }
6986
- }));
6987
- }
6988
- staticDataLoadCategories(contentTypes) {
6989
- this.store.dispatch(StaticDataGetListCategories({
6990
- payload: {
6991
- contentTypes
6992
- }
6993
- }));
6994
- }
6995
- }
6996
- StaticDataFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable });
6997
- StaticDataFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataFacade, providedIn: "root" });
6998
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataFacade, decorators: [{
6999
- type: Injectable,
7000
- args: [{ providedIn: "root" }]
7001
- }], ctorParameters: function () { return [{ type: i1.Store }]; } });
7002
-
7003
7159
  class FormDeleteFileFacade {
7004
7160
  constructor(store) {
7005
7161
  this.store = store;
@@ -10692,12 +10848,10 @@ class StaticDataListItemsComponent {
10692
10848
  this.staticSection = this.staticDataConfiguration[this.contentType];
10693
10849
  if (this.staticSection) {
10694
10850
  this.userRights$ = this.rightService.getUserRoleRightsForSection('static-data', this.contentType);
10695
- if (this.staticSection) {
10696
- this.title = this.customTitle || this.staticSection?.title || '';
10697
- this.loadStaticData();
10698
- this.loadStaticDataMeta();
10699
- this.changeDetectorRef.markForCheck();
10700
- }
10851
+ this.title = this.customTitle || this.staticSection?.title || '';
10852
+ this.loadStaticData();
10853
+ this.loadStaticDataMeta();
10854
+ this.changeDetectorRef.markForCheck();
10701
10855
  }
10702
10856
  else {
10703
10857
  console.error('[ wt-front-shared ][ static-data-items ][ loadData ]', 'NOT_FOUND_STATIC_DATA_SECTION', { contentType: this.contentType });
@@ -10804,10 +10958,10 @@ class StaticDataListItemsComponent {
10804
10958
  }
10805
10959
  }
10806
10960
  StaticDataListItemsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataListItemsComponent, deps: [{ token: i1$4.MatDialog }, { token: RightService }, { token: StaticDataFacade }, { token: i0.ChangeDetectorRef }, { token: RouterFacade }], target: i0.ɵɵFactoryTarget.Component });
10807
- StaticDataListItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: { staticDataConfiguration: "staticDataConfiguration", contentType: "contentType", customTitle: "customTitle", addTitle: "addTitle", parentSection: "parentSection", parentItemId: "parentItemId", showPanelHeader: "showPanelHeader", parentData: "parentData", parentSectionHashtag: "parentSectionHashtag", autoCompleteFields: "autoCompleteFields", filteringQuery: "filteringQuery" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "searchInput", first: true, predicate: ["search"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"showPanelHeader\" [title]=\"title\"></shared-panel-header>\n\n <h1>{{title}}</h1>\n <div class=\"content p-24\">\n <div *ngIf=\"staticSection.options?.search\" class=\"top-bar\">\n <div class=\"search-block\">\n \u041F\u043E\u0438\u0441\u043A:&nbsp; <input #search class=\"search-input\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\">\n <app-static-data-items [items]=\"staticData\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta.perPage !== -1\">\n <mat-paginator\n *ngIf=\"totalCount\"\n [length]=\"staticDataObj.meta.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[10, 25, 100]\"\n (page)=\"changePage($event)\"></mat-paginator>\n </div>\n </ng-container>\n <div *ngIf=\"isLoaded && !totalCount\">\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442</div>\n <div *ngIf=\"userRights[0]\" class=\"text-center mt-30 mb-30\">\n <shared-button\n id=\"go-to-create-form-button\"\n class=\"mr-5\"\n iconSize=\"small\"\n icon=\"add\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"accent\"\n (click)=\"addHandle()\">{{ addTitle || '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C' }}\n </shared-button>\n </div>\n </div>\n <ng-container *ngIf=\"loaded$|async; let loaded;\">\n <shared-spinner *ngIf=\"!loaded\"></shared-spinner>\n </ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.top-bar .search-block{display:flex;align-content:center;align-items:center}.top-bar .search-block .search-input{background-color:#adcde8!important;padding:11px 10px!important}.top-bar .search-block .cancel-button{width:64px;height:40px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$3.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "component", type: PanelHeaderComponent, selector: "shared-panel-header", inputs: ["title", "parentTitle", "parentUrl"] }, { kind: "component", type: StaticDataItemsComponent, selector: "app-static-data-items", inputs: ["items", "contentType", "queryParams", "userRights", "staticSection"], outputs: ["delete"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10961
+ StaticDataListItemsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: { staticDataConfiguration: "staticDataConfiguration", contentType: "contentType", customTitle: "customTitle", addTitle: "addTitle", parentSection: "parentSection", parentItemId: "parentItemId", showPanelHeader: "showPanelHeader", parentData: "parentData", parentSectionHashtag: "parentSectionHashtag", autoCompleteFields: "autoCompleteFields", filteringQuery: "filteringQuery" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, static: true }, { propertyName: "searchInput", first: true, predicate: ["search"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"showPanelHeader\" [title]=\"title\"></shared-panel-header>\n\n <h1>{{title}}</h1>\n <div class=\"content p-24\">\n <div *ngIf=\"staticSection.options?.search\" class=\"top-bar\">\n <div class=\"search-block\">\n \u041F\u043E\u0438\u0441\u043A:&nbsp; <input #search class=\"search-input\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\">\n <app-static-data-items [items]=\"staticData\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1\">\n <mat-paginator\n *ngIf=\"totalCount\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[10, 25, 100]\"\n (page)=\"changePage($event)\"></mat-paginator>\n </div>\n </ng-container>\n <div *ngIf=\"isLoaded && !totalCount\">\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442</div>\n <div *ngIf=\"userRights[0]\" class=\"text-center mt-30 mb-30\">\n <shared-button\n id=\"go-to-create-form-button\"\n class=\"mr-5\"\n iconSize=\"small\"\n icon=\"add\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"accent\"\n (click)=\"addHandle()\">{{ addTitle || '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C' }}\n </shared-button>\n </div>\n </div>\n <ng-container *ngIf=\"loaded$|async; let loaded;\">\n <shared-spinner *ngIf=\"!loaded\"></shared-spinner>\n </ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.top-bar .search-block{display:flex;align-content:center;align-items:center}.top-bar .search-block .search-input{background-color:#adcde8!important;padding:11px 10px!important}.top-bar .search-block .cancel-button{width:64px;height:40px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$3.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "component", type: SpinnerComponent, selector: "shared-spinner", inputs: ["overlay", "diameter", "color", "position"] }, { kind: "component", type: ButtonComponent, selector: "shared-button", inputs: ["icon", "iconColor", "iconSize", "rightIcon", "disabled", "loading", "active", "stopPropagation", "type", "color", "size", "styleTheme", "tooltip", "tooltipPosition"], outputs: ["clickButton"] }, { kind: "component", type: PanelHeaderComponent, selector: "shared-panel-header", inputs: ["title", "parentTitle", "parentUrl"] }, { kind: "component", type: StaticDataItemsComponent, selector: "app-static-data-items", inputs: ["items", "contentType", "queryParams", "userRights", "staticSection"], outputs: ["delete"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
10808
10962
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataListItemsComponent, decorators: [{
10809
10963
  type: Component,
10810
- args: [{ selector: 'app-static-data-list-items', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"showPanelHeader\" [title]=\"title\"></shared-panel-header>\n\n <h1>{{title}}</h1>\n <div class=\"content p-24\">\n <div *ngIf=\"staticSection.options?.search\" class=\"top-bar\">\n <div class=\"search-block\">\n \u041F\u043E\u0438\u0441\u043A:&nbsp; <input #search class=\"search-input\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\">\n <app-static-data-items [items]=\"staticData\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta.perPage !== -1\">\n <mat-paginator\n *ngIf=\"totalCount\"\n [length]=\"staticDataObj.meta.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[10, 25, 100]\"\n (page)=\"changePage($event)\"></mat-paginator>\n </div>\n </ng-container>\n <div *ngIf=\"isLoaded && !totalCount\">\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442</div>\n <div *ngIf=\"userRights[0]\" class=\"text-center mt-30 mb-30\">\n <shared-button\n id=\"go-to-create-form-button\"\n class=\"mr-5\"\n iconSize=\"small\"\n icon=\"add\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"accent\"\n (click)=\"addHandle()\">{{ addTitle || '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C' }}\n </shared-button>\n </div>\n </div>\n <ng-container *ngIf=\"loaded$|async; let loaded;\">\n <shared-spinner *ngIf=\"!loaded\"></shared-spinner>\n </ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.top-bar .search-block{display:flex;align-content:center;align-items:center}.top-bar .search-block .search-input{background-color:#adcde8!important;padding:11px 10px!important}.top-bar .search-block .cancel-button{width:64px;height:40px}\n"] }]
10964
+ args: [{ selector: 'app-static-data-list-items', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticDataMeta$ | async) as staticDataObj\">\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"showPanelHeader\" [title]=\"title\"></shared-panel-header>\n\n <h1>{{title}}</h1>\n <div class=\"content p-24\">\n <div *ngIf=\"staticSection.options?.search\" class=\"top-bar\">\n <div class=\"search-block\">\n \u041F\u043E\u0438\u0441\u043A:&nbsp; <input #search class=\"search-input\">\n <shared-button\n icon=\"search\"\n color=\"accent\"\n iconColor=\"black\"\n (click)=\"searchHandle(search.value)\"></shared-button>\n <div class=\"cancel-button\">\n <shared-button\n *ngIf=\"search.value\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"black\"\n (click)=\"searchCancelHandle()\"></shared-button>\n </div>\n </div>\n </div>\n <ng-container *ngIf=\"staticData$ | async as staticData\">\n <div class=\"center-block p-10\">\n <app-static-data-items [items]=\"staticData\"\n [userRights]=\"userRights\"\n [staticSection]=\"staticSection\"\n [contentType]=\"contentType\"\n [queryParams]=\"queryParams\"\n (delete)=\"deleteEvent($event)\"></app-static-data-items>\n </div>\n <div *ngIf=\"staticDataObj.meta?.perPage !== -1\">\n <mat-paginator\n *ngIf=\"totalCount\"\n [length]=\"staticDataObj.meta?.totalCount\"\n [pageIndex]=\"pageIndex\"\n [pageSizeOptions]=\"[10, 25, 100]\"\n (page)=\"changePage($event)\"></mat-paginator>\n </div>\n </ng-container>\n <div *ngIf=\"isLoaded && !totalCount\">\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442</div>\n <div *ngIf=\"userRights[0]\" class=\"text-center mt-30 mb-30\">\n <shared-button\n id=\"go-to-create-form-button\"\n class=\"mr-5\"\n iconSize=\"small\"\n icon=\"add\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"accent\"\n (click)=\"addHandle()\">{{ addTitle || '\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C' }}\n </shared-button>\n </div>\n </div>\n <ng-container *ngIf=\"loaded$|async; let loaded;\">\n <shared-spinner *ngIf=\"!loaded\"></shared-spinner>\n </ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [".top-bar{background:#c7deef;display:flex;justify-content:flex-end}.top-bar .search-block{display:flex;align-content:center;align-items:center}.top-bar .search-block .search-input{background-color:#adcde8!important;padding:11px 10px!important}.top-bar .search-block .cancel-button{width:64px;height:40px}\n"] }]
10811
10965
  }], ctorParameters: function () { return [{ type: i1$4.MatDialog }, { type: RightService }, { type: StaticDataFacade }, { type: i0.ChangeDetectorRef }, { type: RouterFacade }]; }, propDecorators: { staticDataConfiguration: [{
10812
10966
  type: Input
10813
10967
  }], contentType: [{
@@ -12720,5 +12874,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
12720
12874
  * Generated bundle index. Do not edit.
12721
12875
  */
12722
12876
 
12723
- 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, StaticDataComponentInputData, 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 };
12877
+ 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, StaticDataComponentInputData, 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, StaticDataLoadRevisions, StaticDataMetaStatus, StaticDataModel, StaticDataModule, StaticDataNewRevisions, 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 };
12724
12878
  //# sourceMappingURL=wt-front-shared.mjs.map