@dignite-ng/expand.cms 3.1.6 → 3.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/cms.module.mjs +10 -3
- package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +22 -3
- package/esm2022/lib/components/admin/entries/edit.component.mjs +6 -5
- package/esm2022/lib/components/admin/entries/entries.component.mjs +250 -27
- package/esm2022/lib/components/dynamic-form/entry/entry-control.component.mjs +74 -10
- package/esm2022/lib/components/dynamic-form/entry/entry-search.component.mjs +62 -7
- package/esm2022/lib/components/index.mjs +1 -1
- package/esm2022/lib/pipes/get-slug-by-id.pipe.mjs +17 -0
- package/fesm2022/dignite-ng-expand.cms.mjs +425 -48
- package/fesm2022/dignite-ng-expand.cms.mjs.map +1 -1
- package/lib/cms.module.d.ts +3 -1
- package/lib/components/admin/entries/create-or-edit-entries.component.d.ts +1 -0
- package/lib/components/admin/entries/entries.component.d.ts +63 -0
- package/lib/components/dynamic-form/entry/entry-control.component.d.ts +17 -2
- package/lib/components/dynamic-form/entry/entry-search.component.d.ts +17 -2
- package/lib/pipes/get-slug-by-id.pipe.d.ts +7 -0
- package/package.json +1 -1
|
@@ -15,8 +15,6 @@ import { ColumnMode, NgxDatatableModule } from '@swimlane/ngx-datatable';
|
|
|
15
15
|
import { finalize, of, map, tap } from 'rxjs';
|
|
16
16
|
import * as i4 from '@dignite-ng/expand.core';
|
|
17
17
|
import { UpdateListService, ValidatorsService, LocationBackService, DigniteValidatorsService } from '@dignite-ng/expand.core';
|
|
18
|
-
import * as i7 from '@angular/cdk/drag-drop';
|
|
19
|
-
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
20
18
|
import * as i2 from '@angular/common';
|
|
21
19
|
import { Location, DatePipe } from '@angular/common';
|
|
22
20
|
import * as i6$1 from '@ngx-validate/core';
|
|
@@ -26,6 +24,10 @@ import * as i14 from '@abp/ng.components/page';
|
|
|
26
24
|
import { PageModule } from '@abp/ng.components/page';
|
|
27
25
|
import * as i6$2 from '@dignite-ng/expand.dynamic-form';
|
|
28
26
|
import { DynamicFormModule } from '@dignite-ng/expand.dynamic-form';
|
|
27
|
+
import * as i7 from '@angular/cdk/drag-drop';
|
|
28
|
+
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
29
|
+
import * as i5 from 'ng-zorro-antd/tree-select';
|
|
30
|
+
import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';
|
|
29
31
|
import * as i4$1 from 'ng-zorro-antd/select';
|
|
30
32
|
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
31
33
|
import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
|
|
@@ -510,6 +512,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
510
512
|
}]
|
|
511
513
|
}] });
|
|
512
514
|
|
|
515
|
+
class GetSlugByIdPipe {
|
|
516
|
+
transform(parentId, items) {
|
|
517
|
+
return items?.find(item => item.id === parentId)?.slug || '';
|
|
518
|
+
}
|
|
519
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: GetSlugByIdPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
520
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: GetSlugByIdPipe, isStandalone: true, name: "getSlugById" }); }
|
|
521
|
+
}
|
|
522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: GetSlugByIdPipe, decorators: [{
|
|
523
|
+
type: Pipe,
|
|
524
|
+
args: [{
|
|
525
|
+
name: 'getSlugById',
|
|
526
|
+
standalone: true
|
|
527
|
+
}]
|
|
528
|
+
}] });
|
|
529
|
+
|
|
513
530
|
/* eslint-disable no-constant-condition */
|
|
514
531
|
/* eslint-disable no-async-promise-executor */
|
|
515
532
|
/* eslint-disable @angular-eslint/component-selector */
|
|
@@ -567,6 +584,18 @@ class EntriesComponent {
|
|
|
567
584
|
};
|
|
568
585
|
this.filters = {};
|
|
569
586
|
this.maxResultCount = 10;
|
|
587
|
+
this.copylistItem = [];
|
|
588
|
+
this.shouldScrollToTop = true;
|
|
589
|
+
/** 当前拖拽目标节点的ID */
|
|
590
|
+
this.dropTargetId = null;
|
|
591
|
+
/** 拖拽位置:above-上方, below-下方, inside-内部 */
|
|
592
|
+
this.dropPosition = null;
|
|
593
|
+
/** 当前被拖拽的节点 */
|
|
594
|
+
this.draggedItem = null;
|
|
595
|
+
/** 是否正在拖拽 */
|
|
596
|
+
this.isDragging = false;
|
|
597
|
+
/** 是否为无效拖拽目标(拖拽到自身或子节点) */
|
|
598
|
+
this.isInvalidDropTarget = false;
|
|
570
599
|
this.isexpanded = false;
|
|
571
600
|
}
|
|
572
601
|
ngOnInit() {
|
|
@@ -604,6 +633,7 @@ class EntriesComponent {
|
|
|
604
633
|
})
|
|
605
634
|
.subscribe(async (res) => {
|
|
606
635
|
this.SiteOfSectionList = res.items.filter(el => el.isActive);
|
|
636
|
+
// this.filters.sectionId = res.items[res.items.length-1]?.id || '';
|
|
607
637
|
this.filters.sectionId = res.items[0]?.id || '';
|
|
608
638
|
await this.getSectionOfEntryType();
|
|
609
639
|
resolve(res.items);
|
|
@@ -789,17 +819,19 @@ class EntriesComponent {
|
|
|
789
819
|
const setData = (list) => {
|
|
790
820
|
this.data.items = [];
|
|
791
821
|
this.data.totalCount = 0;
|
|
792
|
-
if (this.SiteOfSectionType == SectionType.Structure) {
|
|
793
|
-
list.items = list.items.sort((a, b) => {
|
|
794
|
-
return new Date(b.creationTime).getTime() - new Date(a.creationTime).getTime();
|
|
795
|
-
});
|
|
796
|
-
}
|
|
797
822
|
for (const element of list.items) {
|
|
798
823
|
const sectionItem = this.SiteOfSectionList.find(el => el.id == element.sectionId);
|
|
799
824
|
element.sectionType = sectionItem.type;
|
|
800
825
|
}
|
|
826
|
+
if (this.SiteOfSectionType == SectionType.Structure) {
|
|
827
|
+
this.copylistItem = list.items;
|
|
828
|
+
list.items = this.buildTree(list.items);
|
|
829
|
+
}
|
|
801
830
|
this.data = list;
|
|
802
|
-
this.
|
|
831
|
+
if (this.shouldScrollToTop) {
|
|
832
|
+
this.scrollToTop();
|
|
833
|
+
}
|
|
834
|
+
this.shouldScrollToTop = true;
|
|
803
835
|
};
|
|
804
836
|
this.list.hookToQuery(getData).subscribe(setData);
|
|
805
837
|
}
|
|
@@ -827,33 +859,241 @@ class EntriesComponent {
|
|
|
827
859
|
}
|
|
828
860
|
});
|
|
829
861
|
}
|
|
862
|
+
/**
|
|
863
|
+
* CDK拖拽开始事件
|
|
864
|
+
*/
|
|
865
|
+
onDragStarted(event) {
|
|
866
|
+
this.isDragging = true;
|
|
867
|
+
this.draggedItem = event.source.data?.item;
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* CDK拖拽结束事件
|
|
871
|
+
*/
|
|
872
|
+
onDragEnded(event) {
|
|
873
|
+
// 不立即清除状态,让drop方法先执行
|
|
874
|
+
setTimeout(() => {
|
|
875
|
+
this.isDragging = false;
|
|
876
|
+
this.draggedItem = null;
|
|
877
|
+
this.isInvalidDropTarget = false;
|
|
878
|
+
}, 100);
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* CDK拖拽进入事件
|
|
882
|
+
*/
|
|
883
|
+
onDragEntered(event, targetItem) {
|
|
884
|
+
if (!this.isDragging)
|
|
885
|
+
return;
|
|
886
|
+
this.dropTargetId = targetItem.id;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* 鼠标移动事件,判断位置
|
|
890
|
+
*/
|
|
891
|
+
onMouseMove(event, targetItem) {
|
|
892
|
+
if (!this.isDragging || !this.draggedItem)
|
|
893
|
+
return;
|
|
894
|
+
const target = event.currentTarget.closest('tr');
|
|
895
|
+
if (!target)
|
|
896
|
+
return;
|
|
897
|
+
this.dropTargetId = targetItem.id;
|
|
898
|
+
const rect = target.getBoundingClientRect();
|
|
899
|
+
const y = event.clientY - rect.top;
|
|
900
|
+
const height = rect.height;
|
|
901
|
+
if (y < height * 0.25) {
|
|
902
|
+
this.dropPosition = 'above';
|
|
903
|
+
}
|
|
904
|
+
else if (y > height * 0.75) {
|
|
905
|
+
this.dropPosition = 'below';
|
|
906
|
+
}
|
|
907
|
+
else {
|
|
908
|
+
this.dropPosition = 'inside';
|
|
909
|
+
}
|
|
910
|
+
// 检查是否为无效拖拽目标
|
|
911
|
+
this.isInvalidDropTarget = this.isDescendantOrSelf(this.draggedItem.id, targetItem.id);
|
|
912
|
+
// console.log('拖拽节点ID:', this.draggedItem.id, '目标节点ID:', targetItem.id, '是否无效:', this.isInvalidDropTarget);
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* 拖拽离开事件处理
|
|
916
|
+
* 清除拖拽目标和位置标识
|
|
917
|
+
*/
|
|
918
|
+
onDragLeave(event) {
|
|
919
|
+
// 不立即清除状态,让drop事件能够获取到dropTargetId和dropPosition
|
|
920
|
+
// 状态会在drop事件中清除
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* 拖拽释放事件处理
|
|
924
|
+
* 根据拖拽位置调用后端API移动节点
|
|
925
|
+
* @param event CDK拖拽事件
|
|
926
|
+
*/
|
|
830
927
|
drop(event) {
|
|
831
|
-
|
|
832
|
-
const
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
928
|
+
// 获取被拖拽的节点数据
|
|
929
|
+
const draggedData = event.item.data;
|
|
930
|
+
if (!draggedData) {
|
|
931
|
+
console.log('无draggedData');
|
|
932
|
+
this.clearDropState();
|
|
933
|
+
return;
|
|
934
|
+
}
|
|
935
|
+
const draggedItem = draggedData.item;
|
|
936
|
+
// 验证拖拽目标和位置是否有效
|
|
937
|
+
if (!this.dropTargetId || !this.dropPosition) {
|
|
938
|
+
console.log('无拖拽目标或位置');
|
|
939
|
+
this.clearDropState();
|
|
836
940
|
return;
|
|
837
|
-
if (previousIndexOrder < currentIndexOrder) {
|
|
838
|
-
moveorder = currentIndexOrder + 1;
|
|
839
941
|
}
|
|
840
|
-
|
|
942
|
+
// 在原始平铺数据中查找目标节点
|
|
943
|
+
const targetItem = this.findItemById(this.copylistItem, this.dropTargetId);
|
|
944
|
+
// 验证目标节点存在且不是自己或子节点
|
|
945
|
+
if (!targetItem || this.isDescendantOrSelf(draggedItem.id, targetItem.id)) {
|
|
946
|
+
this.toaster.warn(this._LocalizationService.instant('Cms::CannotDragToSelfOrDescendant'));
|
|
947
|
+
this.clearDropState();
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
console.log('拖拽节点:', draggedItem);
|
|
951
|
+
/*
|
|
952
|
+
拖拽位置:above-上方, below-下方, inside-内部
|
|
953
|
+
dropPosition: 'above' | 'below' | 'inside' | null = null;
|
|
954
|
+
*/
|
|
955
|
+
console.log('目标节点:', targetItem);
|
|
956
|
+
console.log('位置:', this.dropPosition);
|
|
957
|
+
// 构建移动参数
|
|
958
|
+
const moveParams = {};
|
|
959
|
+
// 如果是放置到内部,设置parentId为目标节点ID
|
|
960
|
+
if (this.dropPosition === 'inside') {
|
|
961
|
+
moveParams.parentId = targetItem.id;
|
|
962
|
+
}
|
|
963
|
+
// 如果是放置在上方或下方,使用目标节点的parentId和order
|
|
964
|
+
else {
|
|
965
|
+
moveParams.parentId = targetItem.parentId;
|
|
966
|
+
// 上方使用目标节点的order,下方使用order+1
|
|
967
|
+
moveParams.order = this.dropPosition === 'above' ? targetItem.order : targetItem.order + 1;
|
|
968
|
+
}
|
|
969
|
+
console.log('移动参数:', moveParams);
|
|
970
|
+
// 立即更新本地数据
|
|
971
|
+
this.updateLocalData(draggedItem, moveParams);
|
|
972
|
+
this.clearDropState();
|
|
973
|
+
// 调用后端API
|
|
841
974
|
this._EntryAdminService
|
|
842
|
-
.move(
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
.pipe(finalize(() => {
|
|
975
|
+
.move(draggedItem.id, moveParams)
|
|
976
|
+
.subscribe(() => {
|
|
977
|
+
this.toaster.success(this._LocalizationService.instant('AbpUi::SavedSuccessfully'));
|
|
978
|
+
this.shouldScrollToTop = false;
|
|
847
979
|
this.list.get();
|
|
848
|
-
})
|
|
849
|
-
.
|
|
850
|
-
|
|
851
|
-
|
|
980
|
+
}, () => {
|
|
981
|
+
this.shouldScrollToTop = false;
|
|
982
|
+
this.list.get();
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* 清除拖拽状态
|
|
987
|
+
*/
|
|
988
|
+
clearDropState() {
|
|
989
|
+
this.dropTargetId = null;
|
|
990
|
+
this.dropPosition = null;
|
|
991
|
+
this.isDragging = false;
|
|
992
|
+
this.draggedItem = null;
|
|
993
|
+
this.isInvalidDropTarget = false;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* 检查目标节点是否是拖拽节点的后代或自身
|
|
997
|
+
*/
|
|
998
|
+
isDescendantOrSelf(draggedId, targetId) {
|
|
999
|
+
if (draggedId === targetId) {
|
|
1000
|
+
// console.log('目标是自身');
|
|
1001
|
+
return true;
|
|
1002
|
+
}
|
|
1003
|
+
const result = this.isDescendant(draggedId, targetId);
|
|
1004
|
+
// console.log('目标是子节点:', result);
|
|
1005
|
+
return result;
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* 递归检查目标节点是否是拖拽节点的子节点
|
|
1009
|
+
*/
|
|
1010
|
+
isDescendant(parentId, childId) {
|
|
1011
|
+
const parent = this.findItemById(this.data.items, parentId);
|
|
1012
|
+
if (!parent)
|
|
1013
|
+
return false;
|
|
1014
|
+
const checkChildren = (node) => {
|
|
1015
|
+
if (!node.children || node.children.length === 0)
|
|
1016
|
+
return false;
|
|
1017
|
+
for (const child of node.children) {
|
|
1018
|
+
if (child.id === childId)
|
|
1019
|
+
return true;
|
|
1020
|
+
if (checkChildren(child))
|
|
1021
|
+
return true;
|
|
1022
|
+
}
|
|
1023
|
+
return false;
|
|
1024
|
+
};
|
|
1025
|
+
return checkChildren(parent);
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* 在树形结构或平铺数组中递归查找指定ID的节点
|
|
1029
|
+
* @param items 节点数组
|
|
1030
|
+
* @param id 要查找的节点ID
|
|
1031
|
+
* @returns 找到的节点或null
|
|
1032
|
+
*/
|
|
1033
|
+
findItemById(items, id) {
|
|
1034
|
+
for (const item of items) {
|
|
1035
|
+
if (item.id === id)
|
|
1036
|
+
return item;
|
|
1037
|
+
// 如果有子节点,递归查找
|
|
1038
|
+
if (item.children) {
|
|
1039
|
+
const found = this.findItemById(item.children, id);
|
|
1040
|
+
if (found)
|
|
1041
|
+
return found;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
return null;
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* 更新本地数据
|
|
1048
|
+
*/
|
|
1049
|
+
updateLocalData(draggedItem, moveParams) {
|
|
1050
|
+
const flatItem = this.copylistItem.find(item => item.id === draggedItem.id);
|
|
1051
|
+
if (!flatItem)
|
|
1052
|
+
return;
|
|
1053
|
+
flatItem.parentId = moveParams.parentId;
|
|
1054
|
+
if (moveParams.order !== undefined) {
|
|
1055
|
+
flatItem.order = moveParams.order;
|
|
1056
|
+
}
|
|
1057
|
+
else {
|
|
1058
|
+
// 拖拽到内部时,设置为0(子节点开头)
|
|
1059
|
+
flatItem.order = 0;
|
|
1060
|
+
}
|
|
1061
|
+
this.data.items = this.buildTree(this.copylistItem);
|
|
852
1062
|
}
|
|
853
1063
|
/**高级筛选切换 */
|
|
854
1064
|
expandedChange(event) {
|
|
855
1065
|
this.isexpanded = event;
|
|
856
1066
|
}
|
|
1067
|
+
/**将平铺数据转换为树形结构并排序 */
|
|
1068
|
+
buildTree(items) {
|
|
1069
|
+
const map = new Map();
|
|
1070
|
+
const roots = [];
|
|
1071
|
+
items.forEach(item => {
|
|
1072
|
+
map.set(item.id, { ...item, children: [] });
|
|
1073
|
+
});
|
|
1074
|
+
items.forEach(item => {
|
|
1075
|
+
const node = map.get(item.id);
|
|
1076
|
+
if (item.parentId === null || item.parentId === undefined) {
|
|
1077
|
+
roots.push(node);
|
|
1078
|
+
}
|
|
1079
|
+
else {
|
|
1080
|
+
const parent = map.get(item.parentId);
|
|
1081
|
+
if (parent) {
|
|
1082
|
+
parent.children.push(node);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
});
|
|
1086
|
+
const sortByOrder = (nodes) => {
|
|
1087
|
+
nodes.sort((a, b) => a.order - b.order);
|
|
1088
|
+
nodes.forEach(node => {
|
|
1089
|
+
if (node.children && node.children.length > 0) {
|
|
1090
|
+
sortByOrder(node.children);
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
};
|
|
1094
|
+
sortByOrder(roots);
|
|
1095
|
+
return roots;
|
|
1096
|
+
}
|
|
857
1097
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntriesComponent, deps: [{ token: EntryAdminService }, { token: SectionAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1.ConfigStateService }, { token: i6.Router }, { token: i1.LocalizationService }, { token: FormAdminService }, { token: FieldAdminService }, { token: i0.ChangeDetectorRef }, { token: FormControlsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
858
1098
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: EntriesComponent, selector: "cms-entries", providers: [
|
|
859
1099
|
ListService,
|
|
@@ -864,7 +1104,7 @@ class EntriesComponent {
|
|
|
864
1104
|
provide: EXTENSIONS_IDENTIFIER,
|
|
865
1105
|
useValue: ECmsComponent.Entries,
|
|
866
1106
|
},
|
|
867
|
-
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \">\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length === 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button class=\"btn btn-sm btn-primary\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single\"\r\n [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\"><i\r\n class=\"fa fa-plus me-2\"></i> {{'Cms::NewEntry'|abpLocalization}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::NewEntry' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single&&isEntryTypeExist(item.id)\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\">{{item.displayName}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <div id=\"sites-page\" class=\"sites-page\">\r\n <div class=\"card\">\r\n <div class=\"card-body \">\r\n <div class=\"row align-items-end\">\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.sectionId\"\r\n (change)=\"sectionIdChange()\">\r\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.culture\" (change)=\"cultureChange()\">\r\n <ng-container *ngFor=\"let item of sectionLanguagesList\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-6\">\r\n <!-- <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\r\n [placeholder]=\"'Cms::PagerSearch'|abpLocalization\" />\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"listget()\">\r\n <i class=\"bi bi-search\"></i>\r\n </button>\r\n </div> -->\r\n </div>\r\n </div>\r\n @if(filters.culture&&enablegearchFormEntity&&enableSearchFieldList.length>0){\r\n <div id=\"entries-advanced-form\" class=\"entries-advanced-form \" [hidden]=\"isexpanded\"\r\n (abpInit)=\"abpInitss()\">\r\n <form [formGroup]=\"enablegearchFormEntity\">\r\n <div class=\"row align-items-end\">\r\n <ng-container *ngFor=\"let el of enableSearchFieldList\">\r\n <ng-container *ngIf=\"el.field&&enablegearchFormEntity&&el.enableSearch\">\r\n <div class=\"col-md-3\">\r\n <df-dynamic-search [fields]=\"el\" [parentFiledName]=\"'extraProperties'\"\r\n [culture]=\"filters.culture\"\r\n [entity]=\"enablegearchFormEntity\"></df-dynamic-search>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <div class=\"col-md-3 mb-3 \">\r\n <button type=\"button\" class=\"btn btn-primary \" (click)=\"listget()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"card mb-0\">\r\n <div class=\"card-body p-0\">\r\n @if(SiteOfSectionType!==SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\" [columnMode]=\"ColumnMode.force\"\r\n [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [virtualization]=\"false\"\r\n [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\r\n <!-- <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <ngx-datatable-column [name]=\"'Cms::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::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 \r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\" [width]=\"80\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.value=== value\">{{ 'Cms::Enum:EntryStatus:'+item.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n @for (item of showinFieldList; track $index) {\r\n <ngx-datatable-column [name]=\"'Cms::'+item.displayName | abpLocalization\"\r\n [prop]=\"item?.field?.name\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <df-dynamic-view [type]=\"item.field.formControlName\" [showInList]=\"true\" [fields]=\"item\"\r\n [value]=\"row?.extraProperties[item.field.name]\"></df-dynamic-view>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\"\r\n [width]=\"190\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | shortDateTime }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\"\r\n [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <div ngbDropdown container=\"body\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{row.id}}/edit\">{{'Cms::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((row|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button>\r\n }\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'Cms::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n </ngx-datatable>\r\n </div>\r\n }\r\n\r\n @if(SiteOfSectionType===SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <table class=\"table overflow-nowrap mb-0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <thead>\r\n <tr>\r\n <th class=\"sticky-left-card-bg\"> <span\r\n class=\"bi bi-arrows-move fs-5 drag-handle me-2 opacity-0\"></span>{{'AbpUi::Actions'\r\n | abpLocalization}}</th>\r\n <th>{{'Cms::Slug' | 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 <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 class=\"white-space-normal\">{{item.slug}}</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 \r\n <td>\r\n <ng-container *ngFor=\"let item2 of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.status=== item2.value\">{{\r\n 'Cms::Enum:EntryStatus:'+item2.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </td>\r\n @for (item1 of showinFieldList; track $index) {\r\n <td>\r\n <df-dynamic-view [type]=\"item1.field.formControlName\" [showInList]=\"true\"\r\n [fields]=\"item1\"\r\n [value]=\"item?.extraProperties[item1.field.name]\"></df-dynamic-view>\r\n\r\n </td>\r\n }\r\n <td>{{item.publishTime | shortDateTime }}</td>\r\n </tr>\r\n </tbody>\r\n @if(data.items.length === 0){\r\n <div class=\"text-muted p-2\">\r\n {{ 'Cms::NoDataAvailableInDatatable' | abpLocalization}}\r\n </div>\r\n }\r\n </table>\r\n </div>\r\n <div class=\"card-footer py-2\">\r\n <small class=\"text-muted\"> {{data.totalCount}} {{ 'Cms::Total' | abpLocalization}}</small>\r\n </div>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n</abp-page>", styles: ["::ng-deep .sites-page .dignite_page{background:transparent}::ng-deep .sites-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sites-page .card-header input{flex:2 1 auto}::ng-deep .sites-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-page .morentr{border:2px solid transparent}::ng-deep .sites-page .borderdrag{border:2px solid var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .borderdragtd{background-color:var(--ck-color-selector-column-resizer-hover)!important}::ng-deep .sites-page .testtr{border-color:transparent}::ng-deep .sites-page .testtr td{padding:2px}::ng-deep .sites-page .testtr:hover{background-color:transparent}.cdk-drag-preview{display:table;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box:last-child{border:0}.example-list.cdk-drop-list-dragging .example-box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}.white-space-normal{white-space:normal;min-width:150px}.overflow-nowrap{overflow:auto;white-space:nowrap}::ng-deep .sites-page .table th{padding-left:1rem!important;padding-right:1rem!important}::ng-deep .sites-page .table td{padding:.875rem 1rem!important}::ng-deep .sites-page .table .sticky-left-card-bg{position:sticky;left:0;background:var(--bs-card-bg)}::ng-deep .sites-page .entries-advanced-form{transition:all .3s linear}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "component", type: i11.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i11.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i11.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i14.PageToolbarContainerComponent, selector: "abp-page-toolbar-container" }, { kind: "component", type: i6$2.DynamicViewComponent, selector: "df-dynamic-view", inputs: ["showInList", "fields", "type", "value"] }, { kind: "component", type: i6$2.DynamicSearchComponent, selector: "df-dynamic-search", inputs: ["culture", "parentFiledName", "fields", "entity"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: i1.ShortDateTimePipe, name: "shortDateTime" }, { kind: "pipe", type: GetLocalizedEntriesBySlugPipe, name: "getLocalizedEntriesBySlug" }] }); }
|
|
1107
|
+
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \">\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length === 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button class=\"btn btn-sm btn-primary\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single\"\r\n [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\"><i\r\n class=\"fa fa-plus me-2\"></i> {{'Cms::NewEntry'|abpLocalization}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::NewEntry' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single&&isEntryTypeExist(item.id)\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\">{{item.displayName}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <div id=\"sites-page\" class=\"sites-page\">\r\n <div class=\"card\">\r\n <div class=\"card-body \">\r\n <div class=\"row align-items-end\">\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.sectionId\"\r\n (change)=\"sectionIdChange()\">\r\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.culture\" (change)=\"cultureChange()\">\r\n <ng-container *ngFor=\"let item of sectionLanguagesList\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-6\">\r\n <!-- <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\r\n [placeholder]=\"'Cms::PagerSearch'|abpLocalization\" />\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"listget()\">\r\n <i class=\"bi bi-search\"></i>\r\n </button>\r\n </div> -->\r\n </div>\r\n </div>\r\n @if(filters.culture&&enablegearchFormEntity&&enableSearchFieldList.length>0){\r\n <div id=\"entries-advanced-form\" class=\"entries-advanced-form \" [hidden]=\"isexpanded\"\r\n (abpInit)=\"abpInitss()\">\r\n <form [formGroup]=\"enablegearchFormEntity\">\r\n <div class=\"row align-items-end\">\r\n <ng-container *ngFor=\"let el of enableSearchFieldList\">\r\n <ng-container *ngIf=\"el.field&&enablegearchFormEntity&&el.enableSearch\">\r\n <div class=\"col-md-3\">\r\n <df-dynamic-search [fields]=\"el\" [parentFiledName]=\"'extraProperties'\"\r\n [culture]=\"filters.culture\"\r\n [entity]=\"enablegearchFormEntity\"></df-dynamic-search>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <div class=\"col-md-3 mb-3 \">\r\n <button type=\"button\" class=\"btn btn-primary \" (click)=\"listget()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"card mb-0\">\r\n <div class=\"card-body p-0\">\r\n @if(SiteOfSectionType!==SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\" [columnMode]=\"ColumnMode.force\"\r\n [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [virtualization]=\"false\"\r\n [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\r\n <!-- <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <ngx-datatable-column [name]=\"'Cms::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::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\r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\" [width]=\"80\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.value=== value\">{{ 'Cms::Enum:EntryStatus:'+item.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n @for (item of showinFieldList; track $index) {\r\n <ngx-datatable-column [name]=\"'Cms::'+item.displayName | abpLocalization\"\r\n [prop]=\"item?.field?.name\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <df-dynamic-view [type]=\"item.field.formControlName\" [showInList]=\"true\" [fields]=\"item\"\r\n [value]=\"row?.extraProperties[item.field.name]\"></df-dynamic-view>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\"\r\n [width]=\"190\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | shortDateTime }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\"\r\n [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <div ngbDropdown container=\"body\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{row.id}}/edit\">{{'Cms::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((row|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button>\r\n }\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'Cms::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n </ngx-datatable>\r\n </div>\r\n }\r\n\r\n @if(SiteOfSectionType===SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <table class=\"table overflow-nowrap mb-0\" cdkDropList [cdkDropListSortingDisabled]=\"true\" (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::Slug' | abpLocalization}}</th>\r\n <th>{{'Cms::ParentEntry' | 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 <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 <ng-container *ngFor=\"let item of data.items\">\r\n <ng-container *ngTemplateOutlet=\"treeRow; context: {item: item, level: 0}\"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n \r\n <ng-template #treeRow let-item=\"item\" let-level=\"level\">\r\n <tr cdkDrag [cdkDragData]=\"{item: item, level: level}\"\r\n [class.drop-above]=\"dropPosition === 'above' && dropTargetId === item.id && !isInvalidDropTarget\"\r\n [class.drop-below]=\"dropPosition === 'below' && dropTargetId === item.id && !isInvalidDropTarget\"\r\n [class.drop-inside]=\"dropPosition === 'inside' && dropTargetId === item.id && !isInvalidDropTarget\"\r\n [class.drop-invalid]=\"dropTargetId === item.id && isInvalidDropTarget\"\r\n [style.cursor]=\"dropTargetId === item.id && isInvalidDropTarget ? 'not-allowed' : ''\"\r\n (cdkDragStarted)=\"onDragStarted($event)\"\r\n (cdkDragEnded)=\"onDragEnded($event)\"\r\n (cdkDragEntered)=\"onDragEntered($event, item)\"\r\n (mousemove)=\"onMouseMove($event, item)\">\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\" (mousemove)=\"onMouseMove($event, item)\">\r\n <span [style.padding-left.px]=\"level * 20\">{{item.slug}}</span>\r\n </td>\r\n <td class=\"white-space-normal\">{{(item.parentId|getSlugById:copylistItem)||'---'}}</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\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 <ng-container *ngIf=\"item.children && item.children.length > 0\">\r\n <ng-container *ngFor=\"let child of item.children\">\r\n <ng-container *ngTemplateOutlet=\"treeRow; context: {item: child, level: level + 1}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\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 .table .drag-handle{cursor:move;cursor:grab}::ng-deep .sites-page .table .drag-handle:active{cursor:grabbing}::ng-deep .sites-page .entries-advanced-form{transition:all .3s linear}.drop-above{border-top:3px solid #28a745!important}.drop-below{border-bottom:3px solid #28a745!important}.drop-inside{background-color:#28a7451a!important}.drop-invalid{background-color:#dc35451a!important}tr[cdkDrag] td{vertical-align:middle}.drag-handle{cursor:move;cursor:grab}.drag-handle:active{cursor:grabbing}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "component", type: i11.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction"] }, { kind: "directive", type: i11.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate"] }, { kind: "directive", type: i11.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i14.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i14.PageToolbarContainerComponent, selector: "abp-page-toolbar-container" }, { kind: "component", type: i6$2.DynamicViewComponent, selector: "df-dynamic-view", inputs: ["showInList", "fields", "type", "value"] }, { kind: "component", type: i6$2.DynamicSearchComponent, selector: "df-dynamic-search", inputs: ["culture", "parentFiledName", "fields", "entity"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: i1.ShortDateTimePipe, name: "shortDateTime" }, { kind: "pipe", type: GetLocalizedEntriesBySlugPipe, name: "getLocalizedEntriesBySlug" }, { kind: "pipe", type: GetSlugByIdPipe, name: "getSlugById" }] }); }
|
|
868
1108
|
}
|
|
869
1109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntriesComponent, decorators: [{
|
|
870
1110
|
type: Component,
|
|
@@ -877,7 +1117,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
877
1117
|
provide: EXTENSIONS_IDENTIFIER,
|
|
878
1118
|
useValue: ECmsComponent.Entries,
|
|
879
1119
|
},
|
|
880
|
-
], template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \">\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length === 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button class=\"btn btn-sm btn-primary\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single\"\r\n [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\"><i\r\n class=\"fa fa-plus me-2\"></i> {{'Cms::NewEntry'|abpLocalization}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::NewEntry' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single&&isEntryTypeExist(item.id)\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\">{{item.displayName}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <div id=\"sites-page\" class=\"sites-page\">\r\n <div class=\"card\">\r\n <div class=\"card-body \">\r\n <div class=\"row align-items-end\">\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.sectionId\"\r\n (change)=\"sectionIdChange()\">\r\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.culture\" (change)=\"cultureChange()\">\r\n <ng-container *ngFor=\"let item of sectionLanguagesList\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-6\">\r\n <!-- <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\r\n [placeholder]=\"'Cms::PagerSearch'|abpLocalization\" />\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"listget()\">\r\n <i class=\"bi bi-search\"></i>\r\n </button>\r\n </div> -->\r\n </div>\r\n </div>\r\n @if(filters.culture&&enablegearchFormEntity&&enableSearchFieldList.length>0){\r\n <div id=\"entries-advanced-form\" class=\"entries-advanced-form \" [hidden]=\"isexpanded\"\r\n (abpInit)=\"abpInitss()\">\r\n <form [formGroup]=\"enablegearchFormEntity\">\r\n <div class=\"row align-items-end\">\r\n <ng-container *ngFor=\"let el of enableSearchFieldList\">\r\n <ng-container *ngIf=\"el.field&&enablegearchFormEntity&&el.enableSearch\">\r\n <div class=\"col-md-3\">\r\n <df-dynamic-search [fields]=\"el\" [parentFiledName]=\"'extraProperties'\"\r\n [culture]=\"filters.culture\"\r\n [entity]=\"enablegearchFormEntity\"></df-dynamic-search>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <div class=\"col-md-3 mb-3 \">\r\n <button type=\"button\" class=\"btn btn-primary \" (click)=\"listget()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"card mb-0\">\r\n <div class=\"card-body p-0\">\r\n @if(SiteOfSectionType!==SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\" [columnMode]=\"ColumnMode.force\"\r\n [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [virtualization]=\"false\"\r\n [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\r\n <!-- <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <ngx-datatable-column [name]=\"'Cms::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::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 \r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\" [width]=\"80\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.value=== value\">{{ 'Cms::Enum:EntryStatus:'+item.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n @for (item of showinFieldList; track $index) {\r\n <ngx-datatable-column [name]=\"'Cms::'+item.displayName | abpLocalization\"\r\n [prop]=\"item?.field?.name\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <df-dynamic-view [type]=\"item.field.formControlName\" [showInList]=\"true\" [fields]=\"item\"\r\n [value]=\"row?.extraProperties[item.field.name]\"></df-dynamic-view>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\"\r\n [width]=\"190\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | shortDateTime }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\"\r\n [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <div ngbDropdown container=\"body\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{row.id}}/edit\">{{'Cms::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((row|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button>\r\n }\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'Cms::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n </ngx-datatable>\r\n </div>\r\n }\r\n\r\n @if(SiteOfSectionType===SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <table class=\"table overflow-nowrap mb-0\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n <thead>\r\n <tr>\r\n <th class=\"sticky-left-card-bg\"> <span\r\n class=\"bi bi-arrows-move fs-5 drag-handle me-2 opacity-0\"></span>{{'AbpUi::Actions'\r\n | abpLocalization}}</th>\r\n <th>{{'Cms::Slug' | 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 <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 class=\"white-space-normal\">{{item.slug}}</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 \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"] }]
|
|
1120
|
+
], template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \">\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length === 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button class=\"btn btn-sm btn-primary\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single\"\r\n [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\"><i\r\n class=\"fa fa-plus me-2\"></i> {{'Cms::NewEntry'|abpLocalization}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::NewEntry' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [disabled]=\"data.totalCount===1&&SiteOfSectionType===SectionType.Single&&isEntryTypeExist(item.id)\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:item.id}\">{{item.displayName}}</button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </abp-page-toolbar-container>\r\n <div id=\"sites-page\" class=\"sites-page\">\r\n <div class=\"card\">\r\n <div class=\"card-body \">\r\n <div class=\"row align-items-end\">\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.sectionId\"\r\n (change)=\"sectionIdChange()\">\r\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\r\n <option [value]=\"item.id\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-3\">\r\n <label class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.culture\" (change)=\"cultureChange()\">\r\n <ng-container *ngFor=\"let item of sectionLanguagesList\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3 col-md-6\">\r\n <!-- <div class=\"input-group\">\r\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\r\n [placeholder]=\"'Cms::PagerSearch'|abpLocalization\" />\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"listget()\">\r\n <i class=\"bi bi-search\"></i>\r\n </button>\r\n </div> -->\r\n </div>\r\n </div>\r\n @if(filters.culture&&enablegearchFormEntity&&enableSearchFieldList.length>0){\r\n <div id=\"entries-advanced-form\" class=\"entries-advanced-form \" [hidden]=\"isexpanded\"\r\n (abpInit)=\"abpInitss()\">\r\n <form [formGroup]=\"enablegearchFormEntity\">\r\n <div class=\"row align-items-end\">\r\n <ng-container *ngFor=\"let el of enableSearchFieldList\">\r\n <ng-container *ngIf=\"el.field&&enablegearchFormEntity&&el.enableSearch\">\r\n <div class=\"col-md-3\">\r\n <df-dynamic-search [fields]=\"el\" [parentFiledName]=\"'extraProperties'\"\r\n [culture]=\"filters.culture\"\r\n [entity]=\"enablegearchFormEntity\"></df-dynamic-search>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <div class=\"col-md-3 mb-3 \">\r\n <button type=\"button\" class=\"btn btn-primary \" (click)=\"listget()\">\r\n <span>{{ 'AbpUi::Refresh' | abpLocalization }}</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n\r\n\r\n <div class=\"card mb-0\">\r\n <div class=\"card-body p-0\">\r\n @if(SiteOfSectionType!==SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\" [columnMode]=\"ColumnMode.force\"\r\n [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\" [virtualization]=\"false\"\r\n [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\r\n <!-- <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column> -->\r\n <ngx-datatable-column [name]=\"'Cms::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::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\r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\" [width]=\"80\"\r\n [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of _entryStatusOptions\">\r\n <ng-container *ngIf=\"item.value=== value\">{{ 'Cms::Enum:EntryStatus:'+item.key |\r\n abpLocalization }}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n @for (item of showinFieldList; track $index) {\r\n <ngx-datatable-column [name]=\"'Cms::'+item.displayName | abpLocalization\"\r\n [prop]=\"item?.field?.name\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <df-dynamic-view [type]=\"item.field.formControlName\" [showInList]=\"true\" [fields]=\"item\"\r\n [value]=\"row?.extraProperties[item.field.name]\"></df-dynamic-view>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\"\r\n [width]=\"190\" [sortable]=\"false\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | shortDateTime }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\"\r\n [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <div ngbDropdown container=\"body\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\r\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu>\r\n <button ngbDropdownItem\r\n routerLink=\"/cms/admin/entries/{{row.id}}/edit\">{{'Cms::Edit' |\r\n abpLocalization}}</button>\r\n @if\r\n (((row|getLocalizedEntriesBySlug:filters.sectionId:sectionLanguagesList)|async)===false)\r\n {\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [queryParams]=\"{cultureName: filters.culture,sectionId:filters.sectionId,entryTypeId:row.entryTypeId,entryVersionId:row.id,isOther:1}\">{{'Cms::CreateOtherLanguages'\r\n |\r\n abpLocalization}} </button>\r\n }\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'Cms::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n\r\n </ngx-datatable>\r\n </div>\r\n }\r\n\r\n @if(SiteOfSectionType===SectionType.Structure){\r\n <div class=\"table-responsive table-fixed-header\">\r\n <table class=\"table overflow-nowrap mb-0\" cdkDropList [cdkDropListSortingDisabled]=\"true\" (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::Slug' | abpLocalization}}</th>\r\n <th>{{'Cms::ParentEntry' | 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 <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 <ng-container *ngFor=\"let item of data.items\">\r\n <ng-container *ngTemplateOutlet=\"treeRow; context: {item: item, level: 0}\"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n \r\n <ng-template #treeRow let-item=\"item\" let-level=\"level\">\r\n <tr cdkDrag [cdkDragData]=\"{item: item, level: level}\"\r\n [class.drop-above]=\"dropPosition === 'above' && dropTargetId === item.id && !isInvalidDropTarget\"\r\n [class.drop-below]=\"dropPosition === 'below' && dropTargetId === item.id && !isInvalidDropTarget\"\r\n [class.drop-inside]=\"dropPosition === 'inside' && dropTargetId === item.id && !isInvalidDropTarget\"\r\n [class.drop-invalid]=\"dropTargetId === item.id && isInvalidDropTarget\"\r\n [style.cursor]=\"dropTargetId === item.id && isInvalidDropTarget ? 'not-allowed' : ''\"\r\n (cdkDragStarted)=\"onDragStarted($event)\"\r\n (cdkDragEnded)=\"onDragEnded($event)\"\r\n (cdkDragEntered)=\"onDragEntered($event, item)\"\r\n (mousemove)=\"onMouseMove($event, item)\">\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\" (mousemove)=\"onMouseMove($event, item)\">\r\n <span [style.padding-left.px]=\"level * 20\">{{item.slug}}</span>\r\n </td>\r\n <td class=\"white-space-normal\">{{(item.parentId|getSlugById:copylistItem)||'---'}}</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\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 <ng-container *ngIf=\"item.children && item.children.length > 0\">\r\n <ng-container *ngFor=\"let child of item.children\">\r\n <ng-container *ngTemplateOutlet=\"treeRow; context: {item: child, level: level + 1}\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\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 .table .drag-handle{cursor:move;cursor:grab}::ng-deep .sites-page .table .drag-handle:active{cursor:grabbing}::ng-deep .sites-page .entries-advanced-form{transition:all .3s linear}.drop-above{border-top:3px solid #28a745!important}.drop-below{border-bottom:3px solid #28a745!important}.drop-inside{background-color:#28a7451a!important}.drop-invalid{background-color:#dc35451a!important}tr[cdkDrag] td{vertical-align:middle}.drag-handle{cursor:move;cursor:grab}.drag-handle:active{cursor:grabbing}\n"] }]
|
|
881
1121
|
}], ctorParameters: () => [{ type: EntryAdminService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.ConfigStateService }, { type: i6.Router }, { type: i1.LocalizationService }, { type: FormAdminService }, { type: FieldAdminService }, { type: i0.ChangeDetectorRef }, { type: FormControlsService }] });
|
|
882
1122
|
|
|
883
1123
|
class CreateOrUpdateEntryInputBase {
|
|
@@ -1148,17 +1388,34 @@ class CreateOrEditEntriesComponent {
|
|
|
1148
1388
|
})
|
|
1149
1389
|
.subscribe((res) => {
|
|
1150
1390
|
const entryList = res.items.filter(el => el.id !== this.entryInfo?.id);
|
|
1391
|
+
console.log(entryList, 'entryList');
|
|
1392
|
+
entryList.forEach(el => {
|
|
1393
|
+
el.title = el.slug;
|
|
1394
|
+
el.key = el.id;
|
|
1395
|
+
});
|
|
1151
1396
|
const parentList = entryList.filter(el => !el.parentId);
|
|
1152
1397
|
parentList.forEach(el => {
|
|
1153
1398
|
const layer = 0;
|
|
1154
1399
|
el.layer = new Array(layer);
|
|
1155
1400
|
el.children = this.groupByParentId(entryList, el.id, layer + 1);
|
|
1401
|
+
el.isLeaf = !el.children || el.children.length === 0;
|
|
1156
1402
|
});
|
|
1403
|
+
console.log(parentList, 'parentList');
|
|
1157
1404
|
this.entryList = parentList;
|
|
1158
1405
|
resolve(res);
|
|
1159
1406
|
});
|
|
1160
1407
|
});
|
|
1161
1408
|
}
|
|
1409
|
+
// nodes: any[] = [
|
|
1410
|
+
// {
|
|
1411
|
+
// title: 'parent 1',
|
|
1412
|
+
// key: '100',
|
|
1413
|
+
// children:[]
|
|
1414
|
+
// }
|
|
1415
|
+
// ];
|
|
1416
|
+
onChange($event) {
|
|
1417
|
+
console.log($event);
|
|
1418
|
+
}
|
|
1162
1419
|
/**对数组按照父子关系进行分组 */
|
|
1163
1420
|
groupByParentId(arr, id = '', layer) {
|
|
1164
1421
|
let result = [];
|
|
@@ -1166,6 +1423,7 @@ class CreateOrEditEntriesComponent {
|
|
|
1166
1423
|
result.forEach(el => {
|
|
1167
1424
|
el.layer = new Array(layer);
|
|
1168
1425
|
el.children = this.groupByParentId(arr, el.id, layer + 1);
|
|
1426
|
+
el.isLeaf = !el.children || el.children.length === 0;
|
|
1169
1427
|
});
|
|
1170
1428
|
return result;
|
|
1171
1429
|
}
|
|
@@ -1215,11 +1473,11 @@ class CreateOrEditEntriesComponent {
|
|
|
1215
1473
|
});
|
|
1216
1474
|
}
|
|
1217
1475
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditEntriesComponent, deps: [{ token: i4.ToPinyinService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1218
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: { isEdit: "isEdit", isCreateVersion: "isCreateVersion", sectionId: "sectionId", entryTypeId: "entryTypeId", select: "select", entity: "entity", isOther: "isOther" }, outputs: { feedbackChildInfo: "feedbackChildInfo" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<div [formGroup]=\"formEntity\">\r\n <div class=\"row create-or-edit-entries-page\">\r\n <div class=\"col-md-8\">\r\n <div class=\"card\">\r\n <div class=\"card-body py-0\">\r\n <!-- <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Title' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"title\"\r\n (blur)=\"setTitleToSlugBlur($event)\">\r\n </div> -->\r\n\r\n <ng-container *ngIf=\"isLoad\">\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"tabActive\" [destroyOnHide]=\"false\" class=\"nav-tabs mb-0\">\r\n <ng-container *ngFor=\"let item of showEntryType?.fieldTabs;let i =index\">\r\n <li [ngbNavItem]=\"i\" [destroyOnHide]=\"false\">\r\n <button ngbNavLink *ngIf=\"showEntryType?.fieldTabs.length>1\">{{item.name}}</button>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\r\n <ng-container *ngIf=\"el&&formEntity\">\r\n <df-dynamic-control [fields]=\"el\"\r\n [selected]=\"entryInfo ? entryInfo.extraProperties[el.field.name] : ''\"\r\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureInput.value\"\r\n [entity]=\"formEntity\"></df-dynamic-control>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"\"></div>\r\n </ng-container>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Slug' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\" (change)=\"slugChange($event)\">\r\n <div class=\"text-danger\" *ngIf=\"slugInput.dirty\">\r\n {{slugInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}</div>\r\n <select class=\"form-select form-select-multiple\" formControlName=\"culture\">\r\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <div class=\"text-danger\" *ngIf=\"cultureInput.dirty\">\r\n {{cultureInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</div>\r\n <input type=\"text\" disabled [value]=\"showEntryType?.displayName||''\" class=\"form-select\" />\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"sectionInfo.type===1\">\r\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\r\n <select class=\"form-select \" formControlName=\"parentId\">\r\n <option value=\"\"></option>\r\n <ng-container *ngFor=\"let item of entryList;let i =index\">\r\n <option [value]=\"item.id\">{{item.title}}</option>\r\n <ng-container *ngFor=\"let el of item.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n <ng-template #childTemplate let-data>\r\n <option [value]=\"data.value.id\">\r\n <ng-container *ngFor=\"let item of data.value.layer\">--</ng-container>\r\n {{data.value.title}}\r\n </option>\r\n <ng-container *ngFor=\"let el of data.value.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\r\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEdit\">\r\n <label class=\"form-label\" for=\"Version\">{{'Cms::Version' | abpLocalization}}</label>\r\n <ul class=\"list-group\">\r\n <ng-container *ngFor=\"let item of AllVersionsList\">\r\n <li\r\n class=\"list-group-item flex-between d-flex align-items-center justify-content-between\">\r\n <div>\r\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd\r\n HH:mm:s'):('Cms::InitialVersion' | abpLocalization)}}\r\n <span class=\"badge text-bg-success ms-1\"\r\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\r\n <span class=\"badge text-bg-primary ms-1\"\r\n *ngIf=\"item.id === entryVersionId\">{{'Cms::Editing' |\r\n abpLocalization}}</span>\r\n </div>\r\n <div>\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\r\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\r\n (click)=\"ActivatedVersion(item.id)\">\r\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n routerLink=\"/cms/admin/entries/create\"\r\n [queryParams]=\"{entryVersionId:item.id}\">\r\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\r\n *ngIf=\"item.id !== entryVersionId\">\r\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n (click.stop)=\"delectVersion(item.id)\"\r\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== entryVersionId\">\r\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' |\r\n abpLocalization}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"entryInfo\">\r\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\r\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</div>", styles: ["::ng-deep .create-or-edit-entries-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i11$1.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i11$1.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i11$1.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i11$1.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i11$1.NgbNavLinkButton, selector: "button[ngbNavLink]" }, { kind: "directive", type: i11$1.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i11$1.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i6$2.DynamicControlComponent, selector: "df-dynamic-control", inputs: ["selected", "culture", "parentFiledName", "fields", "entity"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1476
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: { isEdit: "isEdit", isCreateVersion: "isCreateVersion", sectionId: "sectionId", entryTypeId: "entryTypeId", select: "select", entity: "entity", isOther: "isOther" }, outputs: { feedbackChildInfo: "feedbackChildInfo" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<div [formGroup]=\"formEntity\">\r\n <div class=\"row create-or-edit-entries-page\">\r\n <div class=\"col-md-8\">\r\n <div class=\"card\">\r\n <div class=\"card-body py-0\">\r\n <!-- <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Title' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"title\"\r\n (blur)=\"setTitleToSlugBlur($event)\">\r\n </div> -->\r\n\r\n <ng-container *ngIf=\"isLoad\">\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"tabActive\" [destroyOnHide]=\"false\" class=\"nav-tabs mb-0\">\r\n <ng-container *ngFor=\"let item of showEntryType?.fieldTabs;let i =index\">\r\n <li [ngbNavItem]=\"i\" [destroyOnHide]=\"false\">\r\n <button ngbNavLink *ngIf=\"showEntryType?.fieldTabs.length>1\">{{item.name}}</button>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\r\n <ng-container *ngIf=\"el&&formEntity\">\r\n <df-dynamic-control [fields]=\"el\"\r\n [selected]=\"entryInfo ? entryInfo.extraProperties[el.field.name] : ''\"\r\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureInput.value\"\r\n [entity]=\"formEntity\"></df-dynamic-control>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"\"></div>\r\n </ng-container>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Slug' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\" (change)=\"slugChange($event)\">\r\n <div class=\"text-danger\" *ngIf=\"slugInput.dirty\">\r\n {{slugInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}</div>\r\n <select class=\"form-select form-select-multiple\" formControlName=\"culture\">\r\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <div class=\"text-danger\" *ngIf=\"cultureInput.dirty\">\r\n {{cultureInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</div>\r\n <input type=\"text\" disabled [value]=\"showEntryType?.displayName||''\" class=\"form-select\" />\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"sectionInfo.type===1\">\r\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\r\n <!-- <select class=\"form-select \" formControlName=\"parentId\">\r\n <option value=\"\"></option>\r\n <ng-container *ngFor=\"let item of entryList;let i =index\">\r\n <option [value]=\"item.id\">{{item.slug}}</option>\r\n <ng-container *ngFor=\"let el of item.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n <ng-template #childTemplate let-data>\r\n <option [value]=\"data.value.id\">\r\n <ng-container *ngFor=\"let item of data.value.layer\">--</ng-container>\r\n {{data.value.slug}}\r\n </option>\r\n <ng-container *ngFor=\"let el of data.value.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </select> -->\r\n <nz-tree-select class=\"form-select dignite-form-tree-select \" [nzMaxTagCount]=\"1\" nzShowSearch\r\n formControlName=\"parentId\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-tree-select-dropdown'\" [nzNodes]=\"entryList\"\r\n nzDefaultExpandAll (ngModelChange)=\"onChange($event)\"></nz-tree-select>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\r\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEdit\">\r\n <label class=\"form-label\" for=\"Version\">{{'Cms::Version' | abpLocalization}}</label>\r\n <ul class=\"list-group\">\r\n <ng-container *ngFor=\"let item of AllVersionsList\">\r\n <li\r\n class=\"list-group-item flex-between d-flex align-items-center justify-content-between\">\r\n <div>\r\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd\r\n HH:mm:s'):('Cms::InitialVersion' | abpLocalization)}}\r\n <span class=\"badge text-bg-success ms-1\"\r\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\r\n <span class=\"badge text-bg-primary ms-1\"\r\n *ngIf=\"item.id === entryVersionId\">{{'Cms::Editing' |\r\n abpLocalization}}</span>\r\n </div>\r\n <div>\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\r\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\r\n (click)=\"ActivatedVersion(item.id)\">\r\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n routerLink=\"/cms/admin/entries/create\"\r\n [queryParams]=\"{entryVersionId:item.id}\">\r\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\r\n *ngIf=\"item.id !== entryVersionId\">\r\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n (click.stop)=\"delectVersion(item.id)\"\r\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== entryVersionId\">\r\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' |\r\n abpLocalization}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"entryInfo\">\r\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\r\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</div>", styles: ["::ng-deep .create-or-edit-entries-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}::ng-deep .dignite-form-tree-select.ant-select{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector{background:transparent!important;border:none!important;padding:.475rem 1.25rem!important;box-shadow:none!important;height:auto!important;display:flex!important;align-items:center!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search{margin-inline-start:0!important;display:flex;align-items:center;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search .ant-select-selection-search-input{background-color:transparent!important;color:var(--bs-body-color)!important;caret-color:var(--bs-body-color)!important;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item .ant-select-selection-item{display:flex;align-items:center;color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .anticon-search,::ng-deep .dignite-form-tree-select.ant-select .anticon-down{display:none}::ng-deep .dignite-form-tree-select.ant-select .ant-select-arrow,::ng-deep .dignite-form-tree-select.ant-select .ant-select-clear{right:36px!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-placeholder{color:var(--bs-body-color)!important;opacity:.6}::ng-deep .dignite-form-tree-select.ant-select.ant-select-multiple .ant-select-selection-item{max-width:60%!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item-remove{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select-dropdown{max-height:256px;overflow-y:auto;background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-dropdown{background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree-switcher{color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree{background:transparent!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode{padding:4px 0}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper{padding:5px 8px;border-radius:4px;transition:all .3s;color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper:hover{background-color:var(--bs-primary)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode.ant-select-tree-treenode-selected .ant-select-tree-node-content-wrapper{background-color:var(--lpx-brand)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-checkbox{margin-right:8px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i11$1.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i11$1.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i11$1.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i11$1.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i11$1.NgbNavLinkButton, selector: "button[ngbNavLink]" }, { kind: "directive", type: i11$1.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i11$1.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i11$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i11$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i11$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i11$1.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i11$1.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i6$2.DynamicControlComponent, selector: "df-dynamic-control", inputs: ["selected", "culture", "parentFiledName", "fields", "entity"] }, { kind: "component", type: i5.NzTreeSelectComponent, selector: "nz-tree-select", inputs: ["nzId", "nzAllowClear", "nzShowExpand", "nzShowLine", "nzDropdownMatchSelectWidth", "nzCheckable", "nzHideUnMatched", "nzShowIcon", "nzShowSearch", "nzDisabled", "nzAsyncData", "nzMultiple", "nzDefaultExpandAll", "nzCheckStrictly", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzExpandedIcon", "nzNotFoundContent", "nzNodes", "nzOpen", "nzSize", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzPlacement", "nzExpandedKeys", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckBoxChange"], exportAs: ["nzTreeSelect"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1219
1477
|
}
|
|
1220
1478
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditEntriesComponent, decorators: [{
|
|
1221
1479
|
type: Component,
|
|
1222
|
-
args: [{ selector: 'cms-create-or-edit-entries', template: "<div [formGroup]=\"formEntity\">\r\n <div class=\"row create-or-edit-entries-page\">\r\n <div class=\"col-md-8\">\r\n <div class=\"card\">\r\n <div class=\"card-body py-0\">\r\n <!-- <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Title' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"title\"\r\n (blur)=\"setTitleToSlugBlur($event)\">\r\n </div> -->\r\n\r\n <ng-container *ngIf=\"isLoad\">\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"tabActive\" [destroyOnHide]=\"false\" class=\"nav-tabs mb-0\">\r\n <ng-container *ngFor=\"let item of showEntryType?.fieldTabs;let i =index\">\r\n <li [ngbNavItem]=\"i\" [destroyOnHide]=\"false\">\r\n <button ngbNavLink *ngIf=\"showEntryType?.fieldTabs.length>1\">{{item.name}}</button>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\r\n <ng-container *ngIf=\"el&&formEntity\">\r\n <df-dynamic-control [fields]=\"el\"\r\n [selected]=\"entryInfo ? entryInfo.extraProperties[el.field.name] : ''\"\r\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureInput.value\"\r\n [entity]=\"formEntity\"></df-dynamic-control>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"\"></div>\r\n </ng-container>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Slug' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\" (change)=\"slugChange($event)\">\r\n <div class=\"text-danger\" *ngIf=\"slugInput.dirty\">\r\n {{slugInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}</div>\r\n <select class=\"form-select form-select-multiple\" formControlName=\"culture\">\r\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <div class=\"text-danger\" *ngIf=\"cultureInput.dirty\">\r\n {{cultureInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</div>\r\n <input type=\"text\" disabled [value]=\"showEntryType?.displayName||''\" class=\"form-select\" />\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"sectionInfo.type===1\">\r\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\r\n <select class=\"form-select \" formControlName=\"parentId\">\r\n <option value=\"\"></option>\r\n <ng-container *ngFor=\"let item of entryList;let i =index\">\r\n <option [value]=\"item.id\">{{item.title}}</option>\r\n <ng-container *ngFor=\"let el of item.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n <ng-template #childTemplate let-data>\r\n <option [value]=\"data.value.id\">\r\n <ng-container *ngFor=\"let item of data.value.layer\">--</ng-container>\r\n {{data.value.title}}\r\n </option>\r\n <ng-container *ngFor=\"let el of data.value.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </select>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\r\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEdit\">\r\n <label class=\"form-label\" for=\"Version\">{{'Cms::Version' | abpLocalization}}</label>\r\n <ul class=\"list-group\">\r\n <ng-container *ngFor=\"let item of AllVersionsList\">\r\n <li\r\n class=\"list-group-item flex-between d-flex align-items-center justify-content-between\">\r\n <div>\r\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd\r\n HH:mm:s'):('Cms::InitialVersion' | abpLocalization)}}\r\n <span class=\"badge text-bg-success ms-1\"\r\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\r\n <span class=\"badge text-bg-primary ms-1\"\r\n *ngIf=\"item.id === entryVersionId\">{{'Cms::Editing' |\r\n abpLocalization}}</span>\r\n </div>\r\n <div>\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\r\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\r\n (click)=\"ActivatedVersion(item.id)\">\r\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n routerLink=\"/cms/admin/entries/create\"\r\n [queryParams]=\"{entryVersionId:item.id}\">\r\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\r\n *ngIf=\"item.id !== entryVersionId\">\r\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n (click.stop)=\"delectVersion(item.id)\"\r\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== entryVersionId\">\r\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' |\r\n abpLocalization}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"entryInfo\">\r\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\r\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</div>", styles: ["::ng-deep .create-or-edit-entries-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}\n"] }]
|
|
1480
|
+
args: [{ selector: 'cms-create-or-edit-entries', template: "<div [formGroup]=\"formEntity\">\r\n <div class=\"row create-or-edit-entries-page\">\r\n <div class=\"col-md-8\">\r\n <div class=\"card\">\r\n <div class=\"card-body py-0\">\r\n <!-- <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Title' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"title\"\r\n (blur)=\"setTitleToSlugBlur($event)\">\r\n </div> -->\r\n\r\n <ng-container *ngIf=\"isLoad\">\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"tabActive\" [destroyOnHide]=\"false\" class=\"nav-tabs mb-0\">\r\n <ng-container *ngFor=\"let item of showEntryType?.fieldTabs;let i =index\">\r\n <li [ngbNavItem]=\"i\" [destroyOnHide]=\"false\">\r\n <button ngbNavLink *ngIf=\"showEntryType?.fieldTabs.length>1\">{{item.name}}</button>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\r\n <ng-container *ngIf=\"el&&formEntity\">\r\n <df-dynamic-control [fields]=\"el\"\r\n [selected]=\"entryInfo ? entryInfo.extraProperties[el.field.name] : ''\"\r\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureInput.value\"\r\n [entity]=\"formEntity\"></df-dynamic-control>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"\"></div>\r\n </ng-container>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::Slug' | abpLocalization}}</div>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\" (change)=\"slugChange($event)\">\r\n <div class=\"text-danger\" *ngIf=\"slugInput.dirty\">\r\n {{slugInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}</div>\r\n <select class=\"form-select form-select-multiple\" formControlName=\"culture\">\r\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\r\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\r\n </ng-container>\r\n </select>\r\n <div class=\"text-danger\" *ngIf=\"cultureInput.dirty\">\r\n {{cultureInput?.errors?.repetition}}\r\n </div>\r\n </div>\r\n <div class=\"mb-3\">\r\n <div class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</div>\r\n <input type=\"text\" disabled [value]=\"showEntryType?.displayName||''\" class=\"form-select\" />\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"sectionInfo.type===1\">\r\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\r\n <!-- <select class=\"form-select \" formControlName=\"parentId\">\r\n <option value=\"\"></option>\r\n <ng-container *ngFor=\"let item of entryList;let i =index\">\r\n <option [value]=\"item.id\">{{item.slug}}</option>\r\n <ng-container *ngFor=\"let el of item.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n <ng-template #childTemplate let-data>\r\n <option [value]=\"data.value.id\">\r\n <ng-container *ngFor=\"let item of data.value.layer\">--</ng-container>\r\n {{data.value.slug}}\r\n </option>\r\n <ng-container *ngFor=\"let el of data.value.children\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\r\n $implicit: {\r\n value: el,\r\n }\r\n }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </select> -->\r\n <nz-tree-select class=\"form-select dignite-form-tree-select \" [nzMaxTagCount]=\"1\" nzShowSearch\r\n formControlName=\"parentId\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-tree-select-dropdown'\" [nzNodes]=\"entryList\"\r\n nzDefaultExpandAll (ngModelChange)=\"onChange($event)\"></nz-tree-select>\r\n </div>\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\r\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"isEdit\">\r\n <label class=\"form-label\" for=\"Version\">{{'Cms::Version' | abpLocalization}}</label>\r\n <ul class=\"list-group\">\r\n <ng-container *ngFor=\"let item of AllVersionsList\">\r\n <li\r\n class=\"list-group-item flex-between d-flex align-items-center justify-content-between\">\r\n <div>\r\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd\r\n HH:mm:s'):('Cms::InitialVersion' | abpLocalization)}}\r\n <span class=\"badge text-bg-success ms-1\"\r\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\r\n <span class=\"badge text-bg-primary ms-1\"\r\n *ngIf=\"item.id === entryVersionId\">{{'Cms::Editing' |\r\n abpLocalization}}</span>\r\n </div>\r\n <div>\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\r\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\r\n (click)=\"ActivatedVersion(item.id)\">\r\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n routerLink=\"/cms/admin/entries/create\"\r\n [queryParams]=\"{entryVersionId:item.id}\">\r\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' |\r\n abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\r\n *ngIf=\"item.id !== entryVersionId\">\r\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\r\n </button>\r\n <button ngbDropdownItem type=\"button\"\r\n (click.stop)=\"delectVersion(item.id)\"\r\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== entryVersionId\">\r\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' |\r\n abpLocalization}}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n <div class=\"mb-3\" *ngIf=\"entryInfo\">\r\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\r\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\r\n </div>\r\n\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</div>", styles: ["::ng-deep .create-or-edit-entries-page .nav-tabs .nav-link.active{border-color:var(--bs-nav-tabs-link-active-border-color)!important}::ng-deep .dignite-form-tree-select.ant-select{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector{background:transparent!important;border:none!important;padding:.475rem 1.25rem!important;box-shadow:none!important;height:auto!important;display:flex!important;align-items:center!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search{margin-inline-start:0!important;display:flex;align-items:center;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search .ant-select-selection-search-input{background-color:transparent!important;color:var(--bs-body-color)!important;caret-color:var(--bs-body-color)!important;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item .ant-select-selection-item{display:flex;align-items:center;color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .anticon-search,::ng-deep .dignite-form-tree-select.ant-select .anticon-down{display:none}::ng-deep .dignite-form-tree-select.ant-select .ant-select-arrow,::ng-deep .dignite-form-tree-select.ant-select .ant-select-clear{right:36px!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-placeholder{color:var(--bs-body-color)!important;opacity:.6}::ng-deep .dignite-form-tree-select.ant-select.ant-select-multiple .ant-select-selection-item{max-width:60%!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item-remove{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select-dropdown{max-height:256px;overflow-y:auto;background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-dropdown{background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree-switcher{color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree{background:transparent!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode{padding:4px 0}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper{padding:5px 8px;border-radius:4px;transition:all .3s;color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper:hover{background-color:var(--bs-primary)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode.ant-select-tree-treenode-selected .ant-select-tree-node-content-wrapper{background-color:var(--lpx-brand)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-checkbox{margin-right:8px}\n"] }]
|
|
1223
1481
|
}], ctorParameters: () => [{ type: i4.ToPinyinService }], propDecorators: { isEdit: [{
|
|
1224
1482
|
type: Input
|
|
1225
1483
|
}], isCreateVersion: [{
|
|
@@ -1469,7 +1727,7 @@ class EditComponent {
|
|
|
1469
1727
|
// //检查form是否为FormGroup还是formArray,如果是FormGroup则继续遍历,如果是FormArray则遍历FormArray
|
|
1470
1728
|
// if (form instanceof FormGroup) {
|
|
1471
1729
|
// } else if (form instanceof FormArray) {
|
|
1472
|
-
// }
|
|
1730
|
+
// }
|
|
1473
1731
|
// }
|
|
1474
1732
|
// traverseForm(formEntity);
|
|
1475
1733
|
// return validationStatus
|
|
@@ -1573,6 +1831,7 @@ class EditComponent {
|
|
|
1573
1831
|
// }
|
|
1574
1832
|
// this.formValidation = this.getFormValidationStatus(this.formEntity);
|
|
1575
1833
|
// return this.isSubmit=false;
|
|
1834
|
+
console.log('保存', input);
|
|
1576
1835
|
this.formValidation = true;
|
|
1577
1836
|
if (!this.formEntity.valid) {
|
|
1578
1837
|
for (const item of this.showEntryTypeInfo.fieldTabs) {
|
|
@@ -1598,7 +1857,7 @@ class EditComponent {
|
|
|
1598
1857
|
this.toaster.success(this._LocalizationService.instant(`AbpUi::SavedSuccessfully`));
|
|
1599
1858
|
this._LocationBackService.backTo({
|
|
1600
1859
|
url: `/cms/admin/entries`,
|
|
1601
|
-
replenish: '/edit'
|
|
1860
|
+
replenish: '/edit',
|
|
1602
1861
|
});
|
|
1603
1862
|
this._updateListService.updateList();
|
|
1604
1863
|
});
|
|
@@ -3223,13 +3482,18 @@ class EntryControlComponent {
|
|
|
3223
3482
|
constructor() {
|
|
3224
3483
|
this.fb = inject(FormBuilder);
|
|
3225
3484
|
this._EntryAdminService = inject(EntryAdminService);
|
|
3485
|
+
this._SectionAdminService = inject(SectionAdminService);
|
|
3226
3486
|
this._LocalizationService = inject(LocalizationService);
|
|
3487
|
+
this.SectionType = SectionType;
|
|
3227
3488
|
/**字段配置列表 */
|
|
3228
3489
|
this._fields = '';
|
|
3490
|
+
/**板块信息 */
|
|
3491
|
+
this.sectionInfo = null;
|
|
3229
3492
|
/** */
|
|
3230
3493
|
this.listOfOption = [];
|
|
3494
|
+
/**树形节点 */
|
|
3495
|
+
this.treeNodes = [];
|
|
3231
3496
|
this.cdr = inject(ChangeDetectorRef);
|
|
3232
|
-
this.listOfSelectedValue = '';
|
|
3233
3497
|
}
|
|
3234
3498
|
set entity(v) {
|
|
3235
3499
|
this._entity = v;
|
|
@@ -3254,8 +3518,15 @@ class EntryControlComponent {
|
|
|
3254
3518
|
async dataLoaded() {
|
|
3255
3519
|
if (this._fields && this._entity && this._parentFiledName && this._culture) {
|
|
3256
3520
|
await this.AfterInit();
|
|
3521
|
+
await this.getSectionById();
|
|
3257
3522
|
await this.getEntryAssignList();
|
|
3258
|
-
this.
|
|
3523
|
+
if (this.isStructureType()) {
|
|
3524
|
+
this.treeSelectValue = this._fields.field.formConfiguration['Entry.Multiple'] ? this._selected : this._selected?.[0];
|
|
3525
|
+
}
|
|
3526
|
+
else {
|
|
3527
|
+
this.selectValue = this._fields.field.formConfiguration['Entry.Multiple'] ? this._selected : this._selected?.[0];
|
|
3528
|
+
}
|
|
3529
|
+
this.cdr.detectChanges();
|
|
3259
3530
|
this.submitclick?.nativeElement?.click();
|
|
3260
3531
|
}
|
|
3261
3532
|
}
|
|
@@ -3265,9 +3536,12 @@ class EntryControlComponent {
|
|
|
3265
3536
|
if (this._fields.required) {
|
|
3266
3537
|
ValidatorsArray.push(Validators.required);
|
|
3267
3538
|
}
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3539
|
+
const isMultiple = this._fields.field.formConfiguration['Entry.Multiple'];
|
|
3540
|
+
// let selectValue=isMultiple?this._selected:this._selected;
|
|
3541
|
+
// if(!this._fields.field.formConfiguration['Entry.Multiple']){
|
|
3542
|
+
// this.listOfSelectedValue = this._selected[0];
|
|
3543
|
+
// }
|
|
3544
|
+
// this._selected=selectValue;
|
|
3271
3545
|
const newControl = this.fb.control(this._selected, ValidatorsArray);
|
|
3272
3546
|
// newControl.addValidators(this.arrpanduan())
|
|
3273
3547
|
const extraProperties = this._entity.get(this._parentFiledName);
|
|
@@ -3278,8 +3552,9 @@ class EntryControlComponent {
|
|
|
3278
3552
|
get selectInput() {
|
|
3279
3553
|
return this._entity?.get(this._parentFiledName)?.get(this._fields.field.name);
|
|
3280
3554
|
}
|
|
3281
|
-
|
|
3282
|
-
this.
|
|
3555
|
+
onSelectChange(value) {
|
|
3556
|
+
const arrayValue = this._fields.field.formConfiguration['Entry.Multiple'] ? value : (value ? [value] : []);
|
|
3557
|
+
this.selectInput?.setValue(arrayValue, { emitEvent: false });
|
|
3283
3558
|
}
|
|
3284
3559
|
/**获取对应的条目 */
|
|
3285
3560
|
getEntryAssignList(filter = '') {
|
|
@@ -3295,20 +3570,65 @@ class EntryControlComponent {
|
|
|
3295
3570
|
})
|
|
3296
3571
|
.subscribe((res) => {
|
|
3297
3572
|
this.listOfOption = res.items;
|
|
3573
|
+
if (this.isStructureType()) {
|
|
3574
|
+
this.treeNodes = this.convertToTreeNodes(res.items);
|
|
3575
|
+
}
|
|
3298
3576
|
resolve(true);
|
|
3299
3577
|
});
|
|
3300
3578
|
});
|
|
3301
3579
|
}
|
|
3580
|
+
/**判断是否为结构类型 */
|
|
3581
|
+
isStructureType() {
|
|
3582
|
+
return this.sectionInfo?.type === 1 || this.sectionInfo?.type === SectionType.Structure;
|
|
3583
|
+
}
|
|
3584
|
+
/**转换为树形节点 */
|
|
3585
|
+
convertToTreeNodes(items) {
|
|
3586
|
+
const map = new Map();
|
|
3587
|
+
const roots = [];
|
|
3588
|
+
items.forEach(item => {
|
|
3589
|
+
map.set(item.id, { title: item.slug, key: item.id, isLeaf: true, children: [] });
|
|
3590
|
+
});
|
|
3591
|
+
items.forEach(item => {
|
|
3592
|
+
const node = map.get(item.id);
|
|
3593
|
+
if (item.parentId) {
|
|
3594
|
+
const parent = map.get(item.parentId);
|
|
3595
|
+
if (parent) {
|
|
3596
|
+
parent.children.push(node);
|
|
3597
|
+
parent.isLeaf = false;
|
|
3598
|
+
}
|
|
3599
|
+
else {
|
|
3600
|
+
roots.push(node);
|
|
3601
|
+
}
|
|
3602
|
+
}
|
|
3603
|
+
else {
|
|
3604
|
+
roots.push(node);
|
|
3605
|
+
}
|
|
3606
|
+
});
|
|
3607
|
+
return roots;
|
|
3608
|
+
}
|
|
3609
|
+
onTreeSelectChange(value) {
|
|
3610
|
+
const arrayValue = this._fields.field.formConfiguration['Entry.Multiple'] ? value : (value ? [value] : []);
|
|
3611
|
+
this.selectInput?.setValue(arrayValue, { emitEvent: false });
|
|
3612
|
+
}
|
|
3302
3613
|
/** */
|
|
3303
3614
|
async SelectChange(event) {
|
|
3304
3615
|
await this.getEntryAssignList(event);
|
|
3305
3616
|
}
|
|
3617
|
+
/**获取对应的板块 */
|
|
3618
|
+
getSectionById() {
|
|
3619
|
+
return new Promise((resolve, rejects) => {
|
|
3620
|
+
this._SectionAdminService.get(this._fields.field.formConfiguration['Entry.SectionId']).subscribe((res) => {
|
|
3621
|
+
this.sectionInfo = res;
|
|
3622
|
+
resolve(true);
|
|
3623
|
+
});
|
|
3624
|
+
});
|
|
3625
|
+
}
|
|
3306
3626
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3307
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntryControlComponent, selector: "cms-entry-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n nzMode=\"multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.slug\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" \r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\" [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.slug\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-template>\r\n <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i6$1.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4$1.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }] }); }
|
|
3627
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntryControlComponent, selector: "cms-entry-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"isStructureType(); else normalSelect\">\r\n <nz-tree-select\r\n class=\"form-select dignite-form-tree-select\"\r\n [nzMaxTagCount]=\"1\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"treeSelectValue\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n [nzNodes]=\"treeNodes\"\r\n [nzMultiple]=\"_fields.field.formConfiguration['Entry.Multiple'] || false\"\r\n [nzShowSearch]=\"true\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-tree-select-dropdown'\"\r\n (ngModelChange)=\"onSelectChange($event)\"\r\n nzDefaultExpandAll>\r\n </nz-tree-select>\r\n </ng-container>\r\n \r\n <ng-template #normalSelect>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n nzMode=\"multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"selectValue\" nzAllowClear\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"onSelectChange($event)\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.slug\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"selectValue\" nzAllowClear\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"onSelectChange($event)\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.slug\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-template>\r\n </ng-template>\r\n \r\n <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: ["::ng-deep .dignite-form-tree-select.ant-select{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector{background:transparent!important;border:none!important;padding:.475rem 1.25rem!important;box-shadow:none!important;height:auto!important;display:flex!important;align-items:center!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search{margin-inline-start:0!important;display:flex;align-items:center;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search .ant-select-selection-search-input{background-color:transparent!important;color:var(--bs-body-color)!important;caret-color:var(--bs-body-color)!important;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item .ant-select-selection-item{display:flex;align-items:center;color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .anticon-search,::ng-deep .dignite-form-tree-select.ant-select .anticon-down{display:none}::ng-deep .dignite-form-tree-select.ant-select .ant-select-arrow,::ng-deep .dignite-form-tree-select.ant-select .ant-select-clear{right:36px!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-placeholder{color:var(--bs-body-color)!important;opacity:.6}::ng-deep .dignite-form-tree-select.ant-select.ant-select-multiple .ant-select-selection-item{max-width:60%!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item-remove{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select-dropdown{max-height:256px;overflow-y:auto;background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-dropdown{background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree-switcher{color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree{background:transparent!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode{padding:4px 0}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper{padding:5px 8px;border-radius:4px;transition:all .3s;color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper:hover{background-color:var(--bs-primary)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode.ant-select-tree-treenode-selected .ant-select-tree-node-content-wrapper{background-color:var(--lpx-brand)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-checkbox{margin-right:8px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i4$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4$1.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "component", type: i5.NzTreeSelectComponent, selector: "nz-tree-select", inputs: ["nzId", "nzAllowClear", "nzShowExpand", "nzShowLine", "nzDropdownMatchSelectWidth", "nzCheckable", "nzHideUnMatched", "nzShowIcon", "nzShowSearch", "nzDisabled", "nzAsyncData", "nzMultiple", "nzDefaultExpandAll", "nzCheckStrictly", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzExpandedIcon", "nzNotFoundContent", "nzNodes", "nzOpen", "nzSize", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzPlacement", "nzExpandedKeys", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckBoxChange"], exportAs: ["nzTreeSelect"] }] }); }
|
|
3308
3628
|
}
|
|
3309
3629
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryControlComponent, decorators: [{
|
|
3310
3630
|
type: Component,
|
|
3311
|
-
args: [{ selector: 'cms-entry-control', template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n
|
|
3631
|
+
args: [{ selector: 'cms-entry-control', template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"isStructureType(); else normalSelect\">\r\n <nz-tree-select\r\n class=\"form-select dignite-form-tree-select\"\r\n [nzMaxTagCount]=\"1\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"treeSelectValue\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n [nzNodes]=\"treeNodes\"\r\n [nzMultiple]=\"_fields.field.formConfiguration['Entry.Multiple'] || false\"\r\n [nzShowSearch]=\"true\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-tree-select-dropdown'\"\r\n (ngModelChange)=\"onSelectChange($event)\"\r\n nzDefaultExpandAll>\r\n </nz-tree-select>\r\n </ng-container>\r\n \r\n <ng-template #normalSelect>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n nzMode=\"multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"selectValue\" nzAllowClear\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"onSelectChange($event)\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.slug\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"selectValue\" nzAllowClear\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"onSelectChange($event)\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.slug\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-template>\r\n </ng-template>\r\n \r\n <small class=\"form-text text-muted d-block\"\r\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: ["::ng-deep .dignite-form-tree-select.ant-select{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector{background:transparent!important;border:none!important;padding:.475rem 1.25rem!important;box-shadow:none!important;height:auto!important;display:flex!important;align-items:center!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search{margin-inline-start:0!important;display:flex;align-items:center;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search .ant-select-selection-search-input{background-color:transparent!important;color:var(--bs-body-color)!important;caret-color:var(--bs-body-color)!important;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item .ant-select-selection-item{display:flex;align-items:center;color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .anticon-search,::ng-deep .dignite-form-tree-select.ant-select .anticon-down{display:none}::ng-deep .dignite-form-tree-select.ant-select .ant-select-arrow,::ng-deep .dignite-form-tree-select.ant-select .ant-select-clear{right:36px!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-placeholder{color:var(--bs-body-color)!important;opacity:.6}::ng-deep .dignite-form-tree-select.ant-select.ant-select-multiple .ant-select-selection-item{max-width:60%!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item-remove{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select-dropdown{max-height:256px;overflow-y:auto;background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-dropdown{background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree-switcher{color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree{background:transparent!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode{padding:4px 0}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper{padding:5px 8px;border-radius:4px;transition:all .3s;color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper:hover{background-color:var(--bs-primary)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode.ant-select-tree-treenode-selected .ant-select-tree-node-content-wrapper{background-color:var(--lpx-brand)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-checkbox{margin-right:8px}\n"] }]
|
|
3312
3632
|
}], propDecorators: { entity: [{
|
|
3313
3633
|
type: Input
|
|
3314
3634
|
}], fields: [{
|
|
@@ -3400,12 +3720,17 @@ class EntrySearchComponent {
|
|
|
3400
3720
|
constructor() {
|
|
3401
3721
|
this.fb = inject(FormBuilder);
|
|
3402
3722
|
this._EntryAdminService = inject(EntryAdminService);
|
|
3723
|
+
this._SectionAdminService = inject(SectionAdminService);
|
|
3724
|
+
this.SectionType = SectionType;
|
|
3403
3725
|
/**字段配置列表 */
|
|
3404
3726
|
this._fields = '';
|
|
3727
|
+
/**板块信息 */
|
|
3728
|
+
this.sectionInfo = null;
|
|
3405
3729
|
/** */
|
|
3406
3730
|
this.listOfOption = [];
|
|
3731
|
+
/**树形节点 */
|
|
3732
|
+
this.treeNodes = [];
|
|
3407
3733
|
this.cdr = inject(ChangeDetectorRef);
|
|
3408
|
-
this.listOfSelectedValue = '';
|
|
3409
3734
|
}
|
|
3410
3735
|
set entity(v) {
|
|
3411
3736
|
this._entity = v;
|
|
@@ -3427,8 +3752,9 @@ class EntrySearchComponent {
|
|
|
3427
3752
|
async dataLoaded() {
|
|
3428
3753
|
if (this._fields && this._entity && this._parentFiledName && this._culture) {
|
|
3429
3754
|
await this.AfterInit();
|
|
3755
|
+
await this.getSectionById();
|
|
3430
3756
|
await this.getEntryAssignList();
|
|
3431
|
-
this.cdr.detectChanges();
|
|
3757
|
+
this.cdr.detectChanges();
|
|
3432
3758
|
this.submitclick?.nativeElement?.click();
|
|
3433
3759
|
}
|
|
3434
3760
|
}
|
|
@@ -3450,8 +3776,13 @@ class EntrySearchComponent {
|
|
|
3450
3776
|
get selectInput() {
|
|
3451
3777
|
return this._entity?.get(this._parentFiledName)?.get(this._fields.field.name);
|
|
3452
3778
|
}
|
|
3453
|
-
|
|
3454
|
-
this.
|
|
3779
|
+
onSelectChange(value) {
|
|
3780
|
+
const arrayValue = this._fields.field.formConfiguration['Entry.Multiple'] ? value : (value ? [value] : []);
|
|
3781
|
+
this.selectInput?.setValue(arrayValue, { emitEvent: false });
|
|
3782
|
+
}
|
|
3783
|
+
onTreeSelectChange(value) {
|
|
3784
|
+
const arrayValue = this._fields.field.formConfiguration['Entry.Multiple'] ? value : (value ? [value] : []);
|
|
3785
|
+
this.selectInput?.setValue(arrayValue, { emitEvent: false });
|
|
3455
3786
|
}
|
|
3456
3787
|
/**获取对应的条目 */
|
|
3457
3788
|
getEntryAssignList(filter = '') {
|
|
@@ -3467,6 +3798,47 @@ class EntrySearchComponent {
|
|
|
3467
3798
|
})
|
|
3468
3799
|
.subscribe((res) => {
|
|
3469
3800
|
this.listOfOption = res.items;
|
|
3801
|
+
if (this.isStructureType()) {
|
|
3802
|
+
this.treeNodes = this.convertToTreeNodes(res.items);
|
|
3803
|
+
}
|
|
3804
|
+
resolve(true);
|
|
3805
|
+
});
|
|
3806
|
+
});
|
|
3807
|
+
}
|
|
3808
|
+
/**判断是否为结构类型 */
|
|
3809
|
+
isStructureType() {
|
|
3810
|
+
return this.sectionInfo?.type === 1 || this.sectionInfo?.type === SectionType.Structure;
|
|
3811
|
+
}
|
|
3812
|
+
/**转换为树形节点 */
|
|
3813
|
+
convertToTreeNodes(items) {
|
|
3814
|
+
const map = new Map();
|
|
3815
|
+
const roots = [];
|
|
3816
|
+
items.forEach(item => {
|
|
3817
|
+
map.set(item.id, { title: item.slug, key: item.id, isLeaf: true, children: [] });
|
|
3818
|
+
});
|
|
3819
|
+
items.forEach(item => {
|
|
3820
|
+
const node = map.get(item.id);
|
|
3821
|
+
if (item.parentId) {
|
|
3822
|
+
const parent = map.get(item.parentId);
|
|
3823
|
+
if (parent) {
|
|
3824
|
+
parent.children.push(node);
|
|
3825
|
+
parent.isLeaf = false;
|
|
3826
|
+
}
|
|
3827
|
+
else {
|
|
3828
|
+
roots.push(node);
|
|
3829
|
+
}
|
|
3830
|
+
}
|
|
3831
|
+
else {
|
|
3832
|
+
roots.push(node);
|
|
3833
|
+
}
|
|
3834
|
+
});
|
|
3835
|
+
return roots;
|
|
3836
|
+
}
|
|
3837
|
+
/**获取对应的板块 */
|
|
3838
|
+
getSectionById() {
|
|
3839
|
+
return new Promise((resolve, rejects) => {
|
|
3840
|
+
this._SectionAdminService.get(this._fields.field.formConfiguration['Entry.SectionId']).subscribe((res) => {
|
|
3841
|
+
this.sectionInfo = res;
|
|
3470
3842
|
resolve(true);
|
|
3471
3843
|
});
|
|
3472
3844
|
});
|
|
@@ -3476,11 +3848,11 @@ class EntrySearchComponent {
|
|
|
3476
3848
|
await this.getEntryAssignList(event);
|
|
3477
3849
|
}
|
|
3478
3850
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntrySearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3479
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntrySearchComponent, selector: "cms-entry-search", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n
|
|
3851
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntrySearchComponent, selector: "cms-entry-search", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"isStructureType(); else normalSelect\">\r\n <nz-tree-select\r\n class=\"form-select dignite-form-tree-select\"\r\n [nzMaxTagCount]=\"1\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"treeSelectValue\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n [nzNodes]=\"treeNodes\"\r\n [nzMultiple]=\"_fields.field.formConfiguration['Entry.Multiple'] || false\"\r\n [nzShowSearch]=\"true\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-tree-select-dropdown'\"\r\n (ngModelChange)=\"onTreeSelectChange($event)\"\r\n nzDefaultExpandAll>\r\n </nz-tree-select>\r\n </ng-container>\r\n \r\n <ng-template #normalSelect>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n nzMode=\"multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"selectValue\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"onSelectChange($event)\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.slug\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"selectValue\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"onSelectChange($event)\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.slug\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: ["::ng-deep .dignite-form-tree-select.ant-select{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector{background:transparent!important;border:none!important;padding:.475rem 1.25rem!important;box-shadow:none!important;height:auto!important;display:flex!important;align-items:center!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search{margin-inline-start:0!important;display:flex;align-items:center;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search .ant-select-selection-search-input{background-color:transparent!important;color:var(--bs-body-color)!important;caret-color:var(--bs-body-color)!important;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item .ant-select-selection-item{display:flex;align-items:center;color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .anticon-search,::ng-deep .dignite-form-tree-select.ant-select .anticon-down{display:none}::ng-deep .dignite-form-tree-select.ant-select .ant-select-arrow,::ng-deep .dignite-form-tree-select.ant-select .ant-select-clear{right:36px!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-placeholder{color:var(--bs-body-color)!important;opacity:.6}::ng-deep .dignite-form-tree-select.ant-select.ant-select-multiple .ant-select-selection-item{max-width:60%!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item-remove{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select-dropdown{max-height:256px;overflow-y:auto;background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-dropdown{background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree-switcher{color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree{background:transparent!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode{padding:4px 0}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper{padding:5px 8px;border-radius:4px;transition:all .3s;color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper:hover{background-color:var(--bs-primary)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode.ant-select-tree-treenode-selected .ant-select-tree-node-content-wrapper{background-color:var(--lpx-brand)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-checkbox{margin-right:8px}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i6$1.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i4$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4$1.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "component", type: i5.NzTreeSelectComponent, selector: "nz-tree-select", inputs: ["nzId", "nzAllowClear", "nzShowExpand", "nzShowLine", "nzDropdownMatchSelectWidth", "nzCheckable", "nzHideUnMatched", "nzShowIcon", "nzShowSearch", "nzDisabled", "nzAsyncData", "nzMultiple", "nzDefaultExpandAll", "nzCheckStrictly", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzExpandedIcon", "nzNotFoundContent", "nzNodes", "nzOpen", "nzSize", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzPlacement", "nzExpandedKeys", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckBoxChange"], exportAs: ["nzTreeSelect"] }] }); }
|
|
3480
3852
|
}
|
|
3481
3853
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntrySearchComponent, decorators: [{
|
|
3482
3854
|
type: Component,
|
|
3483
|
-
args: [{ selector: 'cms-entry-search', template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n
|
|
3855
|
+
args: [{ selector: 'cms-entry-search', template: "<form [formGroup]=\"_entity\">\r\n <div [formGroupName]=\"_parentFiledName\" class=\"entry-control-page\">\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\r\n <ng-container *ngIf=\"isStructureType(); else normalSelect\">\r\n <nz-tree-select\r\n class=\"form-select dignite-form-tree-select\"\r\n [nzMaxTagCount]=\"1\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"treeSelectValue\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n [nzNodes]=\"treeNodes\"\r\n [nzMultiple]=\"_fields.field.formConfiguration['Entry.Multiple'] || false\"\r\n [nzShowSearch]=\"true\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-tree-select-dropdown'\"\r\n (ngModelChange)=\"onTreeSelectChange($event)\"\r\n nzDefaultExpandAll>\r\n </nz-tree-select>\r\n </ng-container>\r\n \r\n <ng-template #normalSelect>\r\n <ng-container *ngIf=\"_fields.field.formConfiguration['Entry.Multiple']; else elseTemplate\">\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\" [nzMaxTagCount]=\"1\"\r\n nzMode=\"multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"selectValue\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"onSelectChange($event)\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.slug\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <nz-select class=\"form-select dignite-form-select form-select-multiple\"\r\n [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n [(ngModel)]=\"selectValue\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n (ngModelChange)=\"onSelectChange($event)\"\r\n [nzDropdownMatchSelectWidth]=\"true\"\r\n [nzDropdownClassName]=\"'dignite-form-select-dropdown'\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.slug\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </ng-template>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: ["::ng-deep .dignite-form-tree-select.ant-select{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector{background:transparent!important;border:none!important;padding:.475rem 1.25rem!important;box-shadow:none!important;height:auto!important;display:flex!important;align-items:center!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search{margin-inline-start:0!important;display:flex;align-items:center;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-search .ant-select-selection-search-input{background-color:transparent!important;color:var(--bs-body-color)!important;caret-color:var(--bs-body-color)!important;height:100%}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item{display:flex;align-items:center}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selector .ant-select-selection-overflow .ant-select-selection-overflow-item .ant-select-selection-item{display:flex;align-items:center;color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .anticon-search,::ng-deep .dignite-form-tree-select.ant-select .anticon-down{display:none}::ng-deep .dignite-form-tree-select.ant-select .ant-select-arrow,::ng-deep .dignite-form-tree-select.ant-select .ant-select-clear{right:36px!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-placeholder{color:var(--bs-body-color)!important;opacity:.6}::ng-deep .dignite-form-tree-select.ant-select.ant-select-multiple .ant-select-selection-item{max-width:60%!important}::ng-deep .dignite-form-tree-select.ant-select .ant-select-selection-item-remove{color:var(--bs-body-color)!important}::ng-deep .dignite-form-tree-select-dropdown{max-height:256px;overflow-y:auto;background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-dropdown{background:var(--bs-light)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree-switcher{color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree{background:transparent!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode{padding:4px 0}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper{padding:5px 8px;border-radius:4px;transition:all .3s;color:var(--bs-body-color)}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode .ant-select-tree-node-content-wrapper:hover{background-color:var(--bs-primary)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-treenode.ant-select-tree-treenode-selected .ant-select-tree-node-content-wrapper{background-color:var(--lpx-brand)!important;color:var(--bs-white)!important}::ng-deep .dignite-form-tree-select-dropdown .ant-select-tree .ant-select-tree-checkbox{margin-right:8px}\n"] }]
|
|
3484
3856
|
}], ctorParameters: () => [], propDecorators: { entity: [{
|
|
3485
3857
|
type: Input
|
|
3486
3858
|
}], fields: [{
|
|
@@ -4966,7 +5338,9 @@ class CmsModule {
|
|
|
4966
5338
|
CKEditorModule,
|
|
4967
5339
|
FormsModule,
|
|
4968
5340
|
// CommercialUiModule,
|
|
4969
|
-
GetLocalizedEntriesBySlugPipe
|
|
5341
|
+
GetLocalizedEntriesBySlugPipe,
|
|
5342
|
+
GetSlugByIdPipe,
|
|
5343
|
+
NzTreeSelectModule], exports: [TableConfigComponent,
|
|
4970
5344
|
TableControlComponent,
|
|
4971
5345
|
MatrixConfigComponent,
|
|
4972
5346
|
MatrixControlComponent,
|
|
@@ -4989,7 +5363,8 @@ class CmsModule {
|
|
|
4989
5363
|
DragDropModule,
|
|
4990
5364
|
NgxDatatableModule,
|
|
4991
5365
|
CKEditorModule,
|
|
4992
|
-
FormsModule
|
|
5366
|
+
FormsModule,
|
|
5367
|
+
NzTreeSelectModule] }); }
|
|
4993
5368
|
}
|
|
4994
5369
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsModule, decorators: [{
|
|
4995
5370
|
type: NgModule,
|
|
@@ -5035,6 +5410,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
5035
5410
|
FormsModule,
|
|
5036
5411
|
// CommercialUiModule,
|
|
5037
5412
|
GetLocalizedEntriesBySlugPipe,
|
|
5413
|
+
GetSlugByIdPipe,
|
|
5414
|
+
NzTreeSelectModule,
|
|
5038
5415
|
],
|
|
5039
5416
|
exports: [
|
|
5040
5417
|
TableConfigComponent,
|