@dignite-ng/expand.cms 3.0.0-rc.43 → 3.0.0-rc.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/esm2022/lib/cms.module.mjs +6 -2
  2. package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +33 -3
  3. package/esm2022/lib/components/admin/entries/create.component.mjs +39 -8
  4. package/esm2022/lib/components/admin/entries/edit.component.mjs +55 -50
  5. package/esm2022/lib/components/admin/entries/entries.component.mjs +4 -3
  6. package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.mjs +7 -7
  7. package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +40 -7
  8. package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +50 -10
  9. package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +44 -9
  10. package/esm2022/lib/pipes/get-localized-entries-by-slug.pipe.mjs +43 -0
  11. package/esm2022/lib/proxy/dignite/cms/admin/dynamic-forms/form-admin.service.mjs +1 -1
  12. package/esm2022/lib/proxy/dignite/cms/admin/entries/entry-admin.service.mjs +6 -1
  13. package/esm2022/lib/proxy/dignite/cms/admin/fields/models.mjs +1 -1
  14. package/esm2022/lib/proxy/dignite/cms/fields/models.mjs +1 -1
  15. package/esm2022/lib/proxy/dignite/cms/sections/models.mjs +1 -1
  16. package/esm2022/lib/resolvers/page-default-toolbar-actions.mjs +3 -3
  17. package/fesm2022/dignite-ng-expand.cms.mjs +311 -90
  18. package/fesm2022/dignite-ng-expand.cms.mjs.map +1 -1
  19. package/lib/cms.module.d.ts +2 -1
  20. package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +5 -0
  21. package/lib/components/admin/entries/create.component.d.ts +3 -0
  22. package/lib/components/admin/entries/edit.component.d.ts +1 -0
  23. package/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.d.ts +0 -6
  24. package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +4 -0
  25. package/lib/components/dynamic-form/matrix/matrix-control.component.d.ts +4 -0
  26. package/lib/components/dynamic-form/table/table-control.component.d.ts +4 -0
  27. package/lib/pipes/get-localized-entries-by-slug.pipe.d.ts +10 -0
  28. package/lib/proxy/dignite/cms/admin/entries/entry-admin.service.d.ts +1 -0
  29. package/lib/proxy/dignite/cms/admin/fields/models.d.ts +2 -2
  30. package/lib/proxy/dignite/cms/fields/models.d.ts +1 -1
  31. package/lib/proxy/dignite/cms/sections/models.d.ts +2 -2
  32. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, Component, ChangeDetectorRef, EventEmitter, ViewChild, Input, Output, RendererFactory2, InjectionToken, Injector, NgModule } from '@angular/core';
2
+ import { Injectable, inject, Pipe, Component, ChangeDetectorRef, EventEmitter, ViewChild, Input, Output, RendererFactory2, 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';
@@ -13,7 +13,7 @@ import { FormBuilder, Validators, FormGroup, FormControl, FormArray, FormsModule
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 { UpdateListService, ValidatorsService } from '@dignite-ng/expand.core';
16
+ import { UpdateListService, ValidatorsService, LocationBackService } from '@dignite-ng/expand.core';
17
17
  import * as i7 from '@angular/cdk/drag-drop';
18
18
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
19
19
  import * as i1$1 from '@angular/common';
@@ -84,6 +84,11 @@ class EntryAdminService {
84
84
  url: '/api/cms-admin/entries/search-by-ids',
85
85
  params: { sectionId, ids },
86
86
  }, { apiName: this.apiName, ...config });
87
+ this.getLocalizedEntriesBySlug = (sectionId, slug, config) => this.restService.request({
88
+ method: 'GET',
89
+ url: '/api/cms-admin/entries/localized-entries-by-slug',
90
+ params: { sectionId, slug },
91
+ }, { apiName: this.apiName, ...config });
87
92
  this.move = (id, input, config) => this.restService.request({
88
93
  method: 'POST',
89
94
  url: `/api/cms-admin/entries/move/${id}`,
@@ -372,6 +377,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
372
377
  }]
373
378
  }], ctorParameters: () => [{ type: FormAdminService }] });
374
379
 
380
+ class GetLocalizedEntriesBySlugPipe {
381
+ constructor() {
382
+ this._EntryAdminService = inject(EntryAdminService);
383
+ }
384
+ async transform(value, ...args) {
385
+ const { slug, sectionType } = value;
386
+ // if (sectionType == SectionType.Single) {
387
+ //获取别名下其他的语言版本
388
+ const Entries = await this.getLocalizedEntriesBySlug(args[0], slug);
389
+ //判断Entries中是否还有未创建的语言版本,如果有则返回false,所有的语言版本args[1]都创建了则返回true,
390
+ const state = args[1].every(el => {
391
+ if (Entries.find(el2 => el2.culture === el.cultureName)) {
392
+ return true;
393
+ }
394
+ });
395
+ return state;
396
+ // }
397
+ // return true;
398
+ }
399
+ /**获取别名下其他的语言版本 */
400
+ getLocalizedEntriesBySlug(sectionId, slug) {
401
+ return new Promise((resolve, rejects) => {
402
+ this._EntryAdminService.getLocalizedEntriesBySlug(sectionId, slug).subscribe(res => {
403
+ resolve(res.items);
404
+ }, err => {
405
+ resolve([]);
406
+ });
407
+ });
408
+ }
409
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: GetLocalizedEntriesBySlugPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
410
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: GetLocalizedEntriesBySlugPipe, isStandalone: true, name: "getLocalizedEntriesBySlug" }); }
411
+ }
412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: GetLocalizedEntriesBySlugPipe, decorators: [{
413
+ type: Pipe,
414
+ args: [{
415
+ name: 'getLocalizedEntriesBySlug',
416
+ standalone: true,
417
+ }]
418
+ }] });
419
+
375
420
  /* eslint-disable no-constant-condition */
376
421
  /* eslint-disable no-async-promise-executor */
377
422
  /* eslint-disable @angular-eslint/component-selector */
@@ -732,7 +777,7 @@ class EntriesComponent {
732
777
  provide: EXTENSIONS_IDENTIFIER,
733
778
  useValue: ECmsComponent.Entries,
734
779
  },
735
- ], 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>{{item.displayName}}</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::New' | 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 <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n *ngIf=\"row.culture===defaultCultureName\"\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 <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n *ngIf=\"item.culture===defaultCultureName\"\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 <!-- <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.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: i1.ShortDateTimePipe, name: "shortDateTime" }] }); }
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" }] }); }
736
781
  }
737
782
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntriesComponent, decorators: [{
738
783
  type: Component,
@@ -745,7 +790,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
745
790
  provide: EXTENSIONS_IDENTIFIER,
746
791
  useValue: ECmsComponent.Entries,
747
792
  },
748
- ], 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>{{item.displayName}}</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::New' | 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 <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n *ngIf=\"row.culture===defaultCultureName\"\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 <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n *ngIf=\"item.culture===defaultCultureName\"\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 <!-- <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"] }]
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"] }]
749
794
  }], ctorParameters: () => [{ type: EntryAdminService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.ConfigStateService }, { type: i4.Router }, { type: i1.LocalizationService }, { type: FormAdminService }, { type: FieldAdminService }, { type: i0.ChangeDetectorRef }, { type: FormControlsService }] });
750
795
 
751
796
  class CreateOrUpdateEntryInputBase {
@@ -1013,7 +1058,6 @@ class CreateOrEditEntriesComponent {
1013
1058
  // this.DefaultLanguage = this.configState.getSetting('Abp.Regionalization.DefaultCultureName');
1014
1059
  //选中languagesSystem中的cultureName在 languagesSystem中存在的数组项
1015
1060
  this.languagesList = languagesSystem.filter(el => this.SiteSettingsAdminLanguages.includes(el.cultureName));
1016
- this.cdRef.detectChanges();
1017
1061
  if (this.sectionId) {
1018
1062
  await this.getSectionInfo();
1019
1063
  await this.getEntryList();
@@ -1024,6 +1068,7 @@ class CreateOrEditEntriesComponent {
1024
1068
  const repetition = await this.cultureAsyncValidator();
1025
1069
  if (repetition)
1026
1070
  this.cultureInput.setErrors(repetition);
1071
+ this.slugInput.addValidators(this.SlugRegExValidator());
1027
1072
  this.slugInput.addAsyncValidators(this.SlugAsyncValidator());
1028
1073
  if (this.entryInfo) {
1029
1074
  await this.getAllVersionsList();
@@ -1046,17 +1091,44 @@ class CreateOrEditEntriesComponent {
1046
1091
  });
1047
1092
  }
1048
1093
  this.cdRef.detectChanges();
1094
+ this.cdRef.detectChanges();
1049
1095
  this.feedbackChildInfo.emit({
1050
1096
  showEntryType: this.showEntryType,
1051
1097
  });
1052
1098
  this.isLoad = true;
1053
1099
  if (this.isOther == 1) {
1054
1100
  this.initialVersionIdInput.patchValue('');
1101
+ this.slugInput.disable();
1102
+ await this.getLocalizedEntriesBySlug();
1055
1103
  }
1056
1104
  setTimeout(() => {
1057
1105
  // this.submitclick?.nativeElement.click();
1058
1106
  }, 0);
1059
1107
  }
1108
+ /**获取别名下其他的语言版本 */
1109
+ getLocalizedEntriesBySlug() {
1110
+ return new Promise((resolve, rejects) => {
1111
+ this._EntryAdminService
1112
+ .getLocalizedEntriesBySlug(this.sectionId, this.slugInput.value)
1113
+ .subscribe(res => {
1114
+ // console.log(res,'获取别名下其他的语言版本',this.slugInput.value);
1115
+ this.languagesList = this.languagesList.filter(el => !res.items.find(el2 => el2.culture === el.cultureName));
1116
+ this.cultureInput.patchValue(this.languagesList[0].cultureName);
1117
+ resolve(res);
1118
+ }, err => {
1119
+ resolve(null);
1120
+ });
1121
+ });
1122
+ }
1123
+ SlugRegExValidator() {
1124
+ return (control) => {
1125
+ const regex = /^[a-zA-Z0-9_-]+$/;
1126
+ if (control.value && !regex.test(control.value)) {
1127
+ return { repetition: this._LocalizationService.instant(`Cms::SlugValidatorsText`) };
1128
+ }
1129
+ return null;
1130
+ };
1131
+ }
1060
1132
  // /**别名查重 */
1061
1133
  SlugAsyncValidator() {
1062
1134
  return (control) => {
@@ -1160,7 +1232,10 @@ class CreateOrEditEntriesComponent {
1160
1232
  if (slug.value)
1161
1233
  return;
1162
1234
  pinyinstr = this._CmsApiService.chineseToPinyin(val);
1163
- this.slugInput.patchValue(pinyinstr || val);
1235
+ pinyinstr = pinyinstr || val;
1236
+ //去除特殊字符
1237
+ pinyinstr = pinyinstr.replace(/[^a-zA-Z0-9-]/g, '');
1238
+ this.slugInput.patchValue(pinyinstr);
1164
1239
  this._EntryAdminService
1165
1240
  .slugExists({
1166
1241
  culture: this.cultureInput.value,
@@ -1244,6 +1319,7 @@ class CreateComponent {
1244
1319
  this.toaster = inject(ToasterService);
1245
1320
  this._location = inject(Location);
1246
1321
  this.route = inject(ActivatedRoute);
1322
+ this.router = inject(Router);
1247
1323
  this._EntryAdminService = inject(EntryAdminService);
1248
1324
  this._LocalizationService = inject(LocalizationService);
1249
1325
  this._ValidatorsService = inject(ValidatorsService);
@@ -1267,6 +1343,7 @@ class CreateComponent {
1267
1343
  this.isOther = 0;
1268
1344
  /**显示条目类型信息 */
1269
1345
  this.showEntryTypeInfo = '';
1346
+ this._LocationBackService = inject(LocationBackService);
1270
1347
  this.isSubmit = false;
1271
1348
  }
1272
1349
  /**是否草稿控件*/
@@ -1309,13 +1386,20 @@ class CreateComponent {
1309
1386
  isCheckFormCms(input, module) {
1310
1387
  for (const key in input) {
1311
1388
  if (input[key] === false) {
1312
- let info = `"${this._LocalizationService.instant(`${module}::${key}`)}" `;
1389
+ let info = ``;
1313
1390
  //检查key中是否含有ExtraProperties.
1314
- if (key.includes('ExtraProperties.')) {
1391
+ if (key.includes('extraProperties.')) {
1315
1392
  const arr = key.split('.');
1316
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 {
1317
1400
  //将keyName的首字母转为小写
1318
- const keyNameLower = keyName.charAt(0).toLowerCase() + keyName.slice(1);
1401
+ const keyNameLower = keyName;
1402
+ // const keyNameLower = keyName.charAt(0).toLowerCase() + keyName.slice(1);
1319
1403
  if (this.showEntryTypeInfo && this.showEntryTypeInfo.fieldTabs.length > 0) {
1320
1404
  for (const item of this.showEntryTypeInfo.fieldTabs) {
1321
1405
  for (const el of item.fields) {
@@ -1326,6 +1410,11 @@ class CreateComponent {
1326
1410
  }
1327
1411
  }
1328
1412
  }
1413
+ // }
1414
+ }
1415
+ else {
1416
+ const displayName = key.charAt(0).toUpperCase() + key.slice(1);
1417
+ info = `"${this._LocalizationService.instant(`${module}::${displayName}`)}" `;
1329
1418
  }
1330
1419
  info = info + this._LocalizationService.instant(`AbpValidation::ThisFieldIsNotValid.`);
1331
1420
  //使用abp多语言提示
@@ -1338,11 +1427,16 @@ class CreateComponent {
1338
1427
  /**提交 */
1339
1428
  save() {
1340
1429
  const input = this.formEntity?.value;
1430
+ this.formEntity.markAllAsTouched();
1341
1431
  this.formValidation = this._ValidatorsService.getFormValidationStatus(this.formEntity);
1342
1432
  if (this.isCheckFormCms(this.formValidation, 'Cms')) {
1343
1433
  this.isSubmit = false;
1434
+ if (this.isOther === 1) {
1435
+ this.slugInput.disable();
1436
+ }
1344
1437
  return this.cultureInput.disable();
1345
1438
  }
1439
+ console.log(input, 'input', this.formEntity, this.formValidation);
1346
1440
  // if (this._ValidatorsService.isCheckForm(this.formValidation, 'Cms')) {
1347
1441
  // // this.isSubmit = false;
1348
1442
  // // return this.cultureInput.disable();
@@ -1359,7 +1453,11 @@ class CreateComponent {
1359
1453
  }))
1360
1454
  .subscribe(res => {
1361
1455
  this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
1362
- this._location.back();
1456
+ //检测该页面上一级是否是系统页面,如果是返回上一页,如果不是,则使用页面跳转到上一级页面。
1457
+ this._LocationBackService.backTo({
1458
+ url: `/cms/admin/entries`,
1459
+ replenish: '/create'
1460
+ });
1363
1461
  this._updateListService.updateList();
1364
1462
  });
1365
1463
  }
@@ -1369,7 +1467,15 @@ class CreateComponent {
1369
1467
  // this.isSubmit = true;
1370
1468
  this.draftInput.patchValue(type);
1371
1469
  this.cultureInput.enable();
1372
- this.submitclick?.nativeElement?.click();
1470
+ this.slugInput.enable();
1471
+ this.formEntity.updateValueAndValidity();
1472
+ console.log(this.formEntity, 'formEntity');
1473
+ setTimeout(() => {
1474
+ this.submitclick.nativeElement.click();
1475
+ }, 0);
1476
+ }
1477
+ get slugInput() {
1478
+ return this.formEntity?.get('slug');
1373
1479
  }
1374
1480
  /**返回上一页 */
1375
1481
  backTo() {
@@ -1429,6 +1535,54 @@ class EditComponent {
1429
1535
  this.entryInfo = '';
1430
1536
  /**显示条目类型信息 */
1431
1537
  this.showEntryTypeInfo = '';
1538
+ // /**获取表单所有字段是否通过验证 */
1539
+ // getFormValidationStatus(formEntity: FormGroup | FormArray): { [key: string]: any } {
1540
+ // const validationStatus: { [key: string]: any } = {};
1541
+ // // 递归遍历表单组和表单控件集合
1542
+ // const traverseForm = (form: FormGroup | FormArray, prefix = '') => {
1543
+ // if (form instanceof FormGroup) {
1544
+ // Object.keys(form.controls).forEach(key => {
1545
+ // const control = form.controls[key];
1546
+ // // const displayName = key.charAt(0).toUpperCase() + key.slice(1);
1547
+ // const displayName = key;
1548
+ // const fullKey = prefix ? `${prefix}.${displayName}` : displayName;
1549
+ // if (control instanceof FormControl) {
1550
+ // validationStatus[fullKey] = control.valid;
1551
+ // } else if (control instanceof FormArray) {
1552
+ // traverseForm(control, fullKey);
1553
+ // } else if (control instanceof FormGroup) {
1554
+ // traverseForm(control, fullKey);
1555
+ // }
1556
+ // });
1557
+ // } else if (form instanceof FormArray) {
1558
+ // form.controls.forEach((control, index) => {
1559
+ // const fullKey = prefix ? `${prefix}[${index}]` : `[${index}]`;
1560
+ // if (control instanceof FormControl) {
1561
+ // validationStatus[fullKey] = control.valid;
1562
+ // } else if (control instanceof FormArray) {
1563
+ // traverseForm(control, fullKey);
1564
+ // } else if (control instanceof FormGroup) {
1565
+ // traverseForm(control, fullKey);
1566
+ // }
1567
+ // });
1568
+ // }
1569
+ // };
1570
+ // traverseForm(formEntity);
1571
+ // return validationStatus;
1572
+ // }
1573
+ /**获取表单验证状态 */
1574
+ // getFormValidationStatus(formEntity: FormGroup | FormArray): { [key: string]: any } {
1575
+ // const validationStatus: { [key: string]: any } = {};
1576
+ // const traverseForm = (form: FormGroup | FormArray, prefix = '') => {
1577
+ // //检查form是否为FormGroup还是formArray,如果是FormGroup则继续遍历,如果是FormArray则遍历FormArray
1578
+ // if (form instanceof FormGroup) {
1579
+ // } else if (form instanceof FormArray) {
1580
+ // }
1581
+ // }
1582
+ // traverseForm(formEntity);
1583
+ // return validationStatus
1584
+ // }
1585
+ this._LocationBackService = inject(LocationBackService);
1432
1586
  this.isSubmit = false;
1433
1587
  this.draftValue = '';
1434
1588
  }
@@ -1497,6 +1651,7 @@ class EditComponent {
1497
1651
  const displayName = key.charAt(0).toUpperCase() + key.slice(1);
1498
1652
  info = `"${this._LocalizationService.instant(`${module}::${displayName}`)}" `;
1499
1653
  }
1654
+ console.log('info', info, input[key]);
1500
1655
  info = info + this._LocalizationService.instant(`AbpValidation::ThisFieldIsNotValid.`);
1501
1656
  //使用abp多语言提示
1502
1657
  this.toaster.warn(info);
@@ -1505,53 +1660,6 @@ class EditComponent {
1505
1660
  }
1506
1661
  return false;
1507
1662
  }
1508
- // /**获取表单所有字段是否通过验证 */
1509
- // getFormValidationStatus(formEntity: FormGroup | FormArray): { [key: string]: any } {
1510
- // const validationStatus: { [key: string]: any } = {};
1511
- // // 递归遍历表单组和表单控件集合
1512
- // const traverseForm = (form: FormGroup | FormArray, prefix = '') => {
1513
- // if (form instanceof FormGroup) {
1514
- // Object.keys(form.controls).forEach(key => {
1515
- // const control = form.controls[key];
1516
- // // const displayName = key.charAt(0).toUpperCase() + key.slice(1);
1517
- // const displayName = key;
1518
- // const fullKey = prefix ? `${prefix}.${displayName}` : displayName;
1519
- // if (control instanceof FormControl) {
1520
- // validationStatus[fullKey] = control.valid;
1521
- // } else if (control instanceof FormArray) {
1522
- // traverseForm(control, fullKey);
1523
- // } else if (control instanceof FormGroup) {
1524
- // traverseForm(control, fullKey);
1525
- // }
1526
- // });
1527
- // } else if (form instanceof FormArray) {
1528
- // form.controls.forEach((control, index) => {
1529
- // const fullKey = prefix ? `${prefix}[${index}]` : `[${index}]`;
1530
- // if (control instanceof FormControl) {
1531
- // validationStatus[fullKey] = control.valid;
1532
- // } else if (control instanceof FormArray) {
1533
- // traverseForm(control, fullKey);
1534
- // } else if (control instanceof FormGroup) {
1535
- // traverseForm(control, fullKey);
1536
- // }
1537
- // });
1538
- // }
1539
- // };
1540
- // traverseForm(formEntity);
1541
- // return validationStatus;
1542
- // }
1543
- /**获取表单验证状态 */
1544
- // getFormValidationStatus(formEntity: FormGroup | FormArray): { [key: string]: any } {
1545
- // const validationStatus: { [key: string]: any } = {};
1546
- // const traverseForm = (form: FormGroup | FormArray, prefix = '') => {
1547
- // //检查form是否为FormGroup还是formArray,如果是FormGroup则继续遍历,如果是FormArray则遍历FormArray
1548
- // if (form instanceof FormGroup) {
1549
- // } else if (form instanceof FormArray) {
1550
- // }
1551
- // }
1552
- // traverseForm(formEntity);
1553
- // return validationStatus
1554
- // }
1555
1663
  /**提交 */
1556
1664
  save() {
1557
1665
  this.cultureInput.enable();
@@ -1581,7 +1689,10 @@ class EditComponent {
1581
1689
  }))
1582
1690
  .subscribe(res => {
1583
1691
  this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
1584
- this.backTo();
1692
+ this._LocationBackService.backTo({
1693
+ url: `/cms/admin/entries`,
1694
+ replenish: '/create'
1695
+ });
1585
1696
  this._updateListService.updateList();
1586
1697
  });
1587
1698
  }
@@ -2512,12 +2623,12 @@ class fieldsBase {
2512
2623
  this.fieldId = ['', [Validators.required]];
2513
2624
  /**显示名称 Unique Name*/
2514
2625
  this.displayName = ['', [Validators.required]];
2515
- /**必填 Unique Name*/
2516
- this.required = [false, []];
2517
- /**是否在列表中显示 Unique Name*/
2518
- this.showInList = [false, []];
2519
- /**是否启用搜索 */
2520
- this.enableSearch = [false, []];
2626
+ // /**必填 Unique Name*/
2627
+ // required: any = [false, []];
2628
+ // /**是否在列表中显示 Unique Name*/
2629
+ // showInList: any = [false, []];
2630
+ // /**是否启用搜索 */
2631
+ // enableSearch: any = [false, []];
2521
2632
  }
2522
2633
  }
2523
2634
 
@@ -2911,6 +3022,8 @@ class CreateOrEditComponent {
2911
3022
  }
2912
3023
  /**删除某个tabs表单 */
2913
3024
  deleteFieldTabs(index) {
3025
+ this.deleteTabFieldGroupList(this.resultSource[index].fields);
3026
+ // return
2914
3027
  this.fieldTabs.removeAt(index);
2915
3028
  this.resultSource.splice(index, 1);
2916
3029
  if (this.navActive === index) {
@@ -2920,6 +3033,28 @@ class CreateOrEditComponent {
2920
3033
  this.navActive = this.navActive - 1;
2921
3034
  }
2922
3035
  }
3036
+ /**删除tab标签后还原 fieldGroupList */
3037
+ deleteTabFieldGroupList(deleteFields) {
3038
+ //原数据
3039
+ const fieldList = this.deepClone(this.fieldList);
3040
+ //右侧手风琴数据
3041
+ const formRightGroup = this.deepClone(this.formRightGroup);
3042
+ // 获取要删除的原数据
3043
+ const deleteFieldList = fieldList.filter(el => deleteFields.map(item => item.id).includes(el.id));
3044
+ deleteFieldList.forEach(item => {
3045
+ const index = formRightGroup.findIndex(el => el.id === item.id);
3046
+ formRightGroup.splice(index, 1);
3047
+ });
3048
+ const deleteFieldListGroupIds = deleteFieldList.map(item => item.groupId);
3049
+ this.fieldGroupList.forEach(el => {
3050
+ if (deleteFieldListGroupIds.includes(el.id)) {
3051
+ const elFieldsAll = fieldList.filter(els => els.groupId === el.id);
3052
+ el.fields = elFieldsAll.filter(item => !formRightGroup.some(itemB => item.id === itemB.id));
3053
+ }
3054
+ });
3055
+ this.formRightGroup = formRightGroup;
3056
+ this.setfieldTabsFrom();
3057
+ }
2923
3058
  /**编辑字段模态框状态状态改变回调 */
2924
3059
  VisibleEditFieldChange(event) {
2925
3060
  if (!event) {
@@ -2942,12 +3077,20 @@ class CreateOrEditComponent {
2942
3077
  editFieldSave() {
2943
3078
  const input = this.editFieldFrom.value;
2944
3079
  this.resultSource[this.navActive].fields[this.EditFieldIndex].displayName = input.displayName;
2945
- this.resultSource[this.navActive].fields[this.EditFieldIndex].required = input.required;
2946
- this.resultSource[this.navActive].fields[this.EditFieldIndex].showInList = input.showInList;
2947
- this.resultSource[this.navActive].fields[this.EditFieldIndex].enableSearch = input.enableSearch;
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;
2948
3083
  this.visibleEditFieldOpen = false;
2949
3084
  this.setfieldTabsFrom();
2950
3085
  }
3086
+ /**点击“字段布局”复选框事件 */
3087
+ checkboxChange(event, input) {
3088
+ const { checked, name } = event.target;
3089
+ const { row, index } = input;
3090
+ this.resultSource[this.navActive].fields[index][name] = checked;
3091
+ this.setfieldTabsFrom();
3092
+ console.log(event.target, '点击“字段布局”复选框事件 ', event, input, 'resultSource', this.resultSource, 'newEntity', this.newEntity);
3093
+ }
2951
3094
  /**name表单控件 */
2952
3095
  get nameInput() {
2953
3096
  return this.newEntity.get('name');
@@ -2962,12 +3105,12 @@ class CreateOrEditComponent {
2962
3105
  nameInput.patchValue(pinyin);
2963
3106
  }
2964
3107
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditComponent, deps: [{ token: i3.ToasterService }, { token: i1$1.Location }, { token: i4.ActivatedRoute }, { token: FieldGroupAdminService }, { token: FieldAdminService }, { token: EntryTypeAdminService }, { token: i1.LocalizationService }, { token: CmsApiService }, { token: FormControlsService }], target: i0.ɵɵFactoryTarget.Component }); }
2965
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: CreateOrEditComponent, selector: "cms-create-or-edit", providers: [
3108
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditComponent, selector: "cms-create-or-edit", providers: [
2966
3109
  {
2967
3110
  provide: EXTENSIONS_IDENTIFIER,
2968
3111
  useValue: ECmsComponent.SectionsCreateOrEdit,
2969
3112
  },
2970
- ], 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\" 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 <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\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\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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
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" }] }); }
2971
3114
  }
2972
3115
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditComponent, decorators: [{
2973
3116
  type: Component,
@@ -2976,7 +3119,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
2976
3119
  provide: EXTENSIONS_IDENTIFIER,
2977
3120
  useValue: ECmsComponent.SectionsCreateOrEdit,
2978
3121
  },
2979
- ], 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\" 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 <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\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\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"] }]
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"] }]
2980
3123
  }], ctorParameters: () => [{ type: i3.ToasterService }, { type: i1$1.Location }, { type: i4.ActivatedRoute }, { type: FieldGroupAdminService }, { type: FieldAdminService }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }, { type: CmsApiService }, { type: FormControlsService }], propDecorators: { submitclick: [{
2981
3124
  type: ViewChild,
2982
3125
  args: ['submitclick', { static: true }]
@@ -3697,28 +3840,68 @@ class MatrixControlComponent {
3697
3840
  }
3698
3841
  }
3699
3842
  this._selected = '';
3843
+ console.log(this.fieldNameControl, 'fieldNameControl', this._fields.field.name);
3700
3844
  }
3701
3845
  }
3702
3846
  AfterInit() {
3703
3847
  return new Promise((resolve, rejects) => {
3704
3848
  const formConfiguration = this._fields.field.formConfiguration;
3705
- const newArrayGroup = this.fb.array([]);
3849
+ const ValidatorsArray = [];
3850
+ if (this._fields.required) {
3851
+ ValidatorsArray.push(Validators.required);
3852
+ }
3853
+ const newArrayGroup = this.fb.array([], ValidatorsArray);
3706
3854
  this.extraProperties.setControl(this._fields.field.name, newArrayGroup);
3707
3855
  this.fieldNameControl = this.extraProperties.get(this._fields.field.name);
3856
+ if (this._fields.required) {
3857
+ this.fieldNameControl.addValidators(this.hasValueValidator);
3858
+ // for (const element of formConfiguration.MatrixBlockTypes) {
3859
+ // element.required = true;
3860
+ // }
3861
+ }
3708
3862
  if (this._selected) {
3709
3863
  this._selected.forEach(el => {
3710
3864
  this.addMatrixControl(formConfiguration.MatrixBlockTypes.find(item => item.name == el.matrixBlockTypeName));
3711
3865
  });
3712
3866
  }
3713
- if (this._fields.required) {
3714
- for (const element of formConfiguration.MatrixBlockTypes) {
3715
- element.required = true;
3716
- }
3717
- }
3718
3867
  this.MatrixBlockTypesList = formConfiguration.MatrixBlockTypes;
3719
3868
  resolve(true);
3720
3869
  });
3721
3870
  }
3871
+ /**是否带有值验证器 */
3872
+ hasValueValidator(g) {
3873
+ // 检查是否有任何控件包含有效值
3874
+ const hasValue = g.controls.some(element => {
3875
+ const extraProperties = element.get('extraProperties');
3876
+ return Object.keys(extraProperties.value).some(key => {
3877
+ const value = extraProperties.value[key];
3878
+ // 检查数组类型值
3879
+ if (Array.isArray(value)) {
3880
+ return value.length > 0;
3881
+ }
3882
+ // 检查非空值
3883
+ return value !== null && value !== undefined && value !== '';
3884
+ });
3885
+ });
3886
+ // 根据验证结果设置表单状态
3887
+ g.controls.forEach(element => {
3888
+ const extraProperties = element.get('extraProperties');
3889
+ Object.keys(extraProperties.value).forEach(key => {
3890
+ if (!hasValue) {
3891
+ // 如果没有值,设置所有字段为必填
3892
+ extraProperties.get(key).setValidators(Validators.required);
3893
+ extraProperties.get(key).setErrors({ required: true });
3894
+ }
3895
+ else {
3896
+ // 如果有值,清除错误
3897
+ extraProperties.get(key).setErrors(null);
3898
+ }
3899
+ });
3900
+ });
3901
+ // 返回验证结果
3902
+ return hasValue ? null : { required: true };
3903
+ // return hasValue? null : null;
3904
+ }
3722
3905
  /**增加指定矩阵控件项 */
3723
3906
  addMatrixControl(item) {
3724
3907
  this.fieldNameControl.push(new FormGroup({
@@ -3743,11 +3926,11 @@ class MatrixControlComponent {
3743
3926
  this.fieldNameControl.updateValueAndValidity();
3744
3927
  }
3745
3928
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixControlComponent, deps: [{ token: i1$2.FormBuilder }, { token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component }); }
3746
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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,required:el?.required||false }\"\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 <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"] }] }); }
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" }] }); }
3747
3930
  }
3748
3931
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixControlComponent, decorators: [{
3749
3932
  type: Component,
3750
- 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,required:el?.required||false }\"\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 <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>" }]
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 <!-- <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>" }]
3751
3934
  }], ctorParameters: () => [{ type: i1$2.FormBuilder }, { type: CmsApiService }], propDecorators: { fields: [{
3752
3935
  type: Input
3753
3936
  }], parentFiledName: [{
@@ -4032,15 +4215,16 @@ class TableControlComponent {
4032
4215
  ValidatorsArray.push(Validators.required);
4033
4216
  }
4034
4217
  const formConfiguration = this._fields.field.formConfiguration;
4035
- if (this._fields.required) {
4036
- for (const element of formConfiguration.TableColumns) {
4037
- element.required = true;
4038
- }
4039
- }
4040
4218
  this.formConfiguration = formConfiguration;
4041
- const newArrayGroup = this.fb.array([]);
4219
+ const newArrayGroup = this.fb.array([], ValidatorsArray);
4042
4220
  this.extraProperties.setControl(this._fields.field.name, newArrayGroup);
4043
4221
  this.fieldNameControl = this.extraProperties.get(this._fields.field.name);
4222
+ if (this._fields.required) {
4223
+ this.fieldNameControl.addValidators(this.hasValueValidator);
4224
+ // for (const element of formConfiguration.TableColumns) {
4225
+ // element.required = true;
4226
+ // }
4227
+ }
4044
4228
  if (this._selected) {
4045
4229
  this._selected.forEach(el => {
4046
4230
  this.addTableControlItem();
@@ -4053,11 +4237,45 @@ class TableControlComponent {
4053
4237
  resolve(true);
4054
4238
  });
4055
4239
  }
4240
+ /**是否带有值验证器 */
4241
+ hasValueValidator(g) {
4242
+ // 检查是否有任何控件包含有效值
4243
+ const hasValue = g.controls.some(element => {
4244
+ const extraProperties = element.get('extraProperties');
4245
+ return Object.keys(extraProperties.value).some(key => {
4246
+ const value = extraProperties.value[key];
4247
+ // 检查数组类型值
4248
+ if (Array.isArray(value)) {
4249
+ return value.length > 0;
4250
+ }
4251
+ // 检查非空值
4252
+ return value !== null && value !== undefined && value !== '';
4253
+ });
4254
+ });
4255
+ // 根据验证结果设置表单状态
4256
+ g.controls.forEach(element => {
4257
+ const extraProperties = element.get('extraProperties');
4258
+ Object.keys(extraProperties.value).forEach(key => {
4259
+ if (!hasValue) {
4260
+ // 如果没有值,设置所有字段为必填
4261
+ extraProperties.get(key).setValidators(Validators.required);
4262
+ extraProperties.get(key).setErrors({ required: true });
4263
+ }
4264
+ else {
4265
+ // 如果有值,清除错误
4266
+ extraProperties.get(key).setErrors(null);
4267
+ }
4268
+ });
4269
+ });
4270
+ // 返回验证结果
4271
+ return hasValue && g.controls.length > 0 ? null : { required: true };
4272
+ }
4056
4273
  /**增加表格项 */
4057
4274
  addTableControlItem() {
4058
4275
  this.fieldNameControl.push(this.fb.group({
4059
4276
  extraProperties: this.fb.group({}),
4060
4277
  }));
4278
+ // this.fieldNameControl.updateValueAndValidity();
4061
4279
  }
4062
4280
  /**删除表格项 */
4063
4281
  minusTableControlItem(index) {
@@ -4077,11 +4295,11 @@ class TableControlComponent {
4077
4295
  this.fieldNameControl.updateValueAndValidity();
4078
4296
  }
4079
4297
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableControlComponent, deps: [{ token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component }); }
4080
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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,required:el?.required||false }\"\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 <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: 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"] }] }); }
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: 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" }] }); }
4081
4299
  }
4082
4300
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableControlComponent, decorators: [{
4083
4301
  type: Component,
4084
- 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,required:el?.required||false }\"\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 <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"] }]
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"] }]
4085
4303
  }], ctorParameters: () => [{ type: CmsApiService }], propDecorators: { entity: [{
4086
4304
  type: Input
4087
4305
  }], fields: [{
@@ -4297,7 +4515,7 @@ const Entries_Create_Defaults_Toolbar_Action = ToolbarAction.createMany([
4297
4515
  icon: '',
4298
4516
  },
4299
4517
  {
4300
- text: 'AbpUi::Save',
4518
+ text: 'Cms::SaveDraft',
4301
4519
  action: data => {
4302
4520
  const component = data.getInjected(CreateComponent);
4303
4521
  component.clickSubmit(true);
@@ -4330,7 +4548,7 @@ const Entries_Edit_Defaults_Toolbar_Action = ToolbarAction.createMany([
4330
4548
  icon: '',
4331
4549
  },
4332
4550
  {
4333
- text: 'AbpUi::Save',
4551
+ text: 'Cms::SaveDraft',
4334
4552
  action: data => {
4335
4553
  const component = data.getInjected(EditComponent);
4336
4554
  component.clickSubmit(true);
@@ -4709,7 +4927,9 @@ class CmsModule {
4709
4927
  DragDropModule,
4710
4928
  NgxDatatableModule,
4711
4929
  CKEditorModule,
4712
- FormsModule], exports: [TableConfigComponent,
4930
+ FormsModule,
4931
+ // CommercialUiModule,
4932
+ GetLocalizedEntriesBySlugPipe], exports: [TableConfigComponent,
4713
4933
  TableControlComponent,
4714
4934
  MatrixConfigComponent,
4715
4935
  MatrixControlComponent,
@@ -4777,6 +4997,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
4777
4997
  CKEditorModule,
4778
4998
  FormsModule,
4779
4999
  // CommercialUiModule,
5000
+ GetLocalizedEntriesBySlugPipe,
4780
5001
  ],
4781
5002
  exports: [
4782
5003
  TableConfigComponent,