wt-front-shared 19.0.28 → 19.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/wt-front-shared.mjs +59 -25
- package/fesm2022/wt-front-shared.mjs.map +1 -1
- package/lib/core/+state/static-data/static-data.facade.d.ts +1 -1
- package/lib/core/+state/static-data/static-data.selectors.d.ts +1 -1
- package/lib/core/+state/users/users.effects.d.ts +4 -4
- package/package.json +1 -1
|
@@ -2657,7 +2657,6 @@ class UsersService extends BaseAPIService {
|
|
|
2657
2657
|
return this.doRequest(config, AuthEndpointTypes.LOGIN_SEND);
|
|
2658
2658
|
}
|
|
2659
2659
|
refreshToken(config) {
|
|
2660
|
-
console.log('[ user.service ][ refreshToken ]');
|
|
2661
2660
|
return this.doRequest(config, AuthEndpointTypes.REFRESH_TOKEN);
|
|
2662
2661
|
}
|
|
2663
2662
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UsersService, deps: [{ token: i1$2.HttpClient }, { token: CORE_CONFIG }, { token: RequestsFacade }, { token: FormsFacade }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -5611,7 +5610,9 @@ var IFormFieldFormat;
|
|
|
5611
5610
|
class BaseAutoFormService {
|
|
5612
5611
|
getPreparedFields(fields, formData) {
|
|
5613
5612
|
const result = {};
|
|
5614
|
-
fields
|
|
5613
|
+
fields
|
|
5614
|
+
.filter(field => !field.options || !field.options.hide)
|
|
5615
|
+
.forEach((item) => {
|
|
5615
5616
|
let validators = [];
|
|
5616
5617
|
let asyncValidators = [];
|
|
5617
5618
|
let needToShow = true;
|
|
@@ -7543,11 +7544,9 @@ class StaticDataCreateWithSubEntitiesBehavior extends Behavior {
|
|
|
7543
7544
|
const error = this.result.data?.body?.error;
|
|
7544
7545
|
let returnedActions;
|
|
7545
7546
|
const response = this.result.data;
|
|
7546
|
-
console.log('status', status);
|
|
7547
7547
|
switch (status) {
|
|
7548
7548
|
case ResponseStatus.STATUS_200: {
|
|
7549
7549
|
const { data, meta } = response.body;
|
|
7550
|
-
console.log('data', data);
|
|
7551
7550
|
returnedActions = [
|
|
7552
7551
|
StaticDataCreateWithSubEntitiesSuccess({ payload: { data, contentType: meta.staticDataType, itemId: data.id } }),
|
|
7553
7552
|
];
|
|
@@ -8238,6 +8237,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
8238
8237
|
const getStore = (storeKey) => {
|
|
8239
8238
|
let rootStore = storeKey;
|
|
8240
8239
|
let nestedStore = '';
|
|
8240
|
+
if (!storeKey) {
|
|
8241
|
+
console.error('[ core.selector ][ storeKey not found ]');
|
|
8242
|
+
return undefined;
|
|
8243
|
+
}
|
|
8241
8244
|
if (storeKey.includes('.')) {
|
|
8242
8245
|
const params = storeKey.split('.');
|
|
8243
8246
|
rootStore = params[0];
|
|
@@ -8559,6 +8562,10 @@ class FormFieldSelectComponent {
|
|
|
8559
8562
|
// staticData.list.support-messages
|
|
8560
8563
|
this.selectOptionsFromStore(this.fieldData.options.loadOptionFromStore, this.storeSubList);
|
|
8561
8564
|
}
|
|
8565
|
+
if (this.fieldData.options?.selectOptions?.length) {
|
|
8566
|
+
this.isLoading = false;
|
|
8567
|
+
this.options = this.fieldData.options?.selectOptions;
|
|
8568
|
+
}
|
|
8562
8569
|
}
|
|
8563
8570
|
ngOnDestroy() {
|
|
8564
8571
|
this.destroy$.next();
|
|
@@ -8650,16 +8657,20 @@ class FormFieldSelectComponent {
|
|
|
8650
8657
|
}
|
|
8651
8658
|
}
|
|
8652
8659
|
selectOptionsFromStore(loadOptionFromStore, subList) {
|
|
8660
|
+
console.log('selectOptionsFromStore');
|
|
8653
8661
|
const listKeys = loadOptionFromStore.split('.');
|
|
8654
8662
|
let storeSelector;
|
|
8655
8663
|
if (listKeys[0] === 'staticData') {
|
|
8664
|
+
console.log('listKeys[2]', listKeys[2]);
|
|
8656
8665
|
storeSelector = this.staticDataFacade.getStaticData$(listKeys[2], subList || 'list');
|
|
8657
8666
|
}
|
|
8658
8667
|
else {
|
|
8668
|
+
console.log('loadOptionFromStore', loadOptionFromStore);
|
|
8659
8669
|
storeSelector = this.store.pipe(select(coreQuery.getStore(loadOptionFromStore)));
|
|
8660
8670
|
}
|
|
8661
8671
|
storeSelector?.pipe(filter((listItems) => !!listItems), takeUntil(this.destroy$))
|
|
8662
8672
|
.subscribe((listItems) => {
|
|
8673
|
+
console.log('listItems', listItems);
|
|
8663
8674
|
let newOptions = [];
|
|
8664
8675
|
if (listItems && listItems?.items) {
|
|
8665
8676
|
newOptions = listItems.items;
|
|
@@ -9019,12 +9030,10 @@ class FormFieldSelectShowComponent {
|
|
|
9019
9030
|
this.coreFacade.getStoreByName(keyFromStore)
|
|
9020
9031
|
.pipe(takeUntil(this.destroy$))
|
|
9021
9032
|
.subscribe(items => {
|
|
9022
|
-
console.log('items', this.fieldData.field, items, ids);
|
|
9023
9033
|
if (items?.list?.length) {
|
|
9024
9034
|
this.listItems = items.list
|
|
9025
9035
|
.filter(item => ids.includes(item.id) || ids.includes(String(item.id)))
|
|
9026
9036
|
.map(item => item.name || `Номер ${item.id}`);
|
|
9027
|
-
console.log('this.listItems', this.fieldData.field, this.listItems);
|
|
9028
9037
|
if (ids.length && !this.listItems?.length) {
|
|
9029
9038
|
this.listItems = ([...ids]);
|
|
9030
9039
|
}
|
|
@@ -10856,28 +10865,28 @@ class AutoFormMainComponent {
|
|
|
10856
10865
|
}
|
|
10857
10866
|
getFormFieldClass(data) {
|
|
10858
10867
|
let className = [];
|
|
10859
|
-
if (data.options
|
|
10868
|
+
if (data.options?.col) {
|
|
10860
10869
|
className.push(`col-lg-${data.options.col}`);
|
|
10861
|
-
if (!data.options
|
|
10870
|
+
if (!data.options?.colXl) {
|
|
10862
10871
|
className.push(`col-xl-${data.options.col}`);
|
|
10863
10872
|
}
|
|
10864
10873
|
}
|
|
10865
|
-
if (data.options
|
|
10874
|
+
if (data.options?.colXxl) {
|
|
10866
10875
|
className.push(`col-xxl-${data.options.colXxl}`);
|
|
10867
10876
|
}
|
|
10868
|
-
if (data.options
|
|
10877
|
+
if (data.options?.colXl) {
|
|
10869
10878
|
className.push(`col-xl-${data.options.colXl}`);
|
|
10870
10879
|
}
|
|
10871
|
-
if (data.options
|
|
10880
|
+
if (data.options?.colLg) {
|
|
10872
10881
|
className.push(`col-lg-${data.options.colLg}`);
|
|
10873
10882
|
}
|
|
10874
|
-
if (data.options
|
|
10883
|
+
if (data.options?.colMd) {
|
|
10875
10884
|
className.push(`col-md-${data.options.colMd}`);
|
|
10876
10885
|
}
|
|
10877
10886
|
if (!className.length) {
|
|
10878
10887
|
className.push(`col-lg-12`);
|
|
10879
10888
|
}
|
|
10880
|
-
if (data.options
|
|
10889
|
+
if (data.options?.colSm) {
|
|
10881
10890
|
className.push(`col-sm-${data.options.colSm}`);
|
|
10882
10891
|
}
|
|
10883
10892
|
else {
|
|
@@ -11180,28 +11189,28 @@ class AutoFormShowComponent {
|
|
|
11180
11189
|
}
|
|
11181
11190
|
getFormFieldClass(data) {
|
|
11182
11191
|
let className = [];
|
|
11183
|
-
if (data.options
|
|
11192
|
+
if (data.options?.col) {
|
|
11184
11193
|
className.push(`col-lg-${data.options.col}`);
|
|
11185
|
-
if (!data.options
|
|
11194
|
+
if (!data.options?.colXl) {
|
|
11186
11195
|
className.push(`col-xl-${data.options.col}`);
|
|
11187
11196
|
}
|
|
11188
11197
|
}
|
|
11189
|
-
if (data.options
|
|
11198
|
+
if (data.options?.colXxl) {
|
|
11190
11199
|
className.push(`col-xxl-${data.options.colXxl}`);
|
|
11191
11200
|
}
|
|
11192
|
-
if (data.options
|
|
11201
|
+
if (data.options?.colXl) {
|
|
11193
11202
|
className.push(`col-xl-${data.options.colXl}`);
|
|
11194
11203
|
}
|
|
11195
|
-
if (data.options
|
|
11204
|
+
if (data.options?.colLg) {
|
|
11196
11205
|
className.push(`col-lg-${data.options.colLg}`);
|
|
11197
11206
|
}
|
|
11198
|
-
if (data.options
|
|
11207
|
+
if (data.options?.colMd) {
|
|
11199
11208
|
className.push(`col-md-${data.options.colMd}`);
|
|
11200
11209
|
}
|
|
11201
11210
|
if (!className.length) {
|
|
11202
11211
|
className.push(`col-lg-12`);
|
|
11203
11212
|
}
|
|
11204
|
-
if (data.options
|
|
11213
|
+
if (data.options?.colSm) {
|
|
11205
11214
|
className.push(`col-sm-${data.options.colSm}`);
|
|
11206
11215
|
}
|
|
11207
11216
|
else {
|
|
@@ -12652,7 +12661,6 @@ class StaticDataItemsComponent {
|
|
|
12652
12661
|
this.sortingState = { field: 'id', type: 'asc' };
|
|
12653
12662
|
}
|
|
12654
12663
|
ngOnInit() {
|
|
12655
|
-
console.log('parentSection', this.parentSection, this.parentItemId);
|
|
12656
12664
|
const displayedColumnsStrings = this.displayedColumns.map(item => item.field);
|
|
12657
12665
|
this.displayedColumnsStrings = [...displayedColumnsStrings, 'actions'];
|
|
12658
12666
|
this.displayedFormFields = this.staticSection.fields.filter(item => displayedColumnsStrings.includes(item.field));
|
|
@@ -13065,8 +13073,20 @@ class StaticDataListItemsComponent {
|
|
|
13065
13073
|
});
|
|
13066
13074
|
}
|
|
13067
13075
|
preLoadSections() {
|
|
13068
|
-
|
|
13076
|
+
let preLoadSections = this.staticDataConfiguration[this.contentType]?.preLoadSections;
|
|
13069
13077
|
if (preLoadSections) {
|
|
13078
|
+
if (this.parentItemId) {
|
|
13079
|
+
const newPreLoadSections = [];
|
|
13080
|
+
// Example: business-processes(paging:{perPage:-1}),where:{id:__parentId__})
|
|
13081
|
+
preLoadSections.forEach((item) => {
|
|
13082
|
+
let newItem = item;
|
|
13083
|
+
if (item.indexOf('__parentId__') !== -1 && this.parentItemId) {
|
|
13084
|
+
newItem = item.replace('__parentId__', String(this.parentItemId));
|
|
13085
|
+
}
|
|
13086
|
+
newPreLoadSections.push(newItem);
|
|
13087
|
+
});
|
|
13088
|
+
preLoadSections = newPreLoadSections;
|
|
13089
|
+
}
|
|
13070
13090
|
this.staticDataFacade.staticDataLoadCategories(preLoadSections, this.defaultLanguageId);
|
|
13071
13091
|
}
|
|
13072
13092
|
}
|
|
@@ -13482,8 +13502,24 @@ class StaticDataDetailsComponent {
|
|
|
13482
13502
|
// this.subscribeToRequestStatusStatus();
|
|
13483
13503
|
}
|
|
13484
13504
|
preLoadSections() {
|
|
13485
|
-
|
|
13505
|
+
let preLoadSections = this.staticDataConfiguration[this.contentType]?.preLoadSections;
|
|
13486
13506
|
if (preLoadSections) {
|
|
13507
|
+
if (this.parentItemId) {
|
|
13508
|
+
const newPreLoadSections = [];
|
|
13509
|
+
// Example: business-processes(paging:{perPage:-1}),where:{id:__parentId__})
|
|
13510
|
+
preLoadSections.forEach((item) => {
|
|
13511
|
+
console.log('item', item, this.parentItemId);
|
|
13512
|
+
let newItem = item;
|
|
13513
|
+
if (item.indexOf('__parentId__') !== -1 && this.parentItemId) {
|
|
13514
|
+
newItem = item.replace('__parentId__', String(this.parentItemId));
|
|
13515
|
+
console.log('item++', item);
|
|
13516
|
+
}
|
|
13517
|
+
console.log('newItem', newItem);
|
|
13518
|
+
newPreLoadSections.push(newItem);
|
|
13519
|
+
});
|
|
13520
|
+
console.log('newPreLoadSections', newPreLoadSections);
|
|
13521
|
+
preLoadSections = newPreLoadSections;
|
|
13522
|
+
}
|
|
13487
13523
|
this.staticDataFacade.staticDataLoadCategories(preLoadSections, this.defaultLanguageId);
|
|
13488
13524
|
}
|
|
13489
13525
|
}
|
|
@@ -14005,7 +14041,6 @@ class StaticDataViewComponent {
|
|
|
14005
14041
|
this.howError = false;
|
|
14006
14042
|
}
|
|
14007
14043
|
ngOnInit() {
|
|
14008
|
-
console.log('ngOnInit.modalData', this.dialogContentType, this.dialogItemId);
|
|
14009
14044
|
this.matIconReg.setDefaultFontSetClass('material-symbols-outlined');
|
|
14010
14045
|
this.currentUserData = this.authService.currentUserValue;
|
|
14011
14046
|
this.loadStaticDataConfiguration();
|
|
@@ -14157,7 +14192,6 @@ class StaticDataViewComponent {
|
|
|
14157
14192
|
preLoadSections() {
|
|
14158
14193
|
const preLoadSections = this.staticDataConfiguration[this.contentType]?.preLoadSections;
|
|
14159
14194
|
if (preLoadSections) {
|
|
14160
|
-
console.log('preLoadSections', this.contentType, preLoadSections);
|
|
14161
14195
|
this.staticDataFacade.staticDataLoadCategories(preLoadSections, this.defaultLanguageId);
|
|
14162
14196
|
}
|
|
14163
14197
|
}
|