@dignite-ng/expand.cms 3.0.0-rc.48 → 3.0.0-rc.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/providers/route.provider.d.ts +2 -3
- package/esm2022/config/providers/route.provider.mjs +3 -4
- package/esm2022/lib/cms-routing.module.mjs +3 -3
- package/esm2022/lib/cms.module.mjs +4 -4
- package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +18 -16
- package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +9 -1
- package/esm2022/lib/components/admin/entries/create.component.mjs +25 -63
- package/esm2022/lib/components/admin/entries/edit.component.mjs +28 -14
- package/esm2022/lib/components/admin/entries/entries.component.mjs +11 -16
- package/esm2022/lib/components/admin/fields/create-field.component.mjs +54 -54
- package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +44 -69
- package/esm2022/lib/components/admin/fields/edit-field.component.mjs +130 -73
- package/esm2022/lib/components/admin/fields/fields-form-config.mjs +50 -0
- package/esm2022/lib/components/admin/fields/fields-group.component.mjs +128 -0
- package/esm2022/lib/components/admin/fields/fields.component.mjs +61 -57
- package/esm2022/lib/components/admin/fields/index.mjs +3 -3
- package/esm2022/lib/components/admin/sections/create-or-edit-sections-modal.component.mjs +17 -15
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +59 -86
- package/esm2022/lib/components/admin/sections/sections.component.mjs +11 -14
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.component.mjs +32 -23
- package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +26 -11
- package/esm2022/lib/components/dynamic-form/table/table-config.component.mjs +50 -26
- package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +10 -10
- package/esm2022/lib/components/dynamic-form/table/table-view.component.mjs +3 -2
- package/esm2022/lib/resolvers/page-default-toolbar-actions.mjs +42 -37
- package/esm2022/lib/resolvers/table-default-entity-props.mjs +4 -4
- package/esm2022/lib/services/fields-data.service.mjs +100 -0
- package/esm2022/lib/services/form-controls.service.mjs +12 -10
- package/esm2022/lib/services/index.mjs +3 -4
- package/esm2022/lib/services/keys-convert-to-lowercase.service.mjs +40 -0
- package/fesm2022/dignite-ng-expand.cms-config.mjs +2 -3
- package/fesm2022/dignite-ng-expand.cms-config.mjs.map +1 -1
- package/fesm2022/dignite-ng-expand.cms.mjs +811 -784
- package/fesm2022/dignite-ng-expand.cms.mjs.map +1 -1
- package/lib/cms.module.d.ts +2 -2
- package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +3 -1
- package/lib/components/admin/entries/create-or-update-entry-input-base.d.ts +8 -0
- package/lib/components/admin/entries/create.component.d.ts +1 -2
- package/lib/components/admin/entries/edit.component.d.ts +1 -2
- package/lib/components/admin/entries/entries.component.d.ts +2 -1
- package/lib/components/admin/fields/create-field.component.d.ts +19 -22
- package/lib/components/admin/fields/create-or-edit-field.component.d.ts +20 -26
- package/lib/components/admin/fields/edit-field.component.d.ts +24 -30
- package/lib/components/admin/fields/fields-form-config.d.ts +19 -0
- package/lib/components/admin/fields/fields-group.component.d.ts +48 -0
- package/lib/components/admin/fields/fields.component.d.ts +18 -16
- package/lib/components/admin/fields/index.d.ts +1 -2
- package/lib/components/admin/sections/create-or-edit-sections-modal.component.d.ts +4 -1
- package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +14 -9
- package/lib/components/admin/sections/sections.component.d.ts +1 -3
- package/lib/components/dynamic-form/matrix/matrix-config.component.d.ts +10 -4
- package/lib/components/dynamic-form/matrix/matrix-control.component.d.ts +7 -3
- package/lib/components/dynamic-form/table/table-config.component.d.ts +15 -5
- package/lib/components/dynamic-form/table/table-control.component.d.ts +3 -3
- package/lib/components/dynamic-form/table/table-view.component.d.ts +2 -1
- package/lib/resolvers/page-default-toolbar-actions.d.ts +9 -6
- package/lib/services/fields-data.service.d.ts +45 -0
- package/lib/services/form-controls.service.d.ts +3 -1
- package/lib/services/index.d.ts +2 -3
- package/lib/services/keys-convert-to-lowercase.service.d.ts +16 -0
- package/package.json +1 -1
- package/esm2022/lib/components/admin/fields/create-or-update-field-input-base.mjs +0 -18
- package/esm2022/lib/components/admin/fields/field-group.component.mjs +0 -144
- package/esm2022/lib/constants/styles.mjs +0 -19
- package/esm2022/lib/services/appent-content.mjs +0 -15
- package/esm2022/lib/services/cms-api.service.mjs +0 -94
- package/esm2022/lib/services/cms.service.mjs +0 -22
- package/esm2022/lib/services/field-abstracts.service.mjs +0 -48
- package/lib/components/admin/fields/create-or-update-field-input-base.d.ts +0 -15
- package/lib/components/admin/fields/field-group.component.d.ts +0 -58
- package/lib/constants/styles.d.ts +0 -2
- package/lib/services/appent-content.d.ts +0 -1
- package/lib/services/cms-api.service.d.ts +0 -23
- package/lib/services/cms.service.d.ts +0 -10
- package/lib/services/field-abstracts.service.d.ts +0 -20
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, Pipe, Component, ChangeDetectorRef, EventEmitter, ViewChild, Input, Output,
|
|
2
|
+
import { Injectable, inject, Pipe, Component, ChangeDetectorRef, EventEmitter, ViewChild, Input, Output, InjectionToken, Injector, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@abp/ng.core';
|
|
4
4
|
import { mapEnumToOptions, ListService, ConfigStateService, LIST_QUERY_DEBOUNCE_TIME, LocalizationService, AuthGuard, PermissionGuard, LazyModuleFactory, CoreModule } from '@abp/ng.core';
|
|
5
5
|
import * as i3 from '@abp/ng.theme.shared';
|
|
6
6
|
import { ToasterService, ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i6 from '@angular/router';
|
|
8
8
|
import { Router, ActivatedRoute, RouterModule } from '@angular/router';
|
|
9
9
|
import * as i8 from '@abp/ng.components/extensible';
|
|
10
10
|
import { EXTENSIONS_IDENTIFIER, ToolbarAction, EntityProp, EntityAction, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps, ExtensibleModule } from '@abp/ng.components/extensible';
|
|
11
|
-
import * as i1$
|
|
11
|
+
import * as i1$1 from '@angular/forms';
|
|
12
12
|
import { FormBuilder, Validators, FormGroup, FormControl, FormArray, FormsModule } from '@angular/forms';
|
|
13
13
|
import * as i11 from '@swimlane/ngx-datatable';
|
|
14
14
|
import { ColumnMode, NgxDatatableModule } from '@swimlane/ngx-datatable';
|
|
15
15
|
import { finalize, of, map, tap } from 'rxjs';
|
|
16
|
-
import
|
|
16
|
+
import * as i4 from '@dignite-ng/expand.core';
|
|
17
|
+
import { UpdateListService, ValidatorsService, LocationBackService, DigniteValidatorsService } from '@dignite-ng/expand.core';
|
|
17
18
|
import * as i7 from '@angular/cdk/drag-drop';
|
|
18
19
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
19
|
-
import * as
|
|
20
|
+
import * as i2 from '@angular/common';
|
|
20
21
|
import { Location, DatePipe } from '@angular/common';
|
|
21
|
-
import * as
|
|
22
|
+
import * as i6$1 from '@ngx-validate/core';
|
|
22
23
|
import * as i11$1 from '@ng-bootstrap/ng-bootstrap';
|
|
23
24
|
import { NgbNavModule, NgbAccordionModule, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
24
25
|
import * as i14 from '@abp/ng.components/page';
|
|
25
26
|
import { PageModule } from '@abp/ng.components/page';
|
|
26
|
-
import * as
|
|
27
|
+
import * as i6$2 from '@dignite-ng/expand.dynamic-form';
|
|
27
28
|
import { DynamicFormModule } from '@dignite-ng/expand.dynamic-form';
|
|
28
|
-
import { pinyin } from 'pinyin-pro';
|
|
29
|
-
import { finalize as finalize$1 } from 'rxjs/operators';
|
|
30
29
|
import * as i4$1 from 'ng-zorro-antd/select';
|
|
31
30
|
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
32
31
|
import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
|
|
@@ -340,9 +339,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
340
339
|
}]
|
|
341
340
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
342
341
|
|
|
342
|
+
class FieldsDataService {
|
|
343
|
+
constructor(_fieldGroupService, _formService, _fieldService) {
|
|
344
|
+
this._fieldGroupService = _fieldGroupService;
|
|
345
|
+
this._formService = _formService;
|
|
346
|
+
this._fieldService = _fieldService;
|
|
347
|
+
/**
|
|
348
|
+
* 字段分组列表
|
|
349
|
+
*/
|
|
350
|
+
this.fieldGroupsList = [];
|
|
351
|
+
/**
|
|
352
|
+
* 字段控件类型列表
|
|
353
|
+
*/
|
|
354
|
+
this.fieldControlsTypesList = [];
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* 获取字段分组
|
|
358
|
+
*/
|
|
359
|
+
getfieldGroups(newList = false) {
|
|
360
|
+
return new Promise((resolve, reject) => {
|
|
361
|
+
if (this.fieldGroupsList.length > 0 && newList == false) {
|
|
362
|
+
resolve(this.fieldGroupsList);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
this._fieldGroupService.getList({}).subscribe(res => {
|
|
366
|
+
this.fieldGroupsList = res.items;
|
|
367
|
+
resolve(res.items);
|
|
368
|
+
}, () => {
|
|
369
|
+
reject([]);
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* 获取字段类型列表
|
|
375
|
+
*/
|
|
376
|
+
getControlsfieldTypes() {
|
|
377
|
+
return new Promise((resolve, reject) => {
|
|
378
|
+
if (this.fieldControlsTypesList.length > 0) {
|
|
379
|
+
resolve(this.fieldControlsTypesList);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
this._formService.getFormControls({}).subscribe(res => {
|
|
383
|
+
this.fieldControlsTypesList = res.items;
|
|
384
|
+
resolve(res.items);
|
|
385
|
+
}, () => {
|
|
386
|
+
reject([]);
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
/**创建分组 */
|
|
391
|
+
createFieldGroup(input) {
|
|
392
|
+
return this._fieldGroupService.create(input);
|
|
393
|
+
}
|
|
394
|
+
/**编辑分组 */
|
|
395
|
+
updateFieldGroup(id, input) {
|
|
396
|
+
return this._fieldGroupService.update(id, input);
|
|
397
|
+
}
|
|
398
|
+
/**删除分组 */
|
|
399
|
+
deleteFieldGroup(id) {
|
|
400
|
+
return this._fieldGroupService.delete(id);
|
|
401
|
+
}
|
|
402
|
+
/**获取字段列表 */
|
|
403
|
+
getFieldsList(input) {
|
|
404
|
+
return this._fieldService.getList(input);
|
|
405
|
+
}
|
|
406
|
+
/**创建字段 */
|
|
407
|
+
createField(input) {
|
|
408
|
+
return this._fieldService.create(input);
|
|
409
|
+
}
|
|
410
|
+
/**编辑字段 */
|
|
411
|
+
updateField(id, input) {
|
|
412
|
+
return this._fieldService.update(id, input);
|
|
413
|
+
}
|
|
414
|
+
/**获取字段详情 */
|
|
415
|
+
getFieldDetail(id) {
|
|
416
|
+
return this._fieldService.get(id);
|
|
417
|
+
}
|
|
418
|
+
/**字段验证 */
|
|
419
|
+
nameExists(name) {
|
|
420
|
+
return this._fieldService.nameExists(name);
|
|
421
|
+
}
|
|
422
|
+
/**删除字段 */
|
|
423
|
+
deleteField(id) {
|
|
424
|
+
return this._fieldService.delete(id);
|
|
425
|
+
}
|
|
426
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldsDataService, deps: [{ token: FieldGroupAdminService }, { token: FormAdminService }, { token: FieldAdminService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
427
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldsDataService, providedIn: 'root' }); }
|
|
428
|
+
}
|
|
429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldsDataService, decorators: [{
|
|
430
|
+
type: Injectable,
|
|
431
|
+
args: [{
|
|
432
|
+
providedIn: 'root'
|
|
433
|
+
}]
|
|
434
|
+
}], ctorParameters: () => [{ type: FieldGroupAdminService }, { type: FormAdminService }, { type: FieldAdminService }] });
|
|
435
|
+
|
|
343
436
|
class FormControlsService {
|
|
344
|
-
constructor(_FormAdminService) {
|
|
437
|
+
constructor(_FormAdminService, _service) {
|
|
345
438
|
this._FormAdminService = _FormAdminService;
|
|
439
|
+
this._service = _service;
|
|
346
440
|
/**需要查询的动态表单类型 */
|
|
347
441
|
this.enableSearchTypeList = [];
|
|
348
442
|
/**不需要展示的动态表单类型 */
|
|
@@ -350,12 +444,11 @@ class FormControlsService {
|
|
|
350
444
|
}
|
|
351
445
|
/**获取动态表单类型 */
|
|
352
446
|
getDynamicFormType() {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
});
|
|
447
|
+
// eslint-disable-next-line no-async-promise-executor
|
|
448
|
+
return new Promise(async (resolve, rejects) => {
|
|
449
|
+
const items = await this._service.getControlsfieldTypes();
|
|
450
|
+
this.enableSearchTypeList = items.filter(el => el.enableSearch).map(el => el.name);
|
|
451
|
+
resolve(items);
|
|
359
452
|
});
|
|
360
453
|
}
|
|
361
454
|
async getEnableSearchTypeList() {
|
|
@@ -367,7 +460,7 @@ class FormControlsService {
|
|
|
367
460
|
getdisableshowinTypeList() {
|
|
368
461
|
return this.disableshowinTypeList;
|
|
369
462
|
}
|
|
370
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlsService, deps: [{ token: FormAdminService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
463
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlsService, deps: [{ token: FormAdminService }, { token: FieldsDataService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
371
464
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlsService, providedIn: 'root' }); }
|
|
372
465
|
}
|
|
373
466
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormControlsService, decorators: [{
|
|
@@ -375,7 +468,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
375
468
|
args: [{
|
|
376
469
|
providedIn: 'root',
|
|
377
470
|
}]
|
|
378
|
-
}], ctorParameters: () => [{ type: FormAdminService }] });
|
|
471
|
+
}], ctorParameters: () => [{ type: FormAdminService }, { type: FieldsDataService }] });
|
|
379
472
|
|
|
380
473
|
class GetLocalizedEntriesBySlugPipe {
|
|
381
474
|
constructor() {
|
|
@@ -486,23 +579,13 @@ class EntriesComponent {
|
|
|
486
579
|
}
|
|
487
580
|
/**获取页面数据 */
|
|
488
581
|
async getPageDate() {
|
|
489
|
-
// await this.getDynamicFormType();
|
|
490
582
|
this.enableSearchTypeList = await this._FormControlsService.getEnableSearchTypeList();
|
|
491
|
-
// this.disableshowinTypeList= this._FormControlsService.getdisableshowinTypeList();
|
|
492
583
|
await this.getSiteOfSectionList();
|
|
493
584
|
await this.getSectionLanguagesList();
|
|
585
|
+
this.filters.sorting = 'creationTime desc';
|
|
494
586
|
this.hookToQuery();
|
|
587
|
+
console.log(this.entryTypeList, 'entryTypeList', this.data.items);
|
|
495
588
|
}
|
|
496
|
-
/**获取动态表单类型 */
|
|
497
|
-
// getDynamicFormType() {
|
|
498
|
-
// return new Promise((resolve, rejects) => {
|
|
499
|
-
// this._FormAdminService.getFormControls().subscribe((res:any) => {
|
|
500
|
-
// // this.dynamicFormTypeList = res.items;
|
|
501
|
-
// this.enableSearchTypeList = res.items.filter(el => el.enableSearch).map(el => el.name);
|
|
502
|
-
// resolve(res.items);
|
|
503
|
-
// });
|
|
504
|
-
// });
|
|
505
|
-
// }
|
|
506
589
|
/**切换板块 */
|
|
507
590
|
async sectionIdChange() {
|
|
508
591
|
this.getSectionOfEntryType();
|
|
@@ -671,6 +754,7 @@ class EntriesComponent {
|
|
|
671
754
|
this.filters = {
|
|
672
755
|
sectionId: this.filters.sectionId,
|
|
673
756
|
culture: this.filters.culture,
|
|
757
|
+
sorting: 'creationTime desc',
|
|
674
758
|
};
|
|
675
759
|
this.list.filter = '';
|
|
676
760
|
this.list.maxResultCount = this.maxResultCount;
|
|
@@ -708,7 +792,7 @@ class EntriesComponent {
|
|
|
708
792
|
this.data.totalCount = 0;
|
|
709
793
|
if (this.SiteOfSectionType == SectionType.Structure) {
|
|
710
794
|
list.items = list.items.sort((a, b) => {
|
|
711
|
-
return
|
|
795
|
+
return new Date(b.creationTime).getTime() - new Date(a.creationTime).getTime();
|
|
712
796
|
});
|
|
713
797
|
}
|
|
714
798
|
for (const element of list.items) {
|
|
@@ -724,6 +808,10 @@ class EntriesComponent {
|
|
|
724
808
|
const scrollContainer = document.getElementsByClassName('lpx-scroll-container')[0];
|
|
725
809
|
(scrollContainer || window).scrollTo(0, 0);
|
|
726
810
|
}
|
|
811
|
+
/**判断某个类型的条目是否存在 */
|
|
812
|
+
isEntryTypeExist(entryTypeId) {
|
|
813
|
+
return this.data?.items?.some(el => el.entryTypeId == entryTypeId);
|
|
814
|
+
}
|
|
727
815
|
/**删除条目 */
|
|
728
816
|
deletefield(row) {
|
|
729
817
|
this.confirmation
|
|
@@ -767,7 +855,7 @@ class EntriesComponent {
|
|
|
767
855
|
expandedChange(event) {
|
|
768
856
|
this.isexpanded = event;
|
|
769
857
|
}
|
|
770
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntriesComponent, deps: [{ token: EntryAdminService }, { token: SectionAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1.ConfigStateService }, { token:
|
|
858
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntriesComponent, deps: [{ token: EntryAdminService }, { token: SectionAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1.ConfigStateService }, { token: i6.Router }, { token: i1.LocalizationService }, { token: FormAdminService }, { token: FieldAdminService }, { token: i0.ChangeDetectorRef }, { token: FormControlsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
771
859
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: EntriesComponent, selector: "cms-entries", providers: [
|
|
772
860
|
ListService,
|
|
773
861
|
// Provide this token if you want a different debounce time.
|
|
@@ -777,7 +865,7 @@ class EntriesComponent {
|
|
|
777
865
|
provide: EXTENSIONS_IDENTIFIER,
|
|
778
866
|
useValue: ECmsComponent.Entries,
|
|
779
867
|
},
|
|
780
|
-
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \">\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length === 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button class=\"btn btn-sm btn-primary\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single\"\r\n [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\"><i\r\n class=\"fa fa-plus me-2\"></i> {{'Cms::NewEntry'|abpLocalization}}</button>\r\n <!-- {{item.displayName}} -->\r\n </ng-container>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::NewEntry' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\">{{item.displayName}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <div id=\"sites-page\" class=\"sites-page\">\r\n <div class=\"card\">\r\n <div class=\"card-body \">\r\n <div class=\"row align-items-end\">\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.sectionId\"\r\n (change)=\"sectionIdChange()\">\r\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.culture\" (change)=\"cultureChange()\">\r\n <ng-container *ngFor=\"let item of sectionLanguagesList\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-6\">\r\n <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\r\n [placeholder]=\"'Cms::PagerSearch'|abpLocalization\" />\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"listget()\">\r\n <i class=\"bi bi-search\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n @if(filters.culture&&enablegearchFormEntity&&enableSearchFieldList.length>0){\r\n <div id=\"entries-advanced-form\" class=\"entries-advanced-form \" [hidden]=\"isexpanded\"\r\n (abpInit)=\"abpInitss()\">\r\n <form [formGroup]=\"enablegearchFormEntity\">\r\n <div class=\"row align-items-end\">\r\n <ng-container *ngFor=\"let el of enableSearchFieldList\">\r\n <ng-container *ngIf=\"el.field&&enablegearchFormEntity&&el.enableSearch\">\r\n <div class=\"col-md-3\">\r\n <df-dynamic-search [fields]=\"el\" [parentFiledName]=\"'extraProperties'\"\r\n [culture]=\"filters.culture\"\r\n [entity]=\"enablegearchFormEntity\"></df-dynamic-search>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <div class=\"col-md-3 mb-3 \">\r\n <button type=\"button\" class=\"btn btn-primary \" (click)=\"listget()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"card mb-0\">\r\n <div class=\"card-body p-0\">\r\n @if(SiteOfSectionType!==SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\" [columnMode]=\"ColumnMode.force\"\r\n [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [virtualization]=\"false\"\r\n [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\r\n <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"entryTypeId\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <!-- <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"sectionType\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ 'Cms::Enum:SectionType:'+SectionType[value] |\r\n abpLocalization }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <!-- <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"entryTypeId\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <!-- <ngx-datatable-column [name]=\"'Cms::Slug' | abpLocalization\" prop=\"slug\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\" [width]=\"80\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.value=== value\">{{ 'Cms::Enum:EntryStatus:'+item.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n @for (item of showinFieldList; track $index) {\r\n <ngx-datatable-column [name]=\"'Cms::'+item.displayName | abpLocalization\"\r\n [prop]=\"item?.field?.name\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <df-dynamic-view [type]=\"item.field.formControlName\" [showInList]=\"true\" [fields]=\"item\"\r\n [value]=\"row?.extraProperties[item.field.name]\"></df-dynamic-view>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\"\r\n [width]=\"190\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | shortDateTime }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\"\r\n [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <div ngbDropdown container=\"body\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{row.id}}/edit\">{{'Cms::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((row|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button>\r\n }\r\n <!-- -->\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'Cms::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n </ngx-datatable>\r\n </div>\r\n }\r\n\r\n @if(SiteOfSectionType===SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <table class=\"table overflow-nowrap mb-0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <thead>\r\n <tr>\r\n <th class=\"sticky-left-card-bg\"> <span\r\n class=\"bi bi-arrows-move fs-5 drag-handle me-2 opacity-0\"></span>{{'AbpUi::Actions'\r\n | abpLocalization}}</th>\r\n <th>{{'Cms::Title' | abpLocalization}}</th>\r\n <th>{{'Cms::SectionType' | abpLocalization}}</th>\r\n <th>{{'Cms::EntryType' | abpLocalization}}</th>\r\n\r\n\r\n <!-- <th>{{'Cms::Slug' | abpLocalization}}</th> -->\r\n <th>{{'Cms::Status' | abpLocalization}}</th>\r\n @for (item of showinFieldList; track $index) {\r\n <th>{{'Cms::'+item.displayName | abpLocalization}}</th>\r\n }\r\n <th>{{'Cms::PublishTime' | abpLocalization}}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let item of data.items\" cdkDrag>\r\n <td class=\"sticky-left-card-bg\">\r\n <div ngbDropdown container=\"body\">\r\n <span class=\"bi bi-arrows-move fs-5 drag-handle me-2\" cdkDragHandle></span>\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{item.id}}/edit\">{{'AbpUi::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((item|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.entryTypeId,entryVersionId:item.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}}</button>\r\n }\r\n <!-- <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button> -->\r\n\r\n <button ngbDropdownItem (click)=\"deletefield(item)\">{{'AbpUi::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </td>\r\n <td class=\"white-space-normal\">{{item.title}}</td>\r\n <td>\r\n {{ 'Cms::Enum:SectionType:'+SectionType[item.sectionType] |\r\n abpLocalization }}\r\n </td>\r\n <td>\r\n <ng-container *ngFor=\"let item1 of entryTypeList\">\r\n <ng-container\r\n *ngIf=\"item1.id === item.entryTypeId\">{{item1.displayName}}</ng-container>\r\n </ng-container>\r\n </td>\r\n <!-- <td>{{item.slug}}</td> -->\r\n <td>\r\n <ng-container *ngFor=\"let item2 of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.status=== item2.value\">{{\r\n 'Cms::Enum:EntryStatus:'+item2.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </td>\r\n @for (item1 of showinFieldList; track $index) {\r\n <td>\r\n <df-dynamic-view [type]=\"item1.field.formControlName\" [showInList]=\"true\"\r\n [fields]=\"item1\"\r\n [value]=\"item?.extraProperties[item1.field.name]\"></df-dynamic-view>\r\n\r\n </td>\r\n }\r\n <td>{{item.publishTime | shortDateTime }}</td>\r\n </tr>\r\n </tbody>\r\n @if(data.items.length === 0){\r\n <div class=\"text-muted p-2\">\r\n {{ 'Cms::NoDataAvailableInDatatable' | abpLocalization}}\r\n </div>\r\n }\r\n </table>\r\n </div>\r\n <div class=\"card-footer py-2\">\r\n <small class=\"text-muted\"> {{data.totalCount}} {{ 'Cms::Total' | abpLocalization}}</small>\r\n </div>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n</abp-page>", styles: ["::ng-deep .sites-page .dignite_page{background:transparent}::ng-deep .sites-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sites-page .card-header input{flex:2 1 auto}::ng-deep .sites-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-page .morentr{border:2px solid transparent}::ng-deep .sites-page .borderdrag{border:2px solid var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .borderdragtd{background-color:var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .testtr{border-color:transparent}::ng-deep .sites-page .testtr td{padding:2px}::ng-deep .sites-page .testtr:hover{background-color:transparent}.cdk-drag-preview{display:table;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:0}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}.white-space-normal{white-space:normal;min-width:150px}.overflow-nowrap{overflow:auto;white-space:nowrap}::ng-deep .sites-page .table th{padding-left:1rem!important;padding-right:1rem!important}::ng-deep .sites-page .table td{padding:.875rem 1rem!important}::ng-deep .sites-page .table .sticky-left-card-bg{position:sticky;left:0;background:var(--bs-card-bg)}::ng-deep .sites-page .entries-advanced-form{transition:all .3s linear}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "component", type: i11.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i11.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i11.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i5.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i14.PageToolbarContainerComponent, selector: "abp-page-toolbar-container" }, { kind: "component", type: i15.DynamicViewComponent, selector: "df-dynamic-view", inputs: ["showInList", "fields", "type", "value"] }, { kind: "component", type: i15.DynamicSearchComponent, selector: "df-dynamic-search", inputs: ["culture", "parentFiledName", "fields", "entity"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: i1.ShortDateTimePipe, name: "shortDateTime" }, { kind: "pipe", type: GetLocalizedEntriesBySlugPipe, name: "getLocalizedEntriesBySlug" }] }); }
|
|
868
|
+
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \">\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length === 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button class=\"btn btn-sm btn-primary\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single\"\r\n [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\"><i\r\n class=\"fa fa-plus me-2\"></i> {{'Cms::NewEntry'|abpLocalization}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::NewEntry' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single&&isEntryTypeExist(item.id)\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\">{{item.displayName}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <div id=\"sites-page\" class=\"sites-page\">\r\n <div class=\"card\">\r\n <div class=\"card-body \">\r\n <div class=\"row align-items-end\">\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.sectionId\"\r\n (change)=\"sectionIdChange()\">\r\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.culture\" (change)=\"cultureChange()\">\r\n <ng-container *ngFor=\"let item of sectionLanguagesList\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-6\">\r\n <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\r\n [placeholder]=\"'Cms::PagerSearch'|abpLocalization\" />\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"listget()\">\r\n <i class=\"bi bi-search\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n @if(filters.culture&&enablegearchFormEntity&&enableSearchFieldList.length>0){\r\n <div id=\"entries-advanced-form\" class=\"entries-advanced-form \" [hidden]=\"isexpanded\"\r\n (abpInit)=\"abpInitss()\">\r\n <form [formGroup]=\"enablegearchFormEntity\">\r\n <div class=\"row align-items-end\">\r\n <ng-container *ngFor=\"let el of enableSearchFieldList\">\r\n <ng-container *ngIf=\"el.field&&enablegearchFormEntity&&el.enableSearch\">\r\n <div class=\"col-md-3\">\r\n <df-dynamic-search [fields]=\"el\" [parentFiledName]=\"'extraProperties'\"\r\n [culture]=\"filters.culture\"\r\n [entity]=\"enablegearchFormEntity\"></df-dynamic-search>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <div class=\"col-md-3 mb-3 \">\r\n <button type=\"button\" class=\"btn btn-primary \" (click)=\"listget()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"card mb-0\">\r\n <div class=\"card-body p-0\">\r\n @if(SiteOfSectionType!==SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\" [columnMode]=\"ColumnMode.force\"\r\n [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [virtualization]=\"false\"\r\n [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\r\n <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"entryTypeId\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <!-- <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"sectionType\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ 'Cms::Enum:SectionType:'+SectionType[value] |\r\n abpLocalization }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <!-- <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"entryTypeId\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <!-- <ngx-datatable-column [name]=\"'Cms::Slug' | abpLocalization\" prop=\"slug\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\" [width]=\"80\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.value=== value\">{{ 'Cms::Enum:EntryStatus:'+item.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n @for (item of showinFieldList; track $index) {\r\n <ngx-datatable-column [name]=\"'Cms::'+item.displayName | abpLocalization\"\r\n [prop]=\"item?.field?.name\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <df-dynamic-view [type]=\"item.field.formControlName\" [showInList]=\"true\" [fields]=\"item\"\r\n [value]=\"row?.extraProperties[item.field.name]\"></df-dynamic-view>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\"\r\n [width]=\"190\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | shortDateTime }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\"\r\n [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <div ngbDropdown container=\"body\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{row.id}}/edit\">{{'Cms::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((row|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button>\r\n }\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'Cms::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n </ngx-datatable>\r\n </div>\r\n }\r\n\r\n @if(SiteOfSectionType===SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <table class=\"table overflow-nowrap mb-0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <thead>\r\n <tr>\r\n <th class=\"sticky-left-card-bg\"> <span\r\n class=\"bi bi-arrows-move fs-5 drag-handle me-2 opacity-0\"></span>{{'AbpUi::Actions'\r\n | abpLocalization}}</th>\r\n <th>{{'Cms::Title' | abpLocalization}}</th>\r\n <th>{{'Cms::SectionType' | abpLocalization}}</th>\r\n <th>{{'Cms::EntryType' | abpLocalization}}</th>\r\n\r\n\r\n <!-- <th>{{'Cms::Slug' | abpLocalization}}</th> -->\r\n <th>{{'Cms::Status' | abpLocalization}}</th>\r\n @for (item of showinFieldList; track $index) {\r\n <th>{{'Cms::'+item.displayName | abpLocalization}}</th>\r\n }\r\n <th>{{'Cms::PublishTime' | abpLocalization}}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let item of data.items\" cdkDrag>\r\n <td class=\"sticky-left-card-bg\">\r\n <div ngbDropdown container=\"body\">\r\n <span class=\"bi bi-arrows-move fs-5 drag-handle me-2\" cdkDragHandle></span>\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{item.id}}/edit\">{{'AbpUi::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((item|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.entryTypeId,entryVersionId:item.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}}</button>\r\n }\r\n <!-- <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button> -->\r\n\r\n <button ngbDropdownItem (click)=\"deletefield(item)\">{{'AbpUi::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </td>\r\n <td class=\"white-space-normal\">{{item.title}}</td>\r\n <td>\r\n {{ 'Cms::Enum:SectionType:'+SectionType[item.sectionType] |\r\n abpLocalization }}\r\n </td>\r\n <td>\r\n <ng-container *ngFor=\"let item1 of entryTypeList\">\r\n <ng-container\r\n *ngIf=\"item1.id === item.entryTypeId\">{{item1.displayName}}</ng-container>\r\n </ng-container>\r\n </td>\r\n <!-- <td>{{item.slug}}</td> -->\r\n <td>\r\n <ng-container *ngFor=\"let item2 of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.status=== item2.value\">{{\r\n 'Cms::Enum:EntryStatus:'+item2.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </td>\r\n @for (item1 of showinFieldList; track $index) {\r\n <td>\r\n <df-dynamic-view [type]=\"item1.field.formControlName\" [showInList]=\"true\"\r\n [fields]=\"item1\"\r\n [value]=\"item?.extraProperties[item1.field.name]\"></df-dynamic-view>\r\n\r\n </td>\r\n }\r\n <td>{{item.publishTime | shortDateTime }}</td>\r\n </tr>\r\n </tbody>\r\n @if(data.items.length === 0){\r\n <div class=\"text-muted p-2\">\r\n {{ 'Cms::NoDataAvailableInDatatable' | abpLocalization}}\r\n </div>\r\n }\r\n </table>\r\n </div>\r\n <div class=\"card-footer py-2\">\r\n <small class=\"text-muted\"> {{data.totalCount}} {{ 'Cms::Total' | abpLocalization}}</small>\r\n </div>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n</abp-page>", styles: ["::ng-deep .sites-page .dignite_page{background:transparent}::ng-deep .sites-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sites-page .card-header input{flex:2 1 auto}::ng-deep .sites-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-page .morentr{border:2px solid transparent}::ng-deep .sites-page .borderdrag{border:2px solid var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .borderdragtd{background-color:var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .testtr{border-color:transparent}::ng-deep .sites-page .testtr td{padding:2px}::ng-deep .sites-page .testtr:hover{background-color:transparent}.cdk-drag-preview{display:table;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:0}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}.white-space-normal{white-space:normal;min-width:150px}.overflow-nowrap{overflow:auto;white-space:nowrap}::ng-deep .sites-page .table th{padding-left:1rem!important;padding-right:1rem!important}::ng-deep .sites-page .table td{padding:.875rem 1rem!important}::ng-deep .sites-page .table .sticky-left-card-bg{position:sticky;left:0;background:var(--bs-card-bg)}::ng-deep .sites-page .entries-advanced-form{transition:all .3s linear}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "component", type: i11.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i11.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i11.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i14.PageToolbarContainerComponent, selector: "abp-page-toolbar-container" }, { kind: "component", type: i6$2.DynamicViewComponent, selector: "df-dynamic-view", inputs: ["showInList", "fields", "type", "value"] }, { kind: "component", type: i6$2.DynamicSearchComponent, selector: "df-dynamic-search", inputs: ["culture", "parentFiledName", "fields", "entity"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: i1.ShortDateTimePipe, name: "shortDateTime" }, { kind: "pipe", type: GetLocalizedEntriesBySlugPipe, name: "getLocalizedEntriesBySlug" }] }); }
|
|
781
869
|
}
|
|
782
870
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntriesComponent, decorators: [{
|
|
783
871
|
type: Component,
|
|
@@ -790,8 +878,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
790
878
|
provide: EXTENSIONS_IDENTIFIER,
|
|
791
879
|
useValue: ECmsComponent.Entries,
|
|
792
880
|
},
|
|
793
|
-
], template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \">\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length === 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button class=\"btn btn-sm btn-primary\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single\"\r\n [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\"><i\r\n class=\"fa fa-plus me-2\"></i> {{'Cms::NewEntry'|abpLocalization}}</button>\r\n <!-- {{item.displayName}} -->\r\n </ng-container>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::NewEntry' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\">{{item.displayName}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <div id=\"sites-page\" class=\"sites-page\">\r\n <div class=\"card\">\r\n <div class=\"card-body \">\r\n <div class=\"row align-items-end\">\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.sectionId\"\r\n (change)=\"sectionIdChange()\">\r\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.culture\" (change)=\"cultureChange()\">\r\n <ng-container *ngFor=\"let item of sectionLanguagesList\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-6\">\r\n <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\r\n [placeholder]=\"'Cms::PagerSearch'|abpLocalization\" />\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"listget()\">\r\n <i class=\"bi bi-search\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n @if(filters.culture&&enablegearchFormEntity&&enableSearchFieldList.length>0){\r\n <div id=\"entries-advanced-form\" class=\"entries-advanced-form \" [hidden]=\"isexpanded\"\r\n (abpInit)=\"abpInitss()\">\r\n <form [formGroup]=\"enablegearchFormEntity\">\r\n <div class=\"row align-items-end\">\r\n <ng-container *ngFor=\"let el of enableSearchFieldList\">\r\n <ng-container *ngIf=\"el.field&&enablegearchFormEntity&&el.enableSearch\">\r\n <div class=\"col-md-3\">\r\n <df-dynamic-search [fields]=\"el\" [parentFiledName]=\"'extraProperties'\"\r\n [culture]=\"filters.culture\"\r\n [entity]=\"enablegearchFormEntity\"></df-dynamic-search>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <div class=\"col-md-3 mb-3 \">\r\n <button type=\"button\" class=\"btn btn-primary \" (click)=\"listget()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"card mb-0\">\r\n <div class=\"card-body p-0\">\r\n @if(SiteOfSectionType!==SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\" [columnMode]=\"ColumnMode.force\"\r\n [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [virtualization]=\"false\"\r\n [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\r\n <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"entryTypeId\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <!-- <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"sectionType\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ 'Cms::Enum:SectionType:'+SectionType[value] |\r\n abpLocalization }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <!-- <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"entryTypeId\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <!-- <ngx-datatable-column [name]=\"'Cms::Slug' | abpLocalization\" prop=\"slug\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\" [width]=\"80\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.value=== value\">{{ 'Cms::Enum:EntryStatus:'+item.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n @for (item of showinFieldList; track $index) {\r\n <ngx-datatable-column [name]=\"'Cms::'+item.displayName | abpLocalization\"\r\n [prop]=\"item?.field?.name\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <df-dynamic-view [type]=\"item.field.formControlName\" [showInList]=\"true\" [fields]=\"item\"\r\n [value]=\"row?.extraProperties[item.field.name]\"></df-dynamic-view>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\"\r\n [width]=\"190\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | shortDateTime }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\"\r\n [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <div ngbDropdown container=\"body\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{row.id}}/edit\">{{'Cms::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((row|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button>\r\n }\r\n <!-- -->\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'Cms::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n </ngx-datatable>\r\n </div>\r\n }\r\n\r\n @if(SiteOfSectionType===SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <table class=\"table overflow-nowrap mb-0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <thead>\r\n <tr>\r\n <th class=\"sticky-left-card-bg\"> <span\r\n class=\"bi bi-arrows-move fs-5 drag-handle me-2 opacity-0\"></span>{{'AbpUi::Actions'\r\n | abpLocalization}}</th>\r\n <th>{{'Cms::Title' | abpLocalization}}</th>\r\n <th>{{'Cms::SectionType' | abpLocalization}}</th>\r\n <th>{{'Cms::EntryType' | abpLocalization}}</th>\r\n\r\n\r\n <!-- <th>{{'Cms::Slug' | abpLocalization}}</th> -->\r\n <th>{{'Cms::Status' | abpLocalization}}</th>\r\n @for (item of showinFieldList; track $index) {\r\n <th>{{'Cms::'+item.displayName | abpLocalization}}</th>\r\n }\r\n <th>{{'Cms::PublishTime' | abpLocalization}}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let item of data.items\" cdkDrag>\r\n <td class=\"sticky-left-card-bg\">\r\n <div ngbDropdown container=\"body\">\r\n <span class=\"bi bi-arrows-move fs-5 drag-handle me-2\" cdkDragHandle></span>\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{item.id}}/edit\">{{'AbpUi::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((item|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.entryTypeId,entryVersionId:item.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}}</button>\r\n }\r\n <!-- <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button> -->\r\n\r\n <button ngbDropdownItem (click)=\"deletefield(item)\">{{'AbpUi::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </td>\r\n <td class=\"white-space-normal\">{{item.title}}</td>\r\n <td>\r\n {{ 'Cms::Enum:SectionType:'+SectionType[item.sectionType] |\r\n abpLocalization }}\r\n </td>\r\n <td>\r\n <ng-container *ngFor=\"let item1 of entryTypeList\">\r\n <ng-container\r\n *ngIf=\"item1.id === item.entryTypeId\">{{item1.displayName}}</ng-container>\r\n </ng-container>\r\n </td>\r\n <!-- <td>{{item.slug}}</td> -->\r\n <td>\r\n <ng-container *ngFor=\"let item2 of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.status=== item2.value\">{{\r\n 'Cms::Enum:EntryStatus:'+item2.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </td>\r\n @for (item1 of showinFieldList; track $index) {\r\n <td>\r\n <df-dynamic-view [type]=\"item1.field.formControlName\" [showInList]=\"true\"\r\n [fields]=\"item1\"\r\n [value]=\"item?.extraProperties[item1.field.name]\"></df-dynamic-view>\r\n\r\n </td>\r\n }\r\n <td>{{item.publishTime | shortDateTime }}</td>\r\n </tr>\r\n </tbody>\r\n @if(data.items.length === 0){\r\n <div class=\"text-muted p-2\">\r\n {{ 'Cms::NoDataAvailableInDatatable' | abpLocalization}}\r\n </div>\r\n }\r\n </table>\r\n </div>\r\n <div class=\"card-footer py-2\">\r\n <small class=\"text-muted\"> {{data.totalCount}} {{ 'Cms::Total' | abpLocalization}}</small>\r\n </div>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n</abp-page>", styles: ["::ng-deep .sites-page .dignite_page{background:transparent}::ng-deep .sites-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sites-page .card-header input{flex:2 1 auto}::ng-deep .sites-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-page .morentr{border:2px solid transparent}::ng-deep .sites-page .borderdrag{border:2px solid var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .borderdragtd{background-color:var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .testtr{border-color:transparent}::ng-deep .sites-page .testtr td{padding:2px}::ng-deep .sites-page .testtr:hover{background-color:transparent}.cdk-drag-preview{display:table;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:0}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}.white-space-normal{white-space:normal;min-width:150px}.overflow-nowrap{overflow:auto;white-space:nowrap}::ng-deep .sites-page .table th{padding-left:1rem!important;padding-right:1rem!important}::ng-deep .sites-page .table td{padding:.875rem 1rem!important}::ng-deep .sites-page .table .sticky-left-card-bg{position:sticky;left:0;background:var(--bs-card-bg)}::ng-deep .sites-page .entries-advanced-form{transition:all .3s linear}\n"] }]
|
|
794
|
-
}], ctorParameters: () => [{ type: EntryAdminService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.ConfigStateService }, { type:
|
|
881
|
+
], template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \">\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length === 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button class=\"btn btn-sm btn-primary\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single\"\r\n [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\"><i\r\n class=\"fa fa-plus me-2\"></i> {{'Cms::NewEntry'|abpLocalization}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::NewEntry' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single&&isEntryTypeExist(item.id)\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\">{{item.displayName}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <div id=\"sites-page\" class=\"sites-page\">\r\n <div class=\"card\">\r\n <div class=\"card-body \">\r\n <div class=\"row align-items-end\">\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.sectionId\"\r\n (change)=\"sectionIdChange()\">\r\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.culture\" (change)=\"cultureChange()\">\r\n <ng-container *ngFor=\"let item of sectionLanguagesList\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-6\">\r\n <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\r\n [placeholder]=\"'Cms::PagerSearch'|abpLocalization\" />\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"listget()\">\r\n <i class=\"bi bi-search\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n @if(filters.culture&&enablegearchFormEntity&&enableSearchFieldList.length>0){\r\n <div id=\"entries-advanced-form\" class=\"entries-advanced-form \" [hidden]=\"isexpanded\"\r\n (abpInit)=\"abpInitss()\">\r\n <form [formGroup]=\"enablegearchFormEntity\">\r\n <div class=\"row align-items-end\">\r\n <ng-container *ngFor=\"let el of enableSearchFieldList\">\r\n <ng-container *ngIf=\"el.field&&enablegearchFormEntity&&el.enableSearch\">\r\n <div class=\"col-md-3\">\r\n <df-dynamic-search [fields]=\"el\" [parentFiledName]=\"'extraProperties'\"\r\n [culture]=\"filters.culture\"\r\n [entity]=\"enablegearchFormEntity\"></df-dynamic-search>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <div class=\"col-md-3 mb-3 \">\r\n <button type=\"button\" class=\"btn btn-primary \" (click)=\"listget()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"card mb-0\">\r\n <div class=\"card-body p-0\">\r\n @if(SiteOfSectionType!==SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\" [columnMode]=\"ColumnMode.force\"\r\n [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [virtualization]=\"false\"\r\n [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\r\n <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"entryTypeId\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <!-- <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"sectionType\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ 'Cms::Enum:SectionType:'+SectionType[value] |\r\n abpLocalization }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <!-- <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"entryTypeId\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <!-- <ngx-datatable-column [name]=\"'Cms::Slug' | abpLocalization\" prop=\"slug\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\" [width]=\"80\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.value=== value\">{{ 'Cms::Enum:EntryStatus:'+item.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n @for (item of showinFieldList; track $index) {\r\n <ngx-datatable-column [name]=\"'Cms::'+item.displayName | abpLocalization\"\r\n [prop]=\"item?.field?.name\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <df-dynamic-view [type]=\"item.field.formControlName\" [showInList]=\"true\" [fields]=\"item\"\r\n [value]=\"row?.extraProperties[item.field.name]\"></df-dynamic-view>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\"\r\n [width]=\"190\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | shortDateTime }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\"\r\n [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <div ngbDropdown container=\"body\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{row.id}}/edit\">{{'Cms::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((row|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button>\r\n }\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'Cms::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n </ngx-datatable>\r\n </div>\r\n }\r\n\r\n @if(SiteOfSectionType===SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <table class=\"table overflow-nowrap mb-0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <thead>\r\n <tr>\r\n <th class=\"sticky-left-card-bg\"> <span\r\n class=\"bi bi-arrows-move fs-5 drag-handle me-2 opacity-0\"></span>{{'AbpUi::Actions'\r\n | abpLocalization}}</th>\r\n <th>{{'Cms::Title' | abpLocalization}}</th>\r\n <th>{{'Cms::SectionType' | abpLocalization}}</th>\r\n <th>{{'Cms::EntryType' | abpLocalization}}</th>\r\n\r\n\r\n <!-- <th>{{'Cms::Slug' | abpLocalization}}</th> -->\r\n <th>{{'Cms::Status' | abpLocalization}}</th>\r\n @for (item of showinFieldList; track $index) {\r\n <th>{{'Cms::'+item.displayName | abpLocalization}}</th>\r\n }\r\n <th>{{'Cms::PublishTime' | abpLocalization}}</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let item of data.items\" cdkDrag>\r\n <td class=\"sticky-left-card-bg\">\r\n <div ngbDropdown container=\"body\">\r\n <span class=\"bi bi-arrows-move fs-5 drag-handle me-2\" cdkDragHandle></span>\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{item.id}}/edit\">{{'AbpUi::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((item|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.entryTypeId,entryVersionId:item.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}}</button>\r\n }\r\n <!-- <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button> -->\r\n\r\n <button ngbDropdownItem (click)=\"deletefield(item)\">{{'AbpUi::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </td>\r\n <td class=\"white-space-normal\">{{item.title}}</td>\r\n <td>\r\n {{ 'Cms::Enum:SectionType:'+SectionType[item.sectionType] |\r\n abpLocalization }}\r\n </td>\r\n <td>\r\n <ng-container *ngFor=\"let item1 of entryTypeList\">\r\n <ng-container\r\n *ngIf=\"item1.id === item.entryTypeId\">{{item1.displayName}}</ng-container>\r\n </ng-container>\r\n </td>\r\n <!-- <td>{{item.slug}}</td> -->\r\n <td>\r\n <ng-container *ngFor=\"let item2 of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.status=== item2.value\">{{\r\n 'Cms::Enum:EntryStatus:'+item2.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </td>\r\n @for (item1 of showinFieldList; track $index) {\r\n <td>\r\n <df-dynamic-view [type]=\"item1.field.formControlName\" [showInList]=\"true\"\r\n [fields]=\"item1\"\r\n [value]=\"item?.extraProperties[item1.field.name]\"></df-dynamic-view>\r\n\r\n </td>\r\n }\r\n <td>{{item.publishTime | shortDateTime }}</td>\r\n </tr>\r\n </tbody>\r\n @if(data.items.length === 0){\r\n <div class=\"text-muted p-2\">\r\n {{ 'Cms::NoDataAvailableInDatatable' | abpLocalization}}\r\n </div>\r\n }\r\n </table>\r\n </div>\r\n <div class=\"card-footer py-2\">\r\n <small class=\"text-muted\"> {{data.totalCount}} {{ 'Cms::Total' | abpLocalization}}</small>\r\n </div>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n</abp-page>", styles: ["::ng-deep .sites-page .dignite_page{background:transparent}::ng-deep .sites-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sites-page .card-header input{flex:2 1 auto}::ng-deep .sites-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-page .morentr{border:2px solid transparent}::ng-deep .sites-page .borderdrag{border:2px solid var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .borderdragtd{background-color:var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .testtr{border-color:transparent}::ng-deep .sites-page .testtr td{padding:2px}::ng-deep .sites-page .testtr:hover{background-color:transparent}.cdk-drag-preview{display:table;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:0}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}.white-space-normal{white-space:normal;min-width:150px}.overflow-nowrap{overflow:auto;white-space:nowrap}::ng-deep .sites-page .table th{padding-left:1rem!important;padding-right:1rem!important}::ng-deep .sites-page .table td{padding:.875rem 1rem!important}::ng-deep .sites-page .table .sticky-left-card-bg{position:sticky;left:0;background:var(--bs-card-bg)}::ng-deep .sites-page .entries-advanced-form{transition:all .3s linear}\n"] }]
|
|
882
|
+
}], ctorParameters: () => [{ type: EntryAdminService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.ConfigStateService }, { type: i6.Router }, { type: i1.LocalizationService }, { type: FormAdminService }, { type: FieldAdminService }, { type: i0.ChangeDetectorRef }, { type: FormControlsService }] });
|
|
795
883
|
|
|
796
884
|
class CreateOrUpdateEntryInputBase {
|
|
797
885
|
constructor() {
|
|
@@ -816,161 +904,20 @@ class CreateOrUpdateEntryInputBase {
|
|
|
816
904
|
this.extraProperties = new FormGroup({});
|
|
817
905
|
}
|
|
818
906
|
}
|
|
907
|
+
const EntriesToFormLabelMap = {
|
|
908
|
+
"title": "Cms::Title",
|
|
909
|
+
"slug": "Cms::Slug",
|
|
910
|
+
"culture": "Cms::Languages",
|
|
911
|
+
"draft": "Cms::EntryType",
|
|
912
|
+
"publishTime": "Cms::publishTime",
|
|
913
|
+
"parentId": "Cms::ParentEntry",
|
|
914
|
+
};
|
|
819
915
|
|
|
820
|
-
|
|
821
|
-
constructor(_FieldGroupAdminService, _FormAdminService) {
|
|
822
|
-
this._FieldGroupAdminService = _FieldGroupAdminService;
|
|
823
|
-
this._FormAdminService = _FormAdminService;
|
|
824
|
-
/**字段分组列表 */
|
|
825
|
-
this.fieldGroupList = [];
|
|
826
|
-
/**表单控件类型 */
|
|
827
|
-
this.fromControlList = [];
|
|
828
|
-
}
|
|
829
|
-
/**获取字段分组列表 */
|
|
830
|
-
getfieldGroupList() {
|
|
831
|
-
return new Promise((resolve, reject) => {
|
|
832
|
-
this._FieldGroupAdminService.getList({}).subscribe((res) => {
|
|
833
|
-
this.fieldGroupList = res.items;
|
|
834
|
-
resolve(res.items);
|
|
835
|
-
});
|
|
836
|
-
});
|
|
837
|
-
}
|
|
838
|
-
/**获取表单控件类型 */
|
|
839
|
-
getFromControlList() {
|
|
840
|
-
return new Promise((resolve, reject) => {
|
|
841
|
-
this._FormAdminService.getFormControls({}).subscribe((res) => {
|
|
842
|
-
this.fromControlList = res.items;
|
|
843
|
-
resolve(res.items);
|
|
844
|
-
});
|
|
845
|
-
});
|
|
846
|
-
}
|
|
847
|
-
/**获取排除指定控件类型的表单控件类型 */
|
|
848
|
-
getExcludeAssignControl(typeName) {
|
|
849
|
-
// return this.fromControlList.filter(el => el.name !== typeName)
|
|
850
|
-
return this.fromControlList;
|
|
851
|
-
}
|
|
852
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldAbstractsService, deps: [{ token: FieldGroupAdminService }, { token: FormAdminService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
853
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldAbstractsService, providedIn: 'root' }); }
|
|
854
|
-
}
|
|
855
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldAbstractsService, decorators: [{
|
|
856
|
-
type: Injectable,
|
|
857
|
-
args: [{
|
|
858
|
-
providedIn: 'root',
|
|
859
|
-
}]
|
|
860
|
-
}], ctorParameters: () => [{ type: FieldGroupAdminService }, { type: FormAdminService }] });
|
|
861
|
-
|
|
862
|
-
class CmsService {
|
|
863
|
-
constructor(restService) {
|
|
864
|
-
this.restService = restService;
|
|
865
|
-
this.apiName = 'Cms';
|
|
866
|
-
}
|
|
867
|
-
sample() {
|
|
868
|
-
return this.restService.request({ method: 'GET', url: '/api/Cms/sample' }, { apiName: this.apiName });
|
|
869
|
-
}
|
|
870
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
871
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsService, providedIn: 'root' }); }
|
|
872
|
-
}
|
|
873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsService, decorators: [{
|
|
874
|
-
type: Injectable,
|
|
875
|
-
args: [{
|
|
876
|
-
providedIn: 'root',
|
|
877
|
-
}]
|
|
878
|
-
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
879
|
-
|
|
880
|
-
/* eslint-disable no-prototype-builtins */
|
|
881
|
-
class CmsApiService {
|
|
882
|
-
constructor() { }
|
|
883
|
-
/**
|
|
884
|
-
* 识别中文转化为拼音,固定返回类型
|
|
885
|
-
* 汉字转拼音
|
|
886
|
-
* 大写转小写
|
|
887
|
-
*
|
|
888
|
-
* */
|
|
889
|
-
chineseToPinyin(value) {
|
|
890
|
-
//去除字符串中所有的空格
|
|
891
|
-
const val = value.replaceAll(' ', '-');
|
|
892
|
-
const array = val.split('');
|
|
893
|
-
const newArray = [];
|
|
894
|
-
array.forEach((el, index) => {
|
|
895
|
-
//转化为小写
|
|
896
|
-
let elChange = el.toLowerCase();
|
|
897
|
-
const isChinese = str => {
|
|
898
|
-
return /^[\u4e00-\u9fa5]+$/.test(str);
|
|
899
|
-
};
|
|
900
|
-
if (isChinese(elChange)) {
|
|
901
|
-
const resultWithoutTone = pinyin(elChange, { toneType: 'none', type: 'array' });
|
|
902
|
-
elChange = resultWithoutTone.toString();
|
|
903
|
-
if (index < array.length - 1)
|
|
904
|
-
elChange += '-';
|
|
905
|
-
}
|
|
906
|
-
newArray.push(elChange);
|
|
907
|
-
});
|
|
908
|
-
const pinyinstr = newArray.join('');
|
|
909
|
-
return pinyinstr || val;
|
|
910
|
-
}
|
|
911
|
-
/**
|
|
912
|
-
* 深拷贝--方法 */
|
|
913
|
-
deepClone(obj) {
|
|
914
|
-
if (typeof obj !== 'object' || obj === null)
|
|
915
|
-
return obj;
|
|
916
|
-
const result = Array.isArray(obj) ? [] : {};
|
|
917
|
-
for (const key in obj) {
|
|
918
|
-
if (obj.hasOwnProperty(key)) {
|
|
919
|
-
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
920
|
-
if (obj[key] instanceof Date) {
|
|
921
|
-
result[key] = new Date(obj[key].getTime());
|
|
922
|
-
}
|
|
923
|
-
else if (obj[key] instanceof RegExp) {
|
|
924
|
-
result[key] = new RegExp(obj[key]);
|
|
925
|
-
}
|
|
926
|
-
else {
|
|
927
|
-
result[key] = this.deepClone(obj[key]);
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
else {
|
|
931
|
-
result[key] = obj[key];
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
return result;
|
|
936
|
-
}
|
|
937
|
-
// this._selected = this.convertKeysToCamelCase(this._selected);
|
|
938
|
-
/**
|
|
939
|
-
* 递归将对象属性名首字母转为小写
|
|
940
|
-
* @param obj 需要处理的对象或数组
|
|
941
|
-
* @param isInsideFormConfig 标记是否在 FormConfiguration 内部
|
|
942
|
-
* @returns 处理后的新对象
|
|
943
|
-
*/
|
|
944
|
-
convertKeysToCamelCase(obj, isInsideFormConfig = false) {
|
|
945
|
-
if (Array.isArray(obj)) {
|
|
946
|
-
return obj.map(item => this.convertKeysToCamelCase(item, isInsideFormConfig));
|
|
947
|
-
}
|
|
948
|
-
else if (typeof obj === 'object' && obj !== null) {
|
|
949
|
-
return Object.keys(obj).reduce((acc, key) => {
|
|
950
|
-
// 判断当前层级是否在 FormConfiguration 内部
|
|
951
|
-
const currentIsInsideFormConfig = isInsideFormConfig || key === 'MatrixBlockTypes' || key === 'TableColumns' || key.includes('.');
|
|
952
|
-
// 如果在 FormConfiguration 内部,保留原字段名
|
|
953
|
-
const newKey = currentIsInsideFormConfig ? key : key.charAt(0).toLowerCase() + key.slice(1);
|
|
954
|
-
// 递归处理子属性,并传递是否在 FormConfiguration 内部的状态
|
|
955
|
-
acc[newKey] = this.convertKeysToCamelCase(obj[key], key === 'FormConfiguration');
|
|
956
|
-
return acc;
|
|
957
|
-
}, {});
|
|
958
|
-
}
|
|
959
|
-
return obj;
|
|
960
|
-
}
|
|
961
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
962
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsApiService, providedIn: 'root' }); }
|
|
963
|
-
}
|
|
964
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsApiService, decorators: [{
|
|
965
|
-
type: Injectable,
|
|
966
|
-
args: [{
|
|
967
|
-
providedIn: 'root',
|
|
968
|
-
}]
|
|
969
|
-
}], ctorParameters: () => [] });
|
|
970
|
-
|
|
916
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
971
917
|
/* eslint-disable @angular-eslint/component-selector */
|
|
972
918
|
class CreateOrEditEntriesComponent {
|
|
973
|
-
constructor() {
|
|
919
|
+
constructor(toPinyinService) {
|
|
920
|
+
this.toPinyinService = toPinyinService;
|
|
974
921
|
this.toaster = inject(ToasterService);
|
|
975
922
|
this._location = inject(Location);
|
|
976
923
|
this.configState = inject(ConfigStateService);
|
|
@@ -979,7 +926,6 @@ class CreateOrEditEntriesComponent {
|
|
|
979
926
|
this.datePipe = inject(DatePipe);
|
|
980
927
|
this._LocalizationService = inject(LocalizationService);
|
|
981
928
|
this.router = inject(Router);
|
|
982
|
-
this._CmsApiService = inject(CmsApiService);
|
|
983
929
|
this.cdRef = inject(ChangeDetectorRef);
|
|
984
930
|
this._RegionalizationService = inject(RegionalizationService);
|
|
985
931
|
/**语言列表 */
|
|
@@ -1231,7 +1177,7 @@ class CreateOrEditEntriesComponent {
|
|
|
1231
1177
|
let pinyinstr = '';
|
|
1232
1178
|
if (slug.value)
|
|
1233
1179
|
return;
|
|
1234
|
-
pinyinstr = this.
|
|
1180
|
+
pinyinstr = this.toPinyinService.get(val);
|
|
1235
1181
|
pinyinstr = pinyinstr || val;
|
|
1236
1182
|
//去除特殊字符
|
|
1237
1183
|
pinyinstr = pinyinstr.replace(/[^a-zA-Z0-9-]/g, '');
|
|
@@ -1284,13 +1230,13 @@ class CreateOrEditEntriesComponent {
|
|
|
1284
1230
|
this.getAllVersionsList();
|
|
1285
1231
|
});
|
|
1286
1232
|
}
|
|
1287
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditEntriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1288
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: { isEdit: "isEdit", isCreateVersion: "isCreateVersion", sectionId: "sectionId", entryTypeId: "entryTypeId", select: "select", entity: "entity", isOther: "isOther" }, outputs: { feedbackChildInfo: "feedbackChildInfo" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<div [formGroup]=\"formEntity\">\r\n <div class=\"row create-or-edit-entries-page\">\r\n <div class=\"col-md-8\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Title' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"title\"\r\n (blur)=\"setTitleToSlugBlur($event)\">\r\n </div>\r\n\r\n <ng-container *ngIf=\"isLoad\">\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"tabActive\" [destroyOnHide]=\"false\" class=\"nav-tabs mb-0\">\r\n <ng-container *ngFor=\"let item of showEntryType?.fieldTabs;let i =index\">\r\n <li [ngbNavItem]=\"i\" [destroyOnHide]=\"false\">\r\n <button ngbNavLink *ngIf=\"showEntryType?.fieldTabs.length>1\">{{item.name}}</button>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\r\n <ng-container *ngIf=\"el&&formEntity\">\r\n <df-dynamic [fields]=\"el\"\r\n [selected]=\"entryInfo ? entryInfo.extraProperties[el.field.name] : ''\"\r\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureInput.value\"\r\n [entity]=\"formEntity\"></df-dynamic>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"\"></div>\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n\r\n\r\n <!-- <ng-container *ngIf=\"isLoad\">\r\n <ng-container *ngFor=\"let item of showEntryType?.fieldTabs;let i =index\">\r\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\r\n <ng-container *ngIf=\"el&&formEntity\">\r\n <df-dynamic [fields]=\"el\"\r\n [selected]=\"entryInfo ? entryInfo.extraProperties[el.field.name] : ''\"\r\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureInput.value\"\r\n [entity]=\"formEntity\"></df-dynamic>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container> -->\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Slug' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\">\r\n <div class=\"text-danger\" *ngIf=\"slugInput.dirty\">\r\n {{slugInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}</div>\r\n <select class=\"form-select form-select-multiple\" formControlName=\"culture\">\r\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <div class=\"text-danger\" *ngIf=\"cultureInput.dirty\">\r\n {{cultureInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</div>\r\n <input type=\"text\" disabled [value]=\"showEntryType?.displayName||''\" class=\"form-select\" />\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"sectionInfo.type===1\">\r\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\r\n <select class=\"form-select \" formControlName=\"parentId\">\r\n <option value=\"\"></option>\r\n <ng-container *ngFor=\"let item of entryList;let i =index\">\r\n <option [value]=\"item.id\">{{item.title}}</option>\r\n <ng-container *ngFor=\"let el of item.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n <ng-template #childTemplate let-data>\r\n <option [value]=\"data.value.id\">\r\n <ng-container *ngFor=\"let item of data.value.layer\">--</ng-container>\r\n {{data.value.title}}\r\n </option>\r\n <ng-container *ngFor=\"let el of data.value.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\r\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEdit\">\r\n <label class=\"form-label\" for=\"Version\">{{'Cms::Version' | abpLocalization}}</label>\r\n <ul class=\"list-group\">\r\n <ng-container *ngFor=\"let item of AllVersionsList\">\r\n <li\r\n class=\"list-group-item flex-between d-flex align-items-center justify-content-between\">\r\n <div>\r\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd\r\n HH:mm:s'):('Cms::InitialVersion' | abpLocalization)}}\r\n <span class=\"badge text-bg-success ms-1\"\r\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\r\n <span class=\"badge text-bg-primary ms-1\"\r\n *ngIf=\"item.id === entryVersionId\">{{'Cms::Editing' |\r\n abpLocalization}}</span>\r\n </div>\r\n <div>\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\r\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\r\n (click)=\"ActivatedVersion(item.id)\">\r\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n routerLink=\"/cms/admin/entries/create\"\r\n [queryParams]=\"{entryVersionId:item.id}\">\r\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\r\n *ngIf=\"item.id !== entryVersionId\">\r\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n (click.stop)=\"delectVersion(item.id)\"\r\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== entryVersionId\">\r\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' |\r\n abpLocalization}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"entryInfo\">\r\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\r\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</div>", styles: ["::ng-deep .create-or-edit-entries-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i5.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i5.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i11$1.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i11$1.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i11$1.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i11$1.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i11$1.NgbNavLinkButton, selector: "button[ngbNavLink]" }, { kind: "directive", type: i11$1.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i11$1.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i15.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "culture", "parentFiledName", "fields", "entity"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1233
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditEntriesComponent, deps: [{ token: i4.ToPinyinService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1234
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: { isEdit: "isEdit", isCreateVersion: "isCreateVersion", sectionId: "sectionId", entryTypeId: "entryTypeId", select: "select", entity: "entity", isOther: "isOther" }, outputs: { feedbackChildInfo: "feedbackChildInfo" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<div [formGroup]=\"formEntity\">\r\n <div class=\"row create-or-edit-entries-page\">\r\n <div class=\"col-md-8\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Title' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"title\"\r\n (blur)=\"setTitleToSlugBlur($event)\">\r\n </div>\r\n\r\n <ng-container *ngIf=\"isLoad\">\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"tabActive\" [destroyOnHide]=\"false\" class=\"nav-tabs mb-0\">\r\n <ng-container *ngFor=\"let item of showEntryType?.fieldTabs;let i =index\">\r\n <li [ngbNavItem]=\"i\" [destroyOnHide]=\"false\">\r\n <button ngbNavLink *ngIf=\"showEntryType?.fieldTabs.length>1\">{{item.name}}</button>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\r\n <ng-container *ngIf=\"el&&formEntity\">\r\n <df-dynamic-control [fields]=\"el\"\r\n [selected]=\"entryInfo ? entryInfo.extraProperties[el.field.name] : ''\"\r\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureInput.value\"\r\n [entity]=\"formEntity\"></df-dynamic-control>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"\"></div>\r\n </ng-container>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Slug' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\">\r\n <div class=\"text-danger\" *ngIf=\"slugInput.dirty\">\r\n {{slugInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}</div>\r\n <select class=\"form-select form-select-multiple\" formControlName=\"culture\">\r\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <div class=\"text-danger\" *ngIf=\"cultureInput.dirty\">\r\n {{cultureInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</div>\r\n <input type=\"text\" disabled [value]=\"showEntryType?.displayName||''\" class=\"form-select\" />\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"sectionInfo.type===1\">\r\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\r\n <select class=\"form-select \" formControlName=\"parentId\">\r\n <option value=\"\"></option>\r\n <ng-container *ngFor=\"let item of entryList;let i =index\">\r\n <option [value]=\"item.id\">{{item.title}}</option>\r\n <ng-container *ngFor=\"let el of item.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n <ng-template #childTemplate let-data>\r\n <option [value]=\"data.value.id\">\r\n <ng-container *ngFor=\"let item of data.value.layer\">--</ng-container>\r\n {{data.value.title}}\r\n </option>\r\n <ng-container *ngFor=\"let el of data.value.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\r\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEdit\">\r\n <label class=\"form-label\" for=\"Version\">{{'Cms::Version' | abpLocalization}}</label>\r\n <ul class=\"list-group\">\r\n <ng-container *ngFor=\"let item of AllVersionsList\">\r\n <li\r\n class=\"list-group-item flex-between d-flex align-items-center justify-content-between\">\r\n <div>\r\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd\r\n HH:mm:s'):('Cms::InitialVersion' | abpLocalization)}}\r\n <span class=\"badge text-bg-success ms-1\"\r\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\r\n <span class=\"badge text-bg-primary ms-1\"\r\n *ngIf=\"item.id === entryVersionId\">{{'Cms::Editing' |\r\n abpLocalization}}</span>\r\n </div>\r\n <div>\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\r\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\r\n (click)=\"ActivatedVersion(item.id)\">\r\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n routerLink=\"/cms/admin/entries/create\"\r\n [queryParams]=\"{entryVersionId:item.id}\">\r\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\r\n *ngIf=\"item.id !== entryVersionId\">\r\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n (click.stop)=\"delectVersion(item.id)\"\r\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== entryVersionId\">\r\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' |\r\n abpLocalization}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"entryInfo\">\r\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\r\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</div>", styles: ["::ng-deep .create-or-edit-entries-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i11$1.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i11$1.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i11$1.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i11$1.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i11$1.NgbNavLinkButton, selector: "button[ngbNavLink]" }, { kind: "directive", type: i11$1.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i11$1.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i6$2.DynamicControlComponent, selector: "df-dynamic-control", inputs: ["selected", "culture", "parentFiledName", "fields", "entity"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1289
1235
|
}
|
|
1290
1236
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditEntriesComponent, decorators: [{
|
|
1291
1237
|
type: Component,
|
|
1292
|
-
args: [{ selector: 'cms-create-or-edit-entries', template: "<div [formGroup]=\"formEntity\">\r\n <div class=\"row create-or-edit-entries-page\">\r\n <div class=\"col-md-8\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Title' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"title\"\r\n (blur)=\"setTitleToSlugBlur($event)\">\r\n </div>\r\n\r\n <ng-container *ngIf=\"isLoad\">\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"tabActive\" [destroyOnHide]=\"false\" class=\"nav-tabs mb-0\">\r\n <ng-container *ngFor=\"let item of showEntryType?.fieldTabs;let i =index\">\r\n <li [ngbNavItem]=\"i\" [destroyOnHide]=\"false\">\r\n <button ngbNavLink *ngIf=\"showEntryType?.fieldTabs.length>1\">{{item.name}}</button>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\r\n <ng-container *ngIf=\"el&&formEntity\">\r\n <df-dynamic [fields]=\"el\"\r\n [selected]=\"entryInfo ? entryInfo.extraProperties[el.field.name] : ''\"\r\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureInput.value\"\r\n [entity]=\"formEntity\"></df-dynamic>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"\"></div>\r\n </ng-container>\r\n\r\n\r\n\r\n\r\n\r\n\r\n <!-- <ng-container *ngIf=\"isLoad\">\r\n <ng-container *ngFor=\"let item of showEntryType?.fieldTabs;let i =index\">\r\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\r\n <ng-container *ngIf=\"el&&formEntity\">\r\n <df-dynamic [fields]=\"el\"\r\n [selected]=\"entryInfo ? entryInfo.extraProperties[el.field.name] : ''\"\r\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureInput.value\"\r\n [entity]=\"formEntity\"></df-dynamic>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container> -->\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Slug' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\">\r\n <div class=\"text-danger\" *ngIf=\"slugInput.dirty\">\r\n {{slugInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}</div>\r\n <select class=\"form-select form-select-multiple\" formControlName=\"culture\">\r\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <div class=\"text-danger\" *ngIf=\"cultureInput.dirty\">\r\n {{cultureInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</div>\r\n <input type=\"text\" disabled [value]=\"showEntryType?.displayName||''\" class=\"form-select\" />\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"sectionInfo.type===1\">\r\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\r\n <select class=\"form-select \" formControlName=\"parentId\">\r\n <option value=\"\"></option>\r\n <ng-container *ngFor=\"let item of entryList;let i =index\">\r\n <option [value]=\"item.id\">{{item.title}}</option>\r\n <ng-container *ngFor=\"let el of item.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n <ng-template #childTemplate let-data>\r\n <option [value]=\"data.value.id\">\r\n <ng-container *ngFor=\"let item of data.value.layer\">--</ng-container>\r\n {{data.value.title}}\r\n </option>\r\n <ng-container *ngFor=\"let el of data.value.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\r\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEdit\">\r\n <label class=\"form-label\" for=\"Version\">{{'Cms::Version' | abpLocalization}}</label>\r\n <ul class=\"list-group\">\r\n <ng-container *ngFor=\"let item of AllVersionsList\">\r\n <li\r\n class=\"list-group-item flex-between d-flex align-items-center justify-content-between\">\r\n <div>\r\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd\r\n HH:mm:s'):('Cms::InitialVersion' | abpLocalization)}}\r\n <span class=\"badge text-bg-success ms-1\"\r\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\r\n <span class=\"badge text-bg-primary ms-1\"\r\n *ngIf=\"item.id === entryVersionId\">{{'Cms::Editing' |\r\n abpLocalization}}</span>\r\n </div>\r\n <div>\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\r\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\r\n (click)=\"ActivatedVersion(item.id)\">\r\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n routerLink=\"/cms/admin/entries/create\"\r\n [queryParams]=\"{entryVersionId:item.id}\">\r\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\r\n *ngIf=\"item.id !== entryVersionId\">\r\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n (click.stop)=\"delectVersion(item.id)\"\r\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== entryVersionId\">\r\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' |\r\n abpLocalization}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"entryInfo\">\r\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\r\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</div>", styles: ["::ng-deep .create-or-edit-entries-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}\n"] }]
|
|
1293
|
-
}], propDecorators: { isEdit: [{
|
|
1238
|
+
args: [{ selector: 'cms-create-or-edit-entries', template: "<div [formGroup]=\"formEntity\">\r\n <div class=\"row create-or-edit-entries-page\">\r\n <div class=\"col-md-8\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Title' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"title\"\r\n (blur)=\"setTitleToSlugBlur($event)\">\r\n </div>\r\n\r\n <ng-container *ngIf=\"isLoad\">\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"tabActive\" [destroyOnHide]=\"false\" class=\"nav-tabs mb-0\">\r\n <ng-container *ngFor=\"let item of showEntryType?.fieldTabs;let i =index\">\r\n <li [ngbNavItem]=\"i\" [destroyOnHide]=\"false\">\r\n <button ngbNavLink *ngIf=\"showEntryType?.fieldTabs.length>1\">{{item.name}}</button>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\r\n <ng-container *ngIf=\"el&&formEntity\">\r\n <df-dynamic-control [fields]=\"el\"\r\n [selected]=\"entryInfo ? entryInfo.extraProperties[el.field.name] : ''\"\r\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureInput.value\"\r\n [entity]=\"formEntity\"></df-dynamic-control>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"\"></div>\r\n </ng-container>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Slug' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\">\r\n <div class=\"text-danger\" *ngIf=\"slugInput.dirty\">\r\n {{slugInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}</div>\r\n <select class=\"form-select form-select-multiple\" formControlName=\"culture\">\r\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <div class=\"text-danger\" *ngIf=\"cultureInput.dirty\">\r\n {{cultureInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</div>\r\n <input type=\"text\" disabled [value]=\"showEntryType?.displayName||''\" class=\"form-select\" />\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"sectionInfo.type===1\">\r\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\r\n <select class=\"form-select \" formControlName=\"parentId\">\r\n <option value=\"\"></option>\r\n <ng-container *ngFor=\"let item of entryList;let i =index\">\r\n <option [value]=\"item.id\">{{item.title}}</option>\r\n <ng-container *ngFor=\"let el of item.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n <ng-template #childTemplate let-data>\r\n <option [value]=\"data.value.id\">\r\n <ng-container *ngFor=\"let item of data.value.layer\">--</ng-container>\r\n {{data.value.title}}\r\n </option>\r\n <ng-container *ngFor=\"let el of data.value.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\r\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEdit\">\r\n <label class=\"form-label\" for=\"Version\">{{'Cms::Version' | abpLocalization}}</label>\r\n <ul class=\"list-group\">\r\n <ng-container *ngFor=\"let item of AllVersionsList\">\r\n <li\r\n class=\"list-group-item flex-between d-flex align-items-center justify-content-between\">\r\n <div>\r\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd\r\n HH:mm:s'):('Cms::InitialVersion' | abpLocalization)}}\r\n <span class=\"badge text-bg-success ms-1\"\r\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\r\n <span class=\"badge text-bg-primary ms-1\"\r\n *ngIf=\"item.id === entryVersionId\">{{'Cms::Editing' |\r\n abpLocalization}}</span>\r\n </div>\r\n <div>\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\r\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\r\n (click)=\"ActivatedVersion(item.id)\">\r\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n routerLink=\"/cms/admin/entries/create\"\r\n [queryParams]=\"{entryVersionId:item.id}\">\r\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\r\n *ngIf=\"item.id !== entryVersionId\">\r\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n (click.stop)=\"delectVersion(item.id)\"\r\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== entryVersionId\">\r\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' |\r\n abpLocalization}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"entryInfo\">\r\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\r\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</div>", styles: ["::ng-deep .create-or-edit-entries-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}\n"] }]
|
|
1239
|
+
}], ctorParameters: () => [{ type: i4.ToPinyinService }], propDecorators: { isEdit: [{
|
|
1294
1240
|
type: Input
|
|
1295
1241
|
}], isCreateVersion: [{
|
|
1296
1242
|
type: Input
|
|
@@ -1344,6 +1290,7 @@ class CreateComponent {
|
|
|
1344
1290
|
/**显示条目类型信息 */
|
|
1345
1291
|
this.showEntryTypeInfo = '';
|
|
1346
1292
|
this._LocationBackService = inject(LocationBackService);
|
|
1293
|
+
this._DigniteValidatorsService = inject(DigniteValidatorsService);
|
|
1347
1294
|
this.isSubmit = false;
|
|
1348
1295
|
}
|
|
1349
1296
|
/**是否草稿控件*/
|
|
@@ -1360,7 +1307,7 @@ class CreateComponent {
|
|
|
1360
1307
|
this.entryTypeId = queryParams.entryTypeId;
|
|
1361
1308
|
this.sectionId = queryParams.sectionId;
|
|
1362
1309
|
this.entryVersionId = queryParams.entryVersionId;
|
|
1363
|
-
this.isOther = queryParams.isOther;
|
|
1310
|
+
this.isOther = queryParams.isOther || 0;
|
|
1364
1311
|
this.formEntity = this.fb.group(new CreateOrUpdateEntryInputBase());
|
|
1365
1312
|
this.cultureInput.patchValue(this.cultureName);
|
|
1366
1313
|
if (this.entryVersionId)
|
|
@@ -1382,70 +1329,30 @@ class CreateComponent {
|
|
|
1382
1329
|
_feedbackChildInfo(event) {
|
|
1383
1330
|
this.showEntryTypeInfo = event?.showEntryType || '';
|
|
1384
1331
|
}
|
|
1385
|
-
/**当返回结果为true时表示未通过验证 */
|
|
1386
|
-
isCheckFormCms(input, module) {
|
|
1387
|
-
for (const key in input) {
|
|
1388
|
-
if (input[key] === false) {
|
|
1389
|
-
let info = ``;
|
|
1390
|
-
//检查key中是否含有ExtraProperties.
|
|
1391
|
-
if (key.includes('extraProperties.')) {
|
|
1392
|
-
const arr = key.split('.');
|
|
1393
|
-
const keyName = arr[1];
|
|
1394
|
-
// if (keyName.includes('[')) {
|
|
1395
|
-
// //使用正则提取keyName中[]中的数字下标,并且转化为数字类型,并且去掉keyName中的[*]
|
|
1396
|
-
// const keyNameArr = keyName.match(/\d+/g);
|
|
1397
|
-
// const keyNameArrNum = keyNameArr.map(item => Number(item));
|
|
1398
|
-
// const keyNameArrNumStr = keyNameArrNum.join('.');
|
|
1399
|
-
// } else {
|
|
1400
|
-
//将keyName的首字母转为小写
|
|
1401
|
-
const keyNameLower = keyName;
|
|
1402
|
-
// const keyNameLower = keyName.charAt(0).toLowerCase() + keyName.slice(1);
|
|
1403
|
-
if (this.showEntryTypeInfo && this.showEntryTypeInfo.fieldTabs.length > 0) {
|
|
1404
|
-
for (const item of this.showEntryTypeInfo.fieldTabs) {
|
|
1405
|
-
for (const el of item.fields) {
|
|
1406
|
-
if (el.field.name == keyNameLower) {
|
|
1407
|
-
// info = `"${this._LocalizationService.instant(`${module}::${item.name}下的${el.field.displayName}字段`)}"`;
|
|
1408
|
-
info = `${this._LocalizationService.instant(`${module}::The{1}FieldUnderThe{0}TAB`, item.name, el.field.displayName)}`;
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
// }
|
|
1414
|
-
}
|
|
1415
|
-
else {
|
|
1416
|
-
const displayName = key.charAt(0).toUpperCase() + key.slice(1);
|
|
1417
|
-
info = `"${this._LocalizationService.instant(`${module}::${displayName}`)}" `;
|
|
1418
|
-
}
|
|
1419
|
-
info = info + this._LocalizationService.instant(`AbpValidation::ThisFieldIsNotValid.`);
|
|
1420
|
-
//使用abp多语言提示
|
|
1421
|
-
this.toaster.warn(info);
|
|
1422
|
-
return true;
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
return false;
|
|
1426
|
-
}
|
|
1427
1332
|
/**提交 */
|
|
1428
1333
|
save() {
|
|
1429
1334
|
const input = this.formEntity?.value;
|
|
1335
|
+
input.publishTime = new Date(new Date(input.publishTime).getTime() + 8 * 60 * 60 * 1000).toISOString();
|
|
1430
1336
|
this.formEntity.markAllAsTouched();
|
|
1431
|
-
this.formValidation =
|
|
1432
|
-
if (this.
|
|
1337
|
+
this.formValidation = true;
|
|
1338
|
+
if (!this.formEntity.valid) {
|
|
1339
|
+
for (const item of this.showEntryTypeInfo.fieldTabs) {
|
|
1340
|
+
for (const el of item.fields) {
|
|
1341
|
+
const info = `${this._LocalizationService.instant(`Cms::The{1}FieldUnderThe{0}TAB`, item.name, el.field.displayName)}`;
|
|
1342
|
+
EntriesToFormLabelMap[el.field.name] = info;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
this._DigniteValidatorsService.getErrorMessage({
|
|
1346
|
+
form: this.formEntity,
|
|
1347
|
+
map: EntriesToFormLabelMap,
|
|
1348
|
+
});
|
|
1433
1349
|
this.isSubmit = false;
|
|
1434
|
-
if (this.isOther
|
|
1350
|
+
if (this.isOther == 1) {
|
|
1435
1351
|
this.slugInput.disable();
|
|
1436
1352
|
}
|
|
1437
|
-
|
|
1438
|
-
}
|
|
1439
|
-
console.log(input, 'input', this.formEntity, this.formValidation);
|
|
1440
|
-
// if (this._ValidatorsService.isCheckForm(this.formValidation, 'Cms')) {
|
|
1441
|
-
// // this.isSubmit = false;
|
|
1442
|
-
// // return this.cultureInput.disable();
|
|
1443
|
-
// }
|
|
1444
|
-
// return;
|
|
1445
|
-
// input.culture = this.cultureName;
|
|
1446
|
-
input.publishTime = new Date(new Date(input.publishTime).getTime() + 8 * 60 * 60 * 1000).toISOString();
|
|
1447
|
-
if (!this.formEntity.valid)
|
|
1353
|
+
this.cultureInput.disable();
|
|
1448
1354
|
return;
|
|
1355
|
+
}
|
|
1449
1356
|
this._EntryAdminService
|
|
1450
1357
|
.create(input)
|
|
1451
1358
|
.pipe(finalize(() => {
|
|
@@ -1456,7 +1363,7 @@ class CreateComponent {
|
|
|
1456
1363
|
//检测该页面上一级是否是系统页面,如果是返回上一页,如果不是,则使用页面跳转到上一级页面。
|
|
1457
1364
|
this._LocationBackService.backTo({
|
|
1458
1365
|
url: `/cms/admin/entries`,
|
|
1459
|
-
replenish: '/create'
|
|
1366
|
+
replenish: '/create',
|
|
1460
1367
|
});
|
|
1461
1368
|
this._updateListService.updateList();
|
|
1462
1369
|
});
|
|
@@ -1467,9 +1374,10 @@ class CreateComponent {
|
|
|
1467
1374
|
// this.isSubmit = true;
|
|
1468
1375
|
this.draftInput.patchValue(type);
|
|
1469
1376
|
this.cultureInput.enable();
|
|
1470
|
-
this.
|
|
1377
|
+
if (this.isOther == 1) {
|
|
1378
|
+
this.slugInput.enable();
|
|
1379
|
+
}
|
|
1471
1380
|
this.formEntity.updateValueAndValidity();
|
|
1472
|
-
console.log(this.formEntity, 'formEntity');
|
|
1473
1381
|
setTimeout(() => {
|
|
1474
1382
|
this.submitclick.nativeElement.click();
|
|
1475
1383
|
}, 0);
|
|
@@ -1487,7 +1395,7 @@ class CreateComponent {
|
|
|
1487
1395
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1488
1396
|
useValue: ECmsComponent.Entries_Create,
|
|
1489
1397
|
},
|
|
1490
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::New'| abpLocalization\" [toolbar]=\"true\">\r\n <form class=\"row g-3 needs-validation\" [formGroup]=\"formEntity\" [class]=\"{'was-validated':formValidation}\"\r\n (submit)=\"save()\">\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n <ng-container *ngIf=\"formEntity&§ionId\">\r\n <ng-container *ngIf=\"entryVersionId; else elseTemplate\">\r\n <cms-create-or-edit-entries [sectionId]=\"sectionId\" [entryTypeId]=\"entryTypeId\" [isEdit]=\"false\"\r\n [select]=\"entryInfo\" [isCreateVersion]=\"true\" [isOther]=\"isOther\" (feedbackChildInfo)=\"_feedbackChildInfo($event)\" [entity]=\"formEntity\"></cms-create-or-edit-entries>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <cms-create-or-edit-entries [sectionId]=\"sectionId\" [entryTypeId]=\"entryTypeId\" (feedbackChildInfo)=\"_feedbackChildInfo($event)\"\r\n [isEdit]=\"false\" [select]=\"entryInfo\" [isOther]=\"isOther\"\r\n [entity]=\"formEntity\" ></cms-create-or-edit-entries>\r\n </ng-template>\r\n </ng-container>\r\n </form>\r\n</abp-page>", styles: [""], dependencies: [{ kind: "directive", type:
|
|
1398
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::New'| abpLocalization\" [toolbar]=\"true\">\r\n <form class=\"row g-3 needs-validation\" [formGroup]=\"formEntity\" [class]=\"{'was-validated':formValidation}\"\r\n (submit)=\"save()\">\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n <ng-container *ngIf=\"formEntity&§ionId\">\r\n <ng-container *ngIf=\"entryVersionId; else elseTemplate\">\r\n <cms-create-or-edit-entries [sectionId]=\"sectionId\" [entryTypeId]=\"entryTypeId\" [isEdit]=\"false\"\r\n [select]=\"entryInfo\" [isCreateVersion]=\"true\" [isOther]=\"isOther\" (feedbackChildInfo)=\"_feedbackChildInfo($event)\" [entity]=\"formEntity\"></cms-create-or-edit-entries>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <cms-create-or-edit-entries [sectionId]=\"sectionId\" [entryTypeId]=\"entryTypeId\" (feedbackChildInfo)=\"_feedbackChildInfo($event)\"\r\n [isEdit]=\"false\" [select]=\"entryInfo\" [isOther]=\"isOther\"\r\n [entity]=\"formEntity\" ></cms-create-or-edit-entries>\r\n </ng-template>\r\n </ng-container>\r\n </form>\r\n</abp-page>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: ["isEdit", "isCreateVersion", "sectionId", "entryTypeId", "select", "entity", "isOther"], outputs: ["feedbackChildInfo"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1491
1399
|
}
|
|
1492
1400
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateComponent, decorators: [{
|
|
1493
1401
|
type: Component,
|
|
@@ -1504,6 +1412,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1504
1412
|
|
|
1505
1413
|
/* eslint-disable @angular-eslint/component-selector */
|
|
1506
1414
|
/* eslint-disable @angular-eslint/use-lifecycle-interface */
|
|
1415
|
+
// import { ClassicEditor, Essentials, Paragraph, Bold, Italic } from 'ckeditor5';
|
|
1507
1416
|
class EditComponent {
|
|
1508
1417
|
constructor() {
|
|
1509
1418
|
this.fb = inject(FormBuilder);
|
|
@@ -1513,8 +1422,6 @@ class EditComponent {
|
|
|
1513
1422
|
this.route = inject(ActivatedRoute);
|
|
1514
1423
|
this._EntryAdminService = inject(EntryAdminService);
|
|
1515
1424
|
this._LocalizationService = inject(LocalizationService);
|
|
1516
|
-
this._ValidatorsService = inject(ValidatorsService);
|
|
1517
|
-
this.datePipe = inject(DatePipe);
|
|
1518
1425
|
/**表单验证状态
|
|
1519
1426
|
* {
|
|
1520
1427
|
* title:true,
|
|
@@ -1583,6 +1490,7 @@ class EditComponent {
|
|
|
1583
1490
|
// return validationStatus
|
|
1584
1491
|
// }
|
|
1585
1492
|
this._LocationBackService = inject(LocationBackService);
|
|
1493
|
+
this._DigniteValidatorsService = inject(DigniteValidatorsService);
|
|
1586
1494
|
this.isSubmit = false;
|
|
1587
1495
|
this.draftValue = '';
|
|
1588
1496
|
}
|
|
@@ -1668,20 +1576,34 @@ class EditComponent {
|
|
|
1668
1576
|
input.culture = this.cultureName;
|
|
1669
1577
|
input.publishTime = new Date(new Date(input.publishTime).getTime() + 8 * 60 * 60 * 1000).toISOString();
|
|
1670
1578
|
input.concurrencyStamp = this.entryInfo.concurrencyStamp;
|
|
1671
|
-
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.formEntity);
|
|
1579
|
+
// this.formValidation = this._ValidatorsService.getFormValidationStatus(this.formEntity);
|
|
1672
1580
|
// if (this._ValidatorsService.isCheckForm(this.formValidation, 'Cms')){
|
|
1673
1581
|
// this.isSubmit = false;
|
|
1674
1582
|
// return this.cultureInput.disable();
|
|
1675
1583
|
// }
|
|
1676
1584
|
// this.formValidation = this.getFormValidationStatus(this.formEntity);
|
|
1677
|
-
if (this.isCheckFormCms(this.formValidation, 'Cms')) {
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
}
|
|
1585
|
+
// if (this.isCheckFormCms(this.formValidation, 'Cms')) {
|
|
1586
|
+
// this.isSubmit = false;
|
|
1587
|
+
// return this.cultureInput.disable();
|
|
1588
|
+
// }
|
|
1681
1589
|
// this.formValidation = this.getFormValidationStatus(this.formEntity);
|
|
1682
1590
|
// return this.isSubmit=false;
|
|
1683
|
-
|
|
1591
|
+
this.formValidation = true;
|
|
1592
|
+
if (!this.formEntity.valid) {
|
|
1593
|
+
for (const item of this.showEntryTypeInfo.fieldTabs) {
|
|
1594
|
+
for (const el of item.fields) {
|
|
1595
|
+
const info = `${this._LocalizationService.instant(`Cms::The{1}FieldUnderThe{0}TAB`, item.name, el.field.displayName)}`;
|
|
1596
|
+
EntriesToFormLabelMap[el.field.name] = info;
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
this._DigniteValidatorsService.getErrorMessage({
|
|
1600
|
+
form: this.formEntity,
|
|
1601
|
+
map: EntriesToFormLabelMap,
|
|
1602
|
+
});
|
|
1603
|
+
this.isSubmit = false;
|
|
1604
|
+
this.cultureInput.disable();
|
|
1684
1605
|
return;
|
|
1606
|
+
}
|
|
1685
1607
|
this._EntryAdminService
|
|
1686
1608
|
.update(this.entryInfo.id, input)
|
|
1687
1609
|
.pipe(finalize(() => {
|
|
@@ -1691,7 +1613,7 @@ class EditComponent {
|
|
|
1691
1613
|
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
1692
1614
|
this._LocationBackService.backTo({
|
|
1693
1615
|
url: `/cms/admin/entries`,
|
|
1694
|
-
replenish: '/
|
|
1616
|
+
replenish: '/edit'
|
|
1695
1617
|
});
|
|
1696
1618
|
this._updateListService.updateList();
|
|
1697
1619
|
});
|
|
@@ -1715,7 +1637,7 @@ class EditComponent {
|
|
|
1715
1637
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1716
1638
|
useValue: ECmsComponent.Entries_Edit,
|
|
1717
1639
|
},
|
|
1718
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::Edit'| abpLocalization\" [toolbar]=\"true\">\n <form class=\"row g-3 needs-validation\"\n [class]=\"{'was-validated':formValidation}\" [formGroup]=\"formEntity\" (submit)=\"save()\" >\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <ng-container *ngIf=\"formEntity&&entryInfo\">\n <cms-create-or-edit-entries [sectionId]=\"sectionId\" [entryTypeId]=\"entryTypeId\" [isEdit]=\"true\" [select]=\"entryInfo\" (feedbackChildInfo)=\"_feedbackChildInfo($event)\" [entity]=\"formEntity\"></cms-create-or-edit-entries>\n </ng-container>\n \n </form>\n</abp-page>\n", styles: [""], dependencies: [{ kind: "directive", type:
|
|
1640
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::Edit'| abpLocalization\" [toolbar]=\"true\">\n <form class=\"row g-3 needs-validation\"\n [class]=\"{'was-validated':formValidation}\" [formGroup]=\"formEntity\" (submit)=\"save()\" >\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <ng-container *ngIf=\"formEntity&&entryInfo\">\n <cms-create-or-edit-entries [sectionId]=\"sectionId\" [entryTypeId]=\"entryTypeId\" [isEdit]=\"true\" [select]=\"entryInfo\" (feedbackChildInfo)=\"_feedbackChildInfo($event)\" [entity]=\"formEntity\"></cms-create-or-edit-entries>\n </ng-container>\n \n </form>\n</abp-page>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: ["isEdit", "isCreateVersion", "sectionId", "entryTypeId", "select", "entity", "isOther"], outputs: ["feedbackChildInfo"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1719
1641
|
}
|
|
1720
1642
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EditComponent, decorators: [{
|
|
1721
1643
|
type: Component,
|
|
@@ -1730,147 +1652,132 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1730
1652
|
args: ['submitclick', { static: true }]
|
|
1731
1653
|
}] } });
|
|
1732
1654
|
|
|
1655
|
+
/* eslint-disable @typescript-eslint/no-inferrable-types */
|
|
1733
1656
|
/* eslint-disable @angular-eslint/component-selector */
|
|
1734
|
-
class
|
|
1735
|
-
constructor(fb,
|
|
1657
|
+
class FieldsGroupComponent {
|
|
1658
|
+
constructor(fb, _service, confirmation, _LocalizationService, toaster) {
|
|
1736
1659
|
this.fb = fb;
|
|
1737
|
-
this.
|
|
1738
|
-
this.toaster = toaster;
|
|
1660
|
+
this._service = _service;
|
|
1739
1661
|
this.confirmation = confirmation;
|
|
1740
|
-
this._FieldAbstractsService = _FieldAbstractsService;
|
|
1741
1662
|
this._LocalizationService = _LocalizationService;
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1663
|
+
this.toaster = toaster;
|
|
1664
|
+
/**
|
|
1665
|
+
* 选择的字段分组id
|
|
1666
|
+
*/
|
|
1667
|
+
this.selectedGroupId = '';
|
|
1668
|
+
/**模态框是否开启状态 */
|
|
1669
|
+
this.modalOpen = false;
|
|
1670
|
+
/**模态框是否在忙碌状态 */
|
|
1749
1671
|
this.modalBusy = false;
|
|
1750
|
-
|
|
1751
|
-
this.
|
|
1672
|
+
/**存储将要修改的值 */
|
|
1673
|
+
this.selected = '';
|
|
1674
|
+
/**表单是否触发验证 */
|
|
1675
|
+
this.formValidation = false;
|
|
1752
1676
|
/**点击分组回调 */
|
|
1753
1677
|
this.OnGroupClickBack = new EventEmitter();
|
|
1754
|
-
this._ValidatorsService = inject(ValidatorsService);
|
|
1755
|
-
/**表单验证状态
|
|
1756
|
-
* {
|
|
1757
|
-
* title:true,
|
|
1758
|
-
* }
|
|
1759
|
-
*/
|
|
1760
|
-
this.formValidation = '';
|
|
1761
|
-
}
|
|
1762
|
-
ngOnInit() {
|
|
1763
|
-
this._FieldAbstractsService.getfieldGroupList();
|
|
1764
1678
|
}
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
this.
|
|
1768
|
-
this.
|
|
1769
|
-
this.createForm = this.fb.group({
|
|
1770
|
-
name: ['', [Validators.required]],
|
|
1771
|
-
});
|
|
1679
|
+
/**选择分组 */
|
|
1680
|
+
groupChangeBtn(groupId = '') {
|
|
1681
|
+
this.selectedGroupId = groupId;
|
|
1682
|
+
this.OnGroupClickBack.emit(groupId);
|
|
1772
1683
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1684
|
+
/**模态框状态改变 */
|
|
1685
|
+
modalVisibleChange(event) {
|
|
1775
1686
|
if (!event) {
|
|
1687
|
+
this.modalOpen = event;
|
|
1688
|
+
this.modalBusy = false;
|
|
1689
|
+
this.formValidation = false;
|
|
1690
|
+
this.selected = '';
|
|
1691
|
+
this.groupForm = undefined;
|
|
1776
1692
|
return;
|
|
1777
1693
|
}
|
|
1778
1694
|
}
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
this.
|
|
1784
|
-
|
|
1695
|
+
/**
|
|
1696
|
+
* 创建分组按钮
|
|
1697
|
+
*/
|
|
1698
|
+
createGroupBtn() {
|
|
1699
|
+
this.modalOpen = true;
|
|
1700
|
+
this.groupForm = this.fb.group({
|
|
1701
|
+
name: ['', Validators.required],
|
|
1785
1702
|
});
|
|
1786
1703
|
}
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
/**创建字段分组保存 */
|
|
1794
|
-
createSave() {
|
|
1795
|
-
const input = this.createForm.value;
|
|
1796
|
-
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.createForm);
|
|
1797
|
-
if (this._ValidatorsService.isCheckForm(this.formValidation, 'Cms'))
|
|
1798
|
-
return;
|
|
1799
|
-
if (!this.createForm?.valid)
|
|
1800
|
-
return;
|
|
1801
|
-
if (this.modalBusy)
|
|
1802
|
-
return;
|
|
1803
|
-
this.modalBusy = true;
|
|
1804
|
-
this._FieldGroupAdminService.create(input).pipe(finalize$1(() => {
|
|
1805
|
-
this.modalBusy = false;
|
|
1806
|
-
this.createGroupOpen = false;
|
|
1807
|
-
this.formValidation = '';
|
|
1808
|
-
})).subscribe(res => {
|
|
1809
|
-
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
1810
|
-
this._FieldAbstractsService.getfieldGroupList();
|
|
1704
|
+
/**编辑分组按钮 */
|
|
1705
|
+
editGroupBtn(name) {
|
|
1706
|
+
this.modalOpen = true;
|
|
1707
|
+
this.selected = name;
|
|
1708
|
+
this.groupForm = this.fb.group({
|
|
1709
|
+
name: [name, Validators.required],
|
|
1811
1710
|
});
|
|
1812
1711
|
}
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
if (this._ValidatorsService.isCheckForm(this.formValidation, 'Cms'))
|
|
1818
|
-
return;
|
|
1819
|
-
if (!this.editGroupForm.valid)
|
|
1820
|
-
return;
|
|
1821
|
-
if (this.modalBusy)
|
|
1712
|
+
/**表单提交 */
|
|
1713
|
+
save() {
|
|
1714
|
+
this.formValidation = true;
|
|
1715
|
+
if (!this.groupForm?.valid) {
|
|
1822
1716
|
return;
|
|
1717
|
+
}
|
|
1823
1718
|
this.modalBusy = true;
|
|
1824
|
-
|
|
1825
|
-
this.
|
|
1826
|
-
this.
|
|
1827
|
-
|
|
1828
|
-
|
|
1719
|
+
if (this.selected) {
|
|
1720
|
+
// this.
|
|
1721
|
+
this._service.updateFieldGroup(this.selectedGroupId, this.groupForm.value).subscribe({
|
|
1722
|
+
next: () => {
|
|
1723
|
+
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
1724
|
+
this.modalVisibleChange(false);
|
|
1725
|
+
this._service.getfieldGroups(true);
|
|
1726
|
+
},
|
|
1727
|
+
error: e => console.error(e),
|
|
1728
|
+
complete: () => console.info('complete'),
|
|
1729
|
+
});
|
|
1730
|
+
// .subscribe(() => {
|
|
1731
|
+
// this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
1732
|
+
// this.modalVisibleChange(false);
|
|
1733
|
+
// this._service.getfieldGroups(true);
|
|
1734
|
+
// });
|
|
1735
|
+
return;
|
|
1736
|
+
}
|
|
1737
|
+
this._service.createFieldGroup(this.groupForm.value).subscribe(async (res) => {
|
|
1829
1738
|
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
1830
|
-
this.
|
|
1739
|
+
this.modalVisibleChange(false);
|
|
1740
|
+
await this._service.getfieldGroups(true);
|
|
1741
|
+
this.groupChangeBtn(res.id);
|
|
1831
1742
|
});
|
|
1832
1743
|
}
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
this.confirmation
|
|
1744
|
+
/**删除分组 */
|
|
1745
|
+
deleteGroupBtn(fieldGroupitem) {
|
|
1746
|
+
this.confirmation
|
|
1747
|
+
.warn(fieldGroupitem.name, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`))
|
|
1748
|
+
.subscribe((status) => {
|
|
1836
1749
|
if (status == 'confirm') {
|
|
1837
|
-
this.
|
|
1838
|
-
})).subscribe(res => {
|
|
1750
|
+
this._service.deleteFieldGroup(fieldGroupitem.id).subscribe(async () => {
|
|
1839
1751
|
this.toaster.success(this._LocalizationService.instant(`AbpUi::DeletedSuccessfully`));
|
|
1840
|
-
this.
|
|
1841
|
-
this.
|
|
1752
|
+
await this._service.getfieldGroups(true);
|
|
1753
|
+
this.groupChangeBtn();
|
|
1842
1754
|
});
|
|
1843
1755
|
}
|
|
1844
1756
|
});
|
|
1845
1757
|
}
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
this.fieldGroupId = event;
|
|
1849
|
-
this.OnGroupClickBack.emit(event);
|
|
1850
|
-
}
|
|
1851
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldGroupComponent, deps: [{ token: i1$2.FormBuilder }, { token: FieldGroupAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: FieldAbstractsService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1852
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FieldGroupComponent, selector: "cms-field-group", outputs: { OnGroupClickBack: "OnGroupClickBack" }, ngImport: i0, template: "<div class=\"card-header px-2 py-sm-2 d-flex justify-content-between align-items-center\">\n <h6 class=\"h6 mb-0\">{{'Cms::FieldGroup' | abpLocalization}}</h6>\n <button type=\"button\" class=\"btn btn-link btn-sm ms-2\"><i class=\"fas fa-plus-circle\" aria-hidden=\"true\"\n (click)=\"createGroupBtn()\"></i></button>\n</div>\n<div class=\"card-body p-0\">\n <div class=\"container-height overflow-auto\">\n <ul class=\"list-group list-group-flush\">\n <li class=\"list-group-item list-group-item-action active\" [class.active]=\"fieldGroupId===''\"\n (click)=\"fieldGroupChange('')\">{{'Cms::AllFields' | abpLocalization}}</li>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <li class=\"list-group-item list-group-item-action d-flex justify-content-between align-items-center\"\n [class.active]=\"fieldGroupId===item.id\" (click)=\"fieldGroupChange(item.id)\">\n <div>{{item.name}}</div>\n <div *ngIf=\"fieldGroupId===item.id\">\n <i class=\"fas fa-trash px-1\" role=\"button\" (click.stop)=\"deleteGroupbtn(item)\"></i>\n <i class=\"fas fa-edit px-1\" role=\"button\" (click.stop)=\"editGroupBtn(item.name)\"></i>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>\n\n<abp-modal [(visible)]=\"createGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"createGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'Cms::New' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"createForm; else loaderRef\" [formGroup]=\"createForm\" [class]=\"{'was-validated':formValidation}\" (submit)=\"createSave()\">\n <div class=\"mb-3\">\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\n placeholder=\"\">\n </div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"createForm?.invalid\" [loading]=\"modalBusy\" (click)=\"createSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n<abp-modal [(visible)]=\"editGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"editGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"editGroupForm; else loaderRef\" [formGroup]=\"editGroupForm\" [class]=\"{'was-validated':formValidation}\" (submit)=\"editSave()\">\n <div class=\"mb-3\">\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\n placeholder=\"\">\n </div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"editGroupForm?.invalid\" (click)=\"editSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i5.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i5.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1758
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldsGroupComponent, deps: [{ token: i1$1.FormBuilder }, { token: FieldsDataService }, { token: i3.ConfirmationService }, { token: i1.LocalizationService }, { token: i3.ToasterService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1759
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FieldsGroupComponent, selector: "cms-fields-group", outputs: { OnGroupClickBack: "OnGroupClickBack" }, viewQueries: [{ propertyName: "ModalFormSubmit", first: true, predicate: ["ModalFormSubmit"], descendants: true }], ngImport: i0, template: "<div class=\"card h-100 mb-0\" >\r\n <div class=\"card-header px-2 py-sm-2 d-flex justify-content-between align-items-center\">\r\n <h6 class=\"h6 mb-0\">{{'Cms::FieldGroup' | abpLocalization}}</h6>\r\n <button type=\"button\" class=\"btn btn-link btn-sm ms-2\" (click.stop)=\"createGroupBtn()\"><i class=\"fas fa-plus-circle\"\r\n aria-hidden=\"true\"></i></button>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"container-height overflow-auto\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item list-group-item-action \" [class.active]=\"selectedGroupId===''\" (click)=\"groupChangeBtn()\">{{'Cms::AllFields' | abpLocalization}}</li>\r\n <ng-container *ngFor=\"let item of _service.fieldGroupsList\">\r\n <li class=\"list-group-item list-group-item-action d-flex justify-content-between align-items-center\"\r\n [class.active]=\"selectedGroupId===item.id\" (click)=\"groupChangeBtn(item.id)\">\r\n <div>{{item.name}}</div>\r\n <div *ngIf=\"selectedGroupId===item.id\">\r\n <i class=\"fas fa-trash px-1\" role=\"button\" (click.stop)=\"deleteGroupBtn(item)\"></i>\r\n <i class=\"fas fa-edit px-1\" role=\"button\" (click.stop)=\"editGroupBtn(item.name)\"></i>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n<abp-modal [(visible)]=\"modalOpen\" [busy]=\"modalBusy\" (visibleChange)=\"modalVisibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{(selected?'AbpUi::Edit':'Cms::New') | abpLocalization}}</h3>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ng-template #loaderRef>\r\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\r\n </ng-template>\r\n <form *ngIf=\"groupForm; else loaderRef\" [formGroup]=\"groupForm\" [class]=\"{'was-validated':formValidation}\" (submit)=\"save()\">\r\n <div class=\"mb-3\">\r\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\r\n placeholder=\"\">\r\n </div>\r\n <button type=\"submit\" #ModalFormSubmit style=\"display: none\"></button>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\r\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"createForm?.invalid\" [loading]=\"modalBusy\" (click)=\"ModalFormSubmit?.nativeElement?.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1853
1760
|
}
|
|
1854
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type:
|
|
1761
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldsGroupComponent, decorators: [{
|
|
1855
1762
|
type: Component,
|
|
1856
|
-
args: [{ selector: 'cms-
|
|
1857
|
-
}], ctorParameters: () => [{ type: i1$
|
|
1763
|
+
args: [{ selector: 'cms-fields-group', template: "<div class=\"card h-100 mb-0\" >\r\n <div class=\"card-header px-2 py-sm-2 d-flex justify-content-between align-items-center\">\r\n <h6 class=\"h6 mb-0\">{{'Cms::FieldGroup' | abpLocalization}}</h6>\r\n <button type=\"button\" class=\"btn btn-link btn-sm ms-2\" (click.stop)=\"createGroupBtn()\"><i class=\"fas fa-plus-circle\"\r\n aria-hidden=\"true\"></i></button>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <div class=\"container-height overflow-auto\">\r\n <ul class=\"list-group list-group-flush\">\r\n <li class=\"list-group-item list-group-item-action \" [class.active]=\"selectedGroupId===''\" (click)=\"groupChangeBtn()\">{{'Cms::AllFields' | abpLocalization}}</li>\r\n <ng-container *ngFor=\"let item of _service.fieldGroupsList\">\r\n <li class=\"list-group-item list-group-item-action d-flex justify-content-between align-items-center\"\r\n [class.active]=\"selectedGroupId===item.id\" (click)=\"groupChangeBtn(item.id)\">\r\n <div>{{item.name}}</div>\r\n <div *ngIf=\"selectedGroupId===item.id\">\r\n <i class=\"fas fa-trash px-1\" role=\"button\" (click.stop)=\"deleteGroupBtn(item)\"></i>\r\n <i class=\"fas fa-edit px-1\" role=\"button\" (click.stop)=\"editGroupBtn(item.name)\"></i>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n<abp-modal [(visible)]=\"modalOpen\" [busy]=\"modalBusy\" (visibleChange)=\"modalVisibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{(selected?'AbpUi::Edit':'Cms::New') | abpLocalization}}</h3>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ng-template #loaderRef>\r\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\r\n </ng-template>\r\n <form *ngIf=\"groupForm; else loaderRef\" [formGroup]=\"groupForm\" [class]=\"{'was-validated':formValidation}\" (submit)=\"save()\">\r\n <div class=\"mb-3\">\r\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\r\n placeholder=\"\">\r\n </div>\r\n <button type=\"submit\" #ModalFormSubmit style=\"display: none\"></button>\r\n </form>\r\n </ng-template>\r\n\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\r\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"createForm?.invalid\" [loading]=\"modalBusy\" (click)=\"ModalFormSubmit?.nativeElement?.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\r\n </ng-template>\r\n</abp-modal>\r\n" }]
|
|
1764
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: FieldsDataService }, { type: i3.ConfirmationService }, { type: i1.LocalizationService }, { type: i3.ToasterService }], propDecorators: { ModalFormSubmit: [{
|
|
1765
|
+
type: ViewChild,
|
|
1766
|
+
args: ['ModalFormSubmit', { static: false }]
|
|
1767
|
+
}], OnGroupClickBack: [{
|
|
1858
1768
|
type: Output
|
|
1859
1769
|
}] } });
|
|
1860
1770
|
|
|
1861
1771
|
/* eslint-disable @angular-eslint/component-selector */
|
|
1862
1772
|
class FieldsComponent {
|
|
1863
|
-
constructor(list,
|
|
1773
|
+
constructor(list, _service, toaster, confirmation, _LocalizationService, router, _UpdateListService) {
|
|
1864
1774
|
this.list = list;
|
|
1865
|
-
this.
|
|
1775
|
+
this._service = _service;
|
|
1866
1776
|
this.toaster = toaster;
|
|
1867
1777
|
this.confirmation = confirmation;
|
|
1868
1778
|
this._LocalizationService = _LocalizationService;
|
|
1869
1779
|
this.router = router;
|
|
1870
|
-
this._UpdateListService =
|
|
1871
|
-
this._FieldAbstractsService = inject(FieldAbstractsService);
|
|
1872
|
-
/**表格单元格布局类型 */
|
|
1873
|
-
this.ColumnMode = ColumnMode;
|
|
1780
|
+
this._UpdateListService = _UpdateListService;
|
|
1874
1781
|
/**表格数据 */
|
|
1875
1782
|
this.data = {
|
|
1876
1783
|
items: [],
|
|
@@ -1878,29 +1785,20 @@ class FieldsComponent {
|
|
|
1878
1785
|
};
|
|
1879
1786
|
/**过滤器 */
|
|
1880
1787
|
this.filters = {};
|
|
1881
|
-
/**是否初始化完成 */
|
|
1882
|
-
this.isInit = true;
|
|
1883
1788
|
}
|
|
1884
1789
|
async ngOnInit() {
|
|
1885
|
-
|
|
1886
|
-
|
|
1790
|
+
//Called after the constructor, initializing input properties, and the first call to ngOnChanges.
|
|
1791
|
+
//Add 'implements OnInit' to the class.
|
|
1792
|
+
await Promise.all([this._service.getfieldGroups(), this._service.getControlsfieldTypes()]);
|
|
1887
1793
|
this.hookToQuery();
|
|
1794
|
+
console.log(this.list, '1111');
|
|
1888
1795
|
this._UpdateListService.updateListEvent.subscribe(() => {
|
|
1889
|
-
this.
|
|
1796
|
+
this.getData();
|
|
1890
1797
|
});
|
|
1891
1798
|
}
|
|
1892
|
-
getData() {
|
|
1893
|
-
this.list.get();
|
|
1894
|
-
}
|
|
1895
|
-
/**字段分组选择回调 */
|
|
1896
|
-
fieldGroupChange(event) {
|
|
1897
|
-
this.filters.groupId = event;
|
|
1898
|
-
this.list.page = 0;
|
|
1899
|
-
this.list.get();
|
|
1900
|
-
}
|
|
1901
1799
|
/**使用abp的list获取表格的字段数据列表 */
|
|
1902
1800
|
hookToQuery() {
|
|
1903
|
-
const getData = (query) => this.
|
|
1801
|
+
const getData = (query) => this._service.getFieldsList({
|
|
1904
1802
|
...query,
|
|
1905
1803
|
...this.filters,
|
|
1906
1804
|
});
|
|
@@ -1910,17 +1808,27 @@ class FieldsComponent {
|
|
|
1910
1808
|
};
|
|
1911
1809
|
this.list.hookToQuery(getData).subscribe(setData);
|
|
1912
1810
|
}
|
|
1811
|
+
/**获取表格数据 */
|
|
1812
|
+
getData() {
|
|
1813
|
+
this.data.items = [];
|
|
1814
|
+
this.data.totalCount = 0;
|
|
1815
|
+
// this.list.page=0;
|
|
1816
|
+
this.list.get();
|
|
1817
|
+
}
|
|
1818
|
+
/**重置 */
|
|
1819
|
+
reset() {
|
|
1820
|
+
this.filters = {};
|
|
1821
|
+
this.getData();
|
|
1822
|
+
}
|
|
1823
|
+
/**回到页面顶部 */
|
|
1913
1824
|
scrollToTop() {
|
|
1914
1825
|
const scrollContainer = document.getElementsByClassName('lpx-scroll-container')[0];
|
|
1915
1826
|
(scrollContainer || window).scrollTo(0, 0);
|
|
1916
1827
|
}
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
this.
|
|
1920
|
-
|
|
1921
|
-
groupId: this.filters.groupId,
|
|
1922
|
-
},
|
|
1923
|
-
});
|
|
1828
|
+
/**点击字段分组回调 */
|
|
1829
|
+
onGroupClickBack(groupId) {
|
|
1830
|
+
this.filters.groupId = groupId;
|
|
1831
|
+
this.getData();
|
|
1924
1832
|
}
|
|
1925
1833
|
/**删除字段 */
|
|
1926
1834
|
deletefield(row) {
|
|
@@ -1928,50 +1836,59 @@ class FieldsComponent {
|
|
|
1928
1836
|
.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`))
|
|
1929
1837
|
.subscribe((status) => {
|
|
1930
1838
|
if (status == 'confirm') {
|
|
1931
|
-
this.
|
|
1932
|
-
.delete(row.id)
|
|
1933
|
-
.pipe(finalize(() => { }))
|
|
1934
|
-
.subscribe(res => {
|
|
1839
|
+
this._service.deleteField(row.id).subscribe(() => {
|
|
1935
1840
|
this.toaster.success(this._LocalizationService.instant(`AbpUi::DeletedSuccessfully`));
|
|
1936
|
-
this.
|
|
1841
|
+
this.getData();
|
|
1937
1842
|
});
|
|
1938
1843
|
}
|
|
1939
1844
|
});
|
|
1940
1845
|
}
|
|
1941
|
-
|
|
1846
|
+
/**新建字段按钮 */
|
|
1847
|
+
toFieldsCreateBtn() {
|
|
1848
|
+
this.router.navigate(['/cms/admin/fields/create'], {
|
|
1849
|
+
queryParams: {
|
|
1850
|
+
groupId: this.filters.groupId,
|
|
1851
|
+
},
|
|
1852
|
+
});
|
|
1853
|
+
}
|
|
1854
|
+
/**编辑字段按钮 */
|
|
1855
|
+
editfieldBtn(row) {
|
|
1856
|
+
this.router.navigate(['/cms/admin/fields/' + row.id + '/edit'], {});
|
|
1857
|
+
}
|
|
1858
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldsComponent, deps: [{ token: i1.ListService }, { token: FieldsDataService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1.LocalizationService }, { token: i6.Router }, { token: i4.UpdateListService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1942
1859
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FieldsComponent, selector: "cms-fields", providers: [
|
|
1860
|
+
{
|
|
1861
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
1862
|
+
useValue: ECmsComponent.Fields,
|
|
1863
|
+
},
|
|
1943
1864
|
// [Required]
|
|
1944
1865
|
ListService,
|
|
1945
1866
|
// [Optional]
|
|
1946
1867
|
// Provide this token if you want a different debounce time.
|
|
1947
1868
|
// Default is 300. Cannot be 0. Any value below 100 is not recommended.
|
|
1948
|
-
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue:
|
|
1949
|
-
{
|
|
1950
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
1951
|
-
useValue: ECmsComponent.Fields,
|
|
1952
|
-
},
|
|
1953
|
-
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Fields' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"fields-page\">\n <div class=\"row \">\n <div class=\"col-md-3 mb-2\">\n <div class=\"card mb-0\" style=\"height: 100%;\">\n <cms-field-group (OnGroupClickBack)=\"fieldGroupChange($event)\"></cms-field-group>\n </div>\n </div>\n <div class=\"col-md-9 mb-2\">\n <div class=\"card mb-0\">\n <div class=\"card-header px-2 py-sm-2 border-bottom\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\"\n (click)=\"list.get()\"><i class=\"fa fa-search\"></i></button>\n </div>\n </div>\n <ng-container *ngIf=\"isInit\">\n <abp-extensible-table [data]=\"data?.items\" [recordsTotal]=\"data?.totalCount\" [list]=\"list\"></abp-extensible-table>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n\n</abp-page>", styles: ["::ng-deep .fields-page .dignite_page{background:transparent}::ng-deep .fields-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .fields-page .container-height{height:calc(100vh - 200px)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i8.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], outputs: ["tableActivate"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: FieldGroupComponent, selector: "cms-field-group", outputs: ["OnGroupClickBack"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1869
|
+
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 50 },
|
|
1870
|
+
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Fields' | abpLocalization\" [toolbar]=\"true\">\r\n <div class=\"row\" style=\"min-height: calc(100vh - 42px - 54px - 1.25em - 1.25em);\">\r\n <div class=\"col-md-3 mb-2\">\r\n <cms-fields-group (OnGroupClickBack)=\"onGroupClickBack($event)\"></cms-fields-group>\r\n </div>\r\n <div class=\"col-md-9 mb-2\">\r\n <div class=\"card mb-0\">\r\n <div class=\"card-header px-2 py-sm-2 border-bottom\">\r\n <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\r\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" >\r\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\"\r\n (click)=\"list.get()\"><i class=\"fa fa-search\"></i></button>\r\n </div>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <abp-extensible-table [data]=\"data?.items\" [recordsTotal]=\"data?.totalCount\"\r\n [list]=\"list\">\r\n </abp-extensible-table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i8.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], outputs: ["tableActivate"], exportAs: ["abpExtensibleTable"] }, { kind: "component", type: FieldsGroupComponent, selector: "cms-fields-group", outputs: ["OnGroupClickBack"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1954
1871
|
}
|
|
1955
1872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldsComponent, decorators: [{
|
|
1956
1873
|
type: Component,
|
|
1957
1874
|
args: [{ selector: 'cms-fields', providers: [
|
|
1875
|
+
{
|
|
1876
|
+
provide: EXTENSIONS_IDENTIFIER,
|
|
1877
|
+
useValue: ECmsComponent.Fields,
|
|
1878
|
+
},
|
|
1958
1879
|
// [Required]
|
|
1959
1880
|
ListService,
|
|
1960
1881
|
// [Optional]
|
|
1961
1882
|
// Provide this token if you want a different debounce time.
|
|
1962
1883
|
// Default is 300. Cannot be 0. Any value below 100 is not recommended.
|
|
1963
|
-
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue:
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
useValue: ECmsComponent.Fields,
|
|
1967
|
-
},
|
|
1968
|
-
], template: "<abp-page [title]=\"'Cms::Fields' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"fields-page\">\n <div class=\"row \">\n <div class=\"col-md-3 mb-2\">\n <div class=\"card mb-0\" style=\"height: 100%;\">\n <cms-field-group (OnGroupClickBack)=\"fieldGroupChange($event)\"></cms-field-group>\n </div>\n </div>\n <div class=\"col-md-9 mb-2\">\n <div class=\"card mb-0\">\n <div class=\"card-header px-2 py-sm-2 border-bottom\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\"\n (click)=\"list.get()\"><i class=\"fa fa-search\"></i></button>\n </div>\n </div>\n <ng-container *ngIf=\"isInit\">\n <abp-extensible-table [data]=\"data?.items\" [recordsTotal]=\"data?.totalCount\" [list]=\"list\"></abp-extensible-table>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n\n</abp-page>", styles: ["::ng-deep .fields-page .dignite_page{background:transparent}::ng-deep .fields-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .fields-page .container-height{height:calc(100vh - 200px)}\n"] }]
|
|
1969
|
-
}], ctorParameters: () => [{ type: i1.ListService }, { type: FieldAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.LocalizationService }, { type: i4.Router }] });
|
|
1884
|
+
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 50 },
|
|
1885
|
+
], template: "<abp-page [title]=\"'Cms::Fields' | abpLocalization\" [toolbar]=\"true\">\r\n <div class=\"row\" style=\"min-height: calc(100vh - 42px - 54px - 1.25em - 1.25em);\">\r\n <div class=\"col-md-3 mb-2\">\r\n <cms-fields-group (OnGroupClickBack)=\"onGroupClickBack($event)\"></cms-fields-group>\r\n </div>\r\n <div class=\"col-md-9 mb-2\">\r\n <div class=\"card mb-0\">\r\n <div class=\"card-header px-2 py-sm-2 border-bottom\">\r\n <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\r\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" >\r\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\"\r\n (click)=\"list.get()\"><i class=\"fa fa-search\"></i></button>\r\n </div>\r\n </div>\r\n <div class=\"card-body p-0\">\r\n <abp-extensible-table [data]=\"data?.items\" [recordsTotal]=\"data?.totalCount\"\r\n [list]=\"list\">\r\n </abp-extensible-table>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</abp-page>" }]
|
|
1886
|
+
}], ctorParameters: () => [{ type: i1.ListService }, { type: FieldsDataService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.LocalizationService }, { type: i6.Router }, { type: i4.UpdateListService }] });
|
|
1970
1887
|
|
|
1971
|
-
class
|
|
1888
|
+
class FieldsFormConfig {
|
|
1972
1889
|
constructor() {
|
|
1973
1890
|
/**分组id */
|
|
1974
|
-
this.groupId = [''
|
|
1891
|
+
this.groupId = [''];
|
|
1975
1892
|
/**字段名称 Display name of this field */
|
|
1976
1893
|
this.displayName = ['', [Validators.required]];
|
|
1977
1894
|
/**字段唯一名称 Unique Name*/
|
|
@@ -1979,76 +1896,87 @@ class CreateOrUpdateFieldInputBase {
|
|
|
1979
1896
|
/**描述 说明 */
|
|
1980
1897
|
this.description = ['', []];
|
|
1981
1898
|
/**FieldType字段类型 表单控件名称 */
|
|
1982
|
-
this.formControlName = [
|
|
1899
|
+
this.formControlName = ['', [Validators.required]];
|
|
1983
1900
|
/**动态表单配置 */
|
|
1984
1901
|
this.formConfiguration = new FormGroup({});
|
|
1985
1902
|
}
|
|
1986
1903
|
}
|
|
1904
|
+
/**
|
|
1905
|
+
* 字段名称与表单控件名称映射
|
|
1906
|
+
*/
|
|
1907
|
+
// export enum fieldToFormLabelMap{
|
|
1908
|
+
// /**分组id */
|
|
1909
|
+
// groupId = 'Cms::FieldGroup',
|
|
1910
|
+
// displayName = 'AbpDynamicForm::FieldDisplayName',
|
|
1911
|
+
// name = 'AbpDynamicForm::FieldName',
|
|
1912
|
+
// description='Cms::Description',
|
|
1913
|
+
// // Text='AbpDynamicForm::SelectListItemText',
|
|
1914
|
+
// // Value='AbpDynamicForm::SelectListItemValue',
|
|
1915
|
+
// 'Select.Options'="AbpDynamicForm::SelectListItem",
|
|
1916
|
+
// 'Select.Options-Text'="AbpDynamicForm::SelectListItemText",
|
|
1917
|
+
// 'Select.Options-Value'="AbpDynamicForm::SelectListItemValue",
|
|
1918
|
+
// }
|
|
1919
|
+
const fieldToFormLabelMap = {
|
|
1920
|
+
/**分组id */
|
|
1921
|
+
groupId: 'Cms::FieldGroup',
|
|
1922
|
+
displayName: 'AbpDynamicForm::FieldDisplayName',
|
|
1923
|
+
name: 'AbpDynamicForm::FieldName',
|
|
1924
|
+
description: 'Cms::Description',
|
|
1925
|
+
'Select.Options': "AbpDynamicForm::SelectListItem",
|
|
1926
|
+
'Select.Options-Text': "AbpDynamicForm::SelectListItemText",
|
|
1927
|
+
'Select.Options-Value': "AbpDynamicForm::SelectListItemValue",
|
|
1928
|
+
"TableColumns": 'AbpDynamicForm::SelectListItem',
|
|
1929
|
+
"TableColumns-displayName": 'Cms::TableColumnDisplayName',
|
|
1930
|
+
"TableColumns-name": 'Cms::TableColumnName',
|
|
1931
|
+
"TableColumns-formControlName": 'Cms::TableColumnForm',
|
|
1932
|
+
"MatrixBlockTypes": "Cms::MatrixBlockType",
|
|
1933
|
+
"fields": 'Cms::Fields',
|
|
1934
|
+
"MatrixBlockTypes-fields-displayName": 'AbpDynamicForm::FieldDisplayName',
|
|
1935
|
+
};
|
|
1987
1936
|
|
|
1988
1937
|
/* eslint-disable @angular-eslint/component-selector */
|
|
1989
1938
|
class CreateOrEditFieldComponent {
|
|
1990
|
-
constructor(
|
|
1991
|
-
this.
|
|
1992
|
-
this._CmsApiService = _CmsApiService;
|
|
1993
|
-
this._FieldAdminService = _FieldAdminService;
|
|
1939
|
+
constructor(_ToPinyinService, _LocalizationService) {
|
|
1940
|
+
this._ToPinyinService = _ToPinyinService;
|
|
1994
1941
|
this._LocalizationService = _LocalizationService;
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
set Entity(v) {
|
|
2000
|
-
if (v) {
|
|
2001
|
-
this._Entity = v;
|
|
2002
|
-
this.dataLoaded();
|
|
2003
|
-
}
|
|
2004
|
-
}
|
|
2005
|
-
get formControlName() {
|
|
2006
|
-
return this._Entity.get('formControlName');
|
|
1942
|
+
/**字段分组列表 */
|
|
1943
|
+
this.getfieldGroupsList = [];
|
|
1944
|
+
/**表单控件列表 */
|
|
1945
|
+
this.fromControlList = [];
|
|
2007
1946
|
}
|
|
2008
1947
|
set selected(v) {
|
|
2009
|
-
|
|
2010
|
-
this._selected = v || '';
|
|
2011
|
-
this._selected_copy = v;
|
|
2012
|
-
}
|
|
1948
|
+
this._selected = v;
|
|
2013
1949
|
}
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
this.
|
|
2025
|
-
validators: Validators.required,
|
|
2026
|
-
asyncValidators: [this.repetitionAsyncValidator()],
|
|
2027
|
-
updateOn: 'change',
|
|
2028
|
-
}));
|
|
2029
|
-
setTimeout(() => {
|
|
2030
|
-
// this.submitclick.nativeElement.click();
|
|
2031
|
-
}, 0);
|
|
1950
|
+
set form(v) {
|
|
1951
|
+
this.formEntity = v;
|
|
1952
|
+
}
|
|
1953
|
+
async ngAfterContentInit() {
|
|
1954
|
+
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
1955
|
+
//Add 'implements AfterContentInit' to the class.
|
|
1956
|
+
this.getfieldGroupsList = await this.service.getfieldGroups();
|
|
1957
|
+
this.fromControlList = await this.service.getControlsfieldTypes();
|
|
1958
|
+
this.nameInput.addAsyncValidators([this.repetitionAsyncValidator()]);
|
|
1959
|
+
if (!this.formControlNameInput.value && this.fromControlList.length > 0) {
|
|
1960
|
+
this.formControlNameInput.patchValue(this.fromControlList[0].name);
|
|
2032
1961
|
}
|
|
1962
|
+
this.submitclick.nativeElement.click();
|
|
2033
1963
|
}
|
|
2034
|
-
/**name表单控件 */
|
|
2035
1964
|
get nameInput() {
|
|
2036
|
-
return this.
|
|
1965
|
+
return this.formEntity?.get('name');
|
|
2037
1966
|
}
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
this.nameInput.patchValue(value);
|
|
1967
|
+
get formControlNameInput() {
|
|
1968
|
+
return this.formEntity?.get('formControlName');
|
|
2041
1969
|
}
|
|
2042
1970
|
/**字段标签input失去标点生成字段名字 */
|
|
2043
1971
|
disPlayNameInputBlur(event) {
|
|
2044
1972
|
const value = event.target.value;
|
|
2045
|
-
const pinyin = this.
|
|
1973
|
+
const pinyin = this._ToPinyinService.get(value);
|
|
2046
1974
|
const nameInput = this.nameInput;
|
|
2047
1975
|
if (nameInput.value)
|
|
2048
1976
|
return;
|
|
2049
1977
|
nameInput.patchValue(pinyin);
|
|
2050
1978
|
}
|
|
2051
|
-
|
|
1979
|
+
/**异步验证,验证别名 */
|
|
2052
1980
|
repetitionAsyncValidator() {
|
|
2053
1981
|
return (ctrl) => {
|
|
2054
1982
|
return new Promise(resolve => {
|
|
@@ -2056,7 +1984,7 @@ class CreateOrEditFieldComponent {
|
|
|
2056
1984
|
resolve(null);
|
|
2057
1985
|
return;
|
|
2058
1986
|
}
|
|
2059
|
-
this.
|
|
1987
|
+
this.service.nameExists(ctrl.value).subscribe(res => {
|
|
2060
1988
|
if (res) {
|
|
2061
1989
|
resolve({
|
|
2062
1990
|
repetition: this._LocalizationService.instant(`Cms::FieldName{0}AlreadyExist`, ctrl.value),
|
|
@@ -2069,88 +1997,92 @@ class CreateOrEditFieldComponent {
|
|
|
2069
1997
|
});
|
|
2070
1998
|
};
|
|
2071
1999
|
}
|
|
2072
|
-
|
|
2073
|
-
}
|
|
2074
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditFieldComponent, deps: [{ token: FieldAbstractsService }, { token: CmsApiService }, { token: FieldAdminService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2075
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditFieldComponent, selector: "cms-create-or-edit-field", inputs: { Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<div [formGroup]=\"_Entity\" >\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"groupId\">{{'Cms::FieldGroup' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"groupId\">\n <option value=\"\">{{'Cms::OptionalGrouping' | abpLocalization}}</option>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <option [value]=\"item.id\">{{item.name}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"displayName\">{{'AbpDynamicForm::FieldDisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" required (blur)=\"disPlayNameInputBlur($event)\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"name\">{{'AbpDynamicForm::FieldName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" (input)=\"nameInputBlur($event)\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n <small class=\"form-text text-muted d-block \">{{'AbpDynamicForm::FieldNameHelpText' | abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"formControlName\">{{'Cms::FieldType' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\" (change)=\"formControlNameChange($event)\">\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fromControlList;let i =index\">\n <option [value]=\"item.name\">{{item.displayName|abpLocalization}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"_Entity.value.formControlName&&_Entity\"> \n <df-dynamic [type]=\"_Entity.value.formControlName\" [selected]=\"_selected\" [entity]=\"_Entity\" ></df-dynamic>\n </ng-container>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i5.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i5.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i15.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "culture", "parentFiledName", "fields", "entity"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2000
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditFieldComponent, deps: [{ token: i4.ToPinyinService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2001
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: CreateOrEditFieldComponent, selector: "cms-create-or-edit-field", inputs: { selected: "selected", service: "service", form: "form" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"card\">\r\n <div class=\"card-body\">\r\n <form [formGroup]=\"formEntity\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"groupId\">{{'Cms::FieldGroup' | abpLocalization}}</label>\r\n <select class=\"form-select\" formControlName=\"groupId\">\r\n <option value=\"\">{{'Cms::OptionalGrouping' | abpLocalization}}</option>\r\n <ng-container *ngFor=\"let item of getfieldGroupsList\">\r\n <option [value]=\"item.id\">{{item.name}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"displayName\">*{{'AbpDynamicForm::FieldDisplayName' |\r\n abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" required\r\n (blur)=\"disPlayNameInputBlur($event)\">\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"name\">*{{'AbpDynamicForm::FieldName' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" required>\r\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\r\n {{nameInput.errors?.repetition}}\r\n </div>\r\n <small class=\"form-text text-muted d-block \">{{'AbpDynamicForm::FieldNameHelpText' |\r\n abpLocalization}}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"formControlName\">*{{'Cms::FieldType' | abpLocalization}}</label>\r\n <select class=\"form-select\" formControlName=\"formControlName\">\r\n <ng-container *ngFor=\"let item of fromControlList;let i =index\">\r\n <option [value]=\"item.name\">{{item.displayName|abpLocalization}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n @if(formControlNameInput.value&&formEntity){\r\n <df-dynamic-config [formGroup]=\"formEntity\" [selected]=\"_selected\" [type]=\"formControlNameInput.value\"\r\n [form]=\"formEntity\"></df-dynamic-config>\r\n }\r\n <button form-type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n </form>\r\n </div>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i6$2.DynamicConfigComponent, selector: "df-dynamic-config", inputs: ["type", "selected", "form"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2076
2002
|
}
|
|
2077
2003
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditFieldComponent, decorators: [{
|
|
2078
2004
|
type: Component,
|
|
2079
|
-
args: [{ selector: 'cms-create-or-edit-field', template: "<div
|
|
2080
|
-
}], ctorParameters: () => [{ type:
|
|
2081
|
-
type: ViewChild,
|
|
2082
|
-
args: ['submitclick', { static: true }]
|
|
2083
|
-
}], Entity: [{
|
|
2005
|
+
args: [{ selector: 'cms-create-or-edit-field', template: "<div class=\"card\">\r\n <div class=\"card-body\">\r\n <form [formGroup]=\"formEntity\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"groupId\">{{'Cms::FieldGroup' | abpLocalization}}</label>\r\n <select class=\"form-select\" formControlName=\"groupId\">\r\n <option value=\"\">{{'Cms::OptionalGrouping' | abpLocalization}}</option>\r\n <ng-container *ngFor=\"let item of getfieldGroupsList\">\r\n <option [value]=\"item.id\">{{item.name}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"displayName\">*{{'AbpDynamicForm::FieldDisplayName' |\r\n abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" required\r\n (blur)=\"disPlayNameInputBlur($event)\">\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"name\">*{{'AbpDynamicForm::FieldName' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" required>\r\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\r\n {{nameInput.errors?.repetition}}\r\n </div>\r\n <small class=\"form-text text-muted d-block \">{{'AbpDynamicForm::FieldNameHelpText' |\r\n abpLocalization}}</small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"formControlName\">*{{'Cms::FieldType' | abpLocalization}}</label>\r\n <select class=\"form-select\" formControlName=\"formControlName\">\r\n <ng-container *ngFor=\"let item of fromControlList;let i =index\">\r\n <option [value]=\"item.name\">{{item.displayName|abpLocalization}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n @if(formControlNameInput.value&&formEntity){\r\n <df-dynamic-config [formGroup]=\"formEntity\" [selected]=\"_selected\" [type]=\"formControlNameInput.value\"\r\n [form]=\"formEntity\"></df-dynamic-config>\r\n }\r\n <button form-type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n </form>\r\n </div>\r\n</div>" }]
|
|
2006
|
+
}], ctorParameters: () => [{ type: i4.ToPinyinService }, { type: i1.LocalizationService }], propDecorators: { selected: [{
|
|
2084
2007
|
type: Input
|
|
2085
|
-
}],
|
|
2008
|
+
}], service: [{
|
|
2086
2009
|
type: Input
|
|
2010
|
+
}], form: [{
|
|
2011
|
+
type: Input
|
|
2012
|
+
}], submitclick: [{
|
|
2013
|
+
type: ViewChild,
|
|
2014
|
+
args: ['submitclick', { static: true }]
|
|
2087
2015
|
}] } });
|
|
2088
2016
|
|
|
2017
|
+
/* eslint-disable @typescript-eslint/no-inferrable-types */
|
|
2089
2018
|
/* eslint-disable @angular-eslint/component-selector */
|
|
2090
2019
|
class CreateFieldComponent {
|
|
2091
|
-
constructor(fb,
|
|
2020
|
+
constructor(fb, _service, toaster, _LocationBackService, _LocalizationService, route, _UpdateListService, _DigniteValidatorsService) {
|
|
2092
2021
|
this.fb = fb;
|
|
2093
|
-
this.
|
|
2022
|
+
this._service = _service;
|
|
2094
2023
|
this.toaster = toaster;
|
|
2095
|
-
this.
|
|
2024
|
+
this._LocationBackService = _LocationBackService;
|
|
2096
2025
|
this._LocalizationService = _LocalizationService;
|
|
2097
|
-
this.
|
|
2098
|
-
this.
|
|
2099
|
-
this.
|
|
2100
|
-
|
|
2101
|
-
this.
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
* title:true,
|
|
2105
|
-
* }
|
|
2106
|
-
*/
|
|
2107
|
-
this.formValidation = '';
|
|
2108
|
-
}
|
|
2109
|
-
get groupIdInput() {
|
|
2110
|
-
return this.newEntity?.get('groupId');
|
|
2026
|
+
this.route = route;
|
|
2027
|
+
this._UpdateListService = _UpdateListService;
|
|
2028
|
+
this._DigniteValidatorsService = _DigniteValidatorsService;
|
|
2029
|
+
/**表单是否触发验证 */
|
|
2030
|
+
this.formValidation = false;
|
|
2031
|
+
/**是否提交 */
|
|
2032
|
+
this.isSubmitted = false;
|
|
2111
2033
|
}
|
|
2112
|
-
ngOnInit() {
|
|
2034
|
+
async ngOnInit() {
|
|
2113
2035
|
//Called after the constructor, initializing input properties, and the first call to ngOnChanges.
|
|
2114
2036
|
//Add 'implements OnInit' to the class.
|
|
2115
2037
|
const { groupId } = this.route.snapshot.queryParams;
|
|
2116
|
-
this.
|
|
2038
|
+
this.formEntity = this.fb.group(new FieldsFormConfig());
|
|
2117
2039
|
if (groupId) {
|
|
2118
2040
|
this.groupIdInput.patchValue(groupId);
|
|
2119
2041
|
}
|
|
2120
2042
|
}
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
this.
|
|
2043
|
+
/**字段分组控件 */
|
|
2044
|
+
get groupIdInput() {
|
|
2045
|
+
return this.formEntity?.get('groupId');
|
|
2124
2046
|
}
|
|
2125
|
-
|
|
2047
|
+
/**提交表单 */
|
|
2126
2048
|
save() {
|
|
2127
|
-
this.
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2049
|
+
console.log(this.formEntity.value, '提交表单', this.formEntity);
|
|
2050
|
+
this.formValidation = true;
|
|
2051
|
+
if (!this.formEntity.valid) {
|
|
2052
|
+
this._DigniteValidatorsService.getErrorMessage({
|
|
2053
|
+
form: this.formEntity,
|
|
2054
|
+
map: fieldToFormLabelMap
|
|
2055
|
+
});
|
|
2132
2056
|
return;
|
|
2133
|
-
|
|
2134
|
-
if (
|
|
2057
|
+
}
|
|
2058
|
+
if (this.isSubmitted)
|
|
2135
2059
|
return;
|
|
2136
|
-
this.
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
this.
|
|
2140
|
-
}))
|
|
2141
|
-
.subscribe(res => {
|
|
2060
|
+
this.isSubmitted = true;
|
|
2061
|
+
const input = this.formEntity.value;
|
|
2062
|
+
this._service.createField(input).subscribe(() => {
|
|
2063
|
+
this.reset();
|
|
2142
2064
|
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
2143
|
-
this.
|
|
2065
|
+
// this._LocationBackService.back();
|
|
2066
|
+
this._LocationBackService.backTo({
|
|
2067
|
+
url: `/cms/admin/fields`,
|
|
2068
|
+
replenish: '/create',
|
|
2069
|
+
});
|
|
2144
2070
|
this._UpdateListService.updateList();
|
|
2071
|
+
}, () => {
|
|
2072
|
+
this.reset();
|
|
2145
2073
|
});
|
|
2146
2074
|
}
|
|
2147
|
-
|
|
2075
|
+
/**重置表单 */
|
|
2076
|
+
reset() {
|
|
2077
|
+
this.isSubmitted = false;
|
|
2078
|
+
}
|
|
2079
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateFieldComponent, deps: [{ token: i1$1.FormBuilder }, { token: FieldsDataService }, { token: i3.ToasterService }, { token: i4.LocationBackService }, { token: i1.LocalizationService }, { token: i6.ActivatedRoute }, { token: i4.UpdateListService }, { token: i4.DigniteValidatorsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2148
2080
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateFieldComponent, selector: "cms-create-field", providers: [
|
|
2149
2081
|
{
|
|
2150
2082
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2151
2083
|
useValue: ECmsComponent.FieldsCreate,
|
|
2152
2084
|
},
|
|
2153
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\n
|
|
2085
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\r\n <form [formGroup]=\"formEntity\" [class.was-validated]=\"formValidation\" (submit)=\"save()\">\r\n <button form-type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n <cms-create-or-edit-field [service]=\"_service\" [form]=\"formEntity\"></cms-create-or-edit-field>\r\n </form>\r\n</abp-page>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditFieldComponent, selector: "cms-create-or-edit-field", inputs: ["selected", "service", "form"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2154
2086
|
}
|
|
2155
2087
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateFieldComponent, decorators: [{
|
|
2156
2088
|
type: Component,
|
|
@@ -2159,89 +2091,151 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
2159
2091
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2160
2092
|
useValue: ECmsComponent.FieldsCreate,
|
|
2161
2093
|
},
|
|
2162
|
-
], template: "<abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\n
|
|
2163
|
-
}], ctorParameters: () => [{ type: i1$
|
|
2094
|
+
], template: "<abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\r\n <form [formGroup]=\"formEntity\" [class.was-validated]=\"formValidation\" (submit)=\"save()\">\r\n <button form-type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n <cms-create-or-edit-field [service]=\"_service\" [form]=\"formEntity\"></cms-create-or-edit-field>\r\n </form>\r\n</abp-page>" }]
|
|
2095
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: FieldsDataService }, { type: i3.ToasterService }, { type: i4.LocationBackService }, { type: i1.LocalizationService }, { type: i6.ActivatedRoute }, { type: i4.UpdateListService }, { type: i4.DigniteValidatorsService }], propDecorators: { submitclick: [{
|
|
2164
2096
|
type: ViewChild,
|
|
2165
2097
|
args: ['submitclick', { static: true }]
|
|
2166
2098
|
}] } });
|
|
2167
2099
|
|
|
2100
|
+
/* eslint-disable @angular-eslint/component-selector */
|
|
2168
2101
|
class EditFieldComponent {
|
|
2169
|
-
constructor(fb,
|
|
2102
|
+
constructor(fb, _service, toaster, _LocationBackService, _LocalizationService, route, _UpdateListService, _DigniteValidatorsService) {
|
|
2170
2103
|
this.fb = fb;
|
|
2171
|
-
this.
|
|
2172
|
-
this._FieldAdminService = _FieldAdminService;
|
|
2173
|
-
this.route = route;
|
|
2104
|
+
this._service = _service;
|
|
2174
2105
|
this.toaster = toaster;
|
|
2175
|
-
this.
|
|
2106
|
+
this._LocationBackService = _LocationBackService;
|
|
2176
2107
|
this._LocalizationService = _LocalizationService;
|
|
2177
|
-
this.
|
|
2178
|
-
this._UpdateListService =
|
|
2179
|
-
this.
|
|
2180
|
-
|
|
2181
|
-
this.
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
* }
|
|
2187
|
-
*/
|
|
2188
|
-
this.formValidation = '';
|
|
2108
|
+
this.route = route;
|
|
2109
|
+
this._UpdateListService = _UpdateListService;
|
|
2110
|
+
this._DigniteValidatorsService = _DigniteValidatorsService;
|
|
2111
|
+
/**字段详情 */
|
|
2112
|
+
this.fieldDetail = '';
|
|
2113
|
+
/**表单是否触发验证 */
|
|
2114
|
+
this.formValidation = false;
|
|
2115
|
+
/**是否提交 */
|
|
2116
|
+
this.isSubmitted = false;
|
|
2189
2117
|
}
|
|
2190
2118
|
async ngOnInit() {
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2119
|
+
//Called after the constructor, initializing input properties, and the first call to ngOnChanges.
|
|
2120
|
+
//Add 'implements OnInit' to the class.
|
|
2121
|
+
const { id } = this.route.snapshot.params;
|
|
2122
|
+
this.formEntity = this.fb.group(new FieldsFormConfig());
|
|
2123
|
+
await this.getFieldDetails(id);
|
|
2124
|
+
if (this.fieldDetail) {
|
|
2125
|
+
this.formEntity.patchValue({
|
|
2126
|
+
...this.fieldDetail,
|
|
2127
|
+
groupId: this.fieldDetail.groupId || '',
|
|
2199
2128
|
});
|
|
2200
2129
|
}
|
|
2201
2130
|
}
|
|
2202
2131
|
/**获取字段详情 */
|
|
2203
|
-
|
|
2132
|
+
getFieldDetails(id) {
|
|
2204
2133
|
return new Promise((resolve, reject) => {
|
|
2205
|
-
this.
|
|
2206
|
-
|
|
2207
|
-
this.fieldDetails = res;
|
|
2134
|
+
this._service.getFieldDetail(id).subscribe(res => {
|
|
2135
|
+
this.fieldDetail = res;
|
|
2208
2136
|
resolve(res);
|
|
2137
|
+
}, err => {
|
|
2138
|
+
resolve('');
|
|
2209
2139
|
});
|
|
2210
2140
|
});
|
|
2211
2141
|
}
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
this.
|
|
2142
|
+
/**字段分组控件 */
|
|
2143
|
+
get groupIdInput() {
|
|
2144
|
+
return this.formEntity?.get('groupId');
|
|
2215
2145
|
}
|
|
2216
|
-
|
|
2146
|
+
// 获取错误信息
|
|
2147
|
+
getErrorMessage(error, map) {
|
|
2148
|
+
// 获取本地化标签
|
|
2149
|
+
const getLocalizedLabel = (path) => {
|
|
2150
|
+
return this._LocalizationService.instant(map[path]);
|
|
2151
|
+
};
|
|
2152
|
+
// 格式化数组索引
|
|
2153
|
+
const formatArrayIndex = (item) => {
|
|
2154
|
+
const regex = /\[[0-9]+\]/g;
|
|
2155
|
+
const indexMatch = item.match(regex);
|
|
2156
|
+
const [basePath] = item.split(regex);
|
|
2157
|
+
return getLocalizedLabel(basePath) + (indexMatch ? indexMatch[0] : '');
|
|
2158
|
+
};
|
|
2159
|
+
let errorMessage = '';
|
|
2160
|
+
// 如果错误路径包含formConfiguration
|
|
2161
|
+
if (error.path.includes('formConfiguration')) {
|
|
2162
|
+
// 将错误路径中的formConfiguration-替换掉,并按-分割
|
|
2163
|
+
const pathParts = error.path.replaceAll('formConfiguration-', '').split('-');
|
|
2164
|
+
// 对分割后的路径进行格式化
|
|
2165
|
+
const formattedParts = pathParts.map((part, index) => {
|
|
2166
|
+
// 如果是最后一个路径且不是第一个路径
|
|
2167
|
+
if (index === pathParts.length - 1 && index > 0) {
|
|
2168
|
+
// 获取前一个路径
|
|
2169
|
+
const prevPart = pathParts[index - 1];
|
|
2170
|
+
// 将前一个路径按数组索引分割
|
|
2171
|
+
const [prevBasePath] = prevPart.split(/\[[0-9]+\]/);
|
|
2172
|
+
// 将当前路径按数组索引分割
|
|
2173
|
+
const [currentBasePath] = part.split(/\[[0-9]+\]/);
|
|
2174
|
+
// 组合前一个路径和当前路径
|
|
2175
|
+
const combinedKey = `${prevBasePath}-${currentBasePath}`;
|
|
2176
|
+
// 如果map中存在组合后的路径,则返回本地化标签,否则返回格式化后的数组索引
|
|
2177
|
+
return map[combinedKey]
|
|
2178
|
+
? getLocalizedLabel(combinedKey)
|
|
2179
|
+
: formatArrayIndex(part);
|
|
2180
|
+
}
|
|
2181
|
+
// 否则返回格式化后的数组索引
|
|
2182
|
+
return formatArrayIndex(part);
|
|
2183
|
+
});
|
|
2184
|
+
console.log(formattedParts, 'formattedParts', pathParts);
|
|
2185
|
+
// 将格式化后的路径用-连接起来
|
|
2186
|
+
errorMessage = formattedParts.join('-');
|
|
2187
|
+
}
|
|
2188
|
+
else {
|
|
2189
|
+
// 否则返回本地化标签
|
|
2190
|
+
errorMessage = getLocalizedLabel(error.path);
|
|
2191
|
+
}
|
|
2192
|
+
// 添加错误信息
|
|
2193
|
+
errorMessage = `${errorMessage} ${this._LocalizationService.instant('AbpValidation::ThisFieldIsNotValid.')}`;
|
|
2194
|
+
// 显示警告信息
|
|
2195
|
+
this.toaster.warn(errorMessage);
|
|
2196
|
+
return errorMessage;
|
|
2197
|
+
}
|
|
2198
|
+
/**提交表单 */
|
|
2217
2199
|
save() {
|
|
2218
|
-
this.
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2200
|
+
console.log(this.formEntity.value, '提交表单', this.formEntity);
|
|
2201
|
+
this.formValidation = true;
|
|
2202
|
+
if (!this.formEntity.valid) {
|
|
2203
|
+
this._DigniteValidatorsService.getErrorMessage({
|
|
2204
|
+
form: this.formEntity,
|
|
2205
|
+
map: fieldToFormLabelMap
|
|
2206
|
+
});
|
|
2222
2207
|
return;
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
if (!this.newEntity.valid)
|
|
2208
|
+
}
|
|
2209
|
+
if (this.isSubmitted)
|
|
2226
2210
|
return;
|
|
2227
|
-
this.
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2211
|
+
this.isSubmitted = true;
|
|
2212
|
+
const input = this.formEntity.value;
|
|
2213
|
+
this._service.updateField(this.fieldDetail.id, input).subscribe({
|
|
2214
|
+
next: () => {
|
|
2215
|
+
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
2216
|
+
// this._LocationBackService.back();
|
|
2217
|
+
this._LocationBackService.backTo({
|
|
2218
|
+
url: `/cms/admin/fields`,
|
|
2219
|
+
replenish: '/edit',
|
|
2220
|
+
});
|
|
2221
|
+
this._UpdateListService.updateList();
|
|
2222
|
+
},
|
|
2223
|
+
complete: () => {
|
|
2224
|
+
this.reset();
|
|
2225
|
+
},
|
|
2236
2226
|
});
|
|
2237
2227
|
}
|
|
2238
|
-
|
|
2239
|
-
|
|
2228
|
+
/**重置表单 */
|
|
2229
|
+
reset() {
|
|
2230
|
+
this.isSubmitted = false;
|
|
2231
|
+
}
|
|
2232
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EditFieldComponent, deps: [{ token: i1$1.FormBuilder }, { token: FieldsDataService }, { token: i3.ToasterService }, { token: i4.LocationBackService }, { token: i1.LocalizationService }, { token: i6.ActivatedRoute }, { token: i4.UpdateListService }, { token: i4.DigniteValidatorsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2233
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: EditFieldComponent, selector: "cms-edit-field", providers: [
|
|
2240
2234
|
{
|
|
2241
2235
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2242
2236
|
useValue: ECmsComponent.FieldsEdit,
|
|
2243
2237
|
},
|
|
2244
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<
|
|
2238
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::EditField' | abpLocalization\" [toolbar]=\"true\">\r\n <form [formGroup]=\"formEntity\" [class.was-validated]=\"formValidation\" (submit)=\"save()\">\r\n <button form-type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n @if(fieldDetail){\r\n <cms-create-or-edit-field [selected]=\"fieldDetail\" [service]=\"_service\" [form]=\"formEntity\"></cms-create-or-edit-field>\r\n }\r\n </form>\r\n</abp-page>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditFieldComponent, selector: "cms-create-or-edit-field", inputs: ["selected", "service", "form"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2245
2239
|
}
|
|
2246
2240
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EditFieldComponent, decorators: [{
|
|
2247
2241
|
type: Component,
|
|
@@ -2250,12 +2244,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
2250
2244
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2251
2245
|
useValue: ECmsComponent.FieldsEdit,
|
|
2252
2246
|
},
|
|
2253
|
-
], template: "<
|
|
2254
|
-
}], ctorParameters: () => [{ type: i1$
|
|
2247
|
+
], template: "<abp-page [title]=\"'Cms::EditField' | abpLocalization\" [toolbar]=\"true\">\r\n <form [formGroup]=\"formEntity\" [class.was-validated]=\"formValidation\" (submit)=\"save()\">\r\n <button form-type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n @if(fieldDetail){\r\n <cms-create-or-edit-field [selected]=\"fieldDetail\" [service]=\"_service\" [form]=\"formEntity\"></cms-create-or-edit-field>\r\n }\r\n </form>\r\n</abp-page>" }]
|
|
2248
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: FieldsDataService }, { type: i3.ToasterService }, { type: i4.LocationBackService }, { type: i1.LocalizationService }, { type: i6.ActivatedRoute }, { type: i4.UpdateListService }, { type: i4.DigniteValidatorsService }], propDecorators: { submitclick: [{
|
|
2255
2249
|
type: ViewChild,
|
|
2256
2250
|
args: ['submitclick', { static: true }]
|
|
2257
2251
|
}] } });
|
|
2258
2252
|
|
|
2253
|
+
// export * from './create-or-update-field-input-base'
|
|
2254
|
+
|
|
2259
2255
|
class CreateOrUpdateSectionsInputBase {
|
|
2260
2256
|
constructor() {
|
|
2261
2257
|
this.id = [''];
|
|
@@ -2279,13 +2275,14 @@ class CreateOrUpdateSectionsInputBase {
|
|
|
2279
2275
|
|
|
2280
2276
|
/* eslint-disable @angular-eslint/component-selector */
|
|
2281
2277
|
class CreateOrEditSectionsModalComponent {
|
|
2282
|
-
constructor() {
|
|
2278
|
+
constructor(toPinyinService) {
|
|
2279
|
+
this.toPinyinService = toPinyinService;
|
|
2283
2280
|
this._LocalizationService = inject(LocalizationService);
|
|
2284
2281
|
this.toaster = inject(ToasterService);
|
|
2285
2282
|
this._ValidatorsService = inject(ValidatorsService);
|
|
2286
2283
|
this._UpdateListService = inject(UpdateListService);
|
|
2287
2284
|
this._SectionAdminService = inject(SectionAdminService);
|
|
2288
|
-
|
|
2285
|
+
/**重置表单 */
|
|
2289
2286
|
this._SectionType = SectionType;
|
|
2290
2287
|
this._sectionTypeOptions = sectionTypeOptions;
|
|
2291
2288
|
/**表单验证状态 */
|
|
@@ -2356,7 +2353,7 @@ class CreateOrEditSectionsModalComponent {
|
|
|
2356
2353
|
.pipe(finalize(() => {
|
|
2357
2354
|
this.reset();
|
|
2358
2355
|
}))
|
|
2359
|
-
.subscribe(
|
|
2356
|
+
.subscribe(() => {
|
|
2360
2357
|
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
2361
2358
|
this.visibleChange.emit(false);
|
|
2362
2359
|
this.formValidation = '';
|
|
@@ -2368,7 +2365,7 @@ class CreateOrEditSectionsModalComponent {
|
|
|
2368
2365
|
.pipe(finalize(() => {
|
|
2369
2366
|
this.reset();
|
|
2370
2367
|
}))
|
|
2371
|
-
.subscribe(
|
|
2368
|
+
.subscribe(() => {
|
|
2372
2369
|
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
2373
2370
|
this.visibleChange.emit(false);
|
|
2374
2371
|
this.formValidation = '';
|
|
@@ -2380,7 +2377,7 @@ class CreateOrEditSectionsModalComponent {
|
|
|
2380
2377
|
}
|
|
2381
2378
|
disPlayNameInputBlur(event) {
|
|
2382
2379
|
const value = event.target.value;
|
|
2383
|
-
const pinyin = this.
|
|
2380
|
+
const pinyin = this.toPinyinService.get(value);
|
|
2384
2381
|
const nameInput = this.nameInput;
|
|
2385
2382
|
const routeInput = this.routeInput;
|
|
2386
2383
|
const templateInput = this.templateInput;
|
|
@@ -2458,13 +2455,13 @@ class CreateOrEditSectionsModalComponent {
|
|
|
2458
2455
|
});
|
|
2459
2456
|
};
|
|
2460
2457
|
}
|
|
2461
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditSectionsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2462
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditSectionsModalComponent, selector: "cms-create-or-edit-sections-modal", inputs: { visible: "visible", formEntity: "formEntity" }, outputs: { visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "ModalFormSubmit", first: true, predicate: ["ModalFormSubmit"], descendants: true }], ngImport: i0, template: "<abp-modal [(visible)]=\"ModalOpen\" [busy]=\"ModalBusy\" (visibleChange)=\"ModalVisibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ng-template #loaderRef>\r\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\r\n </ng-template>\r\n <ng-container *ngIf=\"ModalForm; else loaderRef\">\r\n <form class=\"sites-modal-form\" [formGroup]=\"ModalForm\" \r\n [class]=\"{'was-validated':formValidation}\" (submit)=\"save()\">\r\n <button type=\"submit\" #ModalFormSubmit style=\"display: none\"></button>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</label>\r\n <div>\r\n <ng-container *ngFor=\"let item of _sectionTypeOptions;let i =index\">\r\n <div class=\"form-check form-check-inline\">\r\n <input class=\"form-check-input\" type=\"radio\" [value]=\"item.value\"\r\n (change)=\"radiochange()\" formControlName=\"type\" id=\"flexRadioDefault{{i}}\">\r\n <label class=\"form-check-label\" for=\"flexRadioDefault{{i}}\">\r\n {{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}\r\n </label>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\r\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\r\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\r\n {{nameInput.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::Route' | abpLocalization}} </label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"route\" placeholder=\"\" />\r\n <div class=\"text-danger invalid-feedback\" *ngIf=\"routeInput.errors?.repetition\">\r\n {{routeInput.errors?.repetition}}\r\n </div>\r\n <small class=\"form-text text-muted d-block\">\r\n {{'Cms::RouteTips' | abpLocalization}}<br>\r\n blog<br>\r\n {{'blog/{slug}'}}<br>\r\n {{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}\r\n </small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::Template' | abpLocalization}} </label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"template\" placeholder=\"\" />\r\n <small class=\"form-text text-muted d-block\">\r\n {{\"Cms::TemplateTips\" | abpLocalization}}\r\n </small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-check form-check-inline\">\r\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isDefault\"\r\n id=\"isDefault\" />\r\n <label class=\"form-check-label\" for=\"isDefault\"> {{'Cms::Default' | abpLocalization}} </label>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-check form-check-inline\">\r\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\r\n id=\"isActive\" />\r\n <label class=\"form-check-label\" for=\"isActive\"> {{'Cms::IsActive' | abpLocalization}}</label>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\r\n <abp-button iconClass=\"fa fa-check\" type=\"button\" [loading]=\"ModalBusy\" [disabled]=\"ModalBusy\"\r\n (click)=\"ModalFormSubmit?.nativeElement?.click()\">{{'AbpUi::Save'|abpLocalization}}</abp-button>\r\n </ng-template>\r\n</abp-modal>", styles: [""], dependencies: [{ kind: "directive", type:
|
|
2458
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditSectionsModalComponent, deps: [{ token: i4.ToPinyinService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2459
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditSectionsModalComponent, selector: "cms-create-or-edit-sections-modal", inputs: { visible: "visible", formEntity: "formEntity" }, outputs: { visibleChange: "visibleChange" }, viewQueries: [{ propertyName: "ModalFormSubmit", first: true, predicate: ["ModalFormSubmit"], descendants: true }], ngImport: i0, template: "<abp-modal [(visible)]=\"ModalOpen\" [busy]=\"ModalBusy\" (visibleChange)=\"ModalVisibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ng-template #loaderRef>\r\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\r\n </ng-template>\r\n <ng-container *ngIf=\"ModalForm; else loaderRef\">\r\n <form class=\"sites-modal-form\" [formGroup]=\"ModalForm\" \r\n [class]=\"{'was-validated':formValidation}\" (submit)=\"save()\">\r\n <button type=\"submit\" #ModalFormSubmit style=\"display: none\"></button>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</label>\r\n <div>\r\n <ng-container *ngFor=\"let item of _sectionTypeOptions;let i =index\">\r\n <div class=\"form-check form-check-inline\">\r\n <input class=\"form-check-input\" type=\"radio\" [value]=\"item.value\"\r\n (change)=\"radiochange()\" formControlName=\"type\" id=\"flexRadioDefault{{i}}\">\r\n <label class=\"form-check-label\" for=\"flexRadioDefault{{i}}\">\r\n {{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}\r\n </label>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\r\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\r\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\r\n {{nameInput.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::Route' | abpLocalization}} </label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"route\" placeholder=\"\" />\r\n <div class=\"text-danger invalid-feedback\" *ngIf=\"routeInput.errors?.repetition\">\r\n {{routeInput.errors?.repetition}}\r\n </div>\r\n <small class=\"form-text text-muted d-block\">\r\n {{'Cms::RouteTips' | abpLocalization}}<br>\r\n blog<br>\r\n {{'blog/{slug}'}}<br>\r\n {{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}\r\n </small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::Template' | abpLocalization}} </label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"template\" placeholder=\"\" />\r\n <small class=\"form-text text-muted d-block\">\r\n {{\"Cms::TemplateTips\" | abpLocalization}}\r\n </small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-check form-check-inline\">\r\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isDefault\"\r\n id=\"isDefault\" />\r\n <label class=\"form-check-label\" for=\"isDefault\"> {{'Cms::Default' | abpLocalization}} </label>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-check form-check-inline\">\r\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\r\n id=\"isActive\" />\r\n <label class=\"form-check-label\" for=\"isActive\"> {{'Cms::IsActive' | abpLocalization}}</label>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\r\n <abp-button iconClass=\"fa fa-check\" type=\"button\" [loading]=\"ModalBusy\" [disabled]=\"ModalBusy\"\r\n (click)=\"ModalFormSubmit?.nativeElement?.click()\">{{'AbpUi::Save'|abpLocalization}}</abp-button>\r\n </ng-template>\r\n</abp-modal>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2463
2460
|
}
|
|
2464
2461
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditSectionsModalComponent, decorators: [{
|
|
2465
2462
|
type: Component,
|
|
2466
2463
|
args: [{ selector: 'cms-create-or-edit-sections-modal', template: "<abp-modal [(visible)]=\"ModalOpen\" [busy]=\"ModalBusy\" (visibleChange)=\"ModalVisibleChange($event)\">\r\n <ng-template #abpHeader>\r\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\r\n </ng-template>\r\n <ng-template #abpBody>\r\n <ng-template #loaderRef>\r\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\r\n </ng-template>\r\n <ng-container *ngIf=\"ModalForm; else loaderRef\">\r\n <form class=\"sites-modal-form\" [formGroup]=\"ModalForm\" \r\n [class]=\"{'was-validated':formValidation}\" (submit)=\"save()\">\r\n <button type=\"submit\" #ModalFormSubmit style=\"display: none\"></button>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</label>\r\n <div>\r\n <ng-container *ngFor=\"let item of _sectionTypeOptions;let i =index\">\r\n <div class=\"form-check form-check-inline\">\r\n <input class=\"form-check-input\" type=\"radio\" [value]=\"item.value\"\r\n (change)=\"radiochange()\" formControlName=\"type\" id=\"flexRadioDefault{{i}}\">\r\n <label class=\"form-check-label\" for=\"flexRadioDefault{{i}}\">\r\n {{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}\r\n </label>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\r\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\r\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\r\n {{nameInput.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::Route' | abpLocalization}} </label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"route\" placeholder=\"\" />\r\n <div class=\"text-danger invalid-feedback\" *ngIf=\"routeInput.errors?.repetition\">\r\n {{routeInput.errors?.repetition}}\r\n </div>\r\n <small class=\"form-text text-muted d-block\">\r\n {{'Cms::RouteTips' | abpLocalization}}<br>\r\n blog<br>\r\n {{'blog/{slug}'}}<br>\r\n {{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}\r\n </small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\">{{'Cms::Template' | abpLocalization}} </label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"template\" placeholder=\"\" />\r\n <small class=\"form-text text-muted d-block\">\r\n {{\"Cms::TemplateTips\" | abpLocalization}}\r\n </small>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-check form-check-inline\">\r\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isDefault\"\r\n id=\"isDefault\" />\r\n <label class=\"form-check-label\" for=\"isDefault\"> {{'Cms::Default' | abpLocalization}} </label>\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-check form-check-inline\">\r\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\r\n id=\"isActive\" />\r\n <label class=\"form-check-label\" for=\"isActive\"> {{'Cms::IsActive' | abpLocalization}}</label>\r\n </div>\r\n </div>\r\n </form>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #abpFooter>\r\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\r\n <abp-button iconClass=\"fa fa-check\" type=\"button\" [loading]=\"ModalBusy\" [disabled]=\"ModalBusy\"\r\n (click)=\"ModalFormSubmit?.nativeElement?.click()\">{{'AbpUi::Save'|abpLocalization}}</abp-button>\r\n </ng-template>\r\n</abp-modal>" }]
|
|
2467
|
-
}], propDecorators: { visible: [{
|
|
2464
|
+
}], ctorParameters: () => [{ type: i4.ToPinyinService }], propDecorators: { visible: [{
|
|
2468
2465
|
type: Input
|
|
2469
2466
|
}], formEntity: [{
|
|
2470
2467
|
type: Input
|
|
@@ -2477,7 +2474,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
2477
2474
|
|
|
2478
2475
|
/* eslint-disable @angular-eslint/component-selector */
|
|
2479
2476
|
class SectionsComponent {
|
|
2480
|
-
constructor(list, _SectionAdminService, toaster, confirmation, fb, _EntryTypeAdminService, _LocalizationService
|
|
2477
|
+
constructor(list, _SectionAdminService, toaster, confirmation, fb, _EntryTypeAdminService, _LocalizationService) {
|
|
2481
2478
|
this.list = list;
|
|
2482
2479
|
this._SectionAdminService = _SectionAdminService;
|
|
2483
2480
|
this.toaster = toaster;
|
|
@@ -2485,7 +2482,6 @@ class SectionsComponent {
|
|
|
2485
2482
|
this.fb = fb;
|
|
2486
2483
|
this._EntryTypeAdminService = _EntryTypeAdminService;
|
|
2487
2484
|
this._LocalizationService = _LocalizationService;
|
|
2488
|
-
this._CmsApiService = _CmsApiService;
|
|
2489
2485
|
this._UpdateListService = inject(UpdateListService);
|
|
2490
2486
|
this.siteList = [];
|
|
2491
2487
|
this._SectionType = SectionType;
|
|
@@ -2570,7 +2566,7 @@ class SectionsComponent {
|
|
|
2570
2566
|
}
|
|
2571
2567
|
});
|
|
2572
2568
|
}
|
|
2573
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SectionsComponent, deps: [{ token: i1.ListService }, { token: SectionAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1$
|
|
2569
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SectionsComponent, deps: [{ token: i1.ListService }, { token: SectionAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1$1.FormBuilder }, { token: EntryTypeAdminService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2574
2570
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SectionsComponent, selector: "cms-sections", providers: [
|
|
2575
2571
|
// [Required]
|
|
2576
2572
|
ListService,
|
|
@@ -2582,7 +2578,7 @@ class SectionsComponent {
|
|
|
2582
2578
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2583
2579
|
useValue: ECmsComponent.Sections,
|
|
2584
2580
|
},
|
|
2585
|
-
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Sections' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sections-page\">\n <div class=\"card \" >\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"row align-items-end\">\n <div class=\"mb-3 col-md-3\">\n <label class=\"form-label\">{{'Cms::IsActive' | abpLocalization}}\uFF1A</label>\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.isActive\" (change)=\"siteIdChange()\">\n <option [value]=\"''\" >--</option>\n <option [value]=\"true\">{{'AbpUi::Yes'|abpLocalization}}</option>\n <option [value]=\"false\">{{'AbpUi::No'|abpLocalization}}</option>\n </select>\n </div>\n <div class=\"mb-3 col-md-3\">\n <label class=\"form-label\">{{'AbpUi::Search' | abpLocalization}}\uFF1A</label>\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n </div>\n <div class=\"mb-3 col-md-4\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div> \n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"type\" [width]=\"80\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{('Cms::Enum:SectionType:'+_SectionType[value]) | abpLocalization}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsDefault' | abpLocalization\" prop=\"isDefault\" [width]=\"60\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\" [width]=\"60\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"SiteId\" [width]=\"100\" [sortable]=\"false\"> \n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-link\" ngbDropdownToggle id=\"dropdownBasic1\">\n {{'Cms::EntryType' | abpLocalization}}\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <ng-container *ngFor=\"let item of row.entryTypes;let i =index\">\n <li ngbDropdownItem\n class=\"d-flex align-items-center justify-content-between\" [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/'+item.id+'/edit'\"\n >{{item.displayName}}\n <button class=\"btn btn-light btn-sm p-0\"\n (click.stop)=\"deleteEntryType(item)\"><i class=\"fas fa-trash p-sm-1\"\n style=\"font-size: 12px;\" role=\"button\"></i></button>\n </li>\n </ng-container>\n <li ngbDropdownItem [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/create'\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\" [minWidth]=\"190\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | shortDateTime }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\" [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"editSectionBtn(row)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n</abp-page>\n<cms-create-or-edit-sections-modal (visibleChange)=\"visibleChange($event)\" [formEntity]=\"formEntity\" [visible]=\"isVisibleOpen\"></cms-create-or-edit-sections-modal>\n", styles: ["::ng-deep .sections-page .dignite_page{background:transparent}::ng-deep .sections-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sections-page .card-header input{flex:2 1 auto}::ng-deep .sections-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i11.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i11.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i11.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditSectionsModalComponent, selector: "cms-create-or-edit-sections-modal", inputs: ["visible", "formEntity"], outputs: ["visibleChange"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: i1.ShortDateTimePipe, name: "shortDateTime" }] }); }
|
|
2581
|
+
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Sections' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sections-page\">\n <div class=\"card \" >\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"row align-items-end\">\n <div class=\"mb-3 col-md-3\">\n <label class=\"form-label\">{{'Cms::IsActive' | abpLocalization}}\uFF1A</label>\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.isActive\" (change)=\"siteIdChange()\">\n <option [value]=\"''\" >--</option>\n <option [value]=\"true\">{{'AbpUi::Yes'|abpLocalization}}</option>\n <option [value]=\"false\">{{'AbpUi::No'|abpLocalization}}</option>\n </select>\n </div>\n <div class=\"mb-3 col-md-3\">\n <label class=\"form-label\">{{'AbpUi::Search' | abpLocalization}}\uFF1A</label>\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n </div>\n <div class=\"mb-3 col-md-4\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div> \n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"type\" [width]=\"80\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{('Cms::Enum:SectionType:'+_SectionType[value]) | abpLocalization}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsDefault' | abpLocalization\" prop=\"isDefault\" [width]=\"60\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\" [width]=\"60\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"SiteId\" [width]=\"100\" [sortable]=\"false\"> \n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-link\" ngbDropdownToggle id=\"dropdownBasic1\">\n {{'Cms::EntryType' | abpLocalization}}\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <ng-container *ngFor=\"let item of row.entryTypes;let i =index\">\n <li ngbDropdownItem\n class=\"d-flex align-items-center justify-content-between\" [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/'+item.id+'/edit'\"\n >{{item.displayName}}\n <button class=\"btn btn-light btn-sm p-0\"\n (click.stop)=\"deleteEntryType(item)\"><i class=\"fas fa-trash p-sm-1\"\n style=\"font-size: 12px;\" role=\"button\"></i></button>\n </li>\n </ng-container>\n <li ngbDropdownItem [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/create'\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\" [minWidth]=\"190\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | shortDateTime }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\" [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"editSectionBtn(row)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n</abp-page>\n<cms-create-or-edit-sections-modal (visibleChange)=\"visibleChange($event)\" [formEntity]=\"formEntity\" [visible]=\"isVisibleOpen\"></cms-create-or-edit-sections-modal>\n", styles: ["::ng-deep .sections-page .dignite_page{background:transparent}::ng-deep .sections-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sections-page .card-header input{flex:2 1 auto}::ng-deep .sections-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i11.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i11.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i11.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditSectionsModalComponent, selector: "cms-create-or-edit-sections-modal", inputs: ["visible", "formEntity"], outputs: ["visibleChange"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: i1.ShortDateTimePipe, name: "shortDateTime" }] }); }
|
|
2586
2582
|
}
|
|
2587
2583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SectionsComponent, decorators: [{
|
|
2588
2584
|
type: Component,
|
|
@@ -2598,7 +2594,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
2598
2594
|
useValue: ECmsComponent.Sections,
|
|
2599
2595
|
},
|
|
2600
2596
|
], template: "<abp-page [title]=\"'Cms::Sections' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sections-page\">\n <div class=\"card \" >\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"row align-items-end\">\n <div class=\"mb-3 col-md-3\">\n <label class=\"form-label\">{{'Cms::IsActive' | abpLocalization}}\uFF1A</label>\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.isActive\" (change)=\"siteIdChange()\">\n <option [value]=\"''\" >--</option>\n <option [value]=\"true\">{{'AbpUi::Yes'|abpLocalization}}</option>\n <option [value]=\"false\">{{'AbpUi::No'|abpLocalization}}</option>\n </select>\n </div>\n <div class=\"mb-3 col-md-3\">\n <label class=\"form-label\">{{'AbpUi::Search' | abpLocalization}}\uFF1A</label>\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n </div>\n <div class=\"mb-3 col-md-4\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div> \n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"type\" [width]=\"80\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{('Cms::Enum:SectionType:'+_SectionType[value]) | abpLocalization}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsDefault' | abpLocalization\" prop=\"isDefault\" [width]=\"60\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\" [width]=\"60\" [sortable]=\"false\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"SiteId\" [width]=\"100\" [sortable]=\"false\"> \n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-link\" ngbDropdownToggle id=\"dropdownBasic1\">\n {{'Cms::EntryType' | abpLocalization}}\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <ng-container *ngFor=\"let item of row.entryTypes;let i =index\">\n <li ngbDropdownItem\n class=\"d-flex align-items-center justify-content-between\" [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/'+item.id+'/edit'\"\n >{{item.displayName}}\n <button class=\"btn btn-light btn-sm p-0\"\n (click.stop)=\"deleteEntryType(item)\"><i class=\"fas fa-trash p-sm-1\"\n style=\"font-size: 12px;\" role=\"button\"></i></button>\n </li>\n </ng-container>\n <li ngbDropdownItem [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/create'\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\" [minWidth]=\"190\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | shortDateTime }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\" [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"editSectionBtn(row)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n</abp-page>\n<cms-create-or-edit-sections-modal (visibleChange)=\"visibleChange($event)\" [formEntity]=\"formEntity\" [visible]=\"isVisibleOpen\"></cms-create-or-edit-sections-modal>\n", styles: ["::ng-deep .sections-page .dignite_page{background:transparent}::ng-deep .sections-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sections-page .card-header input{flex:2 1 auto}::ng-deep .sections-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"] }]
|
|
2601
|
-
}], ctorParameters: () => [{ type: i1.ListService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1$
|
|
2597
|
+
}], ctorParameters: () => [{ type: i1.ListService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1$1.FormBuilder }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }] });
|
|
2602
2598
|
|
|
2603
2599
|
class CreateOrEditEntryTypeInputBase {
|
|
2604
2600
|
constructor() {
|
|
@@ -2635,22 +2631,28 @@ class fieldsBase {
|
|
|
2635
2631
|
/* eslint-disable no-prototype-builtins */
|
|
2636
2632
|
/* eslint-disable @angular-eslint/component-selector */
|
|
2637
2633
|
class CreateOrEditComponent {
|
|
2638
|
-
constructor(toaster,
|
|
2634
|
+
constructor(toaster, _LocationBackService, route, _FieldGroupAdminService, _FieldAdminService, _EntryTypeAdminService, _LocalizationService, _FormControlsService, toPinyinService) {
|
|
2639
2635
|
this.toaster = toaster;
|
|
2640
|
-
this.
|
|
2636
|
+
this._LocationBackService = _LocationBackService;
|
|
2641
2637
|
this.route = route;
|
|
2642
2638
|
this._FieldGroupAdminService = _FieldGroupAdminService;
|
|
2643
2639
|
this._FieldAdminService = _FieldAdminService;
|
|
2644
2640
|
this._EntryTypeAdminService = _EntryTypeAdminService;
|
|
2645
2641
|
this._LocalizationService = _LocalizationService;
|
|
2646
|
-
this._CmsApiService = _CmsApiService;
|
|
2647
2642
|
this._FormControlsService = _FormControlsService;
|
|
2643
|
+
this.toPinyinService = toPinyinService;
|
|
2648
2644
|
this.fb = inject(FormBuilder);
|
|
2649
2645
|
this._UpdateListService = inject(UpdateListService);
|
|
2650
2646
|
/**版块id */
|
|
2651
2647
|
this.sectionId = '';
|
|
2652
2648
|
/**条目类型id */
|
|
2653
2649
|
this.entryTypesId = '';
|
|
2650
|
+
/**是否全选 */
|
|
2651
|
+
this.isAllSelect = {
|
|
2652
|
+
isRequired: false,
|
|
2653
|
+
isShowInList: false,
|
|
2654
|
+
isEnableSearch: false
|
|
2655
|
+
};
|
|
2654
2656
|
/**需要查询的动态表单类型 */
|
|
2655
2657
|
this.enableSearchTypeList = [];
|
|
2656
2658
|
/**不需要展示的动态表单类型 */
|
|
@@ -2699,14 +2701,6 @@ class CreateOrEditComponent {
|
|
|
2699
2701
|
//板块id
|
|
2700
2702
|
this.sectionId = sectionId;
|
|
2701
2703
|
this.newEntity = this.fb.group(new CreateOrEditEntryTypeInputBase());
|
|
2702
|
-
//
|
|
2703
|
-
// this.enableSearchTypeList=await this._FormControlsService.getEnableSearchTypeList();
|
|
2704
|
-
// this.disableshowinTypeList= this._FormControlsService.getdisableshowinTypeList();
|
|
2705
|
-
// if (sectionId) {
|
|
2706
|
-
// this.sectionId = sectionId;
|
|
2707
|
-
// this.addControlToFieldTabs();
|
|
2708
|
-
// this.getFieldGroup();
|
|
2709
|
-
// }
|
|
2710
2704
|
//获取条目类型详情
|
|
2711
2705
|
if (this.entryTypesId) {
|
|
2712
2706
|
await this.getEntryTypes();
|
|
@@ -2719,7 +2713,7 @@ class CreateOrEditComponent {
|
|
|
2719
2713
|
/**处理数据 */
|
|
2720
2714
|
processData() {
|
|
2721
2715
|
return new Promise((resolve, rejects) => {
|
|
2722
|
-
const fieldList =
|
|
2716
|
+
const fieldList = structuredClone(this.fieldList);
|
|
2723
2717
|
const res = this.entryTypesSelect;
|
|
2724
2718
|
if (!res) {
|
|
2725
2719
|
this.addControlToFieldTabs();
|
|
@@ -2741,10 +2735,18 @@ class CreateOrEditComponent {
|
|
|
2741
2735
|
this.newEntity?.patchValue(res);
|
|
2742
2736
|
this.navActive = 0;
|
|
2743
2737
|
this.resultSource = res.fieldTabs;
|
|
2738
|
+
this.setAllSelectStauts();
|
|
2739
|
+
console.log(this.isAllSelect, 'this.isAllSelect', res.fieldTabs, this.navActive);
|
|
2744
2740
|
}
|
|
2745
2741
|
resolve(true);
|
|
2746
2742
|
});
|
|
2747
2743
|
}
|
|
2744
|
+
/**设置全选状态 */
|
|
2745
|
+
setAllSelectStauts() {
|
|
2746
|
+
this.isAllSelect.isRequired = this.resultSource[this.navActive].fields.every(eld => eld.required);
|
|
2747
|
+
this.isAllSelect.isShowInList = this.resultSource[this.navActive].fields.every(eld => eld.showInList);
|
|
2748
|
+
this.isAllSelect.isEnableSearch = this.resultSource[this.navActive].fields.every(eld => eld.enableSearch);
|
|
2749
|
+
}
|
|
2748
2750
|
/**给fieldTabs添加新控件 */
|
|
2749
2751
|
addControlToFieldTabs(nameValue = '') {
|
|
2750
2752
|
const newFormGroup = this.fb.group(new fieldTabsBase());
|
|
@@ -2771,12 +2773,7 @@ class CreateOrEditComponent {
|
|
|
2771
2773
|
el.fields = fieldList.filter(els => els.groupId === el.id);
|
|
2772
2774
|
});
|
|
2773
2775
|
this.fieldGroupList = fieldGroupList;
|
|
2774
|
-
this.fieldList =
|
|
2775
|
-
// const entryTypesId = this.entryTypesId;
|
|
2776
|
-
// if (entryTypesId) {
|
|
2777
|
-
// this.entryTypesId = entryTypesId;
|
|
2778
|
-
// this.getEntryTypes();
|
|
2779
|
-
// }
|
|
2776
|
+
this.fieldList = structuredClone(fieldList);
|
|
2780
2777
|
resolve(res);
|
|
2781
2778
|
});
|
|
2782
2779
|
});
|
|
@@ -2789,51 +2786,6 @@ class CreateOrEditComponent {
|
|
|
2789
2786
|
resolve(res);
|
|
2790
2787
|
});
|
|
2791
2788
|
});
|
|
2792
|
-
// // const fieldList: any = this.deepClone(this.fieldList);
|
|
2793
|
-
// this._EntryTypeAdminService.get(this.entryTypesId).subscribe(res => {
|
|
2794
|
-
// // res.fieldTabs.forEach(el => {
|
|
2795
|
-
// // el.fields.forEach((eld: any) => {
|
|
2796
|
-
// // eld.id = eld.fieldId;
|
|
2797
|
-
// // eld.groupId = fieldList.find(elfd => elfd.id == eld.fieldId).groupId;
|
|
2798
|
-
// // this.formRightGroup.push(eld);
|
|
2799
|
-
// // const fieldindex = fieldList.findIndex(elfl => elfl.id == eld.fieldId);
|
|
2800
|
-
// // fieldList.splice(fieldindex, 1);
|
|
2801
|
-
// // });
|
|
2802
|
-
// // });
|
|
2803
|
-
// // this.fieldGroupList.forEach((el: any, index) => {
|
|
2804
|
-
// // el.fields = fieldList.filter(els => els.groupId === el.id);
|
|
2805
|
-
// // });
|
|
2806
|
-
// // this.newEntity?.patchValue(res);
|
|
2807
|
-
// this.entryTypesSelect = res;
|
|
2808
|
-
// // this.resultSource = res.fieldTabs;
|
|
2809
|
-
// });
|
|
2810
|
-
}
|
|
2811
|
-
/**
|
|
2812
|
-
* 深拷贝--方法
|
|
2813
|
-
* $api.deepClone() */
|
|
2814
|
-
deepClone(obj) {
|
|
2815
|
-
if (typeof obj !== 'object' || obj === null)
|
|
2816
|
-
return obj;
|
|
2817
|
-
const result = Array.isArray(obj) ? [] : {};
|
|
2818
|
-
for (const key in obj) {
|
|
2819
|
-
if (obj.hasOwnProperty(key)) {
|
|
2820
|
-
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
2821
|
-
if (obj[key] instanceof Date) {
|
|
2822
|
-
result[key] = new Date(obj[key].getTime());
|
|
2823
|
-
}
|
|
2824
|
-
else if (obj[key] instanceof RegExp) {
|
|
2825
|
-
result[key] = new RegExp(obj[key]);
|
|
2826
|
-
}
|
|
2827
|
-
else {
|
|
2828
|
-
result[key] = this.deepClone(obj[key]);
|
|
2829
|
-
}
|
|
2830
|
-
}
|
|
2831
|
-
else {
|
|
2832
|
-
result[key] = obj[key];
|
|
2833
|
-
}
|
|
2834
|
-
}
|
|
2835
|
-
}
|
|
2836
|
-
return result;
|
|
2837
2789
|
}
|
|
2838
2790
|
/**
|
|
2839
2791
|
*
|
|
@@ -2876,8 +2828,8 @@ class CreateOrEditComponent {
|
|
|
2876
2828
|
/* empty */
|
|
2877
2829
|
}
|
|
2878
2830
|
const _fromResultSourceDragEl = this.fromResultSourceDragEl;
|
|
2879
|
-
const formRightGroup =
|
|
2880
|
-
const fieldList =
|
|
2831
|
+
const formRightGroup = structuredClone(this.formRightGroup);
|
|
2832
|
+
const fieldList = structuredClone(this.fieldList);
|
|
2881
2833
|
if (_fromResultSourceDragEl) {
|
|
2882
2834
|
//移动
|
|
2883
2835
|
//从目标源拖拽到数据源
|
|
@@ -2895,6 +2847,7 @@ class CreateOrEditComponent {
|
|
|
2895
2847
|
this.formRightGroup = formRightGroup;
|
|
2896
2848
|
}
|
|
2897
2849
|
this.setfieldTabsFrom();
|
|
2850
|
+
this.setAllSelectStauts();
|
|
2898
2851
|
}
|
|
2899
2852
|
/**拖拽到目标源时触发
|
|
2900
2853
|
*
|
|
@@ -2908,6 +2861,7 @@ class CreateOrEditComponent {
|
|
|
2908
2861
|
this.formRightGroup.push(_fromDataSourceDragEl);
|
|
2909
2862
|
}
|
|
2910
2863
|
this.setfieldTabsFrom();
|
|
2864
|
+
this.setAllSelectStauts();
|
|
2911
2865
|
}
|
|
2912
2866
|
/** 从目标源拖拽到目标源*/
|
|
2913
2867
|
dragToResultSourceItemDropped(fieldsIndex) {
|
|
@@ -2920,6 +2874,7 @@ class CreateOrEditComponent {
|
|
|
2920
2874
|
this.resultSource[this.navActive].fields.splice(fieldsIndex, 0, _fromResultSourceDragEl);
|
|
2921
2875
|
}
|
|
2922
2876
|
this.setfieldTabsFrom();
|
|
2877
|
+
this.setAllSelectStauts();
|
|
2923
2878
|
}
|
|
2924
2879
|
/**设置formA表单 */
|
|
2925
2880
|
setfieldTabsFrom() {
|
|
@@ -2961,7 +2916,11 @@ class CreateOrEditComponent {
|
|
|
2961
2916
|
}))
|
|
2962
2917
|
.subscribe(res => {
|
|
2963
2918
|
this.toaster.success(this._LocalizationService.instant(`Cms::SavedSuccessfully`));
|
|
2964
|
-
this._location.back();
|
|
2919
|
+
// this._location.back();
|
|
2920
|
+
this._LocationBackService.backTo({
|
|
2921
|
+
url: `/cms/admin/fields`,
|
|
2922
|
+
replenish: '/edit'
|
|
2923
|
+
});
|
|
2965
2924
|
this._UpdateListService.updateList();
|
|
2966
2925
|
});
|
|
2967
2926
|
return;
|
|
@@ -2974,7 +2933,11 @@ class CreateOrEditComponent {
|
|
|
2974
2933
|
}))
|
|
2975
2934
|
.subscribe(res => {
|
|
2976
2935
|
this.toaster.success(this._LocalizationService.instant(`Cms::SavedSuccessfully`));
|
|
2977
|
-
this._location.back();
|
|
2936
|
+
// this._location.back();
|
|
2937
|
+
this._LocationBackService.backTo({
|
|
2938
|
+
url: `/cms/admin/sections`,
|
|
2939
|
+
replenish: '/create'
|
|
2940
|
+
});
|
|
2978
2941
|
this._UpdateListService.updateList();
|
|
2979
2942
|
});
|
|
2980
2943
|
}
|
|
@@ -3036,9 +2999,9 @@ class CreateOrEditComponent {
|
|
|
3036
2999
|
/**删除tab标签后还原 fieldGroupList */
|
|
3037
3000
|
deleteTabFieldGroupList(deleteFields) {
|
|
3038
3001
|
//原数据
|
|
3039
|
-
const fieldList =
|
|
3002
|
+
const fieldList = structuredClone(this.fieldList);
|
|
3040
3003
|
//右侧手风琴数据
|
|
3041
|
-
const formRightGroup =
|
|
3004
|
+
const formRightGroup = structuredClone(this.formRightGroup);
|
|
3042
3005
|
// 获取要删除的原数据
|
|
3043
3006
|
const deleteFieldList = fieldList.filter(el => deleteFields.map(item => item.id).includes(el.id));
|
|
3044
3007
|
deleteFieldList.forEach(item => {
|
|
@@ -3077,19 +3040,27 @@ class CreateOrEditComponent {
|
|
|
3077
3040
|
editFieldSave() {
|
|
3078
3041
|
const input = this.editFieldFrom.value;
|
|
3079
3042
|
this.resultSource[this.navActive].fields[this.EditFieldIndex].displayName = input.displayName;
|
|
3080
|
-
// this.resultSource[this.navActive].fields[this.EditFieldIndex].required = input.required;
|
|
3081
|
-
// this.resultSource[this.navActive].fields[this.EditFieldIndex].showInList = input.showInList;
|
|
3082
|
-
// this.resultSource[this.navActive].fields[this.EditFieldIndex].enableSearch = input.enableSearch;
|
|
3083
3043
|
this.visibleEditFieldOpen = false;
|
|
3084
3044
|
this.setfieldTabsFrom();
|
|
3085
3045
|
}
|
|
3086
3046
|
/**点击“字段布局”复选框事件 */
|
|
3087
3047
|
checkboxChange(event, input) {
|
|
3088
3048
|
const { checked, name } = event.target;
|
|
3089
|
-
const {
|
|
3049
|
+
const { index } = input;
|
|
3090
3050
|
this.resultSource[this.navActive].fields[index][name] = checked;
|
|
3091
3051
|
this.setfieldTabsFrom();
|
|
3092
|
-
|
|
3052
|
+
this.setAllSelectStauts();
|
|
3053
|
+
// console.log(event.target,'点击“字段布局”复选框事件 ',event,input,'resultSource',this.resultSource,'newEntity',this.newEntity);
|
|
3054
|
+
}
|
|
3055
|
+
/**全选状态改变 */
|
|
3056
|
+
allSelectChange(event, name) {
|
|
3057
|
+
const { checked } = event.target;
|
|
3058
|
+
this.resultSource[this.navActive].fields.forEach(el => {
|
|
3059
|
+
el[name] = checked;
|
|
3060
|
+
});
|
|
3061
|
+
console.log(this.resultSource[this.navActive].fields, 'this.resultSource[this.navActive].fields', name, checked);
|
|
3062
|
+
this.setfieldTabsFrom();
|
|
3063
|
+
this.setAllSelectStauts();
|
|
3093
3064
|
}
|
|
3094
3065
|
/**name表单控件 */
|
|
3095
3066
|
get nameInput() {
|
|
@@ -3098,19 +3069,19 @@ class CreateOrEditComponent {
|
|
|
3098
3069
|
/**字段标签input失去标点生成字段名字 */
|
|
3099
3070
|
disPlayNameInputBlur(event) {
|
|
3100
3071
|
const value = event.target.value;
|
|
3101
|
-
const pinyin = this.
|
|
3072
|
+
const pinyin = this.toPinyinService.get(value);
|
|
3102
3073
|
const nameInput = this.nameInput;
|
|
3103
3074
|
if (nameInput.value)
|
|
3104
3075
|
return;
|
|
3105
3076
|
nameInput.patchValue(pinyin);
|
|
3106
3077
|
}
|
|
3107
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditComponent, deps: [{ token: i3.ToasterService }, { token:
|
|
3078
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditComponent, deps: [{ token: i3.ToasterService }, { token: i4.LocationBackService }, { token: i6.ActivatedRoute }, { token: FieldGroupAdminService }, { token: FieldAdminService }, { token: EntryTypeAdminService }, { token: i1.LocalizationService }, { token: FormControlsService }, { token: i4.ToPinyinService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3108
3079
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditComponent, selector: "cms-create-or-edit", providers: [
|
|
3109
3080
|
{
|
|
3110
3081
|
provide: EXTENSIONS_IDENTIFIER,
|
|
3111
3082
|
useValue: ECmsComponent.SectionsCreateOrEdit,
|
|
3112
3083
|
},
|
|
3113
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "editFieldTabsModalSubmitBtn", first: true, predicate: ["editFieldTabsModalSubmitBtn"], descendants: true }, { propertyName: "editFieldModalSubmitBtn", first: true, predicate: ["editFieldModalSubmitBtn"], descendants: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" [class]=\"{'was-validated':formValidation}\"\n (submit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\"\n [toolbar]=\"true\">\n <div class=\"create-or-edit-entry-type-page\">\n <div class=\"card\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card-body\">\n <div class=\"\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n <div formArrayName=\"fieldTabs\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::FieldLayout' | abpLocalization}}</label>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-8 border rounded\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"navActive\" class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let item of resultSource; let i = index\">\n <li [ngbNavItem]=\"i\" ngbDropdown class=\"nav-item\"\n role=\"presentation\">\n <button type=\"button\" ngbNavLink class=\"nav-link\">\n {{ item.name }}\n <span class=\"ms-1\" (click.stop)=\"$event.stopPropagation()\"\n ngbDropdownToggle></span>\n </button>\n <div ngbDropdownMenu style=\"z-index: 999;\">\n <span ngbDropdownItem type=\"button\"\n (click.stop)=\"editFieldTabs(item,i)\">\n <i class=\"fas fa-edit\"></i>\n {{'AbpUi::Edit' | abpLocalization}}\n </span>\n <span ngbDropdownItem *ngIf=\"resultSource.length !== 1\"\n type=\"button\" (click.stop)=\"deleteFieldTabs(i)\">\n <i class=\"fas fa-trash\"></i>\n {{'AbpUi::Delete' | abpLocalization}}\n </span>\n </div>\n <ng-template ngbNavContent>\n <div class=\"p-2\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToResultSourceDropped(item,i)\"\n style=\"height: 100%;\">\n <p class=\"form-text text-muted\"\n *ngIf=\"item.fields.length === 0\">\n {{'Cms::DragAndDropFieldTips' | abpLocalization}}\n </p>\n <table class=\"table\">\n <thead>\n <th></th>\n <th>{{'Cms::DisplayName' | abpLocalization}}\n </th>\n <th>{{'Cms::Required' | abpLocalization}}</th>\n <th>{{'Cms::ShowInList' | abpLocalization}}</th>\n <th>{{'Cms::EnableSearch' | abpLocalization}}\n </th>\n <th></th>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let el of item.fields; let iel = index\">\n <tr draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\">\n <td >\n <div class=\"drag-handle d-inline\" \n cdkDragHandle>\n <span\n class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n \n <td>{{ el.displayName }}</td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.required\" name=\"required\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.showInList\" name=\"showInList\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.enableSearch\" name=\"enableSearch\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td style=\"width: 1%;\"> \n <button\n class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n\n\n <!-- <ul class=\"list-group\" style=\"height: 100%;\">\n <ng-container\n *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\"\n style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul> -->\n\n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\"\n (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\"\n ondragover=\"event.preventDefault();\" (drop)=\"dragToDataSourceDropped()\"\n style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n\n\n <!-- </div> -->\n </abp-page>\n\n</form>\n<!-- \u7528\u4E8E\u521B\u5EFA\u7F16\u8F91tab\u7684\u6A21\u6001\u6846 -->\n<abp-modal [(visible)]=\"visibleTabsOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleTabsChange($event)\">\n <ng-template #abpHeader>\n <h3>{{ editFieldTabsSelect ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldTabsFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldTabsFrom\" [class]=\"{'was-validated':formValidation}\"\n (submit)=\"editFieldTabsSave()\">\n <button type=\"submit\" #editFieldTabsModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"editFieldTabsModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save'\n | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n<!-- \u7528\u4E8E\u4FEE\u6539\u5B57\u6BB5\u914D\u7F6E\u7684\u6A21\u6001\u6846 -->\n<abp-modal [(visible)]=\"visibleEditFieldOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleEditFieldChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldFrom\" (submit)=\"editFieldSave()\">\n <button type=\"submit\" #editFieldModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" placeholder=\"\" />\n </div>\n <!-- <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"required\"\n id=\"required\" />\n <label class=\"form-check-label\" for=\"required\"> {{'Cms::Required' | abpLocalization}} </label>\n </div>\n </div> -->\n <!-- @if(isShowInList){\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"showInList\"\n id=\"showInList\" />\n <label class=\"form-check-label\" for=\"showInList\"> {{'Cms::ShowInList' | abpLocalization}}\n </label>\n </div>\n </div>\n }\n @if(isEnableSearch){\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"enableSearch\"\n id=\"enableSearch\" />\n <label class=\"form-check-label\" for=\"enableSearch\"> {{'Cms::EnableSearch' | abpLocalization}}\n </label>\n </div>\n </div>\n } -->\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldFrom.valid\"\n (click)=\"editFieldModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .create-or-edit-entry-type-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-or-edit-entry-type-page .form-control,::ng-deep .create-or-edit-entry-type-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-type-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-type-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit;height:calc(100% - 60px)}::ng-deep .create-or-edit-entry-type-page .tab-pane{height:100%}::ng-deep .create-or-edit-entry-type-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i5.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i5.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i11$1.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i11$1.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i11$1.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i11$1.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i11$1.NgbNavLinkButton, selector: "button[ngbNavLink]" }, { kind: "directive", type: i11$1.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i11$1.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i11$1.NgbAccordionButton, selector: "button[ngbAccordionButton]" }, { kind: "directive", type: i11$1.NgbAccordionDirective, selector: "[ngbAccordion]", inputs: ["animation", "closeOthers", "destroyOnHide"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordion"] }, { kind: "directive", type: i11$1.NgbAccordionItem, selector: "[ngbAccordionItem]", inputs: ["ngbAccordionItem", "destroyOnHide", "disabled", "collapsed"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordionItem"] }, { kind: "directive", type: i11$1.NgbAccordionHeader, selector: "[ngbAccordionHeader]" }, { kind: "directive", type: i11$1.NgbAccordionBody, selector: "[ngbAccordionBody]" }, { kind: "directive", type: i11$1.NgbAccordionCollapse, selector: "[ngbAccordionCollapse]", exportAs: ["ngbAccordionCollapse"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3084
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "editFieldTabsModalSubmitBtn", first: true, predicate: ["editFieldTabsModalSubmitBtn"], descendants: true }, { propertyName: "editFieldModalSubmitBtn", first: true, predicate: ["editFieldModalSubmitBtn"], descendants: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" [class]=\"{'was-validated':formValidation}\"\n (submit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\"\n [toolbar]=\"true\">\n <div class=\"create-or-edit-entry-type-page\">\n <div class=\"card\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card-body\">\n <div class=\"\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n <div formArrayName=\"fieldTabs\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::FieldLayout' | abpLocalization}}</label>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-8 border rounded\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"navActive\" class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let item of resultSource; let i = index\">\n <li [ngbNavItem]=\"i\" ngbDropdown class=\"nav-item\"\n role=\"presentation\">\n <button type=\"button\" ngbNavLink class=\"nav-link\" (click.stop)=\"setAllSelectStauts()\">\n {{ item.name }}\n <span class=\"ms-1\" (click.stop)=\"$event.stopPropagation()\"\n ngbDropdownToggle></span>\n </button>\n <div ngbDropdownMenu style=\"z-index: 999;\">\n <span ngbDropdownItem type=\"button\"\n (click.stop)=\"editFieldTabs(item,i)\">\n <i class=\"fas fa-edit\"></i>\n {{'AbpUi::Edit' | abpLocalization}}\n </span>\n <span ngbDropdownItem *ngIf=\"resultSource.length !== 1\"\n type=\"button\" (click.stop)=\"deleteFieldTabs(i)\">\n <i class=\"fas fa-trash\"></i>\n {{'AbpUi::Delete' | abpLocalization}}\n </span>\n </div>\n <ng-template ngbNavContent>\n <div class=\"p-2\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToResultSourceDropped(item,i)\"\n style=\"height: 100%;\">\n <p class=\"form-text text-muted\"\n *ngIf=\"item.fields.length === 0\">\n {{'Cms::DragAndDropFieldTips' | abpLocalization}}\n </p>\n <table class=\"table\" *ngIf=\"item.fields.length>0\">\n <thead>\n <th></th>\n <th>{{'Cms::DisplayName' | abpLocalization}}\n </th>\n <th>\n <div class=\"d-flex align-items-center p-0\">\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input me-1\" [checked]=\"isAllSelect.isRequired\" (change)=\"allSelectChange($event,'required')\" />{{'Cms::Required' | abpLocalization}}\n </div>\n \n </th>\n <th>\n <div class=\"d-flex align-items-center p-0\">\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input me-1\" [checked]=\"isAllSelect.isShowInList\" (change)=\"allSelectChange($event,'showInList')\" />{{'Cms::ShowInList' | abpLocalization}}\n </div>\n </th>\n <th>\n <div class=\"d-flex align-items-center p-0\">\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input me-1\" [checked]=\"isAllSelect.isEnableSearch\" (change)=\"allSelectChange($event,'enableSearch')\" />{{'Cms::EnableSearch' | abpLocalization}}\n </div>\n </th>\n <th></th>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let el of item.fields; let iel = index\">\n <tr draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\">\n <td >\n <div class=\"drag-handle d-inline\" \n cdkDragHandle>\n <span\n class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n \n <td>{{ el.displayName }}</td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.required\" name=\"required\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.showInList\" name=\"showInList\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.enableSearch\" name=\"enableSearch\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td style=\"width: 1%;\"> \n <button\n class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n\n\n <!-- <ul class=\"list-group\" style=\"height: 100%;\">\n <ng-container\n *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\"\n style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul> -->\n\n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\"\n (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\"\n ondragover=\"event.preventDefault();\" (drop)=\"dragToDataSourceDropped()\"\n style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n\n\n <!-- </div> -->\n </abp-page>\n\n</form>\n<!-- \u7528\u4E8E\u521B\u5EFA\u7F16\u8F91tab\u7684\u6A21\u6001\u6846 -->\n<abp-modal [(visible)]=\"visibleTabsOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleTabsChange($event)\">\n <ng-template #abpHeader>\n <h3>{{ editFieldTabsSelect ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldTabsFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldTabsFrom\" [class]=\"{'was-validated':formValidation}\"\n (submit)=\"editFieldTabsSave()\">\n <button type=\"submit\" #editFieldTabsModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"editFieldTabsModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save'\n | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n<!-- \u7528\u4E8E\u4FEE\u6539\u5B57\u6BB5\u914D\u7F6E\u7684\u6A21\u6001\u6846 -->\n<abp-modal [(visible)]=\"visibleEditFieldOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleEditFieldChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldFrom\" (submit)=\"editFieldSave()\">\n <button type=\"submit\" #editFieldModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" placeholder=\"\" />\n </div>\n <!-- <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"required\"\n id=\"required\" />\n <label class=\"form-check-label\" for=\"required\"> {{'Cms::Required' | abpLocalization}} </label>\n </div>\n </div> -->\n <!-- @if(isShowInList){\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"showInList\"\n id=\"showInList\" />\n <label class=\"form-check-label\" for=\"showInList\"> {{'Cms::ShowInList' | abpLocalization}}\n </label>\n </div>\n </div>\n }\n @if(isEnableSearch){\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"enableSearch\"\n id=\"enableSearch\" />\n <label class=\"form-check-label\" for=\"enableSearch\"> {{'Cms::EnableSearch' | abpLocalization}}\n </label>\n </div>\n </div>\n } -->\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldFrom.valid\"\n (click)=\"editFieldModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .create-or-edit-entry-type-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-or-edit-entry-type-page .form-control,::ng-deep .create-or-edit-entry-type-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-type-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-type-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit;height:calc(100% - 60px)}::ng-deep .create-or-edit-entry-type-page .tab-pane{height:100%}::ng-deep .create-or-edit-entry-type-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i11$1.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i11$1.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i11$1.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i11$1.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i11$1.NgbNavLinkButton, selector: "button[ngbNavLink]" }, { kind: "directive", type: i11$1.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i11$1.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i11$1.NgbAccordionButton, selector: "button[ngbAccordionButton]" }, { kind: "directive", type: i11$1.NgbAccordionDirective, selector: "[ngbAccordion]", inputs: ["animation", "closeOthers", "destroyOnHide"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordion"] }, { kind: "directive", type: i11$1.NgbAccordionItem, selector: "[ngbAccordionItem]", inputs: ["ngbAccordionItem", "destroyOnHide", "disabled", "collapsed"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordionItem"] }, { kind: "directive", type: i11$1.NgbAccordionHeader, selector: "[ngbAccordionHeader]" }, { kind: "directive", type: i11$1.NgbAccordionBody, selector: "[ngbAccordionBody]" }, { kind: "directive", type: i11$1.NgbAccordionCollapse, selector: "[ngbAccordionCollapse]", exportAs: ["ngbAccordionCollapse"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3114
3085
|
}
|
|
3115
3086
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditComponent, decorators: [{
|
|
3116
3087
|
type: Component,
|
|
@@ -3119,8 +3090,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
3119
3090
|
provide: EXTENSIONS_IDENTIFIER,
|
|
3120
3091
|
useValue: ECmsComponent.SectionsCreateOrEdit,
|
|
3121
3092
|
},
|
|
3122
|
-
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" [class]=\"{'was-validated':formValidation}\"\n (submit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\"\n [toolbar]=\"true\">\n <div class=\"create-or-edit-entry-type-page\">\n <div class=\"card\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card-body\">\n <div class=\"\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n <div formArrayName=\"fieldTabs\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::FieldLayout' | abpLocalization}}</label>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-8 border rounded\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"navActive\" class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let item of resultSource; let i = index\">\n <li [ngbNavItem]=\"i\" ngbDropdown class=\"nav-item\"\n role=\"presentation\">\n <button type=\"button\" ngbNavLink class=\"nav-link\">\n {{ item.name }}\n <span class=\"ms-1\" (click.stop)=\"$event.stopPropagation()\"\n ngbDropdownToggle></span>\n </button>\n <div ngbDropdownMenu style=\"z-index: 999;\">\n <span ngbDropdownItem type=\"button\"\n (click.stop)=\"editFieldTabs(item,i)\">\n <i class=\"fas fa-edit\"></i>\n {{'AbpUi::Edit' | abpLocalization}}\n </span>\n <span ngbDropdownItem *ngIf=\"resultSource.length !== 1\"\n type=\"button\" (click.stop)=\"deleteFieldTabs(i)\">\n <i class=\"fas fa-trash\"></i>\n {{'AbpUi::Delete' | abpLocalization}}\n </span>\n </div>\n <ng-template ngbNavContent>\n <div class=\"p-2\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToResultSourceDropped(item,i)\"\n style=\"height: 100%;\">\n <p class=\"form-text text-muted\"\n *ngIf=\"item.fields.length === 0\">\n {{'Cms::DragAndDropFieldTips' | abpLocalization}}\n </p>\n <table class=\"table\">\n <thead>\n <th></th>\n <th>{{'Cms::DisplayName' | abpLocalization}}\n </th>\n <th>{{'Cms::Required' | abpLocalization}}</th>\n <th>{{'Cms::ShowInList' | abpLocalization}}</th>\n <th>{{'Cms::EnableSearch' | abpLocalization}}\n </th>\n <th></th>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let el of item.fields; let iel = index\">\n <tr draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\">\n <td >\n <div class=\"drag-handle d-inline\" \n cdkDragHandle>\n <span\n class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n \n <td>{{ el.displayName }}</td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.required\" name=\"required\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.showInList\" name=\"showInList\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.enableSearch\" name=\"enableSearch\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td style=\"width: 1%;\"> \n <button\n class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n\n\n <!-- <ul class=\"list-group\" style=\"height: 100%;\">\n <ng-container\n *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\"\n style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul> -->\n\n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\"\n (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\"\n ondragover=\"event.preventDefault();\" (drop)=\"dragToDataSourceDropped()\"\n style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n\n\n <!-- </div> -->\n </abp-page>\n\n</form>\n<!-- \u7528\u4E8E\u521B\u5EFA\u7F16\u8F91tab\u7684\u6A21\u6001\u6846 -->\n<abp-modal [(visible)]=\"visibleTabsOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleTabsChange($event)\">\n <ng-template #abpHeader>\n <h3>{{ editFieldTabsSelect ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldTabsFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldTabsFrom\" [class]=\"{'was-validated':formValidation}\"\n (submit)=\"editFieldTabsSave()\">\n <button type=\"submit\" #editFieldTabsModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"editFieldTabsModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save'\n | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n<!-- \u7528\u4E8E\u4FEE\u6539\u5B57\u6BB5\u914D\u7F6E\u7684\u6A21\u6001\u6846 -->\n<abp-modal [(visible)]=\"visibleEditFieldOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleEditFieldChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldFrom\" (submit)=\"editFieldSave()\">\n <button type=\"submit\" #editFieldModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" placeholder=\"\" />\n </div>\n <!-- <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"required\"\n id=\"required\" />\n <label class=\"form-check-label\" for=\"required\"> {{'Cms::Required' | abpLocalization}} </label>\n </div>\n </div> -->\n <!-- @if(isShowInList){\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"showInList\"\n id=\"showInList\" />\n <label class=\"form-check-label\" for=\"showInList\"> {{'Cms::ShowInList' | abpLocalization}}\n </label>\n </div>\n </div>\n }\n @if(isEnableSearch){\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"enableSearch\"\n id=\"enableSearch\" />\n <label class=\"form-check-label\" for=\"enableSearch\"> {{'Cms::EnableSearch' | abpLocalization}}\n </label>\n </div>\n </div>\n } -->\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldFrom.valid\"\n (click)=\"editFieldModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .create-or-edit-entry-type-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-or-edit-entry-type-page .form-control,::ng-deep .create-or-edit-entry-type-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-type-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-type-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit;height:calc(100% - 60px)}::ng-deep .create-or-edit-entry-type-page .tab-pane{height:100%}::ng-deep .create-or-edit-entry-type-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}\n"] }]
|
|
3123
|
-
}], ctorParameters: () => [{ type: i3.ToasterService }, { type:
|
|
3093
|
+
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" [class]=\"{'was-validated':formValidation}\"\n (submit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\"\n [toolbar]=\"true\">\n <div class=\"create-or-edit-entry-type-page\">\n <div class=\"card\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card-body\">\n <div class=\"\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n <div formArrayName=\"fieldTabs\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::FieldLayout' | abpLocalization}}</label>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-8 border rounded\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"navActive\" class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let item of resultSource; let i = index\">\n <li [ngbNavItem]=\"i\" ngbDropdown class=\"nav-item\"\n role=\"presentation\">\n <button type=\"button\" ngbNavLink class=\"nav-link\" (click.stop)=\"setAllSelectStauts()\">\n {{ item.name }}\n <span class=\"ms-1\" (click.stop)=\"$event.stopPropagation()\"\n ngbDropdownToggle></span>\n </button>\n <div ngbDropdownMenu style=\"z-index: 999;\">\n <span ngbDropdownItem type=\"button\"\n (click.stop)=\"editFieldTabs(item,i)\">\n <i class=\"fas fa-edit\"></i>\n {{'AbpUi::Edit' | abpLocalization}}\n </span>\n <span ngbDropdownItem *ngIf=\"resultSource.length !== 1\"\n type=\"button\" (click.stop)=\"deleteFieldTabs(i)\">\n <i class=\"fas fa-trash\"></i>\n {{'AbpUi::Delete' | abpLocalization}}\n </span>\n </div>\n <ng-template ngbNavContent>\n <div class=\"p-2\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToResultSourceDropped(item,i)\"\n style=\"height: 100%;\">\n <p class=\"form-text text-muted\"\n *ngIf=\"item.fields.length === 0\">\n {{'Cms::DragAndDropFieldTips' | abpLocalization}}\n </p>\n <table class=\"table\" *ngIf=\"item.fields.length>0\">\n <thead>\n <th></th>\n <th>{{'Cms::DisplayName' | abpLocalization}}\n </th>\n <th>\n <div class=\"d-flex align-items-center p-0\">\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input me-1\" [checked]=\"isAllSelect.isRequired\" (change)=\"allSelectChange($event,'required')\" />{{'Cms::Required' | abpLocalization}}\n </div>\n \n </th>\n <th>\n <div class=\"d-flex align-items-center p-0\">\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input me-1\" [checked]=\"isAllSelect.isShowInList\" (change)=\"allSelectChange($event,'showInList')\" />{{'Cms::ShowInList' | abpLocalization}}\n </div>\n </th>\n <th>\n <div class=\"d-flex align-items-center p-0\">\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input me-1\" [checked]=\"isAllSelect.isEnableSearch\" (change)=\"allSelectChange($event,'enableSearch')\" />{{'Cms::EnableSearch' | abpLocalization}}\n </div>\n </th>\n <th></th>\n </thead>\n <tbody>\n <ng-container\n *ngFor=\"let el of item.fields; let iel = index\">\n <tr draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\">\n <td >\n <div class=\"drag-handle d-inline\" \n cdkDragHandle>\n <span\n class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n \n <td>{{ el.displayName }}</td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.required\" name=\"required\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.showInList\" name=\"showInList\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td>\n <input type=\"checkbox\" role=\"button\" class=\"form-check-input\" [checked]=\"el.enableSearch\" name=\"enableSearch\" (change)=\"checkboxChange($event,{row:el,index:iel})\" />\n </td>\n <td style=\"width: 1%;\"> \n <button\n class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n\n\n <!-- <ul class=\"list-group\" style=\"height: 100%;\">\n <ng-container\n *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\"\n style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul> -->\n\n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\"\n (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\"\n ondragover=\"event.preventDefault();\" (drop)=\"dragToDataSourceDropped()\"\n style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n\n\n <!-- </div> -->\n </abp-page>\n\n</form>\n<!-- \u7528\u4E8E\u521B\u5EFA\u7F16\u8F91tab\u7684\u6A21\u6001\u6846 -->\n<abp-modal [(visible)]=\"visibleTabsOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleTabsChange($event)\">\n <ng-template #abpHeader>\n <h3>{{ editFieldTabsSelect ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldTabsFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldTabsFrom\" [class]=\"{'was-validated':formValidation}\"\n (submit)=\"editFieldTabsSave()\">\n <button type=\"submit\" #editFieldTabsModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"editFieldTabsModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save'\n | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n<!-- \u7528\u4E8E\u4FEE\u6539\u5B57\u6BB5\u914D\u7F6E\u7684\u6A21\u6001\u6846 -->\n<abp-modal [(visible)]=\"visibleEditFieldOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleEditFieldChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldFrom\" (submit)=\"editFieldSave()\">\n <button type=\"submit\" #editFieldModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" placeholder=\"\" />\n </div>\n <!-- <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"required\"\n id=\"required\" />\n <label class=\"form-check-label\" for=\"required\"> {{'Cms::Required' | abpLocalization}} </label>\n </div>\n </div> -->\n <!-- @if(isShowInList){\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"showInList\"\n id=\"showInList\" />\n <label class=\"form-check-label\" for=\"showInList\"> {{'Cms::ShowInList' | abpLocalization}}\n </label>\n </div>\n </div>\n }\n @if(isEnableSearch){\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"enableSearch\"\n id=\"enableSearch\" />\n <label class=\"form-check-label\" for=\"enableSearch\"> {{'Cms::EnableSearch' | abpLocalization}}\n </label>\n </div>\n </div>\n } -->\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldFrom.valid\"\n (click)=\"editFieldModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .create-or-edit-entry-type-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-or-edit-entry-type-page .form-control,::ng-deep .create-or-edit-entry-type-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-type-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-type-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit;height:calc(100% - 60px)}::ng-deep .create-or-edit-entry-type-page .tab-pane{height:100%}::ng-deep .create-or-edit-entry-type-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}\n"] }]
|
|
3094
|
+
}], ctorParameters: () => [{ type: i3.ToasterService }, { type: i4.LocationBackService }, { type: i6.ActivatedRoute }, { type: FieldGroupAdminService }, { type: FieldAdminService }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }, { type: FormControlsService }, { type: i4.ToPinyinService }], propDecorators: { submitclick: [{
|
|
3124
3095
|
type: ViewChild,
|
|
3125
3096
|
args: ['submitclick', { static: true }]
|
|
3126
3097
|
}], editFieldTabsModalSubmitBtn: [{
|
|
@@ -3231,13 +3202,13 @@ class EntryConfigComponent {
|
|
|
3231
3202
|
async siteIdChange() {
|
|
3232
3203
|
await this.getSiteOfSectionList();
|
|
3233
3204
|
}
|
|
3234
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryConfigComponent, deps: [{ token: i1$
|
|
3235
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntryConfigComponent, selector: "cms-entry-config", inputs: { type: "type", selected: "selected", culture: "culture", Entity: "Entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}</label>\n <select class=\"form-select col-auto\" formControlName=\"Entry.SectionId\">\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Entry.Multiple\" id=\"Multiple\">\n <label class=\"form-check-label\" for=\"Multiple\">\n {{'Cms::Multiple' | abpLocalization}}\n </label>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Entry.Placeholder\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [":ng-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{background-color:transparent!important;border:none!important}:ng-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-color:transparent!important;box-shadow:none!important}.selectclassliveview{overflow:hidden}::ng-deep .ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:transparent}::ng-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-color:transparent;box-shadow:none}::ng-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{background:transparent;border:1px solid transparent}\n"], dependencies: [{ kind: "directive", type:
|
|
3205
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: SectionAdminService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3206
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntryConfigComponent, selector: "cms-entry-config", inputs: { type: "type", selected: "selected", culture: "culture", Entity: "Entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}</label>\n <select class=\"form-select col-auto\" formControlName=\"Entry.SectionId\">\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Entry.Multiple\" id=\"Multiple\">\n <label class=\"form-check-label\" for=\"Multiple\">\n {{'Cms::Multiple' | abpLocalization}}\n </label>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Entry.Placeholder\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [":ng-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{background-color:transparent!important;border:none!important}:ng-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-color:transparent!important;box-shadow:none!important}.selectclassliveview{overflow:hidden}::ng-deep .ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:transparent}::ng-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-color:transparent;box-shadow:none}::ng-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{background:transparent;border:1px solid transparent}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3236
3207
|
}
|
|
3237
3208
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryConfigComponent, decorators: [{
|
|
3238
3209
|
type: Component,
|
|
3239
3210
|
args: [{ selector: 'cms-entry-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}</label>\n <select class=\"form-select col-auto\" formControlName=\"Entry.SectionId\">\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-3\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Entry.Multiple\" id=\"Multiple\">\n <label class=\"form-check-label\" for=\"Multiple\">\n {{'Cms::Multiple' | abpLocalization}}\n </label>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Entry.Placeholder\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [":ng-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{background-color:transparent!important;border:none!important}:ng-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-color:transparent!important;box-shadow:none!important}.selectclassliveview{overflow:hidden}::ng-deep .ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:transparent}::ng-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-color:transparent;box-shadow:none}::ng-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{background:transparent;border:1px solid transparent}\n"] }]
|
|
3240
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3211
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: SectionAdminService }], propDecorators: { type: [{
|
|
3241
3212
|
type: Input
|
|
3242
3213
|
}], selected: [{
|
|
3243
3214
|
type: Input
|
|
@@ -3338,7 +3309,7 @@ class EntryControlComponent {
|
|
|
3338
3309
|
await this.getEntryAssignList(event);
|
|
3339
3310
|
}
|
|
3340
3311
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3341
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntryControlComponent, selector: "cms-entry-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxMultipleCount]=\"1\"\r\n (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"tags\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-template>\r\n <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type:
|
|
3312
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntryControlComponent, selector: "cms-entry-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxMultipleCount]=\"1\"\r\n (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"tags\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-template>\r\n <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4$1.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }] }); }
|
|
3342
3313
|
}
|
|
3343
3314
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryControlComponent, decorators: [{
|
|
3344
3315
|
type: Component,
|
|
@@ -3400,7 +3371,7 @@ class EntryViewComponent {
|
|
|
3400
3371
|
});
|
|
3401
3372
|
}
|
|
3402
3373
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryViewComponent, deps: [{ token: EntryAdminService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3403
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: EntryViewComponent, selector: "cms-entry-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n </div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type:
|
|
3374
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: EntryViewComponent, selector: "cms-entry-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{showValue}}\r\n} @else{\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n </div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
3404
3375
|
}
|
|
3405
3376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryViewComponent, decorators: [{
|
|
3406
3377
|
type: Component,
|
|
@@ -3495,7 +3466,7 @@ class EntrySearchComponent {
|
|
|
3495
3466
|
await this.getEntryAssignList(event);
|
|
3496
3467
|
}
|
|
3497
3468
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntrySearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3498
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntrySearchComponent, selector: "cms-entry-search", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxMultipleCount]=\"1\"\r\n (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"tags\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-template>\r\n <!-- <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small> -->\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type:
|
|
3469
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntrySearchComponent, selector: "cms-entry-search", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxMultipleCount]=\"1\"\r\n (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"tags\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-template>\r\n <!-- <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small> -->\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4$1.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }] }); }
|
|
3499
3470
|
}
|
|
3500
3471
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntrySearchComponent, decorators: [{
|
|
3501
3472
|
type: Component,
|
|
@@ -3541,13 +3512,54 @@ class matrixFieldInputBase {
|
|
|
3541
3512
|
}
|
|
3542
3513
|
}
|
|
3543
3514
|
|
|
3515
|
+
/**
|
|
3516
|
+
* Converts all keys of an object to lowercase.
|
|
3517
|
+
* 将对象所有建转化为小写
|
|
3518
|
+
*/
|
|
3519
|
+
class KeysConvertToLowercaseService {
|
|
3520
|
+
/**
|
|
3521
|
+
* 递归将对象属性名首字母转为小写
|
|
3522
|
+
* @param obj 需要处理的对象或数组
|
|
3523
|
+
* @param isInsideFormConfig 标记是否在 FormConfiguration 内部
|
|
3524
|
+
* @returns 处理后的新对象
|
|
3525
|
+
*/
|
|
3526
|
+
get(obj, isInsideFormConfig = false) {
|
|
3527
|
+
if (Array.isArray(obj)) {
|
|
3528
|
+
return obj.map(item => this.get(item, isInsideFormConfig));
|
|
3529
|
+
}
|
|
3530
|
+
else if (typeof obj === 'object' && obj !== null) {
|
|
3531
|
+
return Object.keys(obj).reduce((acc, key) => {
|
|
3532
|
+
// 判断当前层级是否在 FormConfiguration 内部
|
|
3533
|
+
const currentIsInsideFormConfig = isInsideFormConfig || key === 'MatrixBlockTypes' || key === 'TableColumns' || key.includes('.');
|
|
3534
|
+
// 如果在 FormConfiguration 内部,保留原字段名
|
|
3535
|
+
const newKey = currentIsInsideFormConfig ? key : key.charAt(0).toLowerCase() + key.slice(1);
|
|
3536
|
+
// 递归处理子属性,并传递是否在 FormConfiguration 内部的状态
|
|
3537
|
+
acc[newKey] = this.get(obj[key], key === 'FormConfiguration');
|
|
3538
|
+
return acc;
|
|
3539
|
+
}, {});
|
|
3540
|
+
}
|
|
3541
|
+
return obj;
|
|
3542
|
+
}
|
|
3543
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: KeysConvertToLowercaseService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3544
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: KeysConvertToLowercaseService, providedIn: 'root' }); }
|
|
3545
|
+
}
|
|
3546
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: KeysConvertToLowercaseService, decorators: [{
|
|
3547
|
+
type: Injectable,
|
|
3548
|
+
args: [{
|
|
3549
|
+
providedIn: 'root'
|
|
3550
|
+
}]
|
|
3551
|
+
}] });
|
|
3552
|
+
|
|
3544
3553
|
/* eslint-disable no-async-promise-executor */
|
|
3545
3554
|
/* eslint-disable @angular-eslint/component-selector */
|
|
3546
3555
|
class MatrixConfigComponent {
|
|
3547
|
-
constructor(fb,
|
|
3556
|
+
constructor(fb, _KeysConvertToLowercaseService, _FieldsDataService, toPinyinService) {
|
|
3548
3557
|
this.fb = fb;
|
|
3549
|
-
this.
|
|
3550
|
-
this.
|
|
3558
|
+
this._KeysConvertToLowercaseService = _KeysConvertToLowercaseService;
|
|
3559
|
+
this._FieldsDataService = _FieldsDataService;
|
|
3560
|
+
this.toPinyinService = toPinyinService;
|
|
3561
|
+
/**表单控件组 */
|
|
3562
|
+
this._FieldControlGroup = [];
|
|
3551
3563
|
this.cdr = inject(ChangeDetectorRef);
|
|
3552
3564
|
/**模态框-状态 */
|
|
3553
3565
|
this.matrixModalOpen = false;
|
|
@@ -3570,7 +3582,7 @@ class MatrixConfigComponent {
|
|
|
3570
3582
|
if (v) {
|
|
3571
3583
|
for (const key in v.formConfiguration) {
|
|
3572
3584
|
if (Array.isArray(v.formConfiguration[key])) {
|
|
3573
|
-
v.formConfiguration[key] = this.
|
|
3585
|
+
v.formConfiguration[key] = this._KeysConvertToLowercaseService.get(v.formConfiguration[key]);
|
|
3574
3586
|
}
|
|
3575
3587
|
}
|
|
3576
3588
|
this._selected = v;
|
|
@@ -3588,20 +3600,24 @@ class MatrixConfigComponent {
|
|
|
3588
3600
|
}
|
|
3589
3601
|
}
|
|
3590
3602
|
AfterInit() {
|
|
3591
|
-
return new Promise(async (resolve
|
|
3592
|
-
this._FieldControlGroup = this.
|
|
3603
|
+
return new Promise(async (resolve) => {
|
|
3604
|
+
this._FieldControlGroup = await this._FieldsDataService.getControlsfieldTypes();
|
|
3593
3605
|
this._Entity.setControl('formConfiguration', this.fb.group(new MatrixConfig()));
|
|
3594
3606
|
await this.setSelectValue();
|
|
3595
3607
|
this.formConfiguration.patchValue(this._selected.formConfiguration);
|
|
3596
3608
|
resolve(true);
|
|
3597
3609
|
});
|
|
3598
3610
|
}
|
|
3611
|
+
/**
|
|
3612
|
+
* 设置选择值
|
|
3613
|
+
* @returns void
|
|
3614
|
+
*/
|
|
3599
3615
|
setSelectValue() {
|
|
3600
|
-
return new Promise((resolve
|
|
3616
|
+
return new Promise((resolve) => {
|
|
3601
3617
|
if (this._selected && this._selected.formControlName == this._type) {
|
|
3602
3618
|
this._selected.formConfiguration['MatrixBlockTypes'].forEach((el, index) => {
|
|
3603
3619
|
this.addMatrixBlockTypeItem(el);
|
|
3604
|
-
el.fields.forEach((elf
|
|
3620
|
+
el.fields.forEach((elf) => {
|
|
3605
3621
|
this.addMatrixFieldItem(elf, index);
|
|
3606
3622
|
});
|
|
3607
3623
|
});
|
|
@@ -3721,7 +3737,7 @@ class MatrixConfigComponent {
|
|
|
3721
3737
|
/**矩阵displayNameInput字段失去焦点 */
|
|
3722
3738
|
displayNameInputBlur(event) {
|
|
3723
3739
|
const value = event.target.value;
|
|
3724
|
-
const pinyin = this.
|
|
3740
|
+
const pinyin = this.toPinyinService.get(value);
|
|
3725
3741
|
const nameInput = this.nameInput;
|
|
3726
3742
|
if (nameInput.value)
|
|
3727
3743
|
return;
|
|
@@ -3730,7 +3746,7 @@ class MatrixConfigComponent {
|
|
|
3730
3746
|
/**矩阵displayNameInput字段失去焦点 */
|
|
3731
3747
|
MatrixFieldDisplayNameInputBlur(event) {
|
|
3732
3748
|
const value = event.target.value;
|
|
3733
|
-
const pinyin = this.
|
|
3749
|
+
const pinyin = this.toPinyinService.get(value);
|
|
3734
3750
|
const FieldnameInput = this.FieldnameInput;
|
|
3735
3751
|
if (FieldnameInput.value)
|
|
3736
3752
|
return;
|
|
@@ -3766,13 +3782,13 @@ class MatrixConfigComponent {
|
|
|
3766
3782
|
CdkDragStart(event) {
|
|
3767
3783
|
this.fieldStartDrag = true;
|
|
3768
3784
|
}
|
|
3769
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixConfigComponent, deps: [{ token: i1$
|
|
3770
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: MatrixConfigComponent, selector: "df-matrix-config", inputs: { type: "type", selected: "selected", Entity: "Entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "matrixModalModalSubmit", first: true, predicate: ["matrixModalModalSubmit"], descendants: true }], ngImport: i0, template: "<div [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::::FormControl:Matrix' | abpLocalization}}</label>\n <div class=\"row\" >\n <div class=\"col-md-3\">\n <div class=\"list-group\" [class.fieldStartDragClass]=\"fieldStartDrag\" cdkDropList (cdkDropListDropped)=\"dropMatrix($event)\" #todoList=\"cdkDropList\"\n [cdkDropListData]=\"MatrixBlockTypes.controls\" [cdkDropListSortPredicate]=\"fieldStartDrag?sortPredicate:sortPredicateTrue\"> \n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::MatrixBlockType' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" type=\"button\" (click.stop)=\"addMatrixBlockType()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixBlockChange(i)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action pe-2\"\n [class.active]=\"i===selectMatrixBlockIndex\" cdkDrag>\n <div style=\"line-break: anywhere;\">\n <div>{{item.value.displayName}}</div>\n <div>{{item.value.name}}</div>\n </div>\n <div class=\"d-flex align-items-center justify-content-between\">\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-light btn-sm me-2\" id=\"dropdownBasic1\"\n style=\"z-index: 8;\" ngbDropdownToggle></button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\" style=\"z-index: 9;\">\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"EditMatrixBlock(item.value)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"DeleteMatrixBlock(i)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n <span class=\"bi bi-arrows-move fs-5 drag-handle\" cdkDragHandle></span>\n </div>\n </button>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"list-group\" *ngIf=\"MatrixBlockTypes?.controls.length>0\" cdkDropList\n (cdkDropListDropped)=\"dropFields($event)\" [cdkDropListData]=\"MatrixBlockTypes.controls[selectMatrixBlockIndex].get('fields').controls\" [cdkDropListConnectedTo]=\"[todoList]\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::Fields' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" type=\"button\" (click.stop)=\"addMatrixField()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <ng-container *ngIf=\"i === selectMatrixBlockIndex\">\n <ng-container *ngFor=\"let el of item.controls['fields'].controls;let fi =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixFieldChange(i,fi)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action pe-2\"\n [class.active]=\"fi===selectMatrixFieldIndex\" cdkDrag (cdkDragStarted)=\"CdkDragStart($event)\">\n <div style=\"line-break: anywhere;\">\n <div>{{el.value.displayName}}</div>\n <div>{{el.value.name}}</div>\n </div>\n <div class=\"d-flex align-items-center justify-content-between\">\n <button type=\"button\"\n (click.stop)=\"deleteMatrixField(item.controls['fields'],fi)\"\n class=\"btn btn-sm btn-li\">{{'AbpUi::Delete' | abpLocalization}}</button>\n <span class=\"bi bi-arrows-move fs-5 drag-handle\" cdkDragHandle></span>\n </div>\n </button>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-6\" formArrayName=\"MatrixBlockTypes\">\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <div [formGroupName]=\"i\" [hidden]=\"i !== selectMatrixBlockIndex\">\n <div formArrayName=\"fields\">\n <ng-container *ngFor=\"let itemf of item.controls['fields'].controls;let fi =index\">\n <div [formGroupName]=\"fi\" [hidden]=\"fi !== selectMatrixFieldIndex\">\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"MatrixFieldDisplayNameInputBlur($event)\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"name\">{{'AbpDynamicForm::FieldName' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n <small class=\"form-text text-muted d-block\">\n {{'AbpDynamicForm::FieldNameHelpText' | abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"formControlName\">{{'Cms::FieldType' |\n abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\">\n <ng-container *ngFor=\"let itemC of _FieldControlGroup;let i =index\">\n <option [value]=\"itemC.name\">{{itemC.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"itemf.value.formControlName&&itemf\">\n <df-dynamic [type]=\"itemf.value.formControlName\"\n [selected]=\"_selected?_selected.formConfiguration?.MatrixBlockTypes[i]?.fields[fi]:''\"\n [entity]=\"itemf\"></df-dynamic>\n\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</div>\n\n\n\n<abp-modal [(visible)]=\"matrixModalOpen\" [busy]=\"modalBusy\" (visibleChange)=\"matrixModalVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{isMatrixEdit?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"matrixModalForm; else loaderRef\">\n <form [formGroup]=\"matrixModalForm\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #matrixModalModalSubmit style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"displayNameInputBlur($event)\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"name\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"matrixModalModalSubmit.nativeElement.click()\">{{'AbpUi::Save' |\n abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n", styles: ["::ng-deep .fieldStartDragClass .cdk-drag-placeholder{opacity:.5;height:0;overflow:hidden;padding:0;border:2px solid var(--bs-list-group-active-color)!important;border-radius:10px}::ng-deep .cdk-drag-placeholder{opacity:.5;background-color:var(--bs-list-group-active-bg)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i5.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i5.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i15.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "culture", "parentFiledName", "fields", "entity"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3785
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: KeysConvertToLowercaseService }, { token: FieldsDataService }, { token: i4.ToPinyinService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3786
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: MatrixConfigComponent, selector: "df-matrix-config", inputs: { type: "type", selected: "selected", Entity: "Entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "matrixModalModalSubmit", first: true, predicate: ["matrixModalModalSubmit"], descendants: true }], ngImport: i0, template: "<div [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::::FormControl:Matrix' | abpLocalization}}</label>\n <div class=\"row\" *ngIf=\"MatrixBlockTypes\">\n <div class=\"col-md-3\" >\n <div class=\"list-group\" [class.fieldStartDragClass]=\"fieldStartDrag\" cdkDropList (cdkDropListDropped)=\"dropMatrix($event)\" #todoList=\"cdkDropList\"\n [cdkDropListData]=\"MatrixBlockTypes.controls\" [cdkDropListSortPredicate]=\"fieldStartDrag?sortPredicate:sortPredicateTrue\"> \n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::MatrixBlockType' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" type=\"button\" (click.stop)=\"addMatrixBlockType()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixBlockChange(i)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action pe-2\"\n [class.active]=\"i===selectMatrixBlockIndex\" cdkDrag>\n <div style=\"line-break: anywhere;\">\n <div>{{item.value.displayName}}</div>\n <div>{{item.value.name}}</div>\n </div>\n <div class=\"d-flex align-items-center justify-content-between\">\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-light btn-sm me-2\" id=\"dropdownBasic1\"\n style=\"z-index: 8;\" ngbDropdownToggle></button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\" style=\"z-index: 9;\">\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"EditMatrixBlock(item.value)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"DeleteMatrixBlock(i)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n <span class=\"bi bi-arrows-move fs-5 drag-handle\" cdkDragHandle></span>\n </div>\n </button>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"list-group\" *ngIf=\"MatrixBlockTypes?.controls.length>0\" cdkDropList\n (cdkDropListDropped)=\"dropFields($event)\" [cdkDropListData]=\"MatrixBlockTypes.controls[selectMatrixBlockIndex].get('fields').controls\" [cdkDropListConnectedTo]=\"[todoList]\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::Fields' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" type=\"button\" (click.stop)=\"addMatrixField()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <ng-container *ngIf=\"i === selectMatrixBlockIndex\">\n <ng-container *ngFor=\"let el of item.controls['fields'].controls;let fi =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixFieldChange(i,fi)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action pe-2\"\n [class.active]=\"fi===selectMatrixFieldIndex\" cdkDrag (cdkDragStarted)=\"CdkDragStart($event)\">\n <div style=\"line-break: anywhere;\">\n <div>{{el.value.displayName}}</div>\n <div>{{el.value.name}}</div>\n </div>\n <div class=\"d-flex align-items-center justify-content-between\">\n <button type=\"button\"\n (click.stop)=\"deleteMatrixField(item.controls['fields'],fi)\"\n class=\"btn btn-sm btn-li\">{{'AbpUi::Delete' | abpLocalization}}</button>\n <span class=\"bi bi-arrows-move fs-5 drag-handle\" cdkDragHandle></span>\n </div>\n </button>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-6\" formArrayName=\"MatrixBlockTypes\">\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <div [formGroupName]=\"i\" [hidden]=\"i !== selectMatrixBlockIndex\">\n <div formArrayName=\"fields\">\n <ng-container *ngFor=\"let itemf of item.controls['fields'].controls;let fi =index\">\n <div [formGroupName]=\"fi\" [hidden]=\"fi !== selectMatrixFieldIndex\">\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"MatrixFieldDisplayNameInputBlur($event)\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"name\">{{'AbpDynamicForm::FieldName' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n <small class=\"form-text text-muted d-block\">\n {{'AbpDynamicForm::FieldNameHelpText' | abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"formControlName\">{{'Cms::FieldType' |\n abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\">\n <ng-container *ngFor=\"let itemC of _FieldControlGroup;let i =index\">\n <option [value]=\"itemC.name\">{{itemC.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"itemf.value.formControlName&&itemf\">\n <df-dynamic-config [type]=\"itemf.value.formControlName\"\n [selected]=\"_selected?_selected.formConfiguration?.MatrixBlockTypes[i]?.fields[fi]:''\"\n [form]=\"itemf\"></df-dynamic-config>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</div>\n\n\n\n<abp-modal [(visible)]=\"matrixModalOpen\" [busy]=\"modalBusy\" (visibleChange)=\"matrixModalVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{isMatrixEdit?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"matrixModalForm; else loaderRef\">\n <form [formGroup]=\"matrixModalForm\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #matrixModalModalSubmit style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"displayNameInputBlur($event)\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"name\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"matrixModalModalSubmit.nativeElement.click()\">{{'AbpUi::Save' |\n abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n", styles: ["::ng-deep .fieldStartDragClass .cdk-drag-placeholder{opacity:.5;height:0;overflow:hidden;padding:0;border:2px solid var(--bs-list-group-active-color)!important;border-radius:10px}::ng-deep .cdk-drag-placeholder{opacity:.5;background-color:var(--bs-list-group-active-bg)}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i6$2.DynamicConfigComponent, selector: "df-dynamic-config", inputs: ["type", "selected", "form"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3771
3787
|
}
|
|
3772
3788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixConfigComponent, decorators: [{
|
|
3773
3789
|
type: Component,
|
|
3774
|
-
args: [{ selector: 'df-matrix-config', template: "<div [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::::FormControl:Matrix' | abpLocalization}}</label>\n <div class=\"row\" >\n <div class=\"col-md-3\">\n <div class=\"list-group\" [class.fieldStartDragClass]=\"fieldStartDrag\" cdkDropList (cdkDropListDropped)=\"dropMatrix($event)\" #todoList=\"cdkDropList\"\n [cdkDropListData]=\"MatrixBlockTypes.controls\" [cdkDropListSortPredicate]=\"fieldStartDrag?sortPredicate:sortPredicateTrue\"> \n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::MatrixBlockType' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" type=\"button\" (click.stop)=\"addMatrixBlockType()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixBlockChange(i)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action pe-2\"\n [class.active]=\"i===selectMatrixBlockIndex\" cdkDrag>\n <div style=\"line-break: anywhere;\">\n <div>{{item.value.displayName}}</div>\n <div>{{item.value.name}}</div>\n </div>\n <div class=\"d-flex align-items-center justify-content-between\">\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-light btn-sm me-2\" id=\"dropdownBasic1\"\n style=\"z-index: 8;\" ngbDropdownToggle></button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\" style=\"z-index: 9;\">\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"EditMatrixBlock(item.value)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"DeleteMatrixBlock(i)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n <span class=\"bi bi-arrows-move fs-5 drag-handle\" cdkDragHandle></span>\n </div>\n </button>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"list-group\" *ngIf=\"MatrixBlockTypes?.controls.length>0\" cdkDropList\n (cdkDropListDropped)=\"dropFields($event)\" [cdkDropListData]=\"MatrixBlockTypes.controls[selectMatrixBlockIndex].get('fields').controls\" [cdkDropListConnectedTo]=\"[todoList]\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::Fields' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" type=\"button\" (click.stop)=\"addMatrixField()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <ng-container *ngIf=\"i === selectMatrixBlockIndex\">\n <ng-container *ngFor=\"let el of item.controls['fields'].controls;let fi =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixFieldChange(i,fi)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action pe-2\"\n [class.active]=\"fi===selectMatrixFieldIndex\" cdkDrag (cdkDragStarted)=\"CdkDragStart($event)\">\n <div style=\"line-break: anywhere;\">\n <div>{{el.value.displayName}}</div>\n <div>{{el.value.name}}</div>\n </div>\n <div class=\"d-flex align-items-center justify-content-between\">\n <button type=\"button\"\n (click.stop)=\"deleteMatrixField(item.controls['fields'],fi)\"\n class=\"btn btn-sm btn-li\">{{'AbpUi::Delete' | abpLocalization}}</button>\n <span class=\"bi bi-arrows-move fs-5 drag-handle\" cdkDragHandle></span>\n </div>\n </button>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-6\" formArrayName=\"MatrixBlockTypes\">\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <div [formGroupName]=\"i\" [hidden]=\"i !== selectMatrixBlockIndex\">\n <div formArrayName=\"fields\">\n <ng-container *ngFor=\"let itemf of item.controls['fields'].controls;let fi =index\">\n <div [formGroupName]=\"fi\" [hidden]=\"fi !== selectMatrixFieldIndex\">\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"MatrixFieldDisplayNameInputBlur($event)\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"name\">{{'AbpDynamicForm::FieldName' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n <small class=\"form-text text-muted d-block\">\n {{'AbpDynamicForm::FieldNameHelpText' | abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"formControlName\">{{'Cms::FieldType' |\n abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\">\n <ng-container *ngFor=\"let itemC of _FieldControlGroup;let i =index\">\n <option [value]=\"itemC.name\">{{itemC.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"itemf.value.formControlName&&itemf\">\n <df-dynamic [type]=\"itemf.value.formControlName\"\n [selected]=\"_selected?_selected.formConfiguration?.MatrixBlockTypes[i]?.fields[fi]:''\"\n [entity]=\"itemf\"></df-dynamic>\n\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</div>\n\n\n\n<abp-modal [(visible)]=\"matrixModalOpen\" [busy]=\"modalBusy\" (visibleChange)=\"matrixModalVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{isMatrixEdit?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"matrixModalForm; else loaderRef\">\n <form [formGroup]=\"matrixModalForm\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #matrixModalModalSubmit style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"displayNameInputBlur($event)\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"name\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"matrixModalModalSubmit.nativeElement.click()\">{{'AbpUi::Save' |\n abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n", styles: ["::ng-deep .fieldStartDragClass .cdk-drag-placeholder{opacity:.5;height:0;overflow:hidden;padding:0;border:2px solid var(--bs-list-group-active-color)!important;border-radius:10px}::ng-deep .cdk-drag-placeholder{opacity:.5;background-color:var(--bs-list-group-active-bg)}\n"] }]
|
|
3775
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3790
|
+
args: [{ selector: 'df-matrix-config', template: "<div [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'Cms::::FormControl:Matrix' | abpLocalization}}</label>\n <div class=\"row\" *ngIf=\"MatrixBlockTypes\">\n <div class=\"col-md-3\" >\n <div class=\"list-group\" [class.fieldStartDragClass]=\"fieldStartDrag\" cdkDropList (cdkDropListDropped)=\"dropMatrix($event)\" #todoList=\"cdkDropList\"\n [cdkDropListData]=\"MatrixBlockTypes.controls\" [cdkDropListSortPredicate]=\"fieldStartDrag?sortPredicate:sortPredicateTrue\"> \n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::MatrixBlockType' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" type=\"button\" (click.stop)=\"addMatrixBlockType()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixBlockChange(i)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action pe-2\"\n [class.active]=\"i===selectMatrixBlockIndex\" cdkDrag>\n <div style=\"line-break: anywhere;\">\n <div>{{item.value.displayName}}</div>\n <div>{{item.value.name}}</div>\n </div>\n <div class=\"d-flex align-items-center justify-content-between\">\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-light btn-sm me-2\" id=\"dropdownBasic1\"\n style=\"z-index: 8;\" ngbDropdownToggle></button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\" style=\"z-index: 9;\">\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"EditMatrixBlock(item.value)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"DeleteMatrixBlock(i)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n <span class=\"bi bi-arrows-move fs-5 drag-handle\" cdkDragHandle></span>\n </div>\n </button>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"list-group\" *ngIf=\"MatrixBlockTypes?.controls.length>0\" cdkDropList\n (cdkDropListDropped)=\"dropFields($event)\" [cdkDropListData]=\"MatrixBlockTypes.controls[selectMatrixBlockIndex].get('fields').controls\" [cdkDropListConnectedTo]=\"[todoList]\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::Fields' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" type=\"button\" (click.stop)=\"addMatrixField()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <ng-container *ngIf=\"i === selectMatrixBlockIndex\">\n <ng-container *ngFor=\"let el of item.controls['fields'].controls;let fi =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixFieldChange(i,fi)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action pe-2\"\n [class.active]=\"fi===selectMatrixFieldIndex\" cdkDrag (cdkDragStarted)=\"CdkDragStart($event)\">\n <div style=\"line-break: anywhere;\">\n <div>{{el.value.displayName}}</div>\n <div>{{el.value.name}}</div>\n </div>\n <div class=\"d-flex align-items-center justify-content-between\">\n <button type=\"button\"\n (click.stop)=\"deleteMatrixField(item.controls['fields'],fi)\"\n class=\"btn btn-sm btn-li\">{{'AbpUi::Delete' | abpLocalization}}</button>\n <span class=\"bi bi-arrows-move fs-5 drag-handle\" cdkDragHandle></span>\n </div>\n </button>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-6\" formArrayName=\"MatrixBlockTypes\">\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <div [formGroupName]=\"i\" [hidden]=\"i !== selectMatrixBlockIndex\">\n <div formArrayName=\"fields\">\n <ng-container *ngFor=\"let itemf of item.controls['fields'].controls;let fi =index\">\n <div [formGroupName]=\"fi\" [hidden]=\"fi !== selectMatrixFieldIndex\">\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"MatrixFieldDisplayNameInputBlur($event)\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"name\">{{'AbpDynamicForm::FieldName' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n <small class=\"form-text text-muted d-block\">\n {{'AbpDynamicForm::FieldNameHelpText' | abpLocalization}}</small>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' |\n abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"formControlName\">{{'Cms::FieldType' |\n abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\">\n <ng-container *ngFor=\"let itemC of _FieldControlGroup;let i =index\">\n <option [value]=\"itemC.name\">{{itemC.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"itemf.value.formControlName&&itemf\">\n <df-dynamic-config [type]=\"itemf.value.formControlName\"\n [selected]=\"_selected?_selected.formConfiguration?.MatrixBlockTypes[i]?.fields[fi]:''\"\n [form]=\"itemf\"></df-dynamic-config>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</div>\n\n\n\n<abp-modal [(visible)]=\"matrixModalOpen\" [busy]=\"modalBusy\" (visibleChange)=\"matrixModalVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{isMatrixEdit?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"matrixModalForm; else loaderRef\">\n <form [formGroup]=\"matrixModalForm\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #matrixModalModalSubmit style=\"display: none\"></button>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"displayNameInputBlur($event)\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\" for=\"name\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"matrixModalModalSubmit.nativeElement.click()\">{{'AbpUi::Save' |\n abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n", styles: ["::ng-deep .fieldStartDragClass .cdk-drag-placeholder{opacity:.5;height:0;overflow:hidden;padding:0;border:2px solid var(--bs-list-group-active-color)!important;border-radius:10px}::ng-deep .cdk-drag-placeholder{opacity:.5;background-color:var(--bs-list-group-active-bg)}\n"] }]
|
|
3791
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: KeysConvertToLowercaseService }, { type: FieldsDataService }, { type: i4.ToPinyinService }], propDecorators: { type: [{
|
|
3776
3792
|
type: Input
|
|
3777
3793
|
}], selected: [{
|
|
3778
3794
|
type: Input
|
|
@@ -3788,20 +3804,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
3788
3804
|
|
|
3789
3805
|
/* eslint-disable @angular-eslint/component-selector */
|
|
3790
3806
|
class MatrixControlComponent {
|
|
3791
|
-
constructor(fb,
|
|
3807
|
+
constructor(fb, _KeysConvertToLowercaseService) {
|
|
3792
3808
|
this.fb = fb;
|
|
3793
|
-
this.
|
|
3809
|
+
this._KeysConvertToLowercaseService = _KeysConvertToLowercaseService;
|
|
3794
3810
|
/**字段配置列表 */
|
|
3795
3811
|
this._fields = '';
|
|
3796
3812
|
this.cdr = inject(ChangeDetectorRef);
|
|
3797
3813
|
/**矩阵列表 */
|
|
3798
3814
|
this.MatrixBlockTypesList = [];
|
|
3815
|
+
/**是否全部展开 */
|
|
3816
|
+
this.isAllExpanded = false;
|
|
3799
3817
|
}
|
|
3800
3818
|
set fields(v) {
|
|
3801
3819
|
if (v) {
|
|
3802
3820
|
for (const key in v.field?.formConfiguration) {
|
|
3803
3821
|
if (Array.isArray(v.field?.formConfiguration[key])) {
|
|
3804
|
-
v.field.formConfiguration[key] = this.
|
|
3822
|
+
v.field.formConfiguration[key] = this._KeysConvertToLowercaseService.get(v.field?.formConfiguration[key]);
|
|
3805
3823
|
}
|
|
3806
3824
|
}
|
|
3807
3825
|
this._fields = v;
|
|
@@ -3812,7 +3830,7 @@ class MatrixControlComponent {
|
|
|
3812
3830
|
}
|
|
3813
3831
|
set selected(v) {
|
|
3814
3832
|
if (v) {
|
|
3815
|
-
v = this.
|
|
3833
|
+
v = this._KeysConvertToLowercaseService.get(v);
|
|
3816
3834
|
this._selected = v;
|
|
3817
3835
|
}
|
|
3818
3836
|
}
|
|
@@ -3840,7 +3858,7 @@ class MatrixControlComponent {
|
|
|
3840
3858
|
}
|
|
3841
3859
|
}
|
|
3842
3860
|
this._selected = '';
|
|
3843
|
-
console.log(this.fieldNameControl, 'fieldNameControl', this._fields.field.name);
|
|
3861
|
+
// console.log(this.fieldNameControl, 'fieldNameControl', this._fields.field.name);
|
|
3844
3862
|
}
|
|
3845
3863
|
}
|
|
3846
3864
|
AfterInit() {
|
|
@@ -3863,6 +3881,10 @@ class MatrixControlComponent {
|
|
|
3863
3881
|
this._selected.forEach(el => {
|
|
3864
3882
|
this.addMatrixControl(formConfiguration.MatrixBlockTypes.find(item => item.name == el.matrixBlockTypeName));
|
|
3865
3883
|
});
|
|
3884
|
+
// this.isAllExpanded=false;
|
|
3885
|
+
}
|
|
3886
|
+
else {
|
|
3887
|
+
this.isAllExpanded = true;
|
|
3866
3888
|
}
|
|
3867
3889
|
this.MatrixBlockTypesList = formConfiguration.MatrixBlockTypes;
|
|
3868
3890
|
resolve(true);
|
|
@@ -3925,13 +3947,22 @@ class MatrixControlComponent {
|
|
|
3925
3947
|
moveItemInArray(this.fieldNameControl.controls, event.previousIndex, event.currentIndex);
|
|
3926
3948
|
this.fieldNameControl.updateValueAndValidity();
|
|
3927
3949
|
}
|
|
3928
|
-
|
|
3929
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: MatrixControlComponent, selector: "df-matrix-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div [class]=\"fieldNameControl?.controls?.length>0?'border p-2 rounded-2':''\">\n <div [formArrayName]=\"_fields.field.name\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container *ngFor=\"let item of fieldNameControl.controls;let i=index\">\n <div class=\"card mb-3 border \" [formGroupName]=\"i\" cdkDrag cdkDragLockAxis=\"y\"\n [cdkDragData]=\"item\">\n <div type=\"button\"\n class=\"card-header d-flex align-items-center justify-content-between border-bottom pt-1\" (click.stop)=\"ExpandChange(i)\">\n <div class=\"d-flex\">\n <div class=\"drag-handle me-2\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>{{item.value.displayName}}\n </div>\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-sm btn-light p-0\"\n (click.stop)=\"deleteMatrixControl(i,item)\"><i\n class=\"fas fa-trash p-2\"></i></button>\n <i class=\"bi bi-chevron-down ms-2 \" [style]=\"{display: 'inline-block', transform: item.value.isOpen?'rotate(180deg)':'rotate(0deg)'}\" ></i>\n </div>\n </div>\n <div class=\"card-body\" style=\"overflow:hidden;transition: all 0.2s;\" [style]=\"item.value.isOpen?'height:auto;':'height:0px;padding-top:0px;padding-bottom:0px;'\">\n <ng-container *ngFor=\"let el of MatrixBlockTypesList;let il =index\">\n <ng-container *ngIf=\"el.name===item.value.matrixBlockTypeName\">\n <ng-container *ngFor=\"let elf of el.fields; let fi=index\">\n <ng-container *ngIf=\"item&&elf&&_culture\">\n <df-dynamic [fields]=\"{ field: elf,displayName:elf.displayName }\"\n [selected]=\"_selected ? _selected[i]?_selected[i][_parentFiledName][elf.name]:'': ''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"_culture\"\n [entity]=\"item\"></df-dynamic>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <!-- <div class=\"card mb-3 border \" [formGroupName]=\"i\" cdkDrag cdkDragLockAxis=\"y\"\n [cdkDragData]=\"item\">\n <div ngbAccordion #accordion=\"ngbAccordion\">\n <div ngbAccordionItem=\"first\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>\n <div type=\"button\"\n class=\"card-header d-flex align-items-center justify-content-between border-bottom pt-1\">\n <div class=\"d-flex\">\n <div class=\"drag-handle me-2\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>{{item.value.displayName}}\n </div>\n <div>\n <button class=\"btn btn-sm btn-light p-0\"\n (click.stop)=\"deleteMatrixControl(i,item)\"><i\n class=\"fas fa-trash p-2\"></i></button>\n <i class=\"bi bi-chevron-down ms-2\"></i>\n </div>\n </div>\n </button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <div class=\"card-body\">\n <ng-container *ngFor=\"let el of MatrixBlockTypesList;let il =index\">\n <ng-container *ngIf=\"el.name===item.value.matrixBlockTypeName\">\n <ng-container *ngFor=\"let elf of el.fields; let fi=index\">\n <ng-container *ngIf=\"item&&elf&&_culture\">\n <df-dynamic\n [fields]=\"{ field: elf,displayName:elf.displayName }\"\n [selected]=\"_selected ? _selected[i]?_selected[i][_parentFiledName][elf.name]:'': ''\"\n [parentFiledName]=\"'extraProperties'\"\n [culture]=\"_culture\"\n [entity]=\"item\"></df-dynamic>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </ng-template>\n </div>\n </div>\n </div>\n </div>\n </div> -->\n\n\n <!-- -->\n </ng-container>\n </div>\n <div class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">\n <ng-container *ngFor=\"let item of MatrixBlockTypesList;let i =index\">\n <button type=\"button\" class=\"btn btn-dark soft btn-sm\" (click.stop)=\"addMatrixControl(item)\"><i\n class=\"fas fa-plus me-1\"></i>{{item.displayName}}</button>\n </ng-container>\n </div>\n @if(fieldNameControl?.errors?.required && fieldNameControl.touched){\n <span class=\"form-text invalid-feedback d-block\">{{\"AbpValidation::ThisFieldIsRequired.\"|abpLocalization}}</span>\n }\n \n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i5.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i15.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "culture", "parentFiledName", "fields", "entity"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3950
|
+
/**切换全部展开/折叠状态 */
|
|
3951
|
+
toggleAll() {
|
|
3952
|
+
this.isAllExpanded = !this.isAllExpanded;
|
|
3953
|
+
if (this.fieldNameControl) {
|
|
3954
|
+
this.fieldNameControl.controls.forEach((control) => {
|
|
3955
|
+
control.get('isOpen').patchValue(this.isAllExpanded);
|
|
3956
|
+
});
|
|
3957
|
+
}
|
|
3958
|
+
}
|
|
3959
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixControlComponent, deps: [{ token: i1$1.FormBuilder }, { token: KeysConvertToLowercaseService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3960
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: MatrixControlComponent, selector: "df-matrix-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3 position-relative\">\n <div class=\"d-flex align-items-center justify-content-between position-sticky bg-white py-1\" style=\"top: 42px;z-index: 10;\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n @if(fieldNameControl?.controls?.length>0){\n <button type=\"button\" class=\"btn btn-sm btn-light\" (click)=\"toggleAll()\">\n <i class=\"bi\" [class.bi-arrows-expand]=\"!isAllExpanded\" [class.bi-arrows-collapse]=\"isAllExpanded\"></i>\n <!-- {{ isAllExpanded ? '\u6298\u53E0\u5168\u90E8' : '\u5C55\u5F00\u5168\u90E8' }} -->\n </button>\n }\n </div>\n <div [class]=\"fieldNameControl?.controls?.length>0?'border p-2 rounded-2':''\">\n <div [formArrayName]=\"_fields.field.name\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container *ngFor=\"let item of fieldNameControl.controls;let i=index\">\n <div class=\"card mb-3 border \" [formGroupName]=\"i\" cdkDrag cdkDragLockAxis=\"y\"\n [cdkDragData]=\"item\">\n <div type=\"button\"\n class=\"card-header d-flex align-items-center justify-content-between border-bottom pt-1\" (click.stop)=\"ExpandChange(i)\">\n <div class=\"d-flex\">\n <div class=\"drag-handle me-2\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>{{item.value.displayName}}\n </div>\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-sm btn-light p-0\"\n (click.stop)=\"deleteMatrixControl(i,item)\"><i\n class=\"fas fa-trash p-2\"></i></button>\n <i class=\"bi bi-chevron-down ms-2 \" [style]=\"{display: 'inline-block', transform: item.value.isOpen?'rotate(180deg)':'rotate(0deg)'}\" ></i>\n </div>\n </div>\n <div class=\"card-body\" style=\"overflow:hidden;transition: all 0.2s;\" [style]=\"item.value.isOpen?'height:auto;':'height:0px;padding-top:0px;padding-bottom:0px;'\">\n <ng-container *ngFor=\"let el of MatrixBlockTypesList;let il =index\">\n <ng-container *ngIf=\"el.name===item.value.matrixBlockTypeName\">\n <ng-container *ngFor=\"let elf of el.fields; let fi=index\">\n <ng-container *ngIf=\"item&&elf&&_culture\">\n <df-dynamic-control [fields]=\"{ field: elf,displayName:elf.displayName }\"\n [selected]=\"_selected ? _selected[i]?_selected[i][_parentFiledName][elf.name]:'': ''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"_culture\"\n [entity]=\"item\"></df-dynamic-control>\n \n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n \n </ng-container>\n </div>\n <div class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">\n <ng-container *ngFor=\"let item of MatrixBlockTypesList;let i =index\">\n <button type=\"button\" class=\"btn btn-dark soft btn-sm\" (click.stop)=\"addMatrixControl(item)\"><i\n class=\"fas fa-plus me-1\"></i>{{item.displayName}}</button>\n </ng-container>\n </div>\n @if(fieldNameControl?.errors?.required && fieldNameControl.touched){\n <span class=\"form-text invalid-feedback d-block\">{{\"AbpValidation::ThisFieldIsRequired.\"|abpLocalization}}</span>\n }\n \n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i6$2.DynamicControlComponent, selector: "df-dynamic-control", inputs: ["selected", "culture", "parentFiledName", "fields", "entity"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3930
3961
|
}
|
|
3931
3962
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixControlComponent, decorators: [{
|
|
3932
3963
|
type: Component,
|
|
3933
|
-
args: [{ selector: 'df-matrix-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div [class]=\"fieldNameControl?.controls?.length>0?'border p-2 rounded-2':''\">\n <div [formArrayName]=\"_fields.field.name\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container *ngFor=\"let item of fieldNameControl.controls;let i=index\">\n <div class=\"card mb-3 border \" [formGroupName]=\"i\" cdkDrag cdkDragLockAxis=\"y\"\n [cdkDragData]=\"item\">\n <div type=\"button\"\n class=\"card-header d-flex align-items-center justify-content-between border-bottom pt-1\" (click.stop)=\"ExpandChange(i)\">\n <div class=\"d-flex\">\n <div class=\"drag-handle me-2\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>{{item.value.displayName}}\n </div>\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-sm btn-light p-0\"\n (click.stop)=\"deleteMatrixControl(i,item)\"><i\n class=\"fas fa-trash p-2\"></i></button>\n <i class=\"bi bi-chevron-down ms-2 \" [style]=\"{display: 'inline-block', transform: item.value.isOpen?'rotate(180deg)':'rotate(0deg)'}\" ></i>\n </div>\n </div>\n <div class=\"card-body\" style=\"overflow:hidden;transition: all 0.2s;\" [style]=\"item.value.isOpen?'height:auto;':'height:0px;padding-top:0px;padding-bottom:0px;'\">\n <ng-container *ngFor=\"let el of MatrixBlockTypesList;let il =index\">\n <ng-container *ngIf=\"el.name===item.value.matrixBlockTypeName\">\n <ng-container *ngFor=\"let elf of el.fields; let fi=index\">\n <ng-container *ngIf=\"item&&elf&&_culture\">\n <df-dynamic [fields]=\"{ field: elf,displayName:elf.displayName }\"\n [selected]=\"_selected ? _selected[i]?_selected[i][_parentFiledName][elf.name]:'': ''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"_culture\"\n [entity]=\"item\"></df-dynamic>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n
|
|
3934
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3964
|
+
args: [{ selector: 'df-matrix-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3 position-relative\">\n <div class=\"d-flex align-items-center justify-content-between position-sticky bg-white py-1\" style=\"top: 42px;z-index: 10;\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n @if(fieldNameControl?.controls?.length>0){\n <button type=\"button\" class=\"btn btn-sm btn-light\" (click)=\"toggleAll()\">\n <i class=\"bi\" [class.bi-arrows-expand]=\"!isAllExpanded\" [class.bi-arrows-collapse]=\"isAllExpanded\"></i>\n <!-- {{ isAllExpanded ? '\u6298\u53E0\u5168\u90E8' : '\u5C55\u5F00\u5168\u90E8' }} -->\n </button>\n }\n </div>\n <div [class]=\"fieldNameControl?.controls?.length>0?'border p-2 rounded-2':''\">\n <div [formArrayName]=\"_fields.field.name\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <ng-container *ngFor=\"let item of fieldNameControl.controls;let i=index\">\n <div class=\"card mb-3 border \" [formGroupName]=\"i\" cdkDrag cdkDragLockAxis=\"y\"\n [cdkDragData]=\"item\">\n <div type=\"button\"\n class=\"card-header d-flex align-items-center justify-content-between border-bottom pt-1\" (click.stop)=\"ExpandChange(i)\">\n <div class=\"d-flex\">\n <div class=\"drag-handle me-2\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>{{item.value.displayName}}\n </div>\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-sm btn-light p-0\"\n (click.stop)=\"deleteMatrixControl(i,item)\"><i\n class=\"fas fa-trash p-2\"></i></button>\n <i class=\"bi bi-chevron-down ms-2 \" [style]=\"{display: 'inline-block', transform: item.value.isOpen?'rotate(180deg)':'rotate(0deg)'}\" ></i>\n </div>\n </div>\n <div class=\"card-body\" style=\"overflow:hidden;transition: all 0.2s;\" [style]=\"item.value.isOpen?'height:auto;':'height:0px;padding-top:0px;padding-bottom:0px;'\">\n <ng-container *ngFor=\"let el of MatrixBlockTypesList;let il =index\">\n <ng-container *ngIf=\"el.name===item.value.matrixBlockTypeName\">\n <ng-container *ngFor=\"let elf of el.fields; let fi=index\">\n <ng-container *ngIf=\"item&&elf&&_culture\">\n <df-dynamic-control [fields]=\"{ field: elf,displayName:elf.displayName }\"\n [selected]=\"_selected ? _selected[i]?_selected[i][_parentFiledName][elf.name]:'': ''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"_culture\"\n [entity]=\"item\"></df-dynamic-control>\n \n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n \n </ng-container>\n </div>\n <div class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">\n <ng-container *ngFor=\"let item of MatrixBlockTypesList;let i =index\">\n <button type=\"button\" class=\"btn btn-dark soft btn-sm\" (click.stop)=\"addMatrixControl(item)\"><i\n class=\"fas fa-plus me-1\"></i>{{item.displayName}}</button>\n </ng-container>\n </div>\n @if(fieldNameControl?.errors?.required && fieldNameControl.touched){\n <span class=\"form-text invalid-feedback d-block\">{{\"AbpValidation::ThisFieldIsRequired.\"|abpLocalization}}</span>\n }\n \n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n</form>" }]
|
|
3965
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: KeysConvertToLowercaseService }], propDecorators: { fields: [{
|
|
3935
3966
|
type: Input
|
|
3936
3967
|
}], parentFiledName: [{
|
|
3937
3968
|
type: Input
|
|
@@ -3967,7 +3998,7 @@ class MatrixViewComponent {
|
|
|
3967
3998
|
}
|
|
3968
3999
|
}
|
|
3969
4000
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3970
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: MatrixViewComponent, selector: "cms-matrix-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{'Cms::NotShowInList'|abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type:
|
|
4001
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: MatrixViewComponent, selector: "cms-matrix-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{'Cms::NotShowInList'|abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3971
4002
|
}
|
|
3972
4003
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixViewComponent, decorators: [{
|
|
3973
4004
|
type: Component,
|
|
@@ -4005,12 +4036,16 @@ class TableFormControl {
|
|
|
4005
4036
|
}
|
|
4006
4037
|
}
|
|
4007
4038
|
|
|
4039
|
+
/* eslint-disable no-async-promise-executor */
|
|
4008
4040
|
/* eslint-disable @angular-eslint/component-selector */
|
|
4009
4041
|
class TableConfigComponent {
|
|
4010
|
-
constructor(fb,
|
|
4042
|
+
constructor(fb, _KeysConvertToLowercaseService, _FieldsDataService, toPinyinService) {
|
|
4011
4043
|
this.fb = fb;
|
|
4012
|
-
this.
|
|
4013
|
-
this.
|
|
4044
|
+
this._KeysConvertToLowercaseService = _KeysConvertToLowercaseService;
|
|
4045
|
+
this._FieldsDataService = _FieldsDataService;
|
|
4046
|
+
this.toPinyinService = toPinyinService;
|
|
4047
|
+
/**表单控件组 */
|
|
4048
|
+
this._fieldControlGroup = [];
|
|
4014
4049
|
this.cdr = inject(ChangeDetectorRef);
|
|
4015
4050
|
/**创建站点模态框状态 */
|
|
4016
4051
|
this.tableSelectOpen = false;
|
|
@@ -4025,7 +4060,7 @@ class TableConfigComponent {
|
|
|
4025
4060
|
if (v) {
|
|
4026
4061
|
for (const key in v.formConfiguration) {
|
|
4027
4062
|
if (Array.isArray(v.formConfiguration[key])) {
|
|
4028
|
-
v.formConfiguration[key] = this.
|
|
4063
|
+
v.formConfiguration[key] = this._KeysConvertToLowercaseService.get(v.formConfiguration[key]);
|
|
4029
4064
|
}
|
|
4030
4065
|
}
|
|
4031
4066
|
this._selected = v;
|
|
@@ -4045,15 +4080,13 @@ class TableConfigComponent {
|
|
|
4045
4080
|
async dataLoaded() {
|
|
4046
4081
|
if (this._Entity && this._type) {
|
|
4047
4082
|
await this.AfterInit();
|
|
4048
|
-
this.cdr.detectChanges(); // 手动触发变更检测
|
|
4049
|
-
this.submitclick?.nativeElement?.click();
|
|
4050
4083
|
}
|
|
4051
4084
|
}
|
|
4052
4085
|
/**增加选项 */
|
|
4053
4086
|
addTableColumns() {
|
|
4054
4087
|
this.TableColumns.push(this.fb.group({
|
|
4055
4088
|
...new TableFormControl(),
|
|
4056
|
-
formConfiguration: [{}]
|
|
4089
|
+
formConfiguration: [{}],
|
|
4057
4090
|
}));
|
|
4058
4091
|
this.cdr.detectChanges(); // 手动触发变更检测
|
|
4059
4092
|
}
|
|
@@ -4061,12 +4094,15 @@ class TableConfigComponent {
|
|
|
4061
4094
|
deleteTableColumns(index) {
|
|
4062
4095
|
this.TableColumns.removeAt(index);
|
|
4063
4096
|
}
|
|
4064
|
-
AfterInit() {
|
|
4065
|
-
return new Promise((resolve
|
|
4097
|
+
async AfterInit() {
|
|
4098
|
+
return new Promise(async (resolve) => {
|
|
4066
4099
|
this._Entity?.setControl('formConfiguration', this.fb.group(new TableConfig()));
|
|
4067
|
-
|
|
4100
|
+
// this.formConfiguration.addValidators([this.validateTableColumns]);
|
|
4101
|
+
this.cdr.detectChanges(); // 手动触发变更检测
|
|
4102
|
+
this.submitclick?.nativeElement?.click();
|
|
4103
|
+
this._fieldControlGroup = await this._FieldsDataService.getControlsfieldTypes();
|
|
4068
4104
|
if (this._selected && this._selected.formControlName == this._type) {
|
|
4069
|
-
this._selected.formConfiguration['TableColumns'].forEach(
|
|
4105
|
+
this._selected.formConfiguration['TableColumns'].forEach(() => {
|
|
4070
4106
|
this.addTableColumns();
|
|
4071
4107
|
});
|
|
4072
4108
|
this.formConfiguration.patchValue(this._selected.formConfiguration);
|
|
@@ -4074,18 +4110,35 @@ class TableConfigComponent {
|
|
|
4074
4110
|
else {
|
|
4075
4111
|
this.addTableColumns();
|
|
4076
4112
|
}
|
|
4113
|
+
this.TableColumns.valueChanges.subscribe(value => {
|
|
4114
|
+
console.log(value, 'value');
|
|
4115
|
+
});
|
|
4077
4116
|
resolve(true);
|
|
4078
4117
|
});
|
|
4079
4118
|
}
|
|
4119
|
+
/**
|
|
4120
|
+
* 自定义验证函数
|
|
4121
|
+
* @param formArray 要验证的 FormArray
|
|
4122
|
+
* @returns 验证结果,如果所有项都通过验证则返回 null,否则返回 { invalidArray: true }
|
|
4123
|
+
*/
|
|
4124
|
+
validateTableColumns(formArray) {
|
|
4125
|
+
// console.log(formArray,'自定义验证函数');
|
|
4126
|
+
if (formArray.length === 0) {
|
|
4127
|
+
return { invalidArray: true };
|
|
4128
|
+
}
|
|
4129
|
+
return null;
|
|
4130
|
+
}
|
|
4080
4131
|
/**选择表格的表单控件 */
|
|
4081
4132
|
selectTableControl(event, i, item) {
|
|
4082
4133
|
if (event.target.value === '')
|
|
4083
4134
|
return;
|
|
4135
|
+
console.log(this.CurrentSelectionTableControlName, 'CurrentSelectionTableControlName');
|
|
4084
4136
|
this.CurrentSelectionTableControlName = event.target.value;
|
|
4085
4137
|
this.tableSelectOpen = true;
|
|
4086
4138
|
this.tableSelectForm = this.fb.group(new TableFormControl());
|
|
4087
4139
|
this.TableColumnsIndex = i;
|
|
4088
4140
|
this.itemForm = item;
|
|
4141
|
+
console.log(this.TableColumns, 'TableColumns', this._tableSelected);
|
|
4089
4142
|
}
|
|
4090
4143
|
/**创建站点模态框状态改变 */
|
|
4091
4144
|
tableSelectVisibleChange(event) {
|
|
@@ -4111,10 +4164,10 @@ class TableConfigComponent {
|
|
|
4111
4164
|
this.CurrentSelectionTableControlName = rows.get('formControlName').value;
|
|
4112
4165
|
this.tableSelectForm = this.fb.group(new TableFormControl());
|
|
4113
4166
|
this.tableSelectForm.patchValue({
|
|
4114
|
-
...rows.value
|
|
4167
|
+
...rows.value,
|
|
4115
4168
|
});
|
|
4116
4169
|
this.tableSelectForm.get('formConfiguration')?.patchValue({
|
|
4117
|
-
...rows.value['formConfiguration']
|
|
4170
|
+
...rows.value['formConfiguration'],
|
|
4118
4171
|
});
|
|
4119
4172
|
this._tableSelected = rows.value;
|
|
4120
4173
|
this.TableColumnsIndex = i;
|
|
@@ -4130,7 +4183,7 @@ class TableConfigComponent {
|
|
|
4130
4183
|
/**字段标签input失去标点生成字段名字 */
|
|
4131
4184
|
disPlayNameInputBlur(event, item) {
|
|
4132
4185
|
const value = event.target.value;
|
|
4133
|
-
const pinyin = this.
|
|
4186
|
+
const pinyin = this.toPinyinService.get(value);
|
|
4134
4187
|
const nameInput = item.get('name');
|
|
4135
4188
|
if (nameInput.value)
|
|
4136
4189
|
return;
|
|
@@ -4141,13 +4194,13 @@ class TableConfigComponent {
|
|
|
4141
4194
|
moveItemInArray(this.TableColumns.controls, event.previousIndex, event.currentIndex);
|
|
4142
4195
|
this.TableColumns.updateValueAndValidity();
|
|
4143
4196
|
}
|
|
4144
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableConfigComponent, deps: [{ token: i1$
|
|
4145
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TableConfigComponent, selector: "df-table-config", inputs: { Entity: "Entity", selected: "selected", type: "type" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "tableSelectModalSubmit", first: true, predicate: ["tableSelectModalSubmit"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::SelectListItem' | abpLocalization}}</label>\n <table class=\"table drag-table\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'Cms::TableColumnDisplayName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnForm' | abpLocalization}}</th>\n <th scope=\"col\" class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" type=\"button\" (click.stop)=\"addTableColumns()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button> \n </th>\n </tr>\n </thead>\n <tbody formArrayName=\"TableColumns\">\n <ng-container *ngFor=\"let item of TableColumns.controls;let i=index\">\n <tr [formGroupName]=\"i\" cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"displayName\"
|
|
4197
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: KeysConvertToLowercaseService }, { token: FieldsDataService }, { token: i4.ToPinyinService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4198
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TableConfigComponent, selector: "df-table-config", inputs: { Entity: "Entity", selected: "selected", type: "type" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "tableSelectModalSubmit", first: true, predicate: ["tableSelectModalSubmit"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::SelectListItem' | abpLocalization}}</label>\n <table class=\"table drag-table\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'Cms::TableColumnDisplayName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnForm' | abpLocalization}}</th>\n <th scope=\"col\" class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" type=\"button\" (click.stop)=\"addTableColumns()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button> \n </th>\n </tr>\n </thead>\n <tbody formArrayName=\"TableColumns\">\n <ng-container *ngFor=\"let item of TableColumns.controls;let i=index\">\n <tr [formGroupName]=\"i\" cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"displayName\" required (blur)=\"disPlayNameInputBlur($event,item)\" ></td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"name\" required></td>\n <td>\n <select class=\"form-select\" formControlName=\"formControlName\" required\n (change)=\"selectTableControl($event,i,item)\">\n <option value=\"\">{{'Cms::SelectFormControl' | abpLocalization}}</option>\n <ng-container *ngFor=\"let item_f of _fieldControlGroup;let i_f =index\">\n <option [value]=\"item_f.name\">{{item_f.displayName}}</option>\n </ng-container>\n </select>\n </td>\n <td scope=\"row\">\n <div class=\"flex-start\">\n <button class=\"btn btn-light btn-sm \" type=\"button\" (click.stop)=\"EditSitesBtn(item,i)\">\n <i class=\"fas fa-edit\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" type=\"button\" (click.stop)=\"deleteTableColumns(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n <button type=\"submit\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>\n\n\n<abp-modal [(visible)]=\"tableSelectOpen\" [busy]=\"modalBusy\" (visibleChange)=\"tableSelectVisibleChange($event)\" [options]=\"{ size: CurrentSelectionTableControlName==='Matrix'?'xl':'' ,scrollable:false }\">\n <ng-template #abpHeader>\n <h3>{{_tableSelected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"tableSelectForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"tableSelectForm\"\n (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #tableSelectModalSubmit style=\"display: none\"></button>\n <ng-container *ngIf=\"CurrentSelectionTableControlName&&tableSelectForm\">\n <df-dynamic-config [type]=\"CurrentSelectionTableControlName\" \n [selected]=\"_tableSelected\" [formGroup]=\"tableSelectForm\" [form]=\"tableSelectForm\"></df-dynamic-config>\n </ng-container>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"tableSelectModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [".flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-start{display:flex;align-items:center;justify-content:flex-start}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: i6$2.DynamicConfigComponent, selector: "df-dynamic-config", inputs: ["type", "selected", "form"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
4146
4199
|
}
|
|
4147
4200
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableConfigComponent, decorators: [{
|
|
4148
4201
|
type: Component,
|
|
4149
|
-
args: [{ selector: 'df-table-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::SelectListItem' | abpLocalization}}</label>\n <table class=\"table drag-table\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'Cms::TableColumnDisplayName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnForm' | abpLocalization}}</th>\n <th scope=\"col\" class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" type=\"button\" (click.stop)=\"addTableColumns()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button> \n </th>\n </tr>\n </thead>\n <tbody formArrayName=\"TableColumns\">\n <ng-container *ngFor=\"let item of TableColumns.controls;let i=index\">\n <tr [formGroupName]=\"i\" cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"displayName\"
|
|
4150
|
-
}], ctorParameters: () => [{ type: i1$
|
|
4202
|
+
args: [{ selector: 'df-table-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'AbpDynamicForm::SelectListItem' | abpLocalization}}</label>\n <table class=\"table drag-table\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th scope=\"col\"></th>\n <th scope=\"col\">{{'Cms::TableColumnDisplayName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnForm' | abpLocalization}}</th>\n <th scope=\"col\" class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" type=\"button\" (click.stop)=\"addTableColumns()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button> \n </th>\n </tr>\n </thead>\n <tbody formArrayName=\"TableColumns\">\n <ng-container *ngFor=\"let item of TableColumns.controls;let i=index\">\n <tr [formGroupName]=\"i\" cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"displayName\" required (blur)=\"disPlayNameInputBlur($event,item)\" ></td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"name\" required></td>\n <td>\n <select class=\"form-select\" formControlName=\"formControlName\" required\n (change)=\"selectTableControl($event,i,item)\">\n <option value=\"\">{{'Cms::SelectFormControl' | abpLocalization}}</option>\n <ng-container *ngFor=\"let item_f of _fieldControlGroup;let i_f =index\">\n <option [value]=\"item_f.name\">{{item_f.displayName}}</option>\n </ng-container>\n </select>\n </td>\n <td scope=\"row\">\n <div class=\"flex-start\">\n <button class=\"btn btn-light btn-sm \" type=\"button\" (click.stop)=\"EditSitesBtn(item,i)\">\n <i class=\"fas fa-edit\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" type=\"button\" (click.stop)=\"deleteTableColumns(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n <button type=\"submit\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>\n\n\n<abp-modal [(visible)]=\"tableSelectOpen\" [busy]=\"modalBusy\" (visibleChange)=\"tableSelectVisibleChange($event)\" [options]=\"{ size: CurrentSelectionTableControlName==='Matrix'?'xl':'' ,scrollable:false }\">\n <ng-template #abpHeader>\n <h3>{{_tableSelected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"tableSelectForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"tableSelectForm\"\n (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #tableSelectModalSubmit style=\"display: none\"></button>\n <ng-container *ngIf=\"CurrentSelectionTableControlName&&tableSelectForm\">\n <df-dynamic-config [type]=\"CurrentSelectionTableControlName\" \n [selected]=\"_tableSelected\" [formGroup]=\"tableSelectForm\" [form]=\"tableSelectForm\"></df-dynamic-config>\n </ng-container>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"tableSelectModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [".flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-start{display:flex;align-items:center;justify-content:flex-start}\n"] }]
|
|
4203
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: KeysConvertToLowercaseService }, { type: FieldsDataService }, { type: i4.ToPinyinService }], propDecorators: { Entity: [{
|
|
4151
4204
|
type: Input
|
|
4152
4205
|
}], selected: [{
|
|
4153
4206
|
type: Input
|
|
@@ -4162,9 +4215,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
4162
4215
|
}] } });
|
|
4163
4216
|
|
|
4164
4217
|
class TableControlComponent {
|
|
4165
|
-
constructor(
|
|
4218
|
+
constructor(_KeysConvertToLowercaseService // private fb: FormBuilder,
|
|
4166
4219
|
) {
|
|
4167
|
-
this.
|
|
4220
|
+
this._KeysConvertToLowercaseService = _KeysConvertToLowercaseService;
|
|
4168
4221
|
this.fb = inject(FormBuilder);
|
|
4169
4222
|
/**字段配置列表 */
|
|
4170
4223
|
this._fields = '';
|
|
@@ -4178,7 +4231,7 @@ class TableControlComponent {
|
|
|
4178
4231
|
if (v) {
|
|
4179
4232
|
for (const key in v.field?.formConfiguration) {
|
|
4180
4233
|
if (Array.isArray(v.field?.formConfiguration[key])) {
|
|
4181
|
-
v.field.formConfiguration[key] = this.
|
|
4234
|
+
v.field.formConfiguration[key] = this._KeysConvertToLowercaseService.get(v.field?.formConfiguration[key]);
|
|
4182
4235
|
}
|
|
4183
4236
|
}
|
|
4184
4237
|
this._fields = v;
|
|
@@ -4191,7 +4244,7 @@ class TableControlComponent {
|
|
|
4191
4244
|
}
|
|
4192
4245
|
set selected(v) {
|
|
4193
4246
|
if (v) {
|
|
4194
|
-
v = this.
|
|
4247
|
+
v = this._KeysConvertToLowercaseService.get(v);
|
|
4195
4248
|
this._selected = v;
|
|
4196
4249
|
this.dataLoaded();
|
|
4197
4250
|
}
|
|
@@ -4294,13 +4347,13 @@ class TableControlComponent {
|
|
|
4294
4347
|
moveItemInArray(this.fieldNameControl.controls, event.previousIndex, event.currentIndex);
|
|
4295
4348
|
this.fieldNameControl.updateValueAndValidity();
|
|
4296
4349
|
}
|
|
4297
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableControlComponent, deps: [{ token:
|
|
4298
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: TableControlComponent, selector: "df-table-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" >\n <div class=\"mb-3 table-control\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div class=\"table-responsive table-fixed-header\">\n <table class=\"table overflow-nowrap mb-0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th ></th>\n <ng-container *ngFor=\"let item of formConfiguration.TableColumns\">\n <th [attr.field-type]=\"item.formControlName\" >{{ item.displayName }}</th>\n </ng-container>\n <th class=\"sticky-right-card-bg\" >\n <div class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" (click.stop)=\"addTableControlItem()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button>\n </div>\n \n </th>\n </tr>\n </thead>\n <tbody [formArrayName]=\"_fields.field.name\">\n <ng-container *ngFor=\"let item of fieldNameControl.controls; let i = index\">\n <tr cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <ng-container *ngFor=\"let el of formConfiguration.TableColumns\">\n <td>\n <ng-container *ngIf=\"item&&el\">\n <df-dynamic [fields]=\"{ field: el }\"\n [selected]=\"_selected?_selected[i]?.extraProperties[''+el.name+'']:''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"_culture\"\n [entity]=\"item\"></df-dynamic>\n </ng-container>\n </td>\n </ng-container>\n <td scope=\"row\" class=\"sticky-right-card-bg\">\n <div class=\"flex-end mb-3\">\n <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"minusTableControlItem(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n <!-- <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"TableArrowUpOrDown('up',i)\" *ngIf=\"i!==0\">\n <i class=\"fas fa-arrow-up\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"TableArrowUpOrDown('down',i)\"\n *ngIf=\"i!==fieldNameControl.controls.length-1\">\n <i class=\"fas fa-arrow-down\"></i>\n </button> -->\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n @if(fieldNameControl?.errors?.required && fieldNameControl.touched){\n <span class=\"form-text invalid-feedback d-block\">{{\"AbpValidation::ThisFieldIsRequired.\"|abpLocalization}}</span>\n }\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n</form>", styles: [".flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-start{display:flex;align-items:center;justify-content:flex-start}.table-control .sticky-right-card-bg{position:sticky;right:0;background:var(--bs-card-bg)}.table-control .table th{white-space:nowrap}.table-control .table th[field-type=TextEdit],.table-control .table th[field-type=Select],.table-control .table th[field-type=DateEdit],.table-control .table th[field-type=NumericEdit],.table-control .table th[field-type=Entry]{min-width:200px}.table-control .table th[field-type=FileExplorer],.table-control .table th[field-type=CkEditor]{min-width:300px}.table-control .table th[field-type=Matrix]{min-width:400px}\n"], dependencies: [{ kind: "directive", type:
|
|
4350
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableControlComponent, deps: [{ token: KeysConvertToLowercaseService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4351
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: TableControlComponent, selector: "df-table-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" >\n <div class=\"mb-3 table-control\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div class=\"table-responsive table-fixed-header\">\n <table class=\"table overflow-nowrap mb-0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th ></th>\n <ng-container *ngFor=\"let item of formConfiguration.TableColumns\">\n <th [attr.field-type]=\"item.formControlName\" >{{ item.displayName }}</th>\n </ng-container>\n <th class=\"sticky-right-card-bg\" >\n <div class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" (click.stop)=\"addTableControlItem()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button>\n </div>\n \n </th>\n </tr>\n </thead>\n <tbody [formArrayName]=\"_fields.field.name\">\n <ng-container *ngFor=\"let item of fieldNameControl.controls; let i = index\">\n <tr cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <ng-container *ngFor=\"let el of formConfiguration.TableColumns\">\n <td>\n <ng-container *ngIf=\"item&&el\">\n <df-dynamic-control [fields]=\"{ field: el }\"\n [selected]=\"_selected?_selected[i]?.extraProperties[''+el.name+'']:''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"_culture\"\n [entity]=\"item\"></df-dynamic-control>\n </ng-container>\n </td>\n </ng-container>\n <td scope=\"row\" class=\"sticky-right-card-bg\">\n <div class=\"flex-end mb-3\">\n <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"minusTableControlItem(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n <!-- <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"TableArrowUpOrDown('up',i)\" *ngIf=\"i!==0\">\n <i class=\"fas fa-arrow-up\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"TableArrowUpOrDown('down',i)\"\n *ngIf=\"i!==fieldNameControl.controls.length-1\">\n <i class=\"fas fa-arrow-down\"></i>\n </button> -->\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n @if(fieldNameControl?.errors?.required && fieldNameControl.touched){\n <span class=\"form-text invalid-feedback d-block\">{{\"AbpValidation::ThisFieldIsRequired.\"|abpLocalization}}</span>\n }\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n</form>", styles: [".flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-start{display:flex;align-items:center;justify-content:flex-start}.table-control .sticky-right-card-bg{position:sticky;right:0;background:var(--bs-card-bg)}.table-control .table th{white-space:nowrap}.table-control .table th[field-type=TextEdit],.table-control .table th[field-type=Select],.table-control .table th[field-type=DateEdit],.table-control .table th[field-type=NumericEdit],.table-control .table th[field-type=Entry]{min-width:200px}.table-control .table th[field-type=FileExplorer],.table-control .table th[field-type=CkEditor]{min-width:300px}.table-control .table th[field-type=Matrix]{min-width:400px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i6$2.DynamicControlComponent, selector: "df-dynamic-control", inputs: ["selected", "culture", "parentFiledName", "fields", "entity"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
4299
4352
|
}
|
|
4300
4353
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableControlComponent, decorators: [{
|
|
4301
4354
|
type: Component,
|
|
4302
|
-
args: [{ selector: 'df-table-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" >\n <div class=\"mb-3 table-control\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div class=\"table-responsive table-fixed-header\">\n <table class=\"table overflow-nowrap mb-0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th ></th>\n <ng-container *ngFor=\"let item of formConfiguration.TableColumns\">\n <th [attr.field-type]=\"item.formControlName\" >{{ item.displayName }}</th>\n </ng-container>\n <th class=\"sticky-right-card-bg\" >\n <div class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" (click.stop)=\"addTableControlItem()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button>\n </div>\n \n </th>\n </tr>\n </thead>\n <tbody [formArrayName]=\"_fields.field.name\">\n <ng-container *ngFor=\"let item of fieldNameControl.controls; let i = index\">\n <tr cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <ng-container *ngFor=\"let el of formConfiguration.TableColumns\">\n <td>\n <ng-container *ngIf=\"item&&el\">\n <df-dynamic [fields]=\"{ field: el }\"\n [selected]=\"_selected?_selected[i]?.extraProperties[''+el.name+'']:''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"_culture\"\n [entity]=\"item\"></df-dynamic>\n </ng-container>\n </td>\n </ng-container>\n <td scope=\"row\" class=\"sticky-right-card-bg\">\n <div class=\"flex-end mb-3\">\n <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"minusTableControlItem(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n <!-- <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"TableArrowUpOrDown('up',i)\" *ngIf=\"i!==0\">\n <i class=\"fas fa-arrow-up\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"TableArrowUpOrDown('down',i)\"\n *ngIf=\"i!==fieldNameControl.controls.length-1\">\n <i class=\"fas fa-arrow-down\"></i>\n </button> -->\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n @if(fieldNameControl?.errors?.required && fieldNameControl.touched){\n <span class=\"form-text invalid-feedback d-block\">{{\"AbpValidation::ThisFieldIsRequired.\"|abpLocalization}}</span>\n }\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n</form>", styles: [".flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-start{display:flex;align-items:center;justify-content:flex-start}.table-control .sticky-right-card-bg{position:sticky;right:0;background:var(--bs-card-bg)}.table-control .table th{white-space:nowrap}.table-control .table th[field-type=TextEdit],.table-control .table th[field-type=Select],.table-control .table th[field-type=DateEdit],.table-control .table th[field-type=NumericEdit],.table-control .table th[field-type=Entry]{min-width:200px}.table-control .table th[field-type=FileExplorer],.table-control .table th[field-type=CkEditor]{min-width:300px}.table-control .table th[field-type=Matrix]{min-width:400px}\n"] }]
|
|
4303
|
-
}], ctorParameters: () => [{ type:
|
|
4355
|
+
args: [{ selector: 'df-table-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\" >\n <div class=\"mb-3 table-control\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div class=\"table-responsive table-fixed-header\">\n <table class=\"table overflow-nowrap mb-0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <thead>\n <tr>\n <th ></th>\n <ng-container *ngFor=\"let item of formConfiguration.TableColumns\">\n <th [attr.field-type]=\"item.formControlName\" >{{ item.displayName }}</th>\n </ng-container>\n <th class=\"sticky-right-card-bg\" >\n <div class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" (click.stop)=\"addTableControlItem()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button>\n </div>\n \n </th>\n </tr>\n </thead>\n <tbody [formArrayName]=\"_fields.field.name\">\n <ng-container *ngFor=\"let item of fieldNameControl.controls; let i = index\">\n <tr cdkDrag cdkDragLockAxis=\"y\" [cdkDragData]=\"item\">\n <td>\n <div class=\"drag-handle\" cdkDragHandle>\n <span class=\"bi bi-arrows-move fs-5\"></span>\n </div>\n </td>\n <ng-container *ngFor=\"let el of formConfiguration.TableColumns\">\n <td>\n <ng-container *ngIf=\"item&&el\">\n <df-dynamic-control [fields]=\"{ field: el }\"\n [selected]=\"_selected?_selected[i]?.extraProperties[''+el.name+'']:''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"_culture\"\n [entity]=\"item\"></df-dynamic-control>\n </ng-container>\n </td>\n </ng-container>\n <td scope=\"row\" class=\"sticky-right-card-bg\">\n <div class=\"flex-end mb-3\">\n <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"minusTableControlItem(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n <!-- <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"TableArrowUpOrDown('up',i)\" *ngIf=\"i!==0\">\n <i class=\"fas fa-arrow-up\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"TableArrowUpOrDown('down',i)\"\n *ngIf=\"i!==fieldNameControl.controls.length-1\">\n <i class=\"fas fa-arrow-down\"></i>\n </button> -->\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n @if(fieldNameControl?.errors?.required && fieldNameControl.touched){\n <span class=\"form-text invalid-feedback d-block\">{{\"AbpValidation::ThisFieldIsRequired.\"|abpLocalization}}</span>\n }\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n</form>", styles: [".flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-start{display:flex;align-items:center;justify-content:flex-start}.table-control .sticky-right-card-bg{position:sticky;right:0;background:var(--bs-card-bg)}.table-control .table th{white-space:nowrap}.table-control .table th[field-type=TextEdit],.table-control .table th[field-type=Select],.table-control .table th[field-type=DateEdit],.table-control .table th[field-type=NumericEdit],.table-control .table th[field-type=Entry]{min-width:200px}.table-control .table th[field-type=FileExplorer],.table-control .table th[field-type=CkEditor]{min-width:300px}.table-control .table th[field-type=Matrix]{min-width:400px}\n"] }]
|
|
4356
|
+
}], ctorParameters: () => [{ type: KeysConvertToLowercaseService }], propDecorators: { entity: [{
|
|
4304
4357
|
type: Input
|
|
4305
4358
|
}], fields: [{
|
|
4306
4359
|
type: Input
|
|
@@ -4315,6 +4368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
4315
4368
|
args: ['submitclick', { static: true }]
|
|
4316
4369
|
}] } });
|
|
4317
4370
|
|
|
4371
|
+
/* eslint-disable @angular-eslint/component-selector */
|
|
4318
4372
|
class TableViewComponent {
|
|
4319
4373
|
constructor() {
|
|
4320
4374
|
/**展示则内容 */
|
|
@@ -4330,13 +4384,13 @@ class TableViewComponent {
|
|
|
4330
4384
|
async ngAfterContentInit() {
|
|
4331
4385
|
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
4332
4386
|
//Add 'implements AfterContentInit' to the class.
|
|
4333
|
-
|
|
4387
|
+
const valueOptions = this._value;
|
|
4334
4388
|
if (this.type && valueOptions) {
|
|
4335
4389
|
this.showValue = valueOptions;
|
|
4336
4390
|
}
|
|
4337
4391
|
}
|
|
4338
4392
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4339
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: TableViewComponent, selector: "cms-table-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{'Cms::NotShowInList'|abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type:
|
|
4393
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: TableViewComponent, selector: "cms-table-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n{{'Cms::NotShowInList'|abpLocalization}}\r\n} @else{\r\n<div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n</div>\r\n}", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
4340
4394
|
}
|
|
4341
4395
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableViewComponent, decorators: [{
|
|
4342
4396
|
type: Component,
|
|
@@ -4379,109 +4433,69 @@ const cmsFieldControlGroup = [
|
|
|
4379
4433
|
},
|
|
4380
4434
|
];
|
|
4381
4435
|
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
// :root select{
|
|
4390
|
-
// cursor: pointer; /* this will show the pointer when hovering */
|
|
4391
|
-
// }
|
|
4392
|
-
// .cdk-global-overlay-wrapper, .cdk-overlay-container {pointer-events: none;top: 0;left: 0;height: 100%;width: 100% }.cdk-overlay-container {position: fixed;z-index: 1000 }.cdk-overlay-container:empty {display: none }.cdk-global-overlay-wrapper, .cdk-overlay-connected-position-bounding-box, .cdk-overlay-pane {position: absolute;z-index: 1000;display: flex }.cdk-overlay-pane {pointer-events: auto;box-sizing: border-box;max-width: 100%;max-height: 100% }.cdk-overlay-backdrop {position: absolute;top: 0;bottom: 0;left: 0;right: 0;z-index: 1000;pointer-events: auto;transition: opacity .4s cubic-bezier(.25, .8, .25, 1);opacity: 0 }.cdk-overlay-backdrop.cdk-overlay-backdrop-showing {opacity: 1 }.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing {opacity: .6 }.cdk-overlay-dark-backdrop {background: rgba(0, 0, 0, .32) }.cdk-overlay-transparent-backdrop {transition: visibility 1ms linear, opacity 1ms linear;visibility: hidden;opacity: 1 }.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing {opacity: 0;visibility: visible }.cdk-overlay-backdrop-noop-animation {transition: none }.cdk-overlay-connected-position-bounding-box {flex-direction: column;min-width: 1px;min-height: 1px }.cdk-global-scrollblock {position: fixed;width: 100%;overflow-y: scroll }.cdk-visually-hidden {border: 0;clip: rect(0 0 0 0);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;outline: 0;-webkit-appearance: none;-moz-appearance: none }.nz-overlay-transparent-backdrop, .nz-overlay-transparent-backdrop.cdk-overlay-backdrop-showing {opacity: 0 }.ant-select, .ant-select-dropdown {margin: 0;line-height: 1.5715;box-sizing: border-box;font-feature-settings: 'tnum';list-style: none }.ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottom, .ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottomLeft, .ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottomRight, .ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottom, .ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottomLeft, .ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottomRight, .ant-select-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-select-dropdown-placement-bottomLeft, .ant-select-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-select-dropdown-placement-bottomLeft {animation-name: antSlideUpIn }.ant-select-dropdown.ant-select-tree-dropdown {top: 100%;left: 0;position: relative;width: 100%;margin-top: 4px;margin-bottom: 4px;overflow: auto }.ant-select-dropdown-hidden, .ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-delete, .ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-eye, .ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info::before {display: none }.ant-select-dropdown {top: 100%;left: 0;position: relative;width: 100%;margin-top: 4px;margin-bottom: 4px;display: block }.ant-select-dropdown .cdk-virtual-scroll-content-wrapper {right: 0 }.ant-select-dropdown .full-width {contain: initial }.ant-select-dropdown .full-width .cdk-virtual-scroll-content-wrapper {position: static }.ant-select-dropdown .full-width .cdk-virtual-scroll-spacer {position: absolute;top: 0;width: 1px }.ant-select-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-select-dropdown-placement-topLeft, .ant-select-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-select-dropdown-placement-topLeft {animation-name: antSlideDownIn }.ant-select-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-select-dropdown-placement-bottomLeft {animation-name: antSlideUpOut }.ant-select-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-select-dropdown-placement-topLeft {animation-name: antSlideDownOut }
|
|
4393
|
-
|
|
4394
|
-
/*** 表单验证样式 start */
|
|
4395
|
-
.was-validated .form-control:invalid, .form-control.is-invalid{
|
|
4396
|
-
border-color: #c00d49 !important;
|
|
4397
|
-
}
|
|
4398
|
-
/*** 表单验证样式 end */
|
|
4399
|
-
`;
|
|
4400
|
-
|
|
4401
|
-
let isAppentStyle = false;
|
|
4402
|
-
function appentStyle() {
|
|
4403
|
-
/**确保该路由守卫只会执行一次 */
|
|
4404
|
-
if (isAppentStyle)
|
|
4405
|
-
return;
|
|
4406
|
-
isAppentStyle = true;
|
|
4407
|
-
const rendererFactory = inject(RendererFactory2);
|
|
4408
|
-
const renderer = rendererFactory.createRenderer(null, null);
|
|
4409
|
-
const style = renderer.createElement('style');
|
|
4410
|
-
renderer.setProperty(style, 'innerHTML', styles);
|
|
4411
|
-
renderer.appendChild(document.head, style);
|
|
4412
|
-
}
|
|
4413
|
-
|
|
4414
|
-
/**版块 */
|
|
4415
|
-
const Sections_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
4436
|
+
/**
|
|
4437
|
+
* 字段列表-新建
|
|
4438
|
+
* [ECmsComponent.Fields]:Fields_Defaults_Toolbar_Action
|
|
4439
|
+
*/
|
|
4440
|
+
const Fields_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
4416
4441
|
{
|
|
4417
4442
|
text: 'Cms::New',
|
|
4418
4443
|
action: data => {
|
|
4419
|
-
const component = data.getInjected(
|
|
4420
|
-
component.
|
|
4444
|
+
const component = data.getInjected(FieldsComponent);
|
|
4445
|
+
component.toFieldsCreateBtn();
|
|
4421
4446
|
},
|
|
4422
4447
|
btnClass: '',
|
|
4423
4448
|
permission: 'CmsAdmin.Entry.Create',
|
|
4424
4449
|
icon: 'fa fa-plus',
|
|
4425
4450
|
},
|
|
4426
4451
|
]);
|
|
4427
|
-
|
|
4428
|
-
const
|
|
4452
|
+
/**字段创建页-保存 */
|
|
4453
|
+
const Fields_Create_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
4429
4454
|
{
|
|
4430
4455
|
text: 'AbpUi::Save',
|
|
4431
4456
|
action: data => {
|
|
4432
|
-
const component = data.getInjected(
|
|
4433
|
-
component.submitclickBtn();
|
|
4457
|
+
const component = data.getInjected(CreateFieldComponent);
|
|
4458
|
+
// component.submitclickBtn();
|
|
4459
|
+
component.submitclick?.nativeElement?.click();
|
|
4434
4460
|
},
|
|
4435
4461
|
btnClass: '',
|
|
4436
4462
|
permission: 'CmsAdmin.Entry.Create',
|
|
4437
4463
|
icon: 'fas fa-save',
|
|
4438
4464
|
},
|
|
4439
4465
|
]);
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
// {
|
|
4443
|
-
// text: 'Cms::New',
|
|
4444
|
-
// action: data => {
|
|
4445
|
-
// const component = data.getInjected(SitesComponent);
|
|
4446
|
-
// // component.createSitesBtn();
|
|
4447
|
-
// },
|
|
4448
|
-
// btnClass: '',
|
|
4449
|
-
// permission: 'CmsAdmin.Entry.Create',
|
|
4450
|
-
// icon: 'fa fa-plus',
|
|
4451
|
-
// },
|
|
4452
|
-
// ]);
|
|
4453
|
-
/**字段 */
|
|
4454
|
-
const Fields_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
4466
|
+
/**字段创建页-保存 */
|
|
4467
|
+
const Fields_Edit_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
4455
4468
|
{
|
|
4456
|
-
text: '
|
|
4469
|
+
text: 'AbpUi::Save',
|
|
4457
4470
|
action: data => {
|
|
4458
|
-
const component = data.getInjected(
|
|
4459
|
-
component.
|
|
4471
|
+
const component = data.getInjected(EditFieldComponent);
|
|
4472
|
+
// component.submitclickBtn();
|
|
4473
|
+
component.submitclick?.nativeElement?.click();
|
|
4460
4474
|
},
|
|
4461
4475
|
btnClass: '',
|
|
4462
4476
|
permission: 'CmsAdmin.Entry.Create',
|
|
4463
|
-
icon: '
|
|
4477
|
+
icon: 'fas fa-save',
|
|
4464
4478
|
},
|
|
4465
4479
|
]);
|
|
4466
|
-
|
|
4467
|
-
const
|
|
4480
|
+
/**版块 */
|
|
4481
|
+
const Sections_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
4468
4482
|
{
|
|
4469
|
-
text: '
|
|
4483
|
+
text: 'Cms::New',
|
|
4470
4484
|
action: data => {
|
|
4471
|
-
const component = data.getInjected(
|
|
4472
|
-
component.
|
|
4485
|
+
const component = data.getInjected(SectionsComponent);
|
|
4486
|
+
component.createBtn();
|
|
4473
4487
|
},
|
|
4474
4488
|
btnClass: '',
|
|
4475
4489
|
permission: 'CmsAdmin.Entry.Create',
|
|
4476
|
-
icon: '
|
|
4490
|
+
icon: 'fa fa-plus',
|
|
4477
4491
|
},
|
|
4478
4492
|
]);
|
|
4479
|
-
|
|
4480
|
-
const
|
|
4493
|
+
/**版块-创建-编辑 */
|
|
4494
|
+
const Sections_Create_Or_Edit_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
4481
4495
|
{
|
|
4482
4496
|
text: 'AbpUi::Save',
|
|
4483
4497
|
action: data => {
|
|
4484
|
-
const component = data.getInjected(
|
|
4498
|
+
const component = data.getInjected(CreateOrEditComponent);
|
|
4485
4499
|
component.submitclickBtn();
|
|
4486
4500
|
},
|
|
4487
4501
|
btnClass: '',
|
|
@@ -4489,6 +4503,19 @@ const Fields_Edit_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
|
4489
4503
|
icon: 'fas fa-save',
|
|
4490
4504
|
},
|
|
4491
4505
|
]);
|
|
4506
|
+
/**站点 */
|
|
4507
|
+
// export const Sites_Defaults_Toolbar_Action = ToolbarAction.createMany<any[]>([
|
|
4508
|
+
// {
|
|
4509
|
+
// text: 'Cms::New',
|
|
4510
|
+
// action: data => {
|
|
4511
|
+
// const component = data.getInjected(SitesComponent);
|
|
4512
|
+
// // component.createSitesBtn();
|
|
4513
|
+
// },
|
|
4514
|
+
// btnClass: '',
|
|
4515
|
+
// permission: 'CmsAdmin.Entry.Create',
|
|
4516
|
+
// icon: 'fa fa-plus',
|
|
4517
|
+
// },
|
|
4518
|
+
// ]);
|
|
4492
4519
|
/**条目 */
|
|
4493
4520
|
const Entries_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
4494
4521
|
{
|
|
@@ -4591,8 +4618,8 @@ const Fields_Entity_Props = EntityProp.createMany([
|
|
|
4591
4618
|
displayName: 'Cms::FormControlName',
|
|
4592
4619
|
sortable: false,
|
|
4593
4620
|
valueResolver: (data) => {
|
|
4594
|
-
const
|
|
4595
|
-
const fromControlList =
|
|
4621
|
+
const _FieldsDataService = data.getInjected(FieldsDataService);
|
|
4622
|
+
const fromControlList = _FieldsDataService.fieldControlsTypesList;
|
|
4596
4623
|
const formControlDisplayName = fromControlList.find(el => el.name == data.record.formControlName)?.displayName;
|
|
4597
4624
|
return of(formControlDisplayName || data.record.formControlName);
|
|
4598
4625
|
},
|
|
@@ -4787,7 +4814,7 @@ const routes = [
|
|
|
4787
4814
|
{
|
|
4788
4815
|
path: 'admin',
|
|
4789
4816
|
canActivate: [AuthGuard, PermissionGuard],
|
|
4790
|
-
resolve: [Extensions_Props_Action_Token_Resolver
|
|
4817
|
+
resolve: [Extensions_Props_Action_Token_Resolver],
|
|
4791
4818
|
children: [
|
|
4792
4819
|
{
|
|
4793
4820
|
path: 'entries',
|
|
@@ -4858,7 +4885,7 @@ const routes = [
|
|
|
4858
4885
|
];
|
|
4859
4886
|
class CmsRoutingModule {
|
|
4860
4887
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4861
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CmsRoutingModule, imports: [
|
|
4888
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CmsRoutingModule, imports: [i6.RouterModule], exports: [RouterModule] }); }
|
|
4862
4889
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
4863
4890
|
}
|
|
4864
4891
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsRoutingModule, decorators: [{
|
|
@@ -4896,7 +4923,7 @@ class CmsModule {
|
|
|
4896
4923
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CmsModule, declarations: [EntriesComponent,
|
|
4897
4924
|
FieldsComponent,
|
|
4898
4925
|
SectionsComponent,
|
|
4899
|
-
|
|
4926
|
+
FieldsGroupComponent,
|
|
4900
4927
|
CreateFieldComponent,
|
|
4901
4928
|
EditFieldComponent,
|
|
4902
4929
|
CreateOrEditFieldComponent,
|
|
@@ -4961,7 +4988,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
4961
4988
|
EntriesComponent,
|
|
4962
4989
|
FieldsComponent,
|
|
4963
4990
|
SectionsComponent,
|
|
4964
|
-
|
|
4991
|
+
FieldsGroupComponent,
|
|
4965
4992
|
CreateFieldComponent,
|
|
4966
4993
|
EditFieldComponent,
|
|
4967
4994
|
CreateOrEditFieldComponent,
|