wt-front-shared 1.0.68 → 1.0.70
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/esm2020/lib/core/+state/forms/forms.reducer.mjs +2 -2
- package/esm2020/lib/core/+state/static-data/static-data.effects.mjs +1 -15
- package/esm2020/lib/core/+state/static-data/static-data.facade.mjs +1 -1
- package/esm2020/lib/core/+state/static-data/static-data.selectors.mjs +20 -3
- package/esm2020/lib/core/components/auto-form/containers/auto-form-main/auto-form-main.component.mjs +7 -2
- package/esm2020/lib/core/components/static-data/containers/static-data-details/static-data-details.component.mjs +21 -15
- package/fesm2015/wt-front-shared.mjs +44 -31
- package/fesm2015/wt-front-shared.mjs.map +1 -1
- package/fesm2020/wt-front-shared.mjs +44 -31
- package/fesm2020/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/components/static-data/containers/static-data-details/static-data-details.component.d.ts +5 -3
- package/package.json +1 -1
|
@@ -2364,7 +2364,7 @@ const _formReducer = createReducer(initialState$e, on(InitForm, UpdateForm, (sta
|
|
|
2364
2364
|
formId,
|
|
2365
2365
|
hasError,
|
|
2366
2366
|
loading,
|
|
2367
|
-
isComplete,
|
|
2367
|
+
isComplete: isComplete || false,
|
|
2368
2368
|
error,
|
|
2369
2369
|
code,
|
|
2370
2370
|
data
|
|
@@ -6165,8 +6165,25 @@ const getStaticData = (contentType, subSection, where) => createSelector(getStat
|
|
|
6165
6165
|
let result = true;
|
|
6166
6166
|
Object.keys(where)
|
|
6167
6167
|
.forEach(whereItem => {
|
|
6168
|
-
|
|
6169
|
-
|
|
6168
|
+
// item[whereItem] is not Array
|
|
6169
|
+
if (!Array.isArray(item[whereItem])) {
|
|
6170
|
+
const fieldValue = item[whereItem];
|
|
6171
|
+
if (!Array.isArray(where[whereItem])) {
|
|
6172
|
+
result = fieldValue === where[whereItem];
|
|
6173
|
+
}
|
|
6174
|
+
else {
|
|
6175
|
+
const whereValues = where[whereItem];
|
|
6176
|
+
result = !!whereValues.includes(fieldValue);
|
|
6177
|
+
}
|
|
6178
|
+
}
|
|
6179
|
+
else {
|
|
6180
|
+
// item[whereItem] is Array
|
|
6181
|
+
if (!Array.isArray(where[whereItem])) {
|
|
6182
|
+
result = item[whereItem].includes(where[whereItem]);
|
|
6183
|
+
}
|
|
6184
|
+
else {
|
|
6185
|
+
result = where[whereItem].every(subItem => item[whereItem].includes(subItem));
|
|
6186
|
+
}
|
|
6170
6187
|
}
|
|
6171
6188
|
});
|
|
6172
6189
|
return result;
|
|
@@ -6450,20 +6467,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
6450
6467
|
args: [{ providedIn: "root" }]
|
|
6451
6468
|
}], ctorParameters: function () { return [{ type: i1.Store }]; } });
|
|
6452
6469
|
|
|
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
6470
|
class StaticDataEffects extends BaseEffects {
|
|
6468
6471
|
constructor(actions$, store, authenticationService, staticDataService, routerService, notificationsFacade) {
|
|
6469
6472
|
super(actions$, store);
|
|
@@ -9360,7 +9363,8 @@ class AutoFormMainComponent {
|
|
|
9360
9363
|
this.dataStored = true;
|
|
9361
9364
|
}
|
|
9362
9365
|
this.storedFormValue = this.form.value;
|
|
9363
|
-
|
|
9366
|
+
// @TODO Need to test 31.01
|
|
9367
|
+
// this.preparingData();
|
|
9364
9368
|
this.getQueryParams();
|
|
9365
9369
|
}
|
|
9366
9370
|
ngOnDestroy() {
|
|
@@ -9449,6 +9453,9 @@ class AutoFormMainComponent {
|
|
|
9449
9453
|
loading: false
|
|
9450
9454
|
});
|
|
9451
9455
|
const newSubscription = this.formsFacade.getForm(this.formId)
|
|
9456
|
+
.pipe(distinctUntilChanged((a, b) => {
|
|
9457
|
+
return a.isComplete === b.isComplete;
|
|
9458
|
+
}))
|
|
9452
9459
|
.subscribe((form) => {
|
|
9453
9460
|
if (form.isComplete) {
|
|
9454
9461
|
this.formCompleted.emit({ newId: form.data.itemId });
|
|
@@ -10996,7 +11003,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
10996
11003
|
}] } });
|
|
10997
11004
|
|
|
10998
11005
|
class StaticDataDetailsComponent {
|
|
10999
|
-
constructor(fb, router, route, autoFormService, routerFacade, formErrors, formsFacade, requestsFacade, staticDataFacade, rightService, dialog, notificationsFacade, coreFacade, publicationMessagesFacade, actionsFacade, injector) {
|
|
11006
|
+
constructor(fb, router, route, autoFormService, routerFacade, formErrors, formsFacade, requestsFacade, staticDataFacade, rightService, dialog, notificationsFacade, coreFacade, publicationMessagesFacade, actionsFacade, injector, cd) {
|
|
11000
11007
|
this.fb = fb;
|
|
11001
11008
|
this.router = router;
|
|
11002
11009
|
this.route = route;
|
|
@@ -11013,6 +11020,7 @@ class StaticDataDetailsComponent {
|
|
|
11013
11020
|
this.publicationMessagesFacade = publicationMessagesFacade;
|
|
11014
11021
|
this.actionsFacade = actionsFacade;
|
|
11015
11022
|
this.injector = injector;
|
|
11023
|
+
this.cd = cd;
|
|
11016
11024
|
this.data = {};
|
|
11017
11025
|
this.storedFormValues = null;
|
|
11018
11026
|
this.dataStored = false;
|
|
@@ -11046,7 +11054,6 @@ class StaticDataDetailsComponent {
|
|
|
11046
11054
|
this.loadStaticDataConfiguration();
|
|
11047
11055
|
this.init();
|
|
11048
11056
|
this.subscribeToRoute();
|
|
11049
|
-
this.subscribeToRequestStatusStatus();
|
|
11050
11057
|
}
|
|
11051
11058
|
ngOnChanges(changes) {
|
|
11052
11059
|
}
|
|
@@ -11067,12 +11074,15 @@ class StaticDataDetailsComponent {
|
|
|
11067
11074
|
this.actionsFacade.sendAction(this.publishInTelegramAction, this.publishInTelegramActionId, data);
|
|
11068
11075
|
}
|
|
11069
11076
|
subscribeToRequestStatusStatus() {
|
|
11077
|
+
if (this.subscriptionToRequestStatus$) {
|
|
11078
|
+
this.subscriptionToRequestStatus$.unsubscribe();
|
|
11079
|
+
}
|
|
11070
11080
|
this.requestsFacade.createRequestListener(`static-data/${this.contentType}`, this.putMethod, this.itemId);
|
|
11071
|
-
this.requestsFacade.getRequestUpdates('static-data',
|
|
11072
|
-
.pipe(
|
|
11081
|
+
this.subscriptionToRequestStatus$ = this.requestsFacade.getRequestUpdates('static-data', this.putMethod, this.itemId)
|
|
11082
|
+
.pipe(map((item) => ({ value: item?.status })))
|
|
11073
11083
|
.subscribe(data => {
|
|
11074
|
-
console.log('data', data);
|
|
11075
11084
|
this.formStatus = data.value;
|
|
11085
|
+
this.cd.markForCheck();
|
|
11076
11086
|
});
|
|
11077
11087
|
}
|
|
11078
11088
|
getUrlExtras() {
|
|
@@ -11183,9 +11193,11 @@ class StaticDataDetailsComponent {
|
|
|
11183
11193
|
if (itemStatus === this.unPublishStatus) {
|
|
11184
11194
|
await this.submitClick();
|
|
11185
11195
|
this.requestsFacade.getRequestUpdates('static-data', this.putMethod, this.itemId, this.contentType)
|
|
11186
|
-
.pipe(
|
|
11187
|
-
.subscribe(() => {
|
|
11188
|
-
|
|
11196
|
+
.pipe(untilComponentDestroyed(this))
|
|
11197
|
+
.subscribe((data) => {
|
|
11198
|
+
if (itemStatus === this.unPublishStatus && data.status === RequestStatus.LOADED) {
|
|
11199
|
+
this.publicationMessagesFacade.publishPost('static-data', this.itemId, this.contentType);
|
|
11200
|
+
}
|
|
11189
11201
|
});
|
|
11190
11202
|
}
|
|
11191
11203
|
if (itemStatus === this.publishStatus) {
|
|
@@ -11270,9 +11282,9 @@ class StaticDataDetailsComponent {
|
|
|
11270
11282
|
this.subscribeToDataStatus();
|
|
11271
11283
|
this.staticDataSubscription();
|
|
11272
11284
|
this.preLoadSections();
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
11285
|
+
if (this.itemId) {
|
|
11286
|
+
this.subscribeToRequestStatusStatus();
|
|
11287
|
+
}
|
|
11276
11288
|
}
|
|
11277
11289
|
}
|
|
11278
11290
|
if (this.staticSection.options?.subEntities && urlFragment) {
|
|
@@ -11282,6 +11294,7 @@ class StaticDataDetailsComponent {
|
|
|
11282
11294
|
}
|
|
11283
11295
|
});
|
|
11284
11296
|
}
|
|
11297
|
+
// this.subscribeToRequestStatusStatus();
|
|
11285
11298
|
}
|
|
11286
11299
|
preLoadSections() {
|
|
11287
11300
|
const preLoadSections = this.staticDataConfiguration[this.contentType]?.preLoadSections;
|
|
@@ -11383,12 +11396,12 @@ class StaticDataDetailsComponent {
|
|
|
11383
11396
|
.toPromise();
|
|
11384
11397
|
}
|
|
11385
11398
|
}
|
|
11386
|
-
StaticDataDetailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataDetailsComponent, deps: [{ token: i6.UntypedFormBuilder }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: AutoFormService }, { token: RouterFacade }, { token: FormErrorsFacade }, { token: FormsFacade }, { token: RequestsFacade }, { token: StaticDataFacade }, { token: RightService }, { token: i1$4.MatDialog }, { token: NotificationsFacade }, { token: CoreFacade }, { token: PublicationMessagesFacade }, { token: ActionsFacade }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
11399
|
+
StaticDataDetailsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataDetailsComponent, deps: [{ token: i6.UntypedFormBuilder }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: AutoFormService }, { token: RouterFacade }, { token: FormErrorsFacade }, { token: FormsFacade }, { token: RequestsFacade }, { token: StaticDataFacade }, { token: RightService }, { token: i1$4.MatDialog }, { token: NotificationsFacade }, { token: CoreFacade }, { token: PublicationMessagesFacade }, { token: ActionsFacade }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11387
11400
|
StaticDataDetailsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: StaticDataDetailsComponent, selector: "app-static-data-details", usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"(status$ | async) as status\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticData$ | async) as staticData\">\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"form.get('name')\" [parentTitle]=\"staticSection.title\"\n [parentUrl]=\"['/static-data', contentType]\"\n [title]=\"form.get('name')?.value\">>\n </shared-panel-header>\n\n <div class=\"content p-24\">\n <div class=\"center-block bg-white mat-elevation-z1\">\n <mat-tab-group [selectedIndex]=\"activeTabIndex\">\n <mat-tab>\n <ng-template mat-tab-label>\n <mat-icon class=\"static-data-tab-icon\">edit</mat-icon>\n \u0424\u043E\u0440\u043C\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F\n </ng-template>\n <ng-template matTabContent>\n <div class=\"center-block-header position-relative\">\n <div @appearFromLeftWithDelay class=\"center-block-header-title\">\n {{ form.get('name')?.value || '\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435' }}\n </div>\n </div>\n <div class=\"center-block-inner\">\n <form [formGroup]=\"form\">\n <shared-auto-form\n *ngIf=\"status.value === statusType.LOADED\"\n class=\"mb-20\"\n [showPublicationMessages]=\"staticSection.options?.havePublication || false\"\n [entity]=\"contentType\"\n [itemId]=\"itemId\"\n [formId]=\"formId\"\n [fields]=\"fields\"\n [form]=\"form\"\n [config]=\"{needToPublish: false}\"\n [havePublication]=\"staticSection.options?.havePublication || false\"\n [errorMessageTexts]=\"globalErrorMessageTexts\"\n (changed)=\"changedFormValue($event)\"\n (formCompleted)=\"formCompleted($event)\"\n ></shared-auto-form>\n\n <div *ngIf=\"staticSection.globalActions\" class=\"global-actions\">\n <div *ngFor=\"let action of staticSection.globalActions\"\n (click)=\"globalActionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>\n <div @appearFromLeftWithDelay\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n class=\"mt-20\">\n <shared-button\n id=\"back-to-list-button\"\n class=\"mr-8\"\n icon=\"chevron_left\"\n type=\"button\"\n styleTheme=\"raised\"\n color=\"basic\"\n iconColor=\"black\"\n (click)=\"goBack()\"\n >\u041A \u0441\u043F\u0438\u0441\u043A\u0443\n </shared-button>\n <shared-button\n *ngIf=\"userRights[0]\"\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [loading]=\"status.value === statusType.LOADING\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >{{ itemId ? '\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C' : '\u0421\u043E\u0437\u0434\u0430\u0442\u044C' }}\n <!-- [disabled]=\"!form.valid dataStored\" -->\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.havePublication\">\n <shared-button\n *ngIf=\"!form.get('status')?.value\"\n id=\"publish-button\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"!itemId || publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C\n </shared-button>\n <shared-button\n *ngIf=\"form.get('status')?.value === publishStatus\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u0421\u043D\u044F\u0442\u044C \u0441 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438\n </shared-button>\n </ng-container>\n <shared-button\n *ngIf=\"userRights[3]\"\n id=\"delete-button\"\n [disabled]=\"!itemId\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n (click)=\"deleteAction(staticData.value)\"\n >\u0423\u0434\u0430\u043B\u0438\u0442\u044C\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.publicationInTelegramBot\">\n <shared-button\n icon=\"send\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n (click)=\"publishInTelegram()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432 Telegram\n </shared-button>\n </ng-container>\n </div>\n </form>\n </div>\n </ng-template>\n </mat-tab>\n <ng-container *ngFor=\"let subEntity of staticSection.options?.subEntities\">\n <mat-tab>\n <ng-template mat-tab-label>\n <mat-icon *ngIf=\"subEntity.titleIcon\"\n class=\"static-data-tab-icon\">{{ subEntity.titleIcon }}\n </mat-icon>\n {{ subEntity.title }}\n </ng-template>\n <ng-template matTabContent>\n <div class=\"center-block-inner\">\n <ng-container *ngIf=\"subEntity.subEntitiesType === 'static-data'\">\n <ng-container *ngIf=\"staticData.value?.id\">\n <ng-container *ngIf=\"staticData.value?.id\" class=\"center-block-inner\">\n <app-static-data-list-items\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [contentType]=\"subEntity.entity\"\n [customTitle]=\"subEntity.title + ' ' + staticData.value?.['name']\"\n [addTitle]=\"subEntity.addTitle + ' ' + staticData.value?.['name']\"\n [filteringQuery]=\"subEntity.getFilteringQuery(staticData.value)\"\n [parentSection]=\"contentType\"\n [parentItemId]=\"itemId\"\n [parentSectionHashtag]=\"subEntity.hashTag\"\n [parentData]=\"form.value\"\n [autoCompleteFields]=\"subEntity.autoCompleteFields\"\n ></app-static-data-list-items>\n </ng-container>\n <shared-spinner *ngIf=\"!staticData.value?.id\"\n [overlay]=\"true\"></shared-spinner>\n </ng-container>\n <ng-container *ngIf=\"!staticData.value?.id\">\n <div class=\"message-box error\">\n <ng-container *ngIf=\"!subEntity.entity\">\n \u041F\u0435\u0440\u0435\u0434 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C\n </ng-container>\n <ng-container *ngIf=\"subEntity.emptyTitle\">\n {{ subEntity.emptyTitle }}\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"subEntity.subEntitiesType === 'component'\">\n <ng-container *ngComponentOutlet=\"\n subEntity.component;\n injector: componentDataInjector;\n \" /> <!-- subEntity.getInputData(form.value) -->\n </ng-container>\n </div>\n </ng-template>\n </mat-tab>\n </ng-container>\n </mat-tab-group>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <shared-spinner *ngIf=\"status.value !== statusType.LOADED || formStatus === 'loading'\" [overlay]=\"true\"></shared-spinner>\n</ng-container>\n\n\n", styles: [".update-published-tour-popup{position:absolute;top:0;left:0;width:100%;background:rgba(72,88,96,.6509803922);height:100%;z-index:100}.static-data-tab-icon{margin-right:5px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AutoFormMainComponent, selector: "shared-auto-form", inputs: ["fields", "itemId", "formId", "showPublicationMessages", "form", "editorImageUploadUrl", "errorMessageTexts", "entity", "havePublication", "config"], outputs: ["changed", "formCompleted"] }, { kind: "component", type: i2$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i9.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i9.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i22.MatTabContent, selector: "[matTabContent]" }, { kind: "directive", type: i22.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i22.MatTab, selector: "mat-tab", inputs: ["disabled"], exportAs: ["matTab"] }, { kind: "component", type: i22.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple", "fitInkBarToContent", "mat-stretch-tabs"], exportAs: ["matTabGroup"] }, { kind: "component", type: StaticDataListItemsComponent, selector: "app-static-data-list-items", inputs: ["staticDataConfiguration", "contentType", "customTitle", "addTitle", "parentSection", "parentItemId", "showPanelHeader", "parentData", "parentSectionHashtag", "autoCompleteFields", "filteringQuery"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }], animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11388
11401
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StaticDataDetailsComponent, decorators: [{
|
|
11389
11402
|
type: Component,
|
|
11390
11403
|
args: [{ selector: 'app-static-data-details', changeDetection: ChangeDetectionStrategy.OnPush, animations: [appearFromRightWithDelay, appearFromLeftWithDelay, appearOpacity], template: "<ng-container *ngIf=\"(status$ | async) as status\">\n <ng-container *ngIf=\"(userRights$ | async) as userRights\">\n <ng-container *ngIf=\"(staticData$ | async) as staticData\">\n <div class=\"page-layout simple fullwidth angular-material-elements\">\n <shared-panel-header *ngIf=\"form.get('name')\" [parentTitle]=\"staticSection.title\"\n [parentUrl]=\"['/static-data', contentType]\"\n [title]=\"form.get('name')?.value\">>\n </shared-panel-header>\n\n <div class=\"content p-24\">\n <div class=\"center-block bg-white mat-elevation-z1\">\n <mat-tab-group [selectedIndex]=\"activeTabIndex\">\n <mat-tab>\n <ng-template mat-tab-label>\n <mat-icon class=\"static-data-tab-icon\">edit</mat-icon>\n \u0424\u043E\u0440\u043C\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F\n </ng-template>\n <ng-template matTabContent>\n <div class=\"center-block-header position-relative\">\n <div @appearFromLeftWithDelay class=\"center-block-header-title\">\n {{ form.get('name')?.value || '\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435' }}\n </div>\n </div>\n <div class=\"center-block-inner\">\n <form [formGroup]=\"form\">\n <shared-auto-form\n *ngIf=\"status.value === statusType.LOADED\"\n class=\"mb-20\"\n [showPublicationMessages]=\"staticSection.options?.havePublication || false\"\n [entity]=\"contentType\"\n [itemId]=\"itemId\"\n [formId]=\"formId\"\n [fields]=\"fields\"\n [form]=\"form\"\n [config]=\"{needToPublish: false}\"\n [havePublication]=\"staticSection.options?.havePublication || false\"\n [errorMessageTexts]=\"globalErrorMessageTexts\"\n (changed)=\"changedFormValue($event)\"\n (formCompleted)=\"formCompleted($event)\"\n ></shared-auto-form>\n\n <div *ngIf=\"staticSection.globalActions\" class=\"global-actions\">\n <div *ngFor=\"let action of staticSection.globalActions\"\n (click)=\"globalActionHandle(action)\" class=\"global-action\">\n {{ action.title }}\n </div>\n </div>\n <div @appearFromLeftWithDelay\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n class=\"mt-20\">\n <shared-button\n id=\"back-to-list-button\"\n class=\"mr-8\"\n icon=\"chevron_left\"\n type=\"button\"\n styleTheme=\"raised\"\n color=\"basic\"\n iconColor=\"black\"\n (click)=\"goBack()\"\n >\u041A \u0441\u043F\u0438\u0441\u043A\u0443\n </shared-button>\n <shared-button\n *ngIf=\"userRights[0]\"\n id=\"form-create-button\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"edit\"\n iconColor=\"white\"\n color=\"accent\"\n styleTheme=\"raised\"\n [loading]=\"status.value === statusType.LOADING\"\n [disabled]=\"!form.valid || formStatus === 'loading'\"\n (click)=\"submitClick()\"\n >{{ itemId ? '\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C' : '\u0421\u043E\u0437\u0434\u0430\u0442\u044C' }}\n <!-- [disabled]=\"!form.valid dataStored\" -->\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.havePublication\">\n <shared-button\n *ngIf=\"!form.get('status')?.value\"\n id=\"publish-button\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"!itemId || publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C\n </shared-button>\n <shared-button\n *ngIf=\"form.get('status')?.value === publishStatus\"\n class=\"mr-8\"\n icon=\"check\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n [disabled]=\"publishButtonLoading\"\n [loading]=\"publishButtonLoading\"\n (click)=\"publishToggle()\"\n >\u0421\u043D\u044F\u0442\u044C \u0441 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438\n </shared-button>\n </ng-container>\n <shared-button\n *ngIf=\"userRights[3]\"\n id=\"delete-button\"\n [disabled]=\"!itemId\"\n class=\"mr-8\"\n type=\"submit\"\n icon=\"clear\"\n color=\"warn\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n (click)=\"deleteAction(staticData.value)\"\n >\u0423\u0434\u0430\u043B\u0438\u0442\u044C\n </shared-button>\n <ng-container *ngIf=\"staticSection.options?.publicationInTelegramBot\">\n <shared-button\n icon=\"send\"\n type=\"button\"\n iconColor=\"white\"\n styleTheme=\"raised\"\n color=\"orange\"\n (click)=\"publishInTelegram()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432 Telegram\n </shared-button>\n </ng-container>\n </div>\n </form>\n </div>\n </ng-template>\n </mat-tab>\n <ng-container *ngFor=\"let subEntity of staticSection.options?.subEntities\">\n <mat-tab>\n <ng-template mat-tab-label>\n <mat-icon *ngIf=\"subEntity.titleIcon\"\n class=\"static-data-tab-icon\">{{ subEntity.titleIcon }}\n </mat-icon>\n {{ subEntity.title }}\n </ng-template>\n <ng-template matTabContent>\n <div class=\"center-block-inner\">\n <ng-container *ngIf=\"subEntity.subEntitiesType === 'static-data'\">\n <ng-container *ngIf=\"staticData.value?.id\">\n <ng-container *ngIf=\"staticData.value?.id\" class=\"center-block-inner\">\n <app-static-data-list-items\n [staticDataConfiguration]=\"staticDataConfiguration\"\n [contentType]=\"subEntity.entity\"\n [customTitle]=\"subEntity.title + ' ' + staticData.value?.['name']\"\n [addTitle]=\"subEntity.addTitle + ' ' + staticData.value?.['name']\"\n [filteringQuery]=\"subEntity.getFilteringQuery(staticData.value)\"\n [parentSection]=\"contentType\"\n [parentItemId]=\"itemId\"\n [parentSectionHashtag]=\"subEntity.hashTag\"\n [parentData]=\"form.value\"\n [autoCompleteFields]=\"subEntity.autoCompleteFields\"\n ></app-static-data-list-items>\n </ng-container>\n <shared-spinner *ngIf=\"!staticData.value?.id\"\n [overlay]=\"true\"></shared-spinner>\n </ng-container>\n <ng-container *ngIf=\"!staticData.value?.id\">\n <div class=\"message-box error\">\n <ng-container *ngIf=\"!subEntity.entity\">\n \u041F\u0435\u0440\u0435\u0434 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0438\u0441\u0435\u0439 \u0412\u0430\u043C \u043D\u0443\u0436\u043D\u043E \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C\n \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0437\u0430\u043F\u0438\u0441\u044C\n </ng-container>\n <ng-container *ngIf=\"subEntity.emptyTitle\">\n {{ subEntity.emptyTitle }}\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"subEntity.subEntitiesType === 'component'\">\n <ng-container *ngComponentOutlet=\"\n subEntity.component;\n injector: componentDataInjector;\n \" /> <!-- subEntity.getInputData(form.value) -->\n </ng-container>\n </div>\n </ng-template>\n </mat-tab>\n </ng-container>\n </mat-tab-group>\n </div>\n </div>\n </div>\n </ng-container>\n </ng-container>\n <shared-spinner *ngIf=\"status.value !== statusType.LOADED || formStatus === 'loading'\" [overlay]=\"true\"></shared-spinner>\n</ng-container>\n\n\n", styles: [".update-published-tour-popup{position:absolute;top:0;left:0;width:100%;background:rgba(72,88,96,.6509803922);height:100%;z-index:100}.static-data-tab-icon{margin-right:5px}\n"] }]
|
|
11391
|
-
}], ctorParameters: function () { return [{ type: i6.UntypedFormBuilder }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: AutoFormService }, { type: RouterFacade }, { type: FormErrorsFacade }, { type: FormsFacade }, { type: RequestsFacade }, { type: StaticDataFacade }, { type: RightService }, { type: i1$4.MatDialog }, { type: NotificationsFacade }, { type: CoreFacade }, { type: PublicationMessagesFacade }, { type: ActionsFacade }, { type: i0.Injector }]; } });
|
|
11404
|
+
}], ctorParameters: function () { return [{ type: i6.UntypedFormBuilder }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: AutoFormService }, { type: RouterFacade }, { type: FormErrorsFacade }, { type: FormsFacade }, { type: RequestsFacade }, { type: StaticDataFacade }, { type: RightService }, { type: i1$4.MatDialog }, { type: NotificationsFacade }, { type: CoreFacade }, { type: PublicationMessagesFacade }, { type: ActionsFacade }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }]; } });
|
|
11392
11405
|
|
|
11393
11406
|
/**
|
|
11394
11407
|
* @title Data table with sorting, pagination, and filtering.
|