@dignite-ng/expand.cms 0.0.49 → 0.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/components/domains/domains.component.d.ts +7 -0
- package/config/components/site-language/site-language.component.d.ts +29 -0
- package/config/enums/route-names.d.ts +3 -2
- package/config/proxy/dignite/cms/admin/sites/index.d.ts +2 -0
- package/config/proxy/dignite/cms/admin/sites/models.d.ts +4 -0
- package/config/proxy/dignite/cms/admin/sites/site-admin.service.d.ts +13 -0
- package/config/proxy/dignite/cms/sites/models.d.ts +4 -0
- package/config/services/validators.service.d.ts +16 -0
- package/esm2022/config/cms-config.module.mjs +4 -4
- package/esm2022/config/components/domains/domains.component.mjs +22 -11
- package/esm2022/config/components/site-language/site-language.component.mjs +108 -0
- package/esm2022/config/enums/route-names.mjs +11 -2
- package/esm2022/config/providers/route.provider.mjs +17 -11
- package/esm2022/config/proxy/admin/domains/domain-admin.service.mjs +18 -19
- package/esm2022/config/proxy/dignite/cms/admin/sites/index.mjs +3 -0
- package/esm2022/config/proxy/dignite/cms/admin/sites/models.mjs +2 -0
- package/esm2022/config/proxy/dignite/cms/admin/sites/site-admin.service.mjs +27 -0
- package/esm2022/config/proxy/dignite/cms/sites/models.mjs +2 -0
- package/esm2022/config/services/validators.service.mjs +82 -0
- package/esm2022/lib/cms-routing.module.mjs +6 -6
- package/esm2022/lib/cms.module.mjs +16 -8
- package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +29 -44
- package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +20 -20
- package/esm2022/lib/components/admin/entries/create.component.mjs +25 -23
- package/esm2022/lib/components/admin/entries/edit.component.mjs +25 -23
- package/esm2022/lib/components/admin/entries/entries.component.mjs +36 -43
- package/esm2022/lib/components/admin/fields/create-field.component.mjs +18 -18
- package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +8 -15
- package/esm2022/lib/components/admin/fields/create-or-update-field-input-base.mjs +13 -13
- package/esm2022/lib/components/admin/fields/edit-field.component.mjs +20 -23
- package/esm2022/lib/components/admin/fields/field-group.component.mjs +35 -27
- package/esm2022/lib/components/admin/fields/fields.component.mjs +14 -20
- package/esm2022/lib/components/admin/sections/create-or-update-sections-input-base.mjs +15 -15
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.-entry-type-input-base.mjs +26 -26
- package/esm2022/lib/components/admin/sections/entry-types/create-or-edit.component.mjs +43 -66
- package/esm2022/lib/components/admin/sections/sections.component.mjs +28 -25
- package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +10 -21
- package/esm2022/lib/components/dynamic-form/entry/entry-config.mjs +7 -7
- package/esm2022/lib/components/dynamic-form/entry/entry-control.component.mjs +9 -19
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.component.mjs +14 -30
- package/esm2022/lib/components/dynamic-form/matrix/matrix-config.mjs +16 -16
- package/esm2022/lib/components/dynamic-form/matrix/matrix-control.component.mjs +7 -22
- package/esm2022/lib/components/dynamic-form/table/table-config.component.mjs +8 -30
- package/esm2022/lib/components/dynamic-form/table/table-config.mjs +15 -15
- package/esm2022/lib/components/dynamic-form/table/table-control.component.mjs +6 -20
- package/esm2022/lib/constants/styles.mjs +6 -1
- package/esm2022/lib/proxy/admin/dynamic-forms/form-admin.service.mjs +8 -9
- package/esm2022/lib/proxy/admin/entries/entry-admin.service.mjs +56 -57
- package/esm2022/lib/proxy/admin/fields/field-admin.service.mjs +31 -32
- package/esm2022/lib/proxy/admin/fields/field-group-admin.service.mjs +27 -28
- package/esm2022/lib/proxy/admin/sections/entry-type-admin.service.mjs +27 -28
- package/esm2022/lib/proxy/admin/sections/section-admin.service.mjs +37 -38
- package/esm2022/lib/proxy/admin/settings/site-settings-admin.service.mjs +17 -18
- package/esm2022/lib/resolvers/extensions-props-action-token.resolver.mjs +132 -0
- package/esm2022/lib/resolvers/page-default-toolbar-actions.mjs +160 -0
- package/esm2022/lib/services/cms-api.service.mjs +3 -4
- package/esm2022/lib/services/cms.service.mjs +4 -5
- package/esm2022/lib/services/field-abstracts.service.mjs +7 -9
- package/esm2022/lib/services/simple-reuse-strategy.mjs +2 -2
- package/esm2022/lib/services/update-list.service.mjs +6 -5
- package/esm2022/lib/services/validators.service.mjs +83 -0
- package/esm2022/public-api.mjs +1 -4
- package/fesm2022/dignite-ng-expand.cms-config.mjs +265 -44
- package/fesm2022/dignite-ng-expand.cms-config.mjs.map +1 -1
- package/fesm2022/dignite-ng-expand.cms.mjs +856 -865
- package/fesm2022/dignite-ng-expand.cms.mjs.map +1 -1
- package/lib/components/admin/entries/create.component.d.ts +7 -0
- package/lib/components/admin/entries/edit.component.d.ts +7 -0
- package/lib/components/admin/fields/create-field.component.d.ts +7 -0
- package/lib/components/admin/fields/create-or-edit-field.component.d.ts +3 -1
- package/lib/components/admin/fields/edit-field.component.d.ts +7 -0
- package/lib/components/admin/fields/field-group.component.d.ts +7 -0
- package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +7 -0
- package/lib/components/admin/sections/sections.component.d.ts +7 -0
- package/lib/constants/styles.d.ts +1 -1
- package/lib/resolvers/extensions-props-action-token.resolver.d.ts +71 -0
- package/lib/services/validators.service.d.ts +16 -0
- package/package.json +1 -1
- package/esm2022/lib/toolbar/index.mjs +0 -3
- package/esm2022/lib/toolbar/toolbar-btn-default-action.mjs +0 -160
- package/esm2022/lib/toolbar/toolbar-config.mjs +0 -83
- package/lib/toolbar/index.d.ts +0 -2
- package/lib/toolbar/toolbar-config.d.ts +0 -56
- /package/lib/{toolbar/toolbar-btn-default-action.d.ts → resolvers/page-default-toolbar-actions.d.ts} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, inject, Component, ViewContainerRef, Input, ViewChildren, ViewChild, Output,
|
|
2
|
+
import { Injectable, EventEmitter, inject, Component, ViewContainerRef, Input, ViewChildren, ViewChild, Output, RendererFactory2, InjectionToken, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@abp/ng.core';
|
|
4
|
-
import { mapEnumToOptions, ListService, ConfigStateService, LIST_QUERY_DEBOUNCE_TIME, AuthGuard, PermissionGuard, LazyModuleFactory, CoreModule } from '@abp/ng.core';
|
|
4
|
+
import { mapEnumToOptions, ListService, ConfigStateService, LIST_QUERY_DEBOUNCE_TIME, LocalizationService, AuthGuard, PermissionGuard, LazyModuleFactory, CoreModule } from '@abp/ng.core';
|
|
5
5
|
import * as i3 from '@abp/ng.theme.shared';
|
|
6
|
-
import { ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
6
|
+
import { ToasterService, ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
7
7
|
import * as i3$1 from '@angular/router';
|
|
8
8
|
import { RouterModule } from '@angular/router';
|
|
9
|
-
import { EXTENSIONS_IDENTIFIER, ToolbarAction, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions } from '@abp/ng.components/extensible';
|
|
9
|
+
import { EXTENSIONS_IDENTIFIER, ToolbarAction, ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps } from '@abp/ng.components/extensible';
|
|
10
10
|
import * as i1$1 from '@angular/forms';
|
|
11
11
|
import { FormBuilder, Validators, FormGroup, FormControl, FormArray, FormsModule } from '@angular/forms';
|
|
12
12
|
import * as i8 from '@swimlane/ngx-datatable';
|
|
@@ -29,26 +29,25 @@ import { fielFieldControlGroup } from '@dignite-ng/expand.file-explorer';
|
|
|
29
29
|
import { ckEditorFieldControlGroup } from '@dignite-ng/expand.ck-editor';
|
|
30
30
|
|
|
31
31
|
class SiteSettingsAdminService {
|
|
32
|
-
restService;
|
|
33
|
-
apiName = 'CmsAdmin';
|
|
34
|
-
getAllLanguages = (config) => this.restService.request({
|
|
35
|
-
method: 'GET',
|
|
36
|
-
url: '/api/cms-admin/site-settings/all-languages',
|
|
37
|
-
}, { apiName: this.apiName, ...config });
|
|
38
|
-
getBrand = (config) => this.restService.request({
|
|
39
|
-
method: 'GET',
|
|
40
|
-
url: '/api/cms-admin/site-settings/brand',
|
|
41
|
-
}, { apiName: this.apiName, ...config });
|
|
42
|
-
getDefaultLanguage = (config) => this.restService.request({
|
|
43
|
-
method: 'GET',
|
|
44
|
-
responseType: 'text',
|
|
45
|
-
url: '/api/cms-admin/site-settings/default-language',
|
|
46
|
-
}, { apiName: this.apiName, ...config });
|
|
47
32
|
constructor(restService) {
|
|
48
33
|
this.restService = restService;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
34
|
+
this.apiName = 'CmsAdmin';
|
|
35
|
+
this.getAllLanguages = (config) => this.restService.request({
|
|
36
|
+
method: 'GET',
|
|
37
|
+
url: '/api/cms-admin/site-settings/all-languages',
|
|
38
|
+
}, { apiName: this.apiName, ...config });
|
|
39
|
+
this.getBrand = (config) => this.restService.request({
|
|
40
|
+
method: 'GET',
|
|
41
|
+
url: '/api/cms-admin/site-settings/brand',
|
|
42
|
+
}, { apiName: this.apiName, ...config });
|
|
43
|
+
this.getDefaultLanguage = (config) => this.restService.request({
|
|
44
|
+
method: 'GET',
|
|
45
|
+
responseType: 'text',
|
|
46
|
+
url: '/api/cms-admin/site-settings/default-language',
|
|
47
|
+
}, { apiName: this.apiName, ...config });
|
|
48
|
+
}
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SiteSettingsAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
50
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SiteSettingsAdminService, providedIn: 'root' }); }
|
|
52
51
|
}
|
|
53
52
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SiteSettingsAdminService, decorators: [{
|
|
54
53
|
type: Injectable,
|
|
@@ -78,13 +77,14 @@ var ECmsComponent;
|
|
|
78
77
|
})(ECmsComponent || (ECmsComponent = {}));
|
|
79
78
|
|
|
80
79
|
class UpdateListService {
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
constructor() {
|
|
81
|
+
this.updateListEvent = new EventEmitter();
|
|
82
|
+
}
|
|
83
83
|
updateList() {
|
|
84
84
|
this.updateListEvent.emit();
|
|
85
85
|
}
|
|
86
|
-
static
|
|
87
|
-
static
|
|
86
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: UpdateListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
87
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: UpdateListService, providedIn: 'root' }); }
|
|
88
88
|
}
|
|
89
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: UpdateListService, decorators: [{
|
|
90
90
|
type: Injectable,
|
|
@@ -94,65 +94,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
94
94
|
}], ctorParameters: () => [] });
|
|
95
95
|
|
|
96
96
|
class EntryAdminService {
|
|
97
|
-
restService;
|
|
98
|
-
apiName = 'CmsAdmin';
|
|
99
|
-
activate = (id, config) => this.restService.request({
|
|
100
|
-
method: 'POST',
|
|
101
|
-
url: `/api/cms-admin/entries/activate/${id}`,
|
|
102
|
-
}, { apiName: this.apiName, ...config });
|
|
103
|
-
create = (input, config) => this.restService.request({
|
|
104
|
-
method: 'POST',
|
|
105
|
-
url: '/api/cms-admin/entries',
|
|
106
|
-
body: input,
|
|
107
|
-
}, { apiName: this.apiName, ...config });
|
|
108
|
-
cultureExistWithSingleSection = (input, config) => this.restService.request({
|
|
109
|
-
method: 'GET',
|
|
110
|
-
url: '/api/cms-admin/entries/culture-exists-with-single-section',
|
|
111
|
-
params: { culture: input.culture, sectionId: input.sectionId, entryTypeId: input.entryTypeId },
|
|
112
|
-
}, { apiName: this.apiName, ...config });
|
|
113
|
-
delete = (id, config) => this.restService.request({
|
|
114
|
-
method: 'DELETE',
|
|
115
|
-
url: `/api/cms-admin/entries/${id}`,
|
|
116
|
-
}, { apiName: this.apiName, ...config });
|
|
117
|
-
get = (id, config) => this.restService.request({
|
|
118
|
-
method: 'GET',
|
|
119
|
-
url: `/api/cms-admin/entries/${id}`,
|
|
120
|
-
}, { apiName: this.apiName, ...config });
|
|
121
|
-
getAllVersions = (id, config) => this.restService.request({
|
|
122
|
-
method: 'GET',
|
|
123
|
-
url: `/api/cms-admin/entries/${id}/all-versions`,
|
|
124
|
-
}, { apiName: this.apiName, ...config });
|
|
125
|
-
getList = (input, config) => this.restService.request({
|
|
126
|
-
method: 'GET',
|
|
127
|
-
url: '/api/cms-admin/entries',
|
|
128
|
-
params: { culture: input.culture, sectionId: input.sectionId, entryTypeId: input.entryTypeId, startPublishDate: input.startPublishDate, expiryPublishDate: input.expiryPublishDate, filter: input.filter, status: input.status, creatorId: input.creatorId, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
129
|
-
}, { apiName: this.apiName, ...config });
|
|
130
|
-
getListByIds = (sectionId, ids, config) => this.restService.request({
|
|
131
|
-
method: 'GET',
|
|
132
|
-
url: '/api/cms-admin/entries/search-by-ids',
|
|
133
|
-
params: { sectionId, ids },
|
|
134
|
-
}, { apiName: this.apiName, ...config });
|
|
135
|
-
move = (id, input, config) => this.restService.request({
|
|
136
|
-
method: 'POST',
|
|
137
|
-
url: `/api/cms-admin/entries/move/${id}`,
|
|
138
|
-
body: input,
|
|
139
|
-
}, { apiName: this.apiName, ...config });
|
|
140
|
-
slugExists = (input, config) => this.restService.request({
|
|
141
|
-
method: 'GET',
|
|
142
|
-
url: '/api/cms-admin/entries/slug-exists',
|
|
143
|
-
params: { culture: input.culture, sectionId: input.sectionId, slug: input.slug },
|
|
144
|
-
}, { apiName: this.apiName, ...config });
|
|
145
|
-
update = (id, input, config) => this.restService.request({
|
|
146
|
-
method: 'PUT',
|
|
147
|
-
url: '/api/cms-admin/entries',
|
|
148
|
-
params: { id },
|
|
149
|
-
body: input,
|
|
150
|
-
}, { apiName: this.apiName, ...config });
|
|
151
97
|
constructor(restService) {
|
|
152
98
|
this.restService = restService;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
99
|
+
this.apiName = 'CmsAdmin';
|
|
100
|
+
this.activate = (id, config) => this.restService.request({
|
|
101
|
+
method: 'POST',
|
|
102
|
+
url: `/api/cms-admin/entries/activate/${id}`,
|
|
103
|
+
}, { apiName: this.apiName, ...config });
|
|
104
|
+
this.create = (input, config) => this.restService.request({
|
|
105
|
+
method: 'POST',
|
|
106
|
+
url: '/api/cms-admin/entries',
|
|
107
|
+
body: input,
|
|
108
|
+
}, { apiName: this.apiName, ...config });
|
|
109
|
+
this.cultureExistWithSingleSection = (input, config) => this.restService.request({
|
|
110
|
+
method: 'GET',
|
|
111
|
+
url: '/api/cms-admin/entries/culture-exists-with-single-section',
|
|
112
|
+
params: { culture: input.culture, sectionId: input.sectionId, entryTypeId: input.entryTypeId },
|
|
113
|
+
}, { apiName: this.apiName, ...config });
|
|
114
|
+
this.delete = (id, config) => this.restService.request({
|
|
115
|
+
method: 'DELETE',
|
|
116
|
+
url: `/api/cms-admin/entries/${id}`,
|
|
117
|
+
}, { apiName: this.apiName, ...config });
|
|
118
|
+
this.get = (id, config) => this.restService.request({
|
|
119
|
+
method: 'GET',
|
|
120
|
+
url: `/api/cms-admin/entries/${id}`,
|
|
121
|
+
}, { apiName: this.apiName, ...config });
|
|
122
|
+
this.getAllVersions = (id, config) => this.restService.request({
|
|
123
|
+
method: 'GET',
|
|
124
|
+
url: `/api/cms-admin/entries/${id}/all-versions`,
|
|
125
|
+
}, { apiName: this.apiName, ...config });
|
|
126
|
+
this.getList = (input, config) => this.restService.request({
|
|
127
|
+
method: 'GET',
|
|
128
|
+
url: '/api/cms-admin/entries',
|
|
129
|
+
params: { culture: input.culture, sectionId: input.sectionId, entryTypeId: input.entryTypeId, startPublishDate: input.startPublishDate, expiryPublishDate: input.expiryPublishDate, filter: input.filter, status: input.status, creatorId: input.creatorId, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
130
|
+
}, { apiName: this.apiName, ...config });
|
|
131
|
+
this.getListByIds = (sectionId, ids, config) => this.restService.request({
|
|
132
|
+
method: 'GET',
|
|
133
|
+
url: '/api/cms-admin/entries/search-by-ids',
|
|
134
|
+
params: { sectionId, ids },
|
|
135
|
+
}, { apiName: this.apiName, ...config });
|
|
136
|
+
this.move = (id, input, config) => this.restService.request({
|
|
137
|
+
method: 'POST',
|
|
138
|
+
url: `/api/cms-admin/entries/move/${id}`,
|
|
139
|
+
body: input,
|
|
140
|
+
}, { apiName: this.apiName, ...config });
|
|
141
|
+
this.slugExists = (input, config) => this.restService.request({
|
|
142
|
+
method: 'GET',
|
|
143
|
+
url: '/api/cms-admin/entries/slug-exists',
|
|
144
|
+
params: { culture: input.culture, sectionId: input.sectionId, slug: input.slug },
|
|
145
|
+
}, { apiName: this.apiName, ...config });
|
|
146
|
+
this.update = (id, input, config) => this.restService.request({
|
|
147
|
+
method: 'PUT',
|
|
148
|
+
url: '/api/cms-admin/entries',
|
|
149
|
+
params: { id },
|
|
150
|
+
body: input,
|
|
151
|
+
}, { apiName: this.apiName, ...config });
|
|
152
|
+
}
|
|
153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
154
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryAdminService, providedIn: 'root' }); }
|
|
156
155
|
}
|
|
157
156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryAdminService, decorators: [{
|
|
158
157
|
type: Injectable,
|
|
@@ -162,36 +161,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
162
161
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
163
162
|
|
|
164
163
|
class EntryTypeAdminService {
|
|
165
|
-
restService;
|
|
166
|
-
apiName = 'CmsAdmin';
|
|
167
|
-
create = (input, config) => this.restService.request({
|
|
168
|
-
method: 'POST',
|
|
169
|
-
url: '/api/cms-admin/entry-types',
|
|
170
|
-
body: input,
|
|
171
|
-
}, { apiName: this.apiName, ...config });
|
|
172
|
-
delete = (id, config) => this.restService.request({
|
|
173
|
-
method: 'DELETE',
|
|
174
|
-
url: `/api/cms-admin/entry-types/${id}`,
|
|
175
|
-
}, { apiName: this.apiName, ...config });
|
|
176
|
-
get = (id, config) => this.restService.request({
|
|
177
|
-
method: 'GET',
|
|
178
|
-
url: `/api/cms-admin/entry-types/${id}`,
|
|
179
|
-
}, { apiName: this.apiName, ...config });
|
|
180
|
-
nameExists = (input, config) => this.restService.request({
|
|
181
|
-
method: 'GET',
|
|
182
|
-
url: '/api/cms-admin/entry-types/name-exists',
|
|
183
|
-
params: { sectionId: input.sectionId, name: input.name },
|
|
184
|
-
}, { apiName: this.apiName, ...config });
|
|
185
|
-
update = (id, input, config) => this.restService.request({
|
|
186
|
-
method: 'PUT',
|
|
187
|
-
url: `/api/cms-admin/entry-types/${id}`,
|
|
188
|
-
body: input,
|
|
189
|
-
}, { apiName: this.apiName, ...config });
|
|
190
164
|
constructor(restService) {
|
|
191
165
|
this.restService = restService;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
166
|
+
this.apiName = 'CmsAdmin';
|
|
167
|
+
this.create = (input, config) => this.restService.request({
|
|
168
|
+
method: 'POST',
|
|
169
|
+
url: '/api/cms-admin/entry-types',
|
|
170
|
+
body: input,
|
|
171
|
+
}, { apiName: this.apiName, ...config });
|
|
172
|
+
this.delete = (id, config) => this.restService.request({
|
|
173
|
+
method: 'DELETE',
|
|
174
|
+
url: `/api/cms-admin/entry-types/${id}`,
|
|
175
|
+
}, { apiName: this.apiName, ...config });
|
|
176
|
+
this.get = (id, config) => this.restService.request({
|
|
177
|
+
method: 'GET',
|
|
178
|
+
url: `/api/cms-admin/entry-types/${id}`,
|
|
179
|
+
}, { apiName: this.apiName, ...config });
|
|
180
|
+
this.nameExists = (input, config) => this.restService.request({
|
|
181
|
+
method: 'GET',
|
|
182
|
+
url: '/api/cms-admin/entry-types/name-exists',
|
|
183
|
+
params: { sectionId: input.sectionId, name: input.name },
|
|
184
|
+
}, { apiName: this.apiName, ...config });
|
|
185
|
+
this.update = (id, input, config) => this.restService.request({
|
|
186
|
+
method: 'PUT',
|
|
187
|
+
url: `/api/cms-admin/entry-types/${id}`,
|
|
188
|
+
body: input,
|
|
189
|
+
}, { apiName: this.apiName, ...config });
|
|
190
|
+
}
|
|
191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryTypeAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
192
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryTypeAdminService, providedIn: 'root' }); }
|
|
195
193
|
}
|
|
196
194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryTypeAdminService, decorators: [{
|
|
197
195
|
type: Injectable,
|
|
@@ -201,46 +199,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
201
199
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
202
200
|
|
|
203
201
|
class SectionAdminService {
|
|
204
|
-
restService;
|
|
205
|
-
apiName = 'CmsAdmin';
|
|
206
|
-
create = (input, config) => this.restService.request({
|
|
207
|
-
method: 'POST',
|
|
208
|
-
url: '/api/cms-admin/sections',
|
|
209
|
-
body: input,
|
|
210
|
-
}, { apiName: this.apiName, ...config });
|
|
211
|
-
delete = (id, config) => this.restService.request({
|
|
212
|
-
method: 'DELETE',
|
|
213
|
-
url: `/api/cms-admin/sections/${id}`,
|
|
214
|
-
}, { apiName: this.apiName, ...config });
|
|
215
|
-
get = (id, config) => this.restService.request({
|
|
216
|
-
method: 'GET',
|
|
217
|
-
url: `/api/cms-admin/sections/${id}`,
|
|
218
|
-
}, { apiName: this.apiName, ...config });
|
|
219
|
-
getList = (input, config) => this.restService.request({
|
|
220
|
-
method: 'GET',
|
|
221
|
-
url: '/api/cms-admin/sections',
|
|
222
|
-
params: { filter: input.filter, isActive: input.isActive, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
223
|
-
}, { apiName: this.apiName, ...config });
|
|
224
|
-
nameExists = (input, config) => this.restService.request({
|
|
225
|
-
method: 'GET',
|
|
226
|
-
url: '/api/cms-admin/sections/name-exists',
|
|
227
|
-
params: { name: input.name },
|
|
228
|
-
}, { apiName: this.apiName, ...config });
|
|
229
|
-
routeExists = (input, config) => this.restService.request({
|
|
230
|
-
method: 'GET',
|
|
231
|
-
url: '/api/cms-admin/sections/route-exists',
|
|
232
|
-
params: { route: input.route },
|
|
233
|
-
}, { apiName: this.apiName, ...config });
|
|
234
|
-
update = (id, input, config) => this.restService.request({
|
|
235
|
-
method: 'PUT',
|
|
236
|
-
url: `/api/cms-admin/sections/${id}`,
|
|
237
|
-
body: input,
|
|
238
|
-
}, { apiName: this.apiName, ...config });
|
|
239
202
|
constructor(restService) {
|
|
240
203
|
this.restService = restService;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
204
|
+
this.apiName = 'CmsAdmin';
|
|
205
|
+
this.create = (input, config) => this.restService.request({
|
|
206
|
+
method: 'POST',
|
|
207
|
+
url: '/api/cms-admin/sections',
|
|
208
|
+
body: input,
|
|
209
|
+
}, { apiName: this.apiName, ...config });
|
|
210
|
+
this.delete = (id, config) => this.restService.request({
|
|
211
|
+
method: 'DELETE',
|
|
212
|
+
url: `/api/cms-admin/sections/${id}`,
|
|
213
|
+
}, { apiName: this.apiName, ...config });
|
|
214
|
+
this.get = (id, config) => this.restService.request({
|
|
215
|
+
method: 'GET',
|
|
216
|
+
url: `/api/cms-admin/sections/${id}`,
|
|
217
|
+
}, { apiName: this.apiName, ...config });
|
|
218
|
+
this.getList = (input, config) => this.restService.request({
|
|
219
|
+
method: 'GET',
|
|
220
|
+
url: '/api/cms-admin/sections',
|
|
221
|
+
params: { filter: input.filter, isActive: input.isActive, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
222
|
+
}, { apiName: this.apiName, ...config });
|
|
223
|
+
this.nameExists = (input, config) => this.restService.request({
|
|
224
|
+
method: 'GET',
|
|
225
|
+
url: '/api/cms-admin/sections/name-exists',
|
|
226
|
+
params: { name: input.name },
|
|
227
|
+
}, { apiName: this.apiName, ...config });
|
|
228
|
+
this.routeExists = (input, config) => this.restService.request({
|
|
229
|
+
method: 'GET',
|
|
230
|
+
url: '/api/cms-admin/sections/route-exists',
|
|
231
|
+
params: { route: input.route },
|
|
232
|
+
}, { apiName: this.apiName, ...config });
|
|
233
|
+
this.update = (id, input, config) => this.restService.request({
|
|
234
|
+
method: 'PUT',
|
|
235
|
+
url: `/api/cms-admin/sections/${id}`,
|
|
236
|
+
body: input,
|
|
237
|
+
}, { apiName: this.apiName, ...config });
|
|
238
|
+
}
|
|
239
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SectionAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
240
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SectionAdminService, providedIn: 'root' }); }
|
|
244
241
|
}
|
|
245
242
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SectionAdminService, decorators: [{
|
|
246
243
|
type: Injectable,
|
|
@@ -250,13 +247,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
250
247
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
251
248
|
|
|
252
249
|
class EntriesComponent {
|
|
253
|
-
_EntryAdminService;
|
|
254
|
-
_SectionAdminService;
|
|
255
|
-
toaster;
|
|
256
|
-
confirmation;
|
|
257
|
-
configState;
|
|
258
|
-
router;
|
|
259
|
-
_LocalizationService;
|
|
260
250
|
constructor(_EntryAdminService, _SectionAdminService, toaster, confirmation, configState, router, _LocalizationService) {
|
|
261
251
|
this._EntryAdminService = _EntryAdminService;
|
|
262
252
|
this._SectionAdminService = _SectionAdminService;
|
|
@@ -265,28 +255,45 @@ class EntriesComponent {
|
|
|
265
255
|
this.configState = configState;
|
|
266
256
|
this.router = router;
|
|
267
257
|
this._LocalizationService = _LocalizationService;
|
|
258
|
+
this.fb = inject(FormBuilder);
|
|
259
|
+
this._UpdateListService = inject(UpdateListService);
|
|
260
|
+
this.list = inject(ListService);
|
|
261
|
+
/**站点列表 */
|
|
262
|
+
// siteList: any[any] = []
|
|
263
|
+
/**选择的站点id */
|
|
264
|
+
// siteId: string = ''
|
|
265
|
+
/**站点下的版块 */
|
|
266
|
+
this.SiteOfSectionList = [];
|
|
267
|
+
/**版块下的语言列表 */
|
|
268
|
+
this.sectionLanguagesList = [];
|
|
269
|
+
/**版块下的条目类型列表 */
|
|
270
|
+
this.entryTypeList = [];
|
|
271
|
+
/**状态编码 */
|
|
272
|
+
this._entryStatusOptions = entryStatusOptions;
|
|
273
|
+
this.config = inject(ConfigStateService);
|
|
274
|
+
this._SiteSettingsAdminService = inject(SiteSettingsAdminService);
|
|
275
|
+
/**站点设置语言 */
|
|
276
|
+
this.SiteSettingsAdminLanguages = [];
|
|
277
|
+
/**列表相关 */
|
|
278
|
+
this.ColumnMode = ColumnMode;
|
|
279
|
+
this.data = {
|
|
280
|
+
items: [],
|
|
281
|
+
totalCount: 0,
|
|
282
|
+
};
|
|
283
|
+
this.filters = {};
|
|
284
|
+
this.filtersForm = this.fb.group({
|
|
285
|
+
siteId: [''],
|
|
286
|
+
sectionId: [''],
|
|
287
|
+
culture: [''],
|
|
288
|
+
filter: [''],
|
|
289
|
+
});
|
|
268
290
|
}
|
|
269
|
-
fb = inject(FormBuilder);
|
|
270
|
-
_UpdateListService = inject(UpdateListService);
|
|
271
|
-
list = inject(ListService);
|
|
272
291
|
ngOnInit() {
|
|
273
292
|
this.getPageDate();
|
|
274
293
|
this._UpdateListService.updateListEvent.subscribe(() => {
|
|
275
294
|
this.list.get();
|
|
276
295
|
});
|
|
277
296
|
}
|
|
278
|
-
/**站点列表 */
|
|
279
|
-
// siteList: any[any] = []
|
|
280
|
-
/**选择的站点id */
|
|
281
|
-
// siteId: string = ''
|
|
282
|
-
/**站点下的版块 */
|
|
283
|
-
SiteOfSectionList = [];
|
|
284
|
-
/**版块下的语言列表 */
|
|
285
|
-
sectionLanguagesList = [];
|
|
286
|
-
/**版块下的条目类型列表 */
|
|
287
|
-
entryTypeList = [];
|
|
288
|
-
/**状态编码 */
|
|
289
|
-
_entryStatusOptions = entryStatusOptions;
|
|
290
297
|
/**获取页面数据 */
|
|
291
298
|
async getPageDate() {
|
|
292
299
|
await this.getSiteOfSectionList();
|
|
@@ -322,8 +329,6 @@ class EntriesComponent {
|
|
|
322
329
|
let sectionId = this.filtersForm.get('sectionId').value;
|
|
323
330
|
this.entryTypeList = this.SiteOfSectionList.find(el => el.id == sectionId)?.entryTypes || [];
|
|
324
331
|
}
|
|
325
|
-
config = inject(ConfigStateService);
|
|
326
|
-
_SiteSettingsAdminService = inject(SiteSettingsAdminService);
|
|
327
332
|
/**获取版块下的语言列表 */
|
|
328
333
|
getSectionLanguagesList() {
|
|
329
334
|
return new Promise(async (resolve, rejects) => {
|
|
@@ -346,8 +351,6 @@ class EntriesComponent {
|
|
|
346
351
|
resolve(LanguagesArray);
|
|
347
352
|
});
|
|
348
353
|
}
|
|
349
|
-
/**站点设置语言 */
|
|
350
|
-
SiteSettingsAdminLanguages = [];
|
|
351
354
|
/**
|
|
352
355
|
* 获取站点设置语言
|
|
353
356
|
*/
|
|
@@ -371,19 +374,6 @@ class EntriesComponent {
|
|
|
371
374
|
queryParams: { cultureName: this.filters.culture, sectionId: this.filters.sectionId, entryTypeId: this.entryTypeList[0].id }
|
|
372
375
|
});
|
|
373
376
|
}
|
|
374
|
-
/**列表相关 */
|
|
375
|
-
ColumnMode = ColumnMode;
|
|
376
|
-
data = {
|
|
377
|
-
items: [],
|
|
378
|
-
totalCount: 0,
|
|
379
|
-
};
|
|
380
|
-
filters = {};
|
|
381
|
-
filtersForm = this.fb.group({
|
|
382
|
-
siteId: [''],
|
|
383
|
-
sectionId: [''],
|
|
384
|
-
culture: [''],
|
|
385
|
-
filter: [''],
|
|
386
|
-
});
|
|
387
377
|
hookToQuery() {
|
|
388
378
|
const getData = (query) => this._EntryAdminService.getList({
|
|
389
379
|
...query,
|
|
@@ -406,8 +396,8 @@ class EntriesComponent {
|
|
|
406
396
|
}
|
|
407
397
|
});
|
|
408
398
|
}
|
|
409
|
-
static
|
|
410
|
-
static
|
|
399
|
+
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: i3$1.Router }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
400
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntriesComponent, selector: "cms-entries", providers: [
|
|
411
401
|
ListService,
|
|
412
402
|
// Provide this token if you want a different debounce time.
|
|
413
403
|
// Default is 300. Cannot be 0. Any value below 100 is not recommended.
|
|
@@ -416,7 +406,7 @@ class EntriesComponent {
|
|
|
416
406
|
provide: EXTENSIONS_IDENTIFIER,
|
|
417
407
|
useValue: ECmsComponent.Entries,
|
|
418
408
|
},
|
|
419
|
-
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \"></abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::New' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [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 px-2 py-sm-2 border-bottom\" [formGroup]=\"filtersForm\">\r\n <div class=\"row align-items-end\">\r\n <div class=\"mb-2 col-3\">\r\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" formControlName=\"sectionId\" (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-2 col-3\">\r\n <label class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" formControlName=\"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 \r\n <div class=\"mb-2 col-3\">\r\n <label class=\"form-label\">{{'AbpUi::Search' | abpLocalization}}\uFF1A</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"filter\"\r\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\r\n </div>\r\n <div class=\"mb-2 col-3\">\r\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"resetData()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\">\r\n <div class=\"card-body p-0\">\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\r\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\r\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\r\n <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\">\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 <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::Slug' | abpLocalization\" prop=\"slug\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\" [width]=\"80\">\r\n <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 <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\" [width]=\"190\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | date: 'YYYY/MM/dd HH:mm:s' }}\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\">{{'AbpUi::Edit' |\r\n abpLocalization}}</button>\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ngx-datatable>\r\n </div>\r\n </div>\r\n </div>\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}\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: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "component", type: i8.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: i8.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: i8.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i10.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i8$1.PageToolbarContainerComponent, selector: "abp-page-toolbar-container" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
|
|
409
|
+
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Entries' | abpLocalization\" [toolbar]=\"true\">\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length < 1\" class=\"col \"></abp-page-toolbar-container>\r\n <abp-page-toolbar-container *ngIf=\"entryTypeList.length > 1\" class=\"col \">\r\n <div class=\"row justify-content-end mx-0 gap-2\" *abpPermission=\"'CmsAdmin.Entry.Create'\">\r\n <div class=\"col-auto px-0 pt-0\">\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button type=\"button\" class=\"btn btn-primary btn-sm ms-2\" id=\"dropdownBasic1\" ngbDropdownToggle>\r\n <i class=\"fa fa-plus pe-1\" aria-hidden=\"true\"></i>{{'Cms::New' | abpLocalization}}\r\n </button>\r\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <button ngbDropdownItem [routerLink]=\"['/cms/admin/entries/create']\"\r\n [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 px-2 py-sm-2 border-bottom\" [formGroup]=\"filtersForm\">\r\n <div class=\"row align-items-end\">\r\n <div class=\"mb-2 col-3\">\r\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" formControlName=\"sectionId\" (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-2 col-3\">\r\n <label class=\"form-label\">{{'AbpUi::Languages' | abpLocalization}}\uFF1A</label>\r\n <select class=\"form-select col-auto\" formControlName=\"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 \r\n <div class=\"mb-2 col-3\">\r\n <label class=\"form-label\">{{'AbpUi::Search' | abpLocalization}}\uFF1A</label>\r\n <input type=\"text\" class=\"form-control\" formControlName=\"filter\"\r\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\r\n </div>\r\n <div class=\"mb-2 col-3\">\r\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"resetData()\">\r\n <i class=\"fa fa-search\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card mb-0\">\r\n <div class=\"card-body p-0\">\r\n <div class=\"table-responsive table-fixed-header\">\r\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\r\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\r\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\r\n <ngx-datatable-column [name]=\"'Cms::Title' | abpLocalization\" prop=\"title\">\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 <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n <ng-container *ngFor=\"let item of entryTypeList\">\r\n <ng-container *ngIf=\"item.id === value\">{{item.displayName}}</ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::Slug' | abpLocalization\" prop=\"slug\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{ value }}\r\n </ng-template>\r\n </ngx-datatable-column>\r\n <ngx-datatable-column [name]=\"'Cms::Status' | abpLocalization\" prop=\"status\" [width]=\"80\">\r\n <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 <ngx-datatable-column [name]=\"'Cms::PublishTime' | abpLocalization\" prop=\"publishTime\" [width]=\"190\">\r\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\r\n {{value | date: 'YYYY/MM/dd HH:mm:s' }}\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\">{{'AbpUi::Edit' |\r\n abpLocalization}}</button>\r\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\r\n abpLocalization}}</button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n </ngx-datatable>\r\n </div>\r\n </div>\r\n </div>\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}\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: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "component", type: i8.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: i8.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: i8.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i10.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i8$1.PageToolbarContainerComponent, selector: "abp-page-toolbar-container" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
420
410
|
}
|
|
421
411
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntriesComponent, decorators: [{
|
|
422
412
|
type: Component,
|
|
@@ -433,26 +423,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
433
423
|
}], ctorParameters: () => [{ type: EntryAdminService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.ConfigStateService }, { type: i3$1.Router }, { type: i1.LocalizationService }] });
|
|
434
424
|
|
|
435
425
|
class CreateOrUpdateEntryInputBase {
|
|
436
|
-
/**语言 */
|
|
437
|
-
culture = ['', [Validators.required]];
|
|
438
|
-
/**条目id */
|
|
439
|
-
entryTypeId = [''];
|
|
440
|
-
/**标题 */
|
|
441
|
-
title = ['', [Validators.required]];
|
|
442
|
-
/**别名 */
|
|
443
|
-
slug = ['', [Validators.required]];
|
|
444
|
-
/**是否是草稿 */
|
|
445
|
-
draft = ['', []];
|
|
446
|
-
/**发布时间 */
|
|
447
|
-
publishTime = ['', [Validators.required]];
|
|
448
|
-
/**上级目录 */
|
|
449
|
-
parentId = [null];
|
|
450
|
-
/**修订说明 */
|
|
451
|
-
versionNotes = [null];
|
|
452
|
-
/**版本 */
|
|
453
|
-
initialVersionId = [null];
|
|
454
|
-
extraProperties = new FormGroup({});
|
|
455
426
|
constructor(data) {
|
|
427
|
+
/**语言 */
|
|
428
|
+
this.culture = ['', [Validators.required]];
|
|
429
|
+
/**条目id */
|
|
430
|
+
this.entryTypeId = [''];
|
|
431
|
+
/**标题 */
|
|
432
|
+
this.title = ['', [Validators.required]];
|
|
433
|
+
/**别名 */
|
|
434
|
+
this.slug = ['', [Validators.required]];
|
|
435
|
+
/**是否是草稿 */
|
|
436
|
+
this.draft = ['', []];
|
|
437
|
+
/**发布时间 */
|
|
438
|
+
this.publishTime = ['', [Validators.required]];
|
|
439
|
+
/**上级目录 */
|
|
440
|
+
this.parentId = [null];
|
|
441
|
+
/**修订说明 */
|
|
442
|
+
this.versionNotes = [null];
|
|
443
|
+
/**版本 */
|
|
444
|
+
this.initialVersionId = [null];
|
|
445
|
+
this.extraProperties = new FormGroup({});
|
|
456
446
|
if (data) {
|
|
457
447
|
for (const key in data) {
|
|
458
448
|
if (data.hasOwnProperty(key)) {
|
|
@@ -463,37 +453,114 @@ class CreateOrUpdateEntryInputBase {
|
|
|
463
453
|
}
|
|
464
454
|
}
|
|
465
455
|
|
|
456
|
+
class ValidatorsService {
|
|
457
|
+
constructor() {
|
|
458
|
+
this.fb = inject(FormBuilder);
|
|
459
|
+
this.toaster = inject(ToasterService);
|
|
460
|
+
this._LocalizationService = inject(LocalizationService);
|
|
461
|
+
}
|
|
462
|
+
/**检查表单- */
|
|
463
|
+
isCheckForm(input) {
|
|
464
|
+
let keys = Object.keys(input);
|
|
465
|
+
for (let i = 0; i < keys.length; i++) {
|
|
466
|
+
const element = keys[i];
|
|
467
|
+
if (input[element] == false) {
|
|
468
|
+
let info = `请检查 ${this._LocalizationService.instant(`CmsKit::${element}`)} 字段`;
|
|
469
|
+
if (element.includes('.') && !element.includes('].')) {
|
|
470
|
+
let arr = element.split('.');
|
|
471
|
+
info = `请检查 ${this._LocalizationService.instant(`Cms::${arr[0]}`)} 的 ${this._LocalizationService.instant(`Cms::${arr[1]}`)}字段`;
|
|
472
|
+
}
|
|
473
|
+
if (element.includes('].')) {
|
|
474
|
+
let arr = element.split('].');
|
|
475
|
+
let arrStart = arr[0].split('[');
|
|
476
|
+
info = `请检查 ${this._LocalizationService.instant(`Cms::${arrStart[0]}`)}[${arrStart[1]}] 的 ${this._LocalizationService.instant(`Cms::${arr[1]}`)}字段`;
|
|
477
|
+
}
|
|
478
|
+
//使用abp多语言提示
|
|
479
|
+
this.toaster.warn(info);
|
|
480
|
+
return true;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
return false;
|
|
484
|
+
}
|
|
485
|
+
/**获取表单所有字段是否通过验证 */
|
|
486
|
+
getFormValidationStatus(formEntity) {
|
|
487
|
+
let validationStatus = {};
|
|
488
|
+
// 递归遍历表单组和表单控件集合
|
|
489
|
+
const traverseForm = (form, prefix = '') => {
|
|
490
|
+
if (form instanceof FormGroup) {
|
|
491
|
+
Object.keys(form.controls).forEach(key => {
|
|
492
|
+
const control = form.controls[key];
|
|
493
|
+
let displayName = key.charAt(0).toUpperCase() + key.slice(1);
|
|
494
|
+
const fullKey = prefix ? `${prefix}.${displayName}` : displayName;
|
|
495
|
+
if (control instanceof FormControl) {
|
|
496
|
+
validationStatus[fullKey] = control.valid;
|
|
497
|
+
}
|
|
498
|
+
else if (control instanceof FormArray) {
|
|
499
|
+
traverseForm(control, fullKey);
|
|
500
|
+
}
|
|
501
|
+
else if (control instanceof FormGroup) {
|
|
502
|
+
traverseForm(control, fullKey);
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
else if (form instanceof FormArray) {
|
|
507
|
+
form.controls.forEach((control, index) => {
|
|
508
|
+
const fullKey = prefix ? `${prefix}[${index}]` : `[${index}]`;
|
|
509
|
+
if (control instanceof FormControl) {
|
|
510
|
+
validationStatus[fullKey] = control.valid;
|
|
511
|
+
}
|
|
512
|
+
else if (control instanceof FormArray) {
|
|
513
|
+
traverseForm(control, fullKey);
|
|
514
|
+
}
|
|
515
|
+
else if (control instanceof FormGroup) {
|
|
516
|
+
traverseForm(control, fullKey);
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
traverseForm(formEntity);
|
|
522
|
+
return validationStatus;
|
|
523
|
+
}
|
|
524
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: ValidatorsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
525
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: ValidatorsService, providedIn: 'root' }); }
|
|
526
|
+
}
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: ValidatorsService, decorators: [{
|
|
528
|
+
type: Injectable,
|
|
529
|
+
args: [{
|
|
530
|
+
providedIn: 'root'
|
|
531
|
+
}]
|
|
532
|
+
}], ctorParameters: () => [] });
|
|
533
|
+
|
|
466
534
|
class FieldGroupAdminService {
|
|
467
|
-
restService;
|
|
468
|
-
apiName = 'CmsAdmin';
|
|
469
|
-
create = (input, config) => this.restService.request({
|
|
470
|
-
method: 'POST',
|
|
471
|
-
url: '/api/cms-admin/field-groups',
|
|
472
|
-
body: input,
|
|
473
|
-
}, { apiName: this.apiName, ...config });
|
|
474
|
-
delete = (id, config) => this.restService.request({
|
|
475
|
-
method: 'DELETE',
|
|
476
|
-
url: `/api/cms-admin/field-groups/${id}`,
|
|
477
|
-
}, { apiName: this.apiName, ...config });
|
|
478
|
-
get = (id, config) => this.restService.request({
|
|
479
|
-
method: 'GET',
|
|
480
|
-
url: `/api/cms-admin/field-groups/${id}`,
|
|
481
|
-
}, { apiName: this.apiName, ...config });
|
|
482
|
-
getList = (input, config) => this.restService.request({
|
|
483
|
-
method: 'GET',
|
|
484
|
-
url: '/api/cms-admin/field-groups',
|
|
485
|
-
params: { input },
|
|
486
|
-
}, { apiName: this.apiName, ...config });
|
|
487
|
-
update = (id, input, config) => this.restService.request({
|
|
488
|
-
method: 'PUT',
|
|
489
|
-
url: `/api/cms-admin/field-groups/${id}`,
|
|
490
|
-
body: input,
|
|
491
|
-
}, { apiName: this.apiName, ...config });
|
|
492
535
|
constructor(restService) {
|
|
493
536
|
this.restService = restService;
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
537
|
+
this.apiName = 'CmsAdmin';
|
|
538
|
+
this.create = (input, config) => this.restService.request({
|
|
539
|
+
method: 'POST',
|
|
540
|
+
url: '/api/cms-admin/field-groups',
|
|
541
|
+
body: input,
|
|
542
|
+
}, { apiName: this.apiName, ...config });
|
|
543
|
+
this.delete = (id, config) => this.restService.request({
|
|
544
|
+
method: 'DELETE',
|
|
545
|
+
url: `/api/cms-admin/field-groups/${id}`,
|
|
546
|
+
}, { apiName: this.apiName, ...config });
|
|
547
|
+
this.get = (id, config) => this.restService.request({
|
|
548
|
+
method: 'GET',
|
|
549
|
+
url: `/api/cms-admin/field-groups/${id}`,
|
|
550
|
+
}, { apiName: this.apiName, ...config });
|
|
551
|
+
this.getList = (input, config) => this.restService.request({
|
|
552
|
+
method: 'GET',
|
|
553
|
+
url: '/api/cms-admin/field-groups',
|
|
554
|
+
params: { input },
|
|
555
|
+
}, { apiName: this.apiName, ...config });
|
|
556
|
+
this.update = (id, input, config) => this.restService.request({
|
|
557
|
+
method: 'PUT',
|
|
558
|
+
url: `/api/cms-admin/field-groups/${id}`,
|
|
559
|
+
body: input,
|
|
560
|
+
}, { apiName: this.apiName, ...config });
|
|
561
|
+
}
|
|
562
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldGroupAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
563
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldGroupAdminService, providedIn: 'root' }); }
|
|
497
564
|
}
|
|
498
565
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldGroupAdminService, decorators: [{
|
|
499
566
|
type: Injectable,
|
|
@@ -503,17 +570,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
503
570
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
504
571
|
|
|
505
572
|
class FormAdminService {
|
|
506
|
-
restService;
|
|
507
|
-
apiName = 'CmsAdmin';
|
|
508
|
-
getFormControls = (config) => this.restService.request({
|
|
509
|
-
method: 'GET',
|
|
510
|
-
url: '/api/cms-admin/dynamic-forms/forms',
|
|
511
|
-
}, { apiName: this.apiName, ...config });
|
|
512
573
|
constructor(restService) {
|
|
513
574
|
this.restService = restService;
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
575
|
+
this.apiName = 'CmsAdmin';
|
|
576
|
+
this.getFormControls = (config) => this.restService.request({
|
|
577
|
+
method: 'GET',
|
|
578
|
+
url: '/api/cms-admin/dynamic-forms/forms',
|
|
579
|
+
}, { apiName: this.apiName, ...config });
|
|
580
|
+
}
|
|
581
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
582
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormAdminService, providedIn: 'root' }); }
|
|
517
583
|
}
|
|
518
584
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FormAdminService, decorators: [{
|
|
519
585
|
type: Injectable,
|
|
@@ -523,22 +589,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
523
589
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
524
590
|
|
|
525
591
|
class FieldAbstractsService {
|
|
526
|
-
_FieldGroupAdminService;
|
|
527
|
-
_FormAdminService;
|
|
528
592
|
constructor(_FieldGroupAdminService, _FormAdminService) {
|
|
529
593
|
this._FieldGroupAdminService = _FieldGroupAdminService;
|
|
530
594
|
this._FormAdminService = _FormAdminService;
|
|
595
|
+
/**字段分组列表 */
|
|
596
|
+
this.fieldGroupList = [];
|
|
597
|
+
/**表单控件类型 */
|
|
598
|
+
this.fromControlList = [];
|
|
531
599
|
}
|
|
532
|
-
/**字段分组列表 */
|
|
533
|
-
fieldGroupList = [];
|
|
534
600
|
/**获取字段分组列表 */
|
|
535
601
|
getfieldGroupList() {
|
|
536
602
|
this._FieldGroupAdminService.getList({}).subscribe(res => {
|
|
537
603
|
this.fieldGroupList = res.items;
|
|
538
604
|
});
|
|
539
605
|
}
|
|
540
|
-
/**表单控件类型 */
|
|
541
|
-
fromControlList = [];
|
|
542
606
|
/**获取表单控件类型 */
|
|
543
607
|
getFromControlList() {
|
|
544
608
|
return new Promise((resolve, reject) => {
|
|
@@ -552,8 +616,8 @@ class FieldAbstractsService {
|
|
|
552
616
|
// return this.fromControlList.filter(el => el.name !== typeName)
|
|
553
617
|
return this.fromControlList;
|
|
554
618
|
}
|
|
555
|
-
static
|
|
556
|
-
static
|
|
619
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldAbstractsService, deps: [{ token: FieldGroupAdminService }, { token: FormAdminService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
620
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldAbstractsService, providedIn: 'root' }); }
|
|
557
621
|
}
|
|
558
622
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldAbstractsService, decorators: [{
|
|
559
623
|
type: Injectable,
|
|
@@ -563,16 +627,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
563
627
|
}], ctorParameters: () => [{ type: FieldGroupAdminService }, { type: FormAdminService }] });
|
|
564
628
|
|
|
565
629
|
class CmsService {
|
|
566
|
-
restService;
|
|
567
|
-
apiName = 'Cms';
|
|
568
630
|
constructor(restService) {
|
|
569
631
|
this.restService = restService;
|
|
632
|
+
this.apiName = 'Cms';
|
|
570
633
|
}
|
|
571
634
|
sample() {
|
|
572
635
|
return this.restService.request({ method: 'GET', url: '/api/Cms/sample' }, { apiName: this.apiName });
|
|
573
636
|
}
|
|
574
|
-
static
|
|
575
|
-
static
|
|
637
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
638
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsService, providedIn: 'root' }); }
|
|
576
639
|
}
|
|
577
640
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsService, decorators: [{
|
|
578
641
|
type: Injectable,
|
|
@@ -582,7 +645,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
582
645
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
583
646
|
|
|
584
647
|
class CmsApiService {
|
|
585
|
-
titleService;
|
|
586
648
|
constructor(titleService) {
|
|
587
649
|
this.titleService = titleService;
|
|
588
650
|
}
|
|
@@ -646,8 +708,8 @@ class CmsApiService {
|
|
|
646
708
|
}
|
|
647
709
|
return result;
|
|
648
710
|
}
|
|
649
|
-
static
|
|
650
|
-
static
|
|
711
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsApiService, deps: [{ token: i1$2.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
712
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsApiService, providedIn: 'root' }); }
|
|
651
713
|
}
|
|
652
714
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsApiService, decorators: [{
|
|
653
715
|
type: Injectable,
|
|
@@ -657,7 +719,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
657
719
|
}], ctorParameters: () => [{ type: i1$2.Title }] });
|
|
658
720
|
|
|
659
721
|
class SimpleReuseStrategy {
|
|
660
|
-
static cacheRouters = new Map();
|
|
722
|
+
static { this.cacheRouters = new Map(); }
|
|
661
723
|
static deleteRouteCache(url) {
|
|
662
724
|
if (SimpleReuseStrategy.cacheRouters.has(url)) {
|
|
663
725
|
const handle = SimpleReuseStrategy.cacheRouters.get(url);
|
|
@@ -721,15 +783,6 @@ class SimpleReuseStrategy {
|
|
|
721
783
|
}
|
|
722
784
|
|
|
723
785
|
class CreateOrEditEntriesComponent {
|
|
724
|
-
toaster;
|
|
725
|
-
_location;
|
|
726
|
-
configState;
|
|
727
|
-
_SectionAdminService;
|
|
728
|
-
_EntryAdminService;
|
|
729
|
-
datePipe;
|
|
730
|
-
_LocalizationService;
|
|
731
|
-
router;
|
|
732
|
-
_CmsApiService;
|
|
733
786
|
constructor(toaster, _location, configState, _SectionAdminService, _EntryAdminService, datePipe, _LocalizationService, router, _CmsApiService) {
|
|
734
787
|
this.toaster = toaster;
|
|
735
788
|
this._location = _location;
|
|
@@ -740,43 +793,43 @@ class CreateOrEditEntriesComponent {
|
|
|
740
793
|
this._LocalizationService = _LocalizationService;
|
|
741
794
|
this.router = router;
|
|
742
795
|
this._CmsApiService = _CmsApiService;
|
|
796
|
+
/**语言 */
|
|
797
|
+
this.cultureName = '';
|
|
798
|
+
/**条目类型id */
|
|
799
|
+
this.entryTypeId = '';
|
|
800
|
+
/**新建版本的版本id,同条目id */
|
|
801
|
+
this.RevisionEntryId = '';
|
|
802
|
+
/**选择的条目项 */
|
|
803
|
+
this.entryTypesItem = '';
|
|
804
|
+
/**版块id */
|
|
805
|
+
this.sectionId = '';
|
|
806
|
+
/**版块详情 */
|
|
807
|
+
this.SectionSelect = '';
|
|
808
|
+
/**语言列表 */
|
|
809
|
+
this.languagesList = [];
|
|
810
|
+
/**条目类型列表-用于选择上级条目 */
|
|
811
|
+
this.entryTypesList = [];
|
|
812
|
+
/**版本列表 */
|
|
813
|
+
this.AllVersionsList = [];
|
|
814
|
+
/**是否是编辑 */
|
|
815
|
+
this.isEdit = false;
|
|
816
|
+
/**来自父组件的传值 */
|
|
817
|
+
this.FromParentQueryParams = '';
|
|
818
|
+
/**指定id的条目信息 */
|
|
819
|
+
this.entrySelect = '';
|
|
820
|
+
this.time = 0;
|
|
821
|
+
this.config = inject(ConfigStateService);
|
|
743
822
|
}
|
|
744
|
-
/**语言 */
|
|
745
|
-
cultureName = '';
|
|
746
|
-
/**条目类型id */
|
|
747
|
-
entryTypeId = '';
|
|
748
|
-
/**新建版本的版本id,同条目id */
|
|
749
|
-
RevisionEntryId = '';
|
|
750
|
-
/**选择的条目项 */
|
|
751
|
-
entryTypesItem = '';
|
|
752
|
-
/**版块id */
|
|
753
|
-
sectionId = '';
|
|
754
|
-
/**版块详情 */
|
|
755
|
-
SectionSelect = '';
|
|
756
|
-
/**语言列表 */
|
|
757
|
-
languagesList = [];
|
|
758
|
-
/**条目类型列表-用于选择上级条目 */
|
|
759
|
-
entryTypesList = [];
|
|
760
|
-
/**版本列表 */
|
|
761
|
-
AllVersionsList = [];
|
|
762
|
-
/**是否是编辑 */
|
|
763
|
-
isEdit = false;
|
|
764
|
-
/**来自父组件的传值 */
|
|
765
|
-
FromParentQueryParams = '';
|
|
766
823
|
set ParentQueryParams(v) {
|
|
767
824
|
if (v) {
|
|
768
825
|
this.FromParentQueryParams = v;
|
|
769
826
|
}
|
|
770
827
|
}
|
|
771
|
-
/**表单实体 */
|
|
772
|
-
_entity;
|
|
773
828
|
set entity(v) {
|
|
774
829
|
if (v) {
|
|
775
830
|
this._entity = v;
|
|
776
831
|
}
|
|
777
832
|
}
|
|
778
|
-
/**指定id的条目信息 */
|
|
779
|
-
entrySelect = '';
|
|
780
833
|
set parentEntrySelect(v) {
|
|
781
834
|
if (v) {
|
|
782
835
|
let V_extraProperties = this._CmsApiService.deepClone(this.convertExtraProperties(v.extraProperties));
|
|
@@ -841,8 +894,6 @@ class CreateOrEditEntriesComponent {
|
|
|
841
894
|
await this.getAllVersionsList();
|
|
842
895
|
}
|
|
843
896
|
}
|
|
844
|
-
/**表单控件模板-动态表单配置组件 */
|
|
845
|
-
FormDynamicontrolRef;
|
|
846
897
|
/**定义自定义异步验证 */
|
|
847
898
|
cultureAsyncValidator_test() {
|
|
848
899
|
return (ctrl) => {
|
|
@@ -876,7 +927,6 @@ class CreateOrEditEntriesComponent {
|
|
|
876
927
|
this.cultureName = source.culture || source.cultureName;
|
|
877
928
|
this.sectionId = source.sectionId;
|
|
878
929
|
}
|
|
879
|
-
time = 0;
|
|
880
930
|
/**定义自定义异步验证 */
|
|
881
931
|
repetitionAsyncValidator() {
|
|
882
932
|
return (ctrl) => {
|
|
@@ -901,13 +951,10 @@ class CreateOrEditEntriesComponent {
|
|
|
901
951
|
});
|
|
902
952
|
};
|
|
903
953
|
}
|
|
904
|
-
config = inject(ConfigStateService);
|
|
905
|
-
// private _EntryAdminService = inject(EntryAdminService)
|
|
906
954
|
/**获取版块详情 */
|
|
907
955
|
getSectionSelect() {
|
|
908
956
|
return new Promise((resolve, rejects) => {
|
|
909
957
|
this._SectionAdminService.get(this.sectionId).subscribe(async (res) => {
|
|
910
|
-
console.log('获取版块详情', res);
|
|
911
958
|
let languages = this.configState.getDeep('localization.languages');
|
|
912
959
|
this.languagesList = languages;
|
|
913
960
|
let entryTypesItem = res.entryTypes.find(el => el.id == this.entryTypeId);
|
|
@@ -1004,8 +1051,8 @@ class CreateOrEditEntriesComponent {
|
|
|
1004
1051
|
this.getAllVersionsList();
|
|
1005
1052
|
});
|
|
1006
1053
|
}
|
|
1007
|
-
static
|
|
1008
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: { isEdit: "isEdit", ParentQueryParams: "ParentQueryParams", entity: "entity", parentEntrySelect: "parentEntrySelect" }, viewQueries: [{ propertyName: "FormDynamicontrolRef", predicate: ["FormDynamicontrolRef"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"create-or-edit-entry-page\" [formGroup]=\"_entity\">\n <div class=\"container \">\n <div class=\"row\">\n <div class=\"col-md-8 \">\n <div class=\"card p-2\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"title\">{{'Cms::Title' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" (blur)=\"setTitleToSlugBlur($event)\"\n formControlName=\"title\">\n </div>\n <!-- <template #FormDynamicRef></template> -->\n <ng-container *ngFor=\"let item of entryTypesItem?.fieldTabs;let i =index\">\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\n <ng-container *ngIf=\"el&&_entity\">\n <df-dynamic [entity]=\"_entity\" [fields]=\"el\"\n [selected]=\"entrySelect ? entrySelect.extraProperties[el.field.name] : ''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureinput.value\"></df-dynamic>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-4 \">\n <div class=\"card mb-0 p-2\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"slug\">{{'Cms::Slug' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"sluginput.errors?.repetition\">\n {{sluginput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"culture\">{{'AbpUi::Languages' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"culture\">\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\n </ng-container>\n </select>\n <input type=\"text\" formControlName=\"culture_shadow\"\n style=\"position: absolute;z-index: -1;opacity: 0;\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"culture_shadowInput.errors?.repetition\">\n {{culture_shadowInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\" *ngIf=\"SectionSelect.type===1\">\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"parentId\">\n <option value=\"\"></option>\n <ng-container *ngFor=\"let item of entryTypesList;let i =index\">\n <option [value]=\"item.id\">{{item.title}}</option>\n <ng-container *ngFor=\"let el of item.children\">\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\n $implicit: {\n value: el,\n }\n }\"></ng-container>\n <ng-template #childTemplate let-data>\n <option [value]=\"data.value.id\">\n <ng-container *ngFor=\"let item of data.value.layer\">--</ng-container>\n {{data.value.title}}</option>\n <ng-container *ngFor=\"let el of data.value.children\">\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\n $implicit: {\n value: el,\n }\n }\"></ng-container>\n </ng-container>\n\n </ng-template>\n </ng-container>\n\n </ng-container>\n </select>\n\n\n\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\n </div>\n <div class=\"mb-2\" *ngIf=\"isEdit\">\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::Version' | abpLocalization}}</label>\n <ul class=\"list-group\">\n <ng-container *ngFor=\"let item of AllVersionsList\">\n <li class=\"list-group-item flex-between\">\n <div>\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd\n HH:mm:s'):('Cms::InitialVersion' | abpLocalization)}}\n <span class=\"badge text-bg-success ms-1\"\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\n <span class=\"badge text-bg-primary ms-1\"\n *ngIf=\"item.id === RevisionEntryId\">{{'Cms::Editing' |\n abpLocalization}}</span>\n </div>\n <div>\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\n (click)=\"ActivatedVersion(item.id)\">\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' |\n abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\"\n routerLink=\"/cms/admin/entries/create\"\n [queryParams]=\"{RevisionEntryId:item.id}\">\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' |\n abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\n *ngIf=\"item.id !== RevisionEntryId\">\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"delectVersion(item.id)\"\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== RevisionEntryId\">\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' |\n abpLocalization}}\n </button>\n </div>\n </div>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["::ng-deep .create-or-edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .create-or-edit-entry-page .form-control,::ng-deep .create-or-edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}::ng-deep .create-or-edit-entry-page .flex-between{display:flex;align-items:center;justify-content:space-between}\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: i3$1.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: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i10.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8$2.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
|
|
1054
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditEntriesComponent, deps: [{ token: i3.ToasterService }, { token: i2.Location }, { token: i1.ConfigStateService }, { token: SectionAdminService }, { token: EntryAdminService }, { token: i2.DatePipe }, { token: i1.LocalizationService }, { token: i3$1.Router }, { token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1055
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: { isEdit: "isEdit", ParentQueryParams: "ParentQueryParams", entity: "entity", parentEntrySelect: "parentEntrySelect" }, viewQueries: [{ propertyName: "FormDynamicontrolRef", predicate: ["FormDynamicontrolRef"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div class=\"create-or-edit-entry-page\" [formGroup]=\"_entity\">\n <div class=\"container \">\n <div class=\"row\">\n <div class=\"col-md-8 \">\n <div class=\"card p-2\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"title\">{{'Cms::Title' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" (blur)=\"setTitleToSlugBlur($event)\"\n formControlName=\"title\">\n </div>\n <!-- <template #FormDynamicRef></template> -->\n <ng-container *ngFor=\"let item of entryTypesItem?.fieldTabs;let i =index\">\n <ng-container *ngFor=\"let el of item.fields;let i1 =index\">\n <ng-container *ngIf=\"el&&_entity\">\n <df-dynamic [entity]=\"_entity\" [fields]=\"el\"\n [selected]=\"entrySelect ? entrySelect.extraProperties[el.field.name] : ''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"cultureinput.value\"></df-dynamic>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-4 \">\n <div class=\"card mb-0 p-2\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"slug\">{{'Cms::Slug' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"slug\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"sluginput.errors?.repetition\">\n {{sluginput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"culture\">{{'AbpUi::Languages' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"culture\">\n <ng-container *ngFor=\"let item of languagesList;let i =index\">\n <option [value]=\"item.cultureName\">{{item.displayName}}</option>\n </ng-container>\n </select>\n <input type=\"text\" formControlName=\"culture_shadow\"\n style=\"position: absolute;z-index: -1;opacity: 0;\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"culture_shadowInput.errors?.repetition\">\n {{culture_shadowInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\" *ngIf=\"SectionSelect.type===1\">\n <label class=\"form-label\" for=\"parentId\">{{'Cms::ParentEntry' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"parentId\">\n <option value=\"\"></option>\n <ng-container *ngFor=\"let item of entryTypesList;let i =index\">\n <option [value]=\"item.id\">{{item.title}}</option>\n <ng-container *ngFor=\"let el of item.children\">\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\n $implicit: {\n value: el,\n }\n }\"></ng-container>\n <ng-template #childTemplate let-data>\n <option [value]=\"data.value.id\">\n <ng-container *ngFor=\"let item of data.value.layer\">--</ng-container>\n {{data.value.title}}</option>\n <ng-container *ngFor=\"let el of data.value.children\">\n <ng-container *ngTemplateOutlet=\"childTemplate; context: {\n $implicit: {\n value: el,\n }\n }\"></ng-container>\n </ng-container>\n\n </ng-template>\n </ng-container>\n\n </ng-container>\n </select>\n\n\n\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::PublishTime' | abpLocalization}}</label>\n <input type=\"datetime-local\" class=\"form-control\" step=\"1\" formControlName=\"publishTime\">\n </div>\n <div class=\"mb-2\" *ngIf=\"isEdit\">\n <label class=\"form-label\" for=\"publishTime\">{{'Cms::Version' | abpLocalization}}</label>\n <ul class=\"list-group\">\n <ng-container *ngFor=\"let item of AllVersionsList\">\n <li class=\"list-group-item flex-between\">\n <div>\n {{item.initialVersionId?(item.creationTime| date: 'YYYY/MM/dd\n HH:mm:s'):('Cms::InitialVersion' | abpLocalization)}}\n <span class=\"badge text-bg-success ms-1\"\n *ngIf=\"item.isActivatedVersion\">{{'Cms::IsActive' | abpLocalization}}</span>\n <span class=\"badge text-bg-primary ms-1\"\n *ngIf=\"item.id === RevisionEntryId\">{{'Cms::Editing' |\n abpLocalization}}</span>\n </div>\n <div>\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-link-primary p-2 \"\n style=\"line-height: 0;\" id=\"dropdownBasic1\" ngbDropdownToggle>\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <button ngbDropdownItem type=\"button\" *ngIf=\"!item.isActivatedVersion\"\n (click)=\"ActivatedVersion(item.id)\">\n <i class=\"fas fa-check me-1\"></i>{{'Cms::IsActive' |\n abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\"\n routerLink=\"/cms/admin/entries/create\"\n [queryParams]=\"{RevisionEntryId:item.id}\">\n <i class=\"fas fa-plus me-1\"></i>{{'Cms::NewVersion' |\n abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\" (click.stop)=\"toEditUrl(item.id)\"\n *ngIf=\"item.id !== RevisionEntryId\">\n <i class=\"fas fa-edit me-1\"></i>{{'AbpUi::Edit' | abpLocalization}}\n </button>\n <button ngbDropdownItem type=\"button\"\n (click.stop)=\"delectVersion(item.id)\"\n *ngIf=\"item.initialVersionId&&!item.isActivatedVersion&&item.id !== RevisionEntryId\">\n <i class=\"fas fa-trash me-1\"></i>{{'AbpUi::Delete' |\n abpLocalization}}\n </button>\n </div>\n </div>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"versionNotes\">{{'Cms::RevisionNotes' | abpLocalization}}</label>\n <textarea class=\"form-control\" formControlName=\"versionNotes\" rows=\"3\"></textarea>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>", styles: ["::ng-deep .create-or-edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .create-or-edit-entry-page .form-control,::ng-deep .create-or-edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}::ng-deep .create-or-edit-entry-page .flex-between{display:flex;align-items:center;justify-content:space-between}\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: i3$1.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: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i10.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8$2.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1009
1056
|
}
|
|
1010
1057
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditEntriesComponent, decorators: [{
|
|
1011
1058
|
type: Component,
|
|
@@ -1024,30 +1071,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1024
1071
|
}] } });
|
|
1025
1072
|
|
|
1026
1073
|
class CreateComponent {
|
|
1027
|
-
toaster;
|
|
1028
|
-
_location;
|
|
1029
|
-
route;
|
|
1030
|
-
_EntryAdminService;
|
|
1031
|
-
_LocalizationService;
|
|
1032
1074
|
constructor(toaster, _location, route, _EntryAdminService, _LocalizationService) {
|
|
1033
1075
|
this.toaster = toaster;
|
|
1034
1076
|
this._location = _location;
|
|
1035
1077
|
this.route = route;
|
|
1036
1078
|
this._EntryAdminService = _EntryAdminService;
|
|
1037
1079
|
this._LocalizationService = _LocalizationService;
|
|
1080
|
+
this.fb = inject(FormBuilder);
|
|
1081
|
+
this._updateListService = inject(UpdateListService);
|
|
1082
|
+
/**是否是草稿 */
|
|
1083
|
+
this.draftType = false;
|
|
1084
|
+
/**页面传值用于传递到子组件 */
|
|
1085
|
+
this.queryParams = '';
|
|
1086
|
+
/**指定id的条目信息 */
|
|
1087
|
+
this.entrySelect = '';
|
|
1088
|
+
this._ValidatorsService = inject(ValidatorsService);
|
|
1089
|
+
/**表单验证状态
|
|
1090
|
+
* {
|
|
1091
|
+
* title:true,
|
|
1092
|
+
* }
|
|
1093
|
+
*/
|
|
1094
|
+
this.formValidation = '';
|
|
1095
|
+
this.isSubmit = false;
|
|
1038
1096
|
}
|
|
1039
|
-
fb = inject(FormBuilder);
|
|
1040
|
-
_updateListService = inject(UpdateListService);
|
|
1041
|
-
/**表单实体 */
|
|
1042
|
-
newEntity;
|
|
1043
|
-
/**是否是草稿 */
|
|
1044
|
-
draftType = false;
|
|
1045
|
-
/**页面传值用于传递到子组件 */
|
|
1046
|
-
queryParams = '';
|
|
1047
|
-
/**指定id的条目信息 */
|
|
1048
|
-
entrySelect = '';
|
|
1049
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
1050
|
-
submitclick;
|
|
1051
1097
|
async ngOnInit() {
|
|
1052
1098
|
this.queryParams = this.route.snapshot.queryParams;
|
|
1053
1099
|
this.newEntity = this.fb.group(new CreateOrUpdateEntryInputBase());
|
|
@@ -1073,6 +1119,9 @@ class CreateComponent {
|
|
|
1073
1119
|
input.culture = this.newEntity.get('culture').value;
|
|
1074
1120
|
if (!this.isSubmit)
|
|
1075
1121
|
return;
|
|
1122
|
+
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.newEntity);
|
|
1123
|
+
if (this._ValidatorsService.isCheckForm(this.formValidation))
|
|
1124
|
+
return;
|
|
1076
1125
|
if (!this.newEntity.valid)
|
|
1077
1126
|
return;
|
|
1078
1127
|
this._EntryAdminService.create(input).subscribe(res => {
|
|
@@ -1081,7 +1130,6 @@ class CreateComponent {
|
|
|
1081
1130
|
this._updateListService.updateList();
|
|
1082
1131
|
});
|
|
1083
1132
|
}
|
|
1084
|
-
isSubmit = false;
|
|
1085
1133
|
/**触发点击按钮替身 */
|
|
1086
1134
|
clickSubmit(type) {
|
|
1087
1135
|
this.isSubmit = true;
|
|
@@ -1092,13 +1140,13 @@ class CreateComponent {
|
|
|
1092
1140
|
backTo() {
|
|
1093
1141
|
this._location.back();
|
|
1094
1142
|
}
|
|
1095
|
-
static
|
|
1096
|
-
static
|
|
1143
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateComponent, deps: [{ token: i3.ToasterService }, { token: i2.Location }, { token: i3$1.ActivatedRoute }, { token: EntryAdminService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1144
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateComponent, selector: "cms-create", providers: [
|
|
1097
1145
|
{
|
|
1098
1146
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1099
1147
|
useValue: ECmsComponent.Entries_Create,
|
|
1100
1148
|
},
|
|
1101
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (
|
|
1149
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"save(draftType)\">\n <abp-page [title]=\"'Cms::New'| abpLocalization\" [toolbar]=\"true\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <ng-container *ngIf=\"entrySelect; else elseTemplate\">\n <cms-create-or-edit-entries [entity]=\"newEntity\" [ParentQueryParams]=\"queryParams\"\n [parentEntrySelect]=\"entrySelect\" ></cms-create-or-edit-entries>\n </ng-container>\n <ng-template #elseTemplate>\n <cms-create-or-edit-entries [entity]=\"newEntity\"\n [ParentQueryParams]=\"queryParams\" ></cms-create-or-edit-entries>\n </ng-template>\n </abp-page>\n</form>", styles: ["::ng-deep .create-or-edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .create-or-edit-entry-page .form-control,::ng-deep .create-or-edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: ["isEdit", "ParentQueryParams", "entity", "parentEntrySelect"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1102
1150
|
}
|
|
1103
1151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateComponent, decorators: [{
|
|
1104
1152
|
type: Component,
|
|
@@ -1107,7 +1155,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1107
1155
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1108
1156
|
useValue: ECmsComponent.Entries_Create,
|
|
1109
1157
|
},
|
|
1110
|
-
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (
|
|
1158
|
+
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"save(draftType)\">\n <abp-page [title]=\"'Cms::New'| abpLocalization\" [toolbar]=\"true\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <ng-container *ngIf=\"entrySelect; else elseTemplate\">\n <cms-create-or-edit-entries [entity]=\"newEntity\" [ParentQueryParams]=\"queryParams\"\n [parentEntrySelect]=\"entrySelect\" ></cms-create-or-edit-entries>\n </ng-container>\n <ng-template #elseTemplate>\n <cms-create-or-edit-entries [entity]=\"newEntity\"\n [ParentQueryParams]=\"queryParams\" ></cms-create-or-edit-entries>\n </ng-template>\n </abp-page>\n</form>", styles: ["::ng-deep .create-or-edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .create-or-edit-entry-page .form-control,::ng-deep .create-or-edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}\n"] }]
|
|
1111
1159
|
}], ctorParameters: () => [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: EntryAdminService }, { type: i1.LocalizationService }], propDecorators: { submitclick: [{
|
|
1112
1160
|
type: ViewChild,
|
|
1113
1161
|
args: ['submitclick', { static: true }]
|
|
@@ -1115,30 +1163,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1115
1163
|
|
|
1116
1164
|
/* eslint-disable @angular-eslint/use-lifecycle-interface */
|
|
1117
1165
|
class EditComponent {
|
|
1118
|
-
toaster;
|
|
1119
|
-
_location;
|
|
1120
|
-
route;
|
|
1121
|
-
_EntryAdminService;
|
|
1122
|
-
_LocalizationService;
|
|
1123
1166
|
constructor(toaster, _location, route, _EntryAdminService, _LocalizationService) {
|
|
1124
1167
|
this.toaster = toaster;
|
|
1125
1168
|
this._location = _location;
|
|
1126
1169
|
this.route = route;
|
|
1127
1170
|
this._EntryAdminService = _EntryAdminService;
|
|
1128
1171
|
this._LocalizationService = _LocalizationService;
|
|
1172
|
+
this.fb = inject(FormBuilder);
|
|
1173
|
+
this._updateListService = inject(UpdateListService);
|
|
1174
|
+
/**是否是草稿 */
|
|
1175
|
+
this.draftType = false;
|
|
1176
|
+
/**页面传值用于传递到子组件 */
|
|
1177
|
+
this.queryParams = {};
|
|
1178
|
+
/**指定id的条目信息 */
|
|
1179
|
+
this.entrySelect = '';
|
|
1180
|
+
this._ValidatorsService = inject(ValidatorsService);
|
|
1181
|
+
/**表单验证状态
|
|
1182
|
+
* {
|
|
1183
|
+
* title:true,
|
|
1184
|
+
* }
|
|
1185
|
+
*/
|
|
1186
|
+
this.formValidation = '';
|
|
1187
|
+
this.isSubmit = false;
|
|
1129
1188
|
}
|
|
1130
|
-
fb = inject(FormBuilder);
|
|
1131
|
-
_updateListService = inject(UpdateListService);
|
|
1132
|
-
/**表单实体 */
|
|
1133
|
-
newEntity;
|
|
1134
|
-
/**是否是草稿 */
|
|
1135
|
-
draftType = false;
|
|
1136
|
-
/**页面传值用于传递到子组件 */
|
|
1137
|
-
queryParams = {};
|
|
1138
|
-
/**指定id的条目信息 */
|
|
1139
|
-
entrySelect = '';
|
|
1140
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
1141
|
-
submitclick;
|
|
1142
1189
|
async ngOnInit() {
|
|
1143
1190
|
this.queryParams.RevisionEntryId = this.route.snapshot.params.entrieId;
|
|
1144
1191
|
this.newEntity = this.fb.group(new CreateOrUpdateEntryInputBase());
|
|
@@ -1164,6 +1211,9 @@ class EditComponent {
|
|
|
1164
1211
|
input.concurrencyStamp = this.entrySelect.concurrencyStamp;
|
|
1165
1212
|
if (!this.isSubmit)
|
|
1166
1213
|
return;
|
|
1214
|
+
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.newEntity);
|
|
1215
|
+
if (this._ValidatorsService.isCheckForm(this.formValidation))
|
|
1216
|
+
return;
|
|
1167
1217
|
if (!this.newEntity.valid)
|
|
1168
1218
|
return;
|
|
1169
1219
|
this._EntryAdminService.update(this.entrySelect.id, input).subscribe(res => {
|
|
@@ -1172,7 +1222,6 @@ class EditComponent {
|
|
|
1172
1222
|
this._updateListService.updateList();
|
|
1173
1223
|
});
|
|
1174
1224
|
}
|
|
1175
|
-
isSubmit = false;
|
|
1176
1225
|
/**触发点击按钮替身 */
|
|
1177
1226
|
clickSubmit(type) {
|
|
1178
1227
|
this.draftType = type;
|
|
@@ -1183,13 +1232,13 @@ class EditComponent {
|
|
|
1183
1232
|
backTo() {
|
|
1184
1233
|
this._location.back();
|
|
1185
1234
|
}
|
|
1186
|
-
static
|
|
1187
|
-
static
|
|
1235
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EditComponent, deps: [{ token: i3.ToasterService }, { token: i2.Location }, { token: i3$1.ActivatedRoute }, { token: EntryAdminService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1236
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EditComponent, selector: "cms-edit", providers: [
|
|
1188
1237
|
{
|
|
1189
1238
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1190
1239
|
useValue: ECmsComponent.Entries_Edit,
|
|
1191
1240
|
},
|
|
1192
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (
|
|
1241
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"save(draftType)\">\n <abp-page [title]=\"'AbpUi::Edit' | abpLocalization\" [toolbar]=\"true\">\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n <ng-container *ngIf=\"entrySelect\">\n <cms-create-or-edit-entries [entity]=\"newEntity\" [ParentQueryParams]=\"queryParams\"\n [parentEntrySelect]=\"entrySelect\" [isEdit]=\"true\"></cms-create-or-edit-entries>\n </ng-container>\n </abp-page>\n</form>", styles: ["::ng-deep .edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .edit-entry-page .form-control,::ng-deep .edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .edit-entry-page .cursor-move{cursor:move}::ng-deep .edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}::ng-deep .edit-entry-page .flex-between{display:flex;align-items:center;justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditEntriesComponent, selector: "cms-create-or-edit-entries", inputs: ["isEdit", "ParentQueryParams", "entity", "parentEntrySelect"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1193
1242
|
}
|
|
1194
1243
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EditComponent, decorators: [{
|
|
1195
1244
|
type: Component,
|
|
@@ -1198,47 +1247,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1198
1247
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1199
1248
|
useValue: ECmsComponent.Entries_Edit,
|
|
1200
1249
|
},
|
|
1201
|
-
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (
|
|
1250
|
+
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"save(draftType)\">\n <abp-page [title]=\"'AbpUi::Edit' | abpLocalization\" [toolbar]=\"true\">\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n <ng-container *ngIf=\"entrySelect\">\n <cms-create-or-edit-entries [entity]=\"newEntity\" [ParentQueryParams]=\"queryParams\"\n [parentEntrySelect]=\"entrySelect\" [isEdit]=\"true\"></cms-create-or-edit-entries>\n </ng-container>\n </abp-page>\n</form>", styles: ["::ng-deep .edit-entry-page .dignite_page{height:calc(100vh - 125px);overflow:auto;background:transparent}::ng-deep .edit-entry-page .form-control,::ng-deep .edit-entry-page .form-select{padding:.475rem 1.25rem}::ng-deep .edit-entry-page .cursor-move{cursor:move}::ng-deep .edit-entry-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit}::ng-deep .edit-entry-page .flex-between{display:flex;align-items:center;justify-content:space-between}\n"] }]
|
|
1202
1251
|
}], ctorParameters: () => [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: EntryAdminService }, { type: i1.LocalizationService }], propDecorators: { submitclick: [{
|
|
1203
1252
|
type: ViewChild,
|
|
1204
1253
|
args: ['submitclick', { static: true }]
|
|
1205
1254
|
}] } });
|
|
1206
1255
|
|
|
1207
1256
|
class FieldAdminService {
|
|
1208
|
-
restService;
|
|
1209
|
-
apiName = 'CmsAdmin';
|
|
1210
|
-
create = (input, config) => this.restService.request({
|
|
1211
|
-
method: 'POST',
|
|
1212
|
-
url: '/api/cms-admin/fields',
|
|
1213
|
-
body: input,
|
|
1214
|
-
}, { apiName: this.apiName, ...config });
|
|
1215
|
-
delete = (id, config) => this.restService.request({
|
|
1216
|
-
method: 'DELETE',
|
|
1217
|
-
url: `/api/cms-admin/fields/${id}`,
|
|
1218
|
-
}, { apiName: this.apiName, ...config });
|
|
1219
|
-
get = (id, config) => this.restService.request({
|
|
1220
|
-
method: 'GET',
|
|
1221
|
-
url: `/api/cms-admin/fields/${id}`,
|
|
1222
|
-
}, { apiName: this.apiName, ...config });
|
|
1223
|
-
getList = (input, config) => this.restService.request({
|
|
1224
|
-
method: 'GET',
|
|
1225
|
-
url: '/api/cms-admin/fields',
|
|
1226
|
-
params: { filter: input.filter, groupId: input.groupId, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
1227
|
-
}, { apiName: this.apiName, ...config });
|
|
1228
|
-
nameExists = (name, config) => this.restService.request({
|
|
1229
|
-
method: 'GET',
|
|
1230
|
-
url: `/api/cms-admin/fields/name-exists/${name}`,
|
|
1231
|
-
}, { apiName: this.apiName, ...config });
|
|
1232
|
-
update = (id, input, config) => this.restService.request({
|
|
1233
|
-
method: 'PUT',
|
|
1234
|
-
url: `/api/cms-admin/fields/${id}`,
|
|
1235
|
-
body: input,
|
|
1236
|
-
}, { apiName: this.apiName, ...config });
|
|
1237
1257
|
constructor(restService) {
|
|
1238
1258
|
this.restService = restService;
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1259
|
+
this.apiName = 'CmsAdmin';
|
|
1260
|
+
this.create = (input, config) => this.restService.request({
|
|
1261
|
+
method: 'POST',
|
|
1262
|
+
url: '/api/cms-admin/fields',
|
|
1263
|
+
body: input,
|
|
1264
|
+
}, { apiName: this.apiName, ...config });
|
|
1265
|
+
this.delete = (id, config) => this.restService.request({
|
|
1266
|
+
method: 'DELETE',
|
|
1267
|
+
url: `/api/cms-admin/fields/${id}`,
|
|
1268
|
+
}, { apiName: this.apiName, ...config });
|
|
1269
|
+
this.get = (id, config) => this.restService.request({
|
|
1270
|
+
method: 'GET',
|
|
1271
|
+
url: `/api/cms-admin/fields/${id}`,
|
|
1272
|
+
}, { apiName: this.apiName, ...config });
|
|
1273
|
+
this.getList = (input, config) => this.restService.request({
|
|
1274
|
+
method: 'GET',
|
|
1275
|
+
url: '/api/cms-admin/fields',
|
|
1276
|
+
params: { filter: input.filter, groupId: input.groupId, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
1277
|
+
}, { apiName: this.apiName, ...config });
|
|
1278
|
+
this.nameExists = (name, config) => this.restService.request({
|
|
1279
|
+
method: 'GET',
|
|
1280
|
+
url: `/api/cms-admin/fields/name-exists/${name}`,
|
|
1281
|
+
}, { apiName: this.apiName, ...config });
|
|
1282
|
+
this.update = (id, input, config) => this.restService.request({
|
|
1283
|
+
method: 'PUT',
|
|
1284
|
+
url: `/api/cms-admin/fields/${id}`,
|
|
1285
|
+
body: input,
|
|
1286
|
+
}, { apiName: this.apiName, ...config });
|
|
1287
|
+
}
|
|
1288
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1289
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldAdminService, providedIn: 'root' }); }
|
|
1242
1290
|
}
|
|
1243
1291
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldAdminService, decorators: [{
|
|
1244
1292
|
type: Injectable,
|
|
@@ -1248,12 +1296,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1248
1296
|
}], ctorParameters: () => [{ type: i1.RestService }] });
|
|
1249
1297
|
|
|
1250
1298
|
class FieldGroupComponent {
|
|
1251
|
-
fb;
|
|
1252
|
-
_FieldGroupAdminService;
|
|
1253
|
-
toaster;
|
|
1254
|
-
confirmation;
|
|
1255
|
-
_FieldAbstractsService;
|
|
1256
|
-
_LocalizationService;
|
|
1257
1299
|
constructor(fb, _FieldGroupAdminService, toaster, confirmation, _FieldAbstractsService, _LocalizationService) {
|
|
1258
1300
|
this.fb = fb;
|
|
1259
1301
|
this._FieldGroupAdminService = _FieldGroupAdminService;
|
|
@@ -1261,29 +1303,33 @@ class FieldGroupComponent {
|
|
|
1261
1303
|
this.confirmation = confirmation;
|
|
1262
1304
|
this._FieldAbstractsService = _FieldAbstractsService;
|
|
1263
1305
|
this._LocalizationService = _LocalizationService;
|
|
1306
|
+
/**表单已存在的值 */
|
|
1307
|
+
this.selected = {};
|
|
1308
|
+
/**选择的字段分组id */
|
|
1309
|
+
this.fieldGroupId = '';
|
|
1310
|
+
/**创建分组模态框状态 */
|
|
1311
|
+
this.createGroupOpen = false;
|
|
1312
|
+
/**用于确定模态的繁忙状态是否为真 */
|
|
1313
|
+
this.modalBusy = false;
|
|
1314
|
+
/**编辑分组模态框状态 */
|
|
1315
|
+
this.editGroupOpen = false;
|
|
1316
|
+
/**点击分组回调 */
|
|
1317
|
+
this.OnGroupClickBack = new EventEmitter();
|
|
1318
|
+
this._ValidatorsService = inject(ValidatorsService);
|
|
1319
|
+
/**表单验证状态
|
|
1320
|
+
* {
|
|
1321
|
+
* title:true,
|
|
1322
|
+
* }
|
|
1323
|
+
*/
|
|
1324
|
+
this.formValidation = '';
|
|
1264
1325
|
}
|
|
1265
|
-
/**创建分组表单 */
|
|
1266
|
-
createForm;
|
|
1267
|
-
/** 编辑分组表单*/
|
|
1268
|
-
editGroupForm;
|
|
1269
|
-
/**表单已存在的值 */
|
|
1270
|
-
selected = {};
|
|
1271
|
-
/**选择的字段分组id */
|
|
1272
|
-
fieldGroupId = '';
|
|
1273
|
-
/**创建分组模态框状态 */
|
|
1274
|
-
createGroupOpen = false;
|
|
1275
|
-
/**用于确定模态的繁忙状态是否为真 */
|
|
1276
|
-
modalBusy = false;
|
|
1277
|
-
/**编辑分组模态框状态 */
|
|
1278
|
-
editGroupOpen = false;
|
|
1279
|
-
/**点击分组回调 */
|
|
1280
|
-
OnGroupClickBack = new EventEmitter();
|
|
1281
1326
|
ngOnInit() {
|
|
1282
1327
|
this._FieldAbstractsService.getfieldGroupList();
|
|
1283
1328
|
}
|
|
1284
1329
|
/**创建字段分组 */
|
|
1285
1330
|
createGroupBtn() {
|
|
1286
1331
|
this.createGroupOpen = true;
|
|
1332
|
+
this.formValidation = '';
|
|
1287
1333
|
this.createForm = this.fb.group({
|
|
1288
1334
|
name: ['', [Validators.required]],
|
|
1289
1335
|
});
|
|
@@ -1297,6 +1343,7 @@ class FieldGroupComponent {
|
|
|
1297
1343
|
/**编辑字段分组 */
|
|
1298
1344
|
editGroupBtn(itemName) {
|
|
1299
1345
|
this.editGroupOpen = true;
|
|
1346
|
+
this.formValidation = '';
|
|
1300
1347
|
this.editGroupForm = this.fb.group({
|
|
1301
1348
|
name: [itemName, [Validators.required]],
|
|
1302
1349
|
});
|
|
@@ -1311,9 +1358,13 @@ class FieldGroupComponent {
|
|
|
1311
1358
|
createSave() {
|
|
1312
1359
|
let input = this.createForm.value;
|
|
1313
1360
|
this.modalBusy = true;
|
|
1361
|
+
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.createForm);
|
|
1362
|
+
if (this._ValidatorsService.isCheckForm(this.formValidation))
|
|
1363
|
+
return;
|
|
1314
1364
|
this._FieldGroupAdminService.create(input).pipe(finalize$1(() => {
|
|
1315
1365
|
this.modalBusy = false;
|
|
1316
1366
|
this.createGroupOpen = false;
|
|
1367
|
+
this.formValidation = '';
|
|
1317
1368
|
})).subscribe(res => {
|
|
1318
1369
|
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
1319
1370
|
this._FieldAbstractsService.getfieldGroupList();
|
|
@@ -1323,9 +1374,13 @@ class FieldGroupComponent {
|
|
|
1323
1374
|
editSave() {
|
|
1324
1375
|
let input = this.editGroupForm.value;
|
|
1325
1376
|
this.modalBusy = true;
|
|
1377
|
+
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.createForm);
|
|
1378
|
+
if (this._ValidatorsService.isCheckForm(this.formValidation))
|
|
1379
|
+
return;
|
|
1326
1380
|
this._FieldGroupAdminService.update(this.fieldGroupId, input).pipe(finalize$1(() => {
|
|
1327
1381
|
this.modalBusy = false;
|
|
1328
1382
|
this.editGroupOpen = false;
|
|
1383
|
+
this.formValidation = '';
|
|
1329
1384
|
})).subscribe(res => {
|
|
1330
1385
|
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
1331
1386
|
this._FieldAbstractsService.getfieldGroupList();
|
|
@@ -1349,23 +1404,17 @@ class FieldGroupComponent {
|
|
|
1349
1404
|
this.fieldGroupId = event;
|
|
1350
1405
|
this.OnGroupClickBack.emit(event);
|
|
1351
1406
|
}
|
|
1352
|
-
static
|
|
1353
|
-
static
|
|
1407
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldGroupComponent, deps: [{ token: i1$1.FormBuilder }, { token: FieldGroupAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: FieldAbstractsService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1408
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FieldGroupComponent, selector: "cms-field-group", outputs: { OnGroupClickBack: "OnGroupClickBack" }, ngImport: i0, template: "<div class=\"card-header px-2 py-sm-2 d-flex justify-content-between align-items-center\">\n <h6 class=\"h6 mb-0\">{{'Cms::FieldGroup' | abpLocalization}}</h6>\n <button type=\"button\" class=\"btn btn-link btn-sm ms-2\"><i class=\"fas fa-plus-circle\" aria-hidden=\"true\"\n (click)=\"createGroupBtn()\"></i></button>\n</div>\n<div class=\"card-body p-0\">\n <div class=\"container-height overflow-auto\">\n <ul class=\"list-group list-group-flush\">\n <li class=\"list-group-item list-group-item-action active\" [class.active]=\"fieldGroupId===''\"\n (click)=\"fieldGroupChange('')\">{{'Cms::AllFields' | abpLocalization}}</li>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <li class=\"list-group-item list-group-item-action d-flex justify-content-between align-items-center\"\n [class.active]=\"fieldGroupId===item.id\" (click)=\"fieldGroupChange(item.id)\">\n <div>{{item.name}}</div>\n <div *ngIf=\"fieldGroupId===item.id\">\n <i class=\"fas fa-trash px-1\" role=\"button\" (click.stop)=\"deleteGroupbtn(item)\"></i>\n <i class=\"fas fa-edit px-1\" role=\"button\" (click.stop)=\"editGroupBtn(item.name)\"></i>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>\n\n<abp-modal [(visible)]=\"createGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"createGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'Cms::New' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"createForm; else loaderRef\" [formGroup]=\"createForm\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"createSave()\">\n <div class=\"mb-3\">\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\n placeholder=\"\">\n </div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"createForm?.invalid\" (click)=\"createSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n<abp-modal [(visible)]=\"editGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"editGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"editGroupForm; else loaderRef\" [formGroup]=\"editGroupForm\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"editSave()\">\n <div class=\"mb-3\">\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\n placeholder=\"\">\n </div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"editGroupForm?.invalid\" (click)=\"editSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1354
1409
|
}
|
|
1355
1410
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldGroupComponent, decorators: [{
|
|
1356
1411
|
type: Component,
|
|
1357
|
-
args: [{ selector: 'cms-field-group', template: "<div class=\"card-header px-2 py-sm-2 d-flex justify-content-between align-items-center\">\n <h6 class=\"h6 mb-0\">{{'Cms::FieldGroup' | abpLocalization}}</h6>\n <button type=\"button\" class=\"btn btn-link btn-sm ms-2\"><i class=\"fas fa-plus-circle\" aria-hidden=\"true\"\n (click)=\"createGroupBtn()\"></i></button>\n</div>\n<div class=\"card-body p-0\">\n <div class=\"container-height overflow-auto\">\n <ul class=\"list-group list-group-flush\">\n <li class=\"list-group-item list-group-item-action active\" [class.active]=\"fieldGroupId===''\"\n (click)=\"fieldGroupChange('')\">{{'Cms::AllFields' | abpLocalization}}</li>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <li class=\"list-group-item list-group-item-action d-flex justify-content-between align-items-center\"\n [class.active]=\"fieldGroupId===item.id\" (click)=\"fieldGroupChange(item.id)\">\n <div>{{item.name}}</div>\n <div *ngIf=\"fieldGroupId===item.id\">\n <i class=\"fas fa-trash px-1\" role=\"button\" (click.stop)=\"deleteGroupbtn(item)\"></i>\n <i class=\"fas fa-edit px-1\" role=\"button\" (click.stop)=\"editGroupBtn(item.name)\"></i>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>\n\n<abp-modal [(visible)]=\"createGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"createGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'Cms::New' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"createForm; else loaderRef\" [formGroup]=\"createForm\" (
|
|
1412
|
+
args: [{ selector: 'cms-field-group', template: "<div class=\"card-header px-2 py-sm-2 d-flex justify-content-between align-items-center\">\n <h6 class=\"h6 mb-0\">{{'Cms::FieldGroup' | abpLocalization}}</h6>\n <button type=\"button\" class=\"btn btn-link btn-sm ms-2\"><i class=\"fas fa-plus-circle\" aria-hidden=\"true\"\n (click)=\"createGroupBtn()\"></i></button>\n</div>\n<div class=\"card-body p-0\">\n <div class=\"container-height overflow-auto\">\n <ul class=\"list-group list-group-flush\">\n <li class=\"list-group-item list-group-item-action active\" [class.active]=\"fieldGroupId===''\"\n (click)=\"fieldGroupChange('')\">{{'Cms::AllFields' | abpLocalization}}</li>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <li class=\"list-group-item list-group-item-action d-flex justify-content-between align-items-center\"\n [class.active]=\"fieldGroupId===item.id\" (click)=\"fieldGroupChange(item.id)\">\n <div>{{item.name}}</div>\n <div *ngIf=\"fieldGroupId===item.id\">\n <i class=\"fas fa-trash px-1\" role=\"button\" (click.stop)=\"deleteGroupbtn(item)\"></i>\n <i class=\"fas fa-edit px-1\" role=\"button\" (click.stop)=\"editGroupBtn(item.name)\"></i>\n </div>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>\n\n<abp-modal [(visible)]=\"createGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"createGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'Cms::New' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"createForm; else loaderRef\" [formGroup]=\"createForm\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"createSave()\">\n <div class=\"mb-3\">\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\n placeholder=\"\">\n </div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"createForm?.invalid\" (click)=\"createSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n<abp-modal [(visible)]=\"editGroupOpen\" [busy]=\"modalBusy\" (visibleChange)=\"editGroupVisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <form *ngIf=\"editGroupForm; else loaderRef\" [formGroup]=\"editGroupForm\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"editSave()\">\n <div class=\"mb-3\">\n <label for=\"exampleFormControlInput1\" class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" id=\"exampleFormControlInput1\" formControlName=\"name\"\n placeholder=\"\">\n </div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"editGroupForm?.invalid\" (click)=\"editSave()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>" }]
|
|
1358
1413
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: FieldGroupAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: FieldAbstractsService }, { type: i1.LocalizationService }], propDecorators: { OnGroupClickBack: [{
|
|
1359
1414
|
type: Output
|
|
1360
1415
|
}] } });
|
|
1361
1416
|
|
|
1362
1417
|
class FieldsComponent {
|
|
1363
|
-
list;
|
|
1364
|
-
_FieldAdminService;
|
|
1365
|
-
toaster;
|
|
1366
|
-
confirmation;
|
|
1367
|
-
_LocalizationService;
|
|
1368
|
-
router;
|
|
1369
1418
|
constructor(list, _FieldAdminService, toaster, confirmation, _LocalizationService, router) {
|
|
1370
1419
|
this.list = list;
|
|
1371
1420
|
this._FieldAdminService = _FieldAdminService;
|
|
@@ -1373,17 +1422,17 @@ class FieldsComponent {
|
|
|
1373
1422
|
this.confirmation = confirmation;
|
|
1374
1423
|
this._LocalizationService = _LocalizationService;
|
|
1375
1424
|
this.router = router;
|
|
1425
|
+
this._UpdateListService = inject(UpdateListService);
|
|
1426
|
+
/**表格单元格布局类型 */
|
|
1427
|
+
this.ColumnMode = ColumnMode;
|
|
1428
|
+
/**表格数据 */
|
|
1429
|
+
this.data = {
|
|
1430
|
+
items: [],
|
|
1431
|
+
totalCount: 0,
|
|
1432
|
+
};
|
|
1433
|
+
/**过滤器 */
|
|
1434
|
+
this.filters = {};
|
|
1376
1435
|
}
|
|
1377
|
-
_UpdateListService = inject(UpdateListService);
|
|
1378
|
-
/**表格单元格布局类型 */
|
|
1379
|
-
ColumnMode = ColumnMode;
|
|
1380
|
-
/**表格数据 */
|
|
1381
|
-
data = {
|
|
1382
|
-
items: [],
|
|
1383
|
-
totalCount: 0,
|
|
1384
|
-
};
|
|
1385
|
-
/**过滤器 */
|
|
1386
|
-
filters = {};
|
|
1387
1436
|
ngOnInit() {
|
|
1388
1437
|
this.hookToQuery();
|
|
1389
1438
|
this._UpdateListService.updateListEvent.subscribe(() => {
|
|
@@ -1426,8 +1475,8 @@ class FieldsComponent {
|
|
|
1426
1475
|
}
|
|
1427
1476
|
});
|
|
1428
1477
|
}
|
|
1429
|
-
static
|
|
1430
|
-
static
|
|
1478
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldsComponent, deps: [{ token: i1.ListService }, { token: FieldAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1.LocalizationService }, { token: i3$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1479
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: FieldsComponent, selector: "cms-fields", providers: [
|
|
1431
1480
|
// [Required]
|
|
1432
1481
|
ListService,
|
|
1433
1482
|
// [Optional]
|
|
@@ -1438,7 +1487,7 @@ class FieldsComponent {
|
|
|
1438
1487
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1439
1488
|
useValue: ECmsComponent.Fields,
|
|
1440
1489
|
},
|
|
1441
|
-
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Fields' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"fields-page\">\n <div class=\"row \">\n <div class=\"col-3\">\n <div class=\"card mb-0\" style=\"height: 100%;\">\n <cms-field-group (OnGroupClickBack)=\"fieldGroupChange($event)\"></cms-field-group>\n </div>\n </div>\n <div class=\"col-9\">\n <div class=\"card mb-0\">\n <div class=\"card-header px-2 py-sm-2 border-bottom\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\"\n (click)=\"list.get()\"><i class=\"fa fa-search\"></i></button>\n </div>\n </div>\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [virtualization]=\"false\" [externalPaging]=\"true\"\n [count]=\"data.totalCount\" [scrollbarH]=\"true\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::FormControlName' | abpLocalization\"\n prop=\"formControlName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Group' | abpLocalization\" prop=\"groupId\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{row.groupName}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\" [width]=\"190\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value|date:'YYYY/MM/dd HH:mm:ss' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\"\n [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\"\n ngbDropdownToggle> <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}</button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem\n routerLink=\"/cms/admin/fields/{{row.id}}/edit\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"deletefield(row)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</abp-page>", styles: ["::ng-deep .fields-page .dignite_page{background:transparent}::ng-deep .fields-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .fields-page .container-height{height:calc(100vh - 200px)}\n"], dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i8.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: i8.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: i8.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i10.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: FieldGroupComponent, selector: "cms-field-group", outputs: ["OnGroupClickBack"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
|
|
1490
|
+
], ngImport: i0, template: "<abp-page [title]=\"'Cms::Fields' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"fields-page\">\n <div class=\"row \">\n <div class=\"col-3\">\n <div class=\"card mb-0\" style=\"height: 100%;\">\n <cms-field-group (OnGroupClickBack)=\"fieldGroupChange($event)\"></cms-field-group>\n </div>\n </div>\n <div class=\"col-9\">\n <div class=\"card mb-0\">\n <div class=\"card-header px-2 py-sm-2 border-bottom\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\"\n (click)=\"list.get()\"><i class=\"fa fa-search\"></i></button>\n </div>\n </div>\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [virtualization]=\"false\" [externalPaging]=\"true\"\n [count]=\"data.totalCount\" [scrollbarH]=\"true\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::FormControlName' | abpLocalization\"\n prop=\"formControlName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Group' | abpLocalization\" prop=\"groupId\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{row.groupName}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\" [width]=\"190\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value|date:'YYYY/MM/dd HH:mm:ss' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\"\n [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\"\n ngbDropdownToggle> <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}</button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem\n routerLink=\"/cms/admin/fields/{{row.id}}/edit\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"deletefield(row)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</abp-page>", styles: ["::ng-deep .fields-page .dignite_page{background:transparent}::ng-deep .fields-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .fields-page .container-height{height:calc(100vh - 200px)}\n"], dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i8.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: i8.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: i8.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i10.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: FieldGroupComponent, selector: "cms-field-group", outputs: ["OnGroupClickBack"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1442
1491
|
}
|
|
1443
1492
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: FieldsComponent, decorators: [{
|
|
1444
1493
|
type: Component,
|
|
@@ -1457,19 +1506,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1457
1506
|
}], ctorParameters: () => [{ type: i1.ListService }, { type: FieldAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.LocalizationService }, { type: i3$1.Router }] });
|
|
1458
1507
|
|
|
1459
1508
|
class CreateOrUpdateFieldInputBase {
|
|
1460
|
-
/**分组id */
|
|
1461
|
-
groupId = ['', []];
|
|
1462
|
-
/**字段名称 Display name of this field */
|
|
1463
|
-
displayName = ['', [Validators.required]];
|
|
1464
|
-
/**字段唯一名称 Unique Name*/
|
|
1465
|
-
name = ['', [Validators.required]];
|
|
1466
|
-
/**描述 说明 */
|
|
1467
|
-
description = ['', []];
|
|
1468
|
-
/**FieldType字段类型 表单控件名称 */
|
|
1469
|
-
formControlName = [undefined, [Validators.required]];
|
|
1470
|
-
/**动态表单配置 */
|
|
1471
|
-
formConfiguration = new FormGroup({});
|
|
1472
1509
|
constructor(data) {
|
|
1510
|
+
/**分组id */
|
|
1511
|
+
this.groupId = ['', []];
|
|
1512
|
+
/**字段名称 Display name of this field */
|
|
1513
|
+
this.displayName = ['', [Validators.required]];
|
|
1514
|
+
/**字段唯一名称 Unique Name*/
|
|
1515
|
+
this.name = ['', [Validators.required]];
|
|
1516
|
+
/**描述 说明 */
|
|
1517
|
+
this.description = ['', []];
|
|
1518
|
+
/**FieldType字段类型 表单控件名称 */
|
|
1519
|
+
this.formControlName = [undefined, [Validators.required]];
|
|
1520
|
+
/**动态表单配置 */
|
|
1521
|
+
this.formConfiguration = new FormGroup({});
|
|
1473
1522
|
if (data) {
|
|
1474
1523
|
for (const key in data) {
|
|
1475
1524
|
if (data.hasOwnProperty(key)) {
|
|
@@ -1481,12 +1530,6 @@ class CreateOrUpdateFieldInputBase {
|
|
|
1481
1530
|
}
|
|
1482
1531
|
|
|
1483
1532
|
class CreateOrEditFieldComponent {
|
|
1484
|
-
_FieldAbstractsService;
|
|
1485
|
-
_CmsApiService;
|
|
1486
|
-
_FieldAdminService;
|
|
1487
|
-
_LocalizationService;
|
|
1488
|
-
/**表单控件模板-动态表单配置组件 */
|
|
1489
|
-
FormDynamicRef;
|
|
1490
1533
|
constructor(_FieldAbstractsService, _CmsApiService, _FieldAdminService, _LocalizationService) {
|
|
1491
1534
|
this._FieldAbstractsService = _FieldAbstractsService;
|
|
1492
1535
|
this._CmsApiService = _CmsApiService;
|
|
@@ -1496,8 +1539,6 @@ class CreateOrEditFieldComponent {
|
|
|
1496
1539
|
this._FieldAbstractsService.getfieldGroupList();
|
|
1497
1540
|
}
|
|
1498
1541
|
}
|
|
1499
|
-
/**表单实体 */
|
|
1500
|
-
_Entity;
|
|
1501
1542
|
set Entity(v) {
|
|
1502
1543
|
if (v) {
|
|
1503
1544
|
this._Entity = v;
|
|
@@ -1507,9 +1548,6 @@ class CreateOrEditFieldComponent {
|
|
|
1507
1548
|
get formControlName() {
|
|
1508
1549
|
return this._Entity.get('formControlName');
|
|
1509
1550
|
}
|
|
1510
|
-
/**选择的表单信息 */
|
|
1511
|
-
_selected_copy;
|
|
1512
|
-
_selected;
|
|
1513
1551
|
set selected(v) {
|
|
1514
1552
|
if (v) {
|
|
1515
1553
|
this._selected = v || '';
|
|
@@ -1532,6 +1570,7 @@ class CreateOrEditFieldComponent {
|
|
|
1532
1570
|
asyncValidators: [this.repetitionAsyncValidator()],
|
|
1533
1571
|
updateOn: 'change'
|
|
1534
1572
|
}));
|
|
1573
|
+
this.submitclick?.nativeElement?.click();
|
|
1535
1574
|
}
|
|
1536
1575
|
}
|
|
1537
1576
|
/**name表单控件 */
|
|
@@ -1573,15 +1612,18 @@ class CreateOrEditFieldComponent {
|
|
|
1573
1612
|
formControlNameChange(event) {
|
|
1574
1613
|
// this._selected='';
|
|
1575
1614
|
}
|
|
1576
|
-
static
|
|
1577
|
-
static
|
|
1615
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditFieldComponent, deps: [{ token: FieldAbstractsService }, { token: CmsApiService }, { token: FieldAdminService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1616
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditFieldComponent, selector: "cms-create-or-edit-field", inputs: { Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "FormDynamicRef", first: true, predicate: ["FormDynamicRef"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n \n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"groupId\">{{'Cms::FieldGroup' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"groupId\">\n <option value=\"\">{{'Cms::OptionalGrouping' | abpLocalization}}</option>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <option [value]=\"item.id\">{{item.name}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"displayName\">{{'DigniteAbpForms::FieldDisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" required (blur)=\"disPlayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"name\">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" (input)=\"nameInputBlur($event)\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">{{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"formControlName\">{{'Cms::FieldType' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\" (change)=\"formControlNameChange($event)\">\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fromControlList;let i =index\">\n <option [value]=\"item.name\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"_Entity.value.formControlName&&_Entity\"> \n <df-dynamic [type]=\"_Entity.value.formControlName\" [entity]=\"_Entity\" [selected]=\"_selected\"></df-dynamic>\n </ng-container>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i8$2.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1578
1617
|
}
|
|
1579
1618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditFieldComponent, decorators: [{
|
|
1580
1619
|
type: Component,
|
|
1581
|
-
args: [{ selector: 'cms-create-or-edit-field', template: "<form [formGroup]=\"_Entity\">\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"groupId\">{{'Cms::FieldGroup' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"groupId\">\n <option value=\"\">{{'Cms::OptionalGrouping' | abpLocalization}}</option>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <option [value]=\"item.id\">{{item.name}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"displayName\">{{'DigniteAbpForms::FieldDisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" (blur)=\"disPlayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"name\">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" (input)=\"nameInputBlur($event)\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">{{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"formControlName\">{{'Cms::FieldType' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\" (change)=\"formControlNameChange($event)\">\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fromControlList;let i =index\">\n <option [value]=\"item.name\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"_Entity.value.formControlName&&_Entity\"> \n <df-dynamic [type]=\"_Entity.value.formControlName\" [entity]=\"_Entity\" [selected]=\"_selected\"></df-dynamic>\n </ng-container>\n\n</form>" }]
|
|
1620
|
+
args: [{ selector: 'cms-create-or-edit-field', template: "<form [formGroup]=\"_Entity\">\n \n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"groupId\">{{'Cms::FieldGroup' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"groupId\">\n <option value=\"\">{{'Cms::OptionalGrouping' | abpLocalization}}</option>\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fieldGroupList\">\n <option [value]=\"item.id\">{{item.name}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"displayName\">{{'DigniteAbpForms::FieldDisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" required (blur)=\"disPlayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"name\">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" (input)=\"nameInputBlur($event)\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">{{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"formControlName\">{{'Cms::FieldType' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\" (change)=\"formControlNameChange($event)\">\n <ng-container *ngFor=\"let item of _FieldAbstractsService.fromControlList;let i =index\">\n <option [value]=\"item.name\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"_Entity.value.formControlName&&_Entity\"> \n <df-dynamic [type]=\"_Entity.value.formControlName\" [entity]=\"_Entity\" [selected]=\"_selected\"></df-dynamic>\n </ng-container>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
|
|
1582
1621
|
}], ctorParameters: () => [{ type: FieldAbstractsService }, { type: CmsApiService }, { type: FieldAdminService }, { type: i1.LocalizationService }], propDecorators: { FormDynamicRef: [{
|
|
1583
1622
|
type: ViewChild,
|
|
1584
1623
|
args: ['FormDynamicRef', { read: ViewContainerRef, static: true }]
|
|
1624
|
+
}], submitclick: [{
|
|
1625
|
+
type: ViewChild,
|
|
1626
|
+
args: ['submitclick', { static: true }]
|
|
1585
1627
|
}], Entity: [{
|
|
1586
1628
|
type: Input
|
|
1587
1629
|
}], selected: [{
|
|
@@ -1589,12 +1631,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1589
1631
|
}] } });
|
|
1590
1632
|
|
|
1591
1633
|
class CreateFieldComponent {
|
|
1592
|
-
fb;
|
|
1593
|
-
_FieldAdminService;
|
|
1594
|
-
toaster;
|
|
1595
|
-
_location;
|
|
1596
|
-
_LocalizationService;
|
|
1597
|
-
_CmsApiService;
|
|
1598
1634
|
constructor(fb, _FieldAdminService, toaster, _location, _LocalizationService, _CmsApiService) {
|
|
1599
1635
|
this.fb = fb;
|
|
1600
1636
|
this._FieldAdminService = _FieldAdminService;
|
|
@@ -1602,12 +1638,16 @@ class CreateFieldComponent {
|
|
|
1602
1638
|
this._location = _location;
|
|
1603
1639
|
this._LocalizationService = _LocalizationService;
|
|
1604
1640
|
this._CmsApiService = _CmsApiService;
|
|
1641
|
+
this._UpdateListService = inject(UpdateListService);
|
|
1642
|
+
this.isSubmit = false;
|
|
1643
|
+
this._ValidatorsService = inject(ValidatorsService);
|
|
1644
|
+
/**表单验证状态
|
|
1645
|
+
* {
|
|
1646
|
+
* title:true,
|
|
1647
|
+
* }
|
|
1648
|
+
*/
|
|
1649
|
+
this.formValidation = '';
|
|
1605
1650
|
}
|
|
1606
|
-
_UpdateListService = inject(UpdateListService);
|
|
1607
|
-
/**表单实体 */
|
|
1608
|
-
newEntity;
|
|
1609
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
1610
|
-
submitclick;
|
|
1611
1651
|
ngOnInit() {
|
|
1612
1652
|
//Called after the constructor, initializing input properties, and the first call to ngOnChanges.
|
|
1613
1653
|
//Add 'implements OnInit' to the class.
|
|
@@ -1618,11 +1658,12 @@ class CreateFieldComponent {
|
|
|
1618
1658
|
this.isSubmit = true;
|
|
1619
1659
|
this.submitclick.nativeElement.click();
|
|
1620
1660
|
}
|
|
1621
|
-
isSubmit = false;
|
|
1622
1661
|
/**保存表单 */
|
|
1623
1662
|
save() {
|
|
1624
1663
|
let input = this.newEntity.value;
|
|
1625
|
-
if (!this.isSubmit)
|
|
1664
|
+
// if (!this.isSubmit) return;
|
|
1665
|
+
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.newEntity);
|
|
1666
|
+
if (this._ValidatorsService.isCheckForm(this.formValidation))
|
|
1626
1667
|
return;
|
|
1627
1668
|
if (!this.newEntity.valid)
|
|
1628
1669
|
return;
|
|
@@ -1632,13 +1673,13 @@ class CreateFieldComponent {
|
|
|
1632
1673
|
this._UpdateListService.updateList();
|
|
1633
1674
|
});
|
|
1634
1675
|
}
|
|
1635
|
-
static
|
|
1636
|
-
static
|
|
1676
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateFieldComponent, deps: [{ token: i1$1.FormBuilder }, { token: FieldAdminService }, { token: i3.ToasterService }, { token: i2.Location }, { token: i1.LocalizationService }, { token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1677
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateFieldComponent, selector: "cms-create-field", providers: [
|
|
1637
1678
|
{
|
|
1638
1679
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1639
1680
|
useValue: ECmsComponent.FieldsCreate,
|
|
1640
1681
|
},
|
|
1641
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form
|
|
1682
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"newEntity\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"save()\">\n <abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button form-type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card\">\n <div class=\"card-body\">\n <cms-create-or-edit-field [Entity]=\"newEntity\"></cms-create-or-edit-field>\n </div>\n </div>\n </div>\n </abp-page>\n</form>", styles: ["::ng-deep .create-field-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-field-page .form-control,::ng-deep .create-field-page .form-select{padding:.475rem 1.25rem}\n"], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditFieldComponent, selector: "cms-create-or-edit-field", inputs: ["Entity", "selected"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1642
1683
|
}
|
|
1643
1684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateFieldComponent, decorators: [{
|
|
1644
1685
|
type: Component,
|
|
@@ -1647,21 +1688,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1647
1688
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1648
1689
|
useValue: ECmsComponent.FieldsCreate,
|
|
1649
1690
|
},
|
|
1650
|
-
], template: "<form
|
|
1691
|
+
], template: "<form [formGroup]=\"newEntity\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"save()\">\n <abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button form-type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card\">\n <div class=\"card-body\">\n <cms-create-or-edit-field [Entity]=\"newEntity\"></cms-create-or-edit-field>\n </div>\n </div>\n </div>\n </abp-page>\n</form>", styles: ["::ng-deep .create-field-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-field-page .form-control,::ng-deep .create-field-page .form-select{padding:.475rem 1.25rem}\n"] }]
|
|
1651
1692
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: FieldAdminService }, { type: i3.ToasterService }, { type: i2.Location }, { type: i1.LocalizationService }, { type: CmsApiService }], propDecorators: { submitclick: [{
|
|
1652
1693
|
type: ViewChild,
|
|
1653
1694
|
args: ['submitclick', { static: true }]
|
|
1654
1695
|
}] } });
|
|
1655
1696
|
|
|
1656
1697
|
class EditFieldComponent {
|
|
1657
|
-
fb;
|
|
1658
|
-
_FieldAbstractsService;
|
|
1659
|
-
_FieldAdminService;
|
|
1660
|
-
route;
|
|
1661
|
-
toaster;
|
|
1662
|
-
_location;
|
|
1663
|
-
_LocalizationService;
|
|
1664
|
-
_CmsApiService;
|
|
1665
1698
|
constructor(fb, _FieldAbstractsService, _FieldAdminService, route, toaster, _location, _LocalizationService, _CmsApiService) {
|
|
1666
1699
|
this.fb = fb;
|
|
1667
1700
|
this._FieldAbstractsService = _FieldAbstractsService;
|
|
@@ -1671,15 +1704,18 @@ class EditFieldComponent {
|
|
|
1671
1704
|
this._location = _location;
|
|
1672
1705
|
this._LocalizationService = _LocalizationService;
|
|
1673
1706
|
this._CmsApiService = _CmsApiService;
|
|
1707
|
+
/**字段id */
|
|
1708
|
+
this.fieldId = '';
|
|
1709
|
+
this._UpdateListService = inject(UpdateListService);
|
|
1710
|
+
this.isSubmit = false;
|
|
1711
|
+
this._ValidatorsService = inject(ValidatorsService);
|
|
1712
|
+
/**表单验证状态
|
|
1713
|
+
* {
|
|
1714
|
+
* title:true,
|
|
1715
|
+
* }
|
|
1716
|
+
*/
|
|
1717
|
+
this.formValidation = '';
|
|
1674
1718
|
}
|
|
1675
|
-
/**表单实体 */
|
|
1676
|
-
newEntity;
|
|
1677
|
-
/**字段id */
|
|
1678
|
-
fieldId = '';
|
|
1679
|
-
/**字段详情 */
|
|
1680
|
-
fieldDetails;
|
|
1681
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
1682
|
-
submitclick;
|
|
1683
1719
|
async ngOnInit() {
|
|
1684
1720
|
const _fieldId = this.route.snapshot.params.id;
|
|
1685
1721
|
if (_fieldId) {
|
|
@@ -1707,13 +1743,14 @@ class EditFieldComponent {
|
|
|
1707
1743
|
this.isSubmit = true;
|
|
1708
1744
|
this.submitclick.nativeElement.click();
|
|
1709
1745
|
}
|
|
1710
|
-
_UpdateListService = inject(UpdateListService);
|
|
1711
|
-
isSubmit = false;
|
|
1712
1746
|
/**保存表单 */
|
|
1713
1747
|
save() {
|
|
1714
1748
|
let input = this.newEntity.value;
|
|
1715
1749
|
if (!this.isSubmit)
|
|
1716
1750
|
return;
|
|
1751
|
+
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.newEntity);
|
|
1752
|
+
if (this._ValidatorsService.isCheckForm(this.formValidation))
|
|
1753
|
+
return;
|
|
1717
1754
|
if (!this.newEntity.valid)
|
|
1718
1755
|
return;
|
|
1719
1756
|
this._FieldAdminService.update(this.fieldId, input).subscribe(res => {
|
|
@@ -1722,13 +1759,13 @@ class EditFieldComponent {
|
|
|
1722
1759
|
this._UpdateListService.updateList();
|
|
1723
1760
|
});
|
|
1724
1761
|
}
|
|
1725
|
-
static
|
|
1726
|
-
static
|
|
1762
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EditFieldComponent, deps: [{ token: i1$1.FormBuilder }, { token: FieldAbstractsService }, { token: FieldAdminService }, { token: i3$1.ActivatedRoute }, { token: i3.ToasterService }, { token: i2.Location }, { token: i1.LocalizationService }, { token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1763
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EditFieldComponent, selector: "cms-edit-field", providers: [
|
|
1727
1764
|
{
|
|
1728
1765
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1729
1766
|
useValue: ECmsComponent.FieldsEdit,
|
|
1730
1767
|
},
|
|
1731
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (
|
|
1768
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (keydown.enter)=\"$event.preventDefault()\" (submit)=\"save()\">\n <abp-page [title]=\"'Cms::EditField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <!-- <div class=\"p-3 bg-white rounded-1\"> -->\n <div class=\"card\">\n <div class=\"card-body\">\n <ng-container *ngIf=\"newEntity&&fieldDetails\">\n <cms-create-or-edit-field [Entity]=\"newEntity\"\n [selected]=\"fieldDetails\"></cms-create-or-edit-field>\n </ng-container>\n </div>\n </div>\n </div>\n </abp-page>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: CreateOrEditFieldComponent, selector: "cms-create-or-edit-field", inputs: ["Entity", "selected"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1732
1769
|
}
|
|
1733
1770
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EditFieldComponent, decorators: [{
|
|
1734
1771
|
type: Component,
|
|
@@ -1737,7 +1774,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1737
1774
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1738
1775
|
useValue: ECmsComponent.FieldsEdit,
|
|
1739
1776
|
},
|
|
1740
|
-
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (
|
|
1777
|
+
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (keydown.enter)=\"$event.preventDefault()\" (submit)=\"save()\">\n <abp-page [title]=\"'Cms::EditField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <!-- <div class=\"p-3 bg-white rounded-1\"> -->\n <div class=\"card\">\n <div class=\"card-body\">\n <ng-container *ngIf=\"newEntity&&fieldDetails\">\n <cms-create-or-edit-field [Entity]=\"newEntity\"\n [selected]=\"fieldDetails\"></cms-create-or-edit-field>\n </ng-container>\n </div>\n </div>\n </div>\n </abp-page>\n</form>" }]
|
|
1741
1778
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: FieldAbstractsService }, { type: FieldAdminService }, { type: i3$1.ActivatedRoute }, { type: i3.ToasterService }, { type: i2.Location }, { type: i1.LocalizationService }, { type: CmsApiService }], propDecorators: { submitclick: [{
|
|
1742
1779
|
type: ViewChild,
|
|
1743
1780
|
args: ['submitclick', { static: true }]
|
|
@@ -1752,21 +1789,21 @@ var SectionType;
|
|
|
1752
1789
|
const sectionTypeOptions = mapEnumToOptions(SectionType);
|
|
1753
1790
|
|
|
1754
1791
|
class CreateOrUpdateSectionsInputBase {
|
|
1755
|
-
/**版块类型 */
|
|
1756
|
-
type = [0, [Validators.required]];
|
|
1757
|
-
/**字段名称 Display name of this field */
|
|
1758
|
-
displayName = ['', [Validators.required]];
|
|
1759
|
-
/**字段唯一名称 Unique Name*/
|
|
1760
|
-
name = ['', [Validators.required]];
|
|
1761
|
-
/**条目路由 */
|
|
1762
|
-
route = ['', [Validators.required]];
|
|
1763
|
-
/**页面模板 */
|
|
1764
|
-
template = ['', [Validators.required]];
|
|
1765
|
-
/**是否默认 */
|
|
1766
|
-
isDefault = [false, []];
|
|
1767
|
-
/**是否激活 */
|
|
1768
|
-
isActive = [true, []];
|
|
1769
1792
|
constructor(data) {
|
|
1793
|
+
/**版块类型 */
|
|
1794
|
+
this.type = [0, [Validators.required]];
|
|
1795
|
+
/**字段名称 Display name of this field */
|
|
1796
|
+
this.displayName = ['', [Validators.required]];
|
|
1797
|
+
/**字段唯一名称 Unique Name*/
|
|
1798
|
+
this.name = ['', [Validators.required]];
|
|
1799
|
+
/**条目路由 */
|
|
1800
|
+
this.route = ['', [Validators.required]];
|
|
1801
|
+
/**页面模板 */
|
|
1802
|
+
this.template = ['', [Validators.required]];
|
|
1803
|
+
/**是否默认 */
|
|
1804
|
+
this.isDefault = [false, []];
|
|
1805
|
+
/**是否激活 */
|
|
1806
|
+
this.isActive = [true, []];
|
|
1770
1807
|
if (data) {
|
|
1771
1808
|
for (const key in data) {
|
|
1772
1809
|
if (data.hasOwnProperty(key)) {
|
|
@@ -1778,14 +1815,6 @@ class CreateOrUpdateSectionsInputBase {
|
|
|
1778
1815
|
}
|
|
1779
1816
|
|
|
1780
1817
|
class SectionsComponent {
|
|
1781
|
-
list;
|
|
1782
|
-
_SectionAdminService;
|
|
1783
|
-
toaster;
|
|
1784
|
-
confirmation;
|
|
1785
|
-
fb;
|
|
1786
|
-
_EntryTypeAdminService;
|
|
1787
|
-
_LocalizationService;
|
|
1788
|
-
_CmsApiService;
|
|
1789
1818
|
constructor(list, _SectionAdminService, toaster, confirmation, fb, _EntryTypeAdminService, _LocalizationService, _CmsApiService) {
|
|
1790
1819
|
this.list = list;
|
|
1791
1820
|
this._SectionAdminService = _SectionAdminService;
|
|
@@ -1795,12 +1824,23 @@ class SectionsComponent {
|
|
|
1795
1824
|
this._EntryTypeAdminService = _EntryTypeAdminService;
|
|
1796
1825
|
this._LocalizationService = _LocalizationService;
|
|
1797
1826
|
this._CmsApiService = _CmsApiService;
|
|
1827
|
+
this._UpdateListService = inject(UpdateListService);
|
|
1828
|
+
this.siteList = [];
|
|
1829
|
+
this.ColumnMode = ColumnMode;
|
|
1830
|
+
this.data = { items: [], totalCount: 0 };
|
|
1831
|
+
this.filters = {};
|
|
1832
|
+
this.visibleOpen = false;
|
|
1833
|
+
this.modalBusy = false;
|
|
1834
|
+
this._SectionType = SectionType;
|
|
1835
|
+
this._sectionTypeOptions = sectionTypeOptions;
|
|
1836
|
+
this._ValidatorsService = inject(ValidatorsService);
|
|
1837
|
+
/**表单验证状态
|
|
1838
|
+
* {
|
|
1839
|
+
* title:true,
|
|
1840
|
+
* }
|
|
1841
|
+
*/
|
|
1842
|
+
this.formValidation = '';
|
|
1798
1843
|
}
|
|
1799
|
-
_UpdateListService = inject(UpdateListService);
|
|
1800
|
-
siteList = [];
|
|
1801
|
-
ColumnMode = ColumnMode;
|
|
1802
|
-
data = { items: [], totalCount: 0 };
|
|
1803
|
-
filters = {};
|
|
1804
1844
|
hookToQuery() {
|
|
1805
1845
|
const getData = (query) => this._SectionAdminService.getList({ ...query, ...this.filters });
|
|
1806
1846
|
const setData = (list) => (this.data = list);
|
|
@@ -1816,13 +1856,6 @@ class SectionsComponent {
|
|
|
1816
1856
|
this.list.page = 0;
|
|
1817
1857
|
this.list.get();
|
|
1818
1858
|
}
|
|
1819
|
-
visibleOpen = false;
|
|
1820
|
-
modalBusy = false;
|
|
1821
|
-
createOrEditForm;
|
|
1822
|
-
selected;
|
|
1823
|
-
_SectionType = SectionType;
|
|
1824
|
-
_sectionTypeOptions = sectionTypeOptions;
|
|
1825
|
-
createOrEditModalSubmitBtn;
|
|
1826
1859
|
VisibleChange(event) {
|
|
1827
1860
|
if (!event) {
|
|
1828
1861
|
this.selected = '';
|
|
@@ -1866,6 +1899,9 @@ class SectionsComponent {
|
|
|
1866
1899
|
}
|
|
1867
1900
|
createSave() {
|
|
1868
1901
|
let input = this.createOrEditForm.value;
|
|
1902
|
+
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.createOrEditForm);
|
|
1903
|
+
if (this._ValidatorsService.isCheckForm(this.formValidation))
|
|
1904
|
+
return;
|
|
1869
1905
|
if (!this.createOrEditForm.valid)
|
|
1870
1906
|
return;
|
|
1871
1907
|
this.modalBusy = true;
|
|
@@ -1884,6 +1920,9 @@ class SectionsComponent {
|
|
|
1884
1920
|
setTimeout(() => {
|
|
1885
1921
|
let input = this.createOrEditForm.value;
|
|
1886
1922
|
input.concurrencyStamp = this.selected.concurrencyStamp;
|
|
1923
|
+
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.createOrEditForm);
|
|
1924
|
+
if (this._ValidatorsService.isCheckForm(this.formValidation))
|
|
1925
|
+
return;
|
|
1887
1926
|
if (!this.createOrEditForm.valid)
|
|
1888
1927
|
return;
|
|
1889
1928
|
this.modalBusy = true;
|
|
@@ -2011,8 +2050,8 @@ class SectionsComponent {
|
|
|
2011
2050
|
});
|
|
2012
2051
|
};
|
|
2013
2052
|
}
|
|
2014
|
-
static
|
|
2015
|
-
static
|
|
2053
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SectionsComponent, deps: [{ token: i1.ListService }, { token: SectionAdminService }, { token: i3.ToasterService }, { token: i3.ConfirmationService }, { token: i1$1.FormBuilder }, { token: EntryTypeAdminService }, { token: i1.LocalizationService }, { token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2054
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: SectionsComponent, selector: "cms-sections", providers: [
|
|
2016
2055
|
// [Required]
|
|
2017
2056
|
ListService,
|
|
2018
2057
|
// [Optional]
|
|
@@ -2023,7 +2062,7 @@ class SectionsComponent {
|
|
|
2023
2062
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2024
2063
|
useValue: ECmsComponent.Sections,
|
|
2025
2064
|
},
|
|
2026
|
-
], viewQueries: [{ propertyName: "createOrEditModalSubmitBtn", first: true, predicate: ["createOrEditModalSubmitBtn"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::Sections' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sections-page\">\n <div class=\"card \" >\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"row align-items-end\">\n <div class=\"mb-2 col-3\">\n <label class=\"form-label\">{{'Cms::IsActive' | abpLocalization}}\uFF1A</label>\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.isActive\" (change)=\"siteIdChange()\">\n <option [value]=\"\"></option>\n <option [value]=\"true\">\u662F</option>\n <option [value]=\"false\">\u5426</option>\n </select>\n </div>\n <div class=\"mb-2 col-3\">\n <label class=\"form-label\">{{'AbpUi::Search' | abpLocalization}}\uFF1A</label>\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n </div>\n <div class=\"mb-2 col-4\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div> \n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"type\" [width]=\"80\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{('Cms::Enum:SectionType:'+_SectionType[value]) | abpLocalization}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsDefault' | abpLocalization\" prop=\"isDefault\" [width]=\"60\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\" [width]=\"60\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"SiteId\" [width]=\"100\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-link\" ngbDropdownToggle id=\"dropdownBasic1\">\n {{'Cms::EntryType' | abpLocalization}}\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <ng-container *ngFor=\"let item of row.entryTypes;let i =index\">\n <li ngbDropdownItem\n class=\"d-flex align-items-center justify-content-between\" [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/'+item.id+'/edit'\"\n >{{item.displayName}}\n <button class=\"btn btn-light btn-sm p-0\"\n (click.stop)=\"deleteEntryType(item)\"><i class=\"fas fa-trash p-sm-1\"\n style=\"font-size: 12px;\" role=\"button\"></i></button>\n </li>\n </ng-container>\n <li ngbDropdownItem [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/create'\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\" [minWidth]=\"190\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'yyyy/MM/dd hh:mm:ss' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\" [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"editSectionBtn(row)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n</abp-page>\n<abp-modal [(visible)]=\"visibleOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"createOrEditForm; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"createOrEditForm\" (ngSubmit)=\"createOrEditSave()\">\n <button type=\"submit\" #createOrEditModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</label>\n <div>\n <ng-container *ngFor=\"let item of _sectionTypeOptions;let i =index\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"item.value\"\n (change)=\"radiochange()\" formControlName=\"type\" id=\"flexRadioDefault{{i}}\">\n <label class=\"form-check-label\" for=\"flexRadioDefault{{i}}\">\n {{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}\n </label>\n </div>\n </ng-container>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Route' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"route\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"routeInput.errors?.repetition\">\n {{routeInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">\n {{'Cms::RouteTips' | abpLocalization}}<br>\n blog<br>\n {{'blog/{slug}'}}<br>\n {{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Template' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"template\" placeholder=\"\" />\n <div class=\"form-text\">\n {{\"Cms::TemplateTips\" | abpLocalization}}\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isDefault\"\n id=\"isDefault\" />\n <label class=\"form-check-label\" for=\"isDefault\"> {{'Cms::Default' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\n id=\"isActive\" />\n <label class=\"form-check-label\" for=\"isActive\"> {{'Cms::IsActive' | abpLocalization}}</label>\n </div>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"createOrEditModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' |\n abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .sections-page .dignite_page{background:transparent}::ng-deep .sections-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sections-page .card-header input{flex:2 1 auto}::ng-deep .sections-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.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.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i8.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: i8.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: i8.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i10.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
|
|
2065
|
+
], viewQueries: [{ propertyName: "createOrEditModalSubmitBtn", first: true, predicate: ["createOrEditModalSubmitBtn"], descendants: true }], ngImport: i0, template: "<abp-page [title]=\"'Cms::Sections' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sections-page\">\n <div class=\"card \" >\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"row align-items-end\">\n <div class=\"mb-2 col-3\">\n <label class=\"form-label\">{{'Cms::IsActive' | abpLocalization}}\uFF1A</label>\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.isActive\" (change)=\"siteIdChange()\">\n <option [value]=\"\"></option>\n <option [value]=\"true\">\u662F</option>\n <option [value]=\"false\">\u5426</option>\n </select>\n </div>\n <div class=\"mb-2 col-3\">\n <label class=\"form-label\">{{'AbpUi::Search' | abpLocalization}}\uFF1A</label>\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n </div>\n <div class=\"mb-2 col-4\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div> \n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"type\" [width]=\"80\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{('Cms::Enum:SectionType:'+_SectionType[value]) | abpLocalization}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsDefault' | abpLocalization\" prop=\"isDefault\" [width]=\"60\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\" [width]=\"60\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"SiteId\" [width]=\"100\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-link\" ngbDropdownToggle id=\"dropdownBasic1\">\n {{'Cms::EntryType' | abpLocalization}}\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <ng-container *ngFor=\"let item of row.entryTypes;let i =index\">\n <li ngbDropdownItem\n class=\"d-flex align-items-center justify-content-between\" [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/'+item.id+'/edit'\"\n >{{item.displayName}}\n <button class=\"btn btn-light btn-sm p-0\"\n (click.stop)=\"deleteEntryType(item)\"><i class=\"fas fa-trash p-sm-1\"\n style=\"font-size: 12px;\" role=\"button\"></i></button>\n </li>\n </ng-container>\n <li ngbDropdownItem [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/create'\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\" [minWidth]=\"190\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'yyyy/MM/dd hh:mm:ss' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\" [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"editSectionBtn(row)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n</abp-page>\n<abp-modal [(visible)]=\"visibleOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"createOrEditForm; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"createOrEditForm\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #createOrEditModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</label>\n <div>\n <ng-container *ngFor=\"let item of _sectionTypeOptions;let i =index\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"item.value\"\n (change)=\"radiochange()\" formControlName=\"type\" id=\"flexRadioDefault{{i}}\">\n <label class=\"form-check-label\" for=\"flexRadioDefault{{i}}\">\n {{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}\n </label>\n </div>\n </ng-container>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Route' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"route\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"routeInput.errors?.repetition\">\n {{routeInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">\n {{'Cms::RouteTips' | abpLocalization}}<br>\n blog<br>\n {{'blog/{slug}'}}<br>\n {{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Template' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"template\" placeholder=\"\" />\n <div class=\"form-text\">\n {{\"Cms::TemplateTips\" | abpLocalization}}\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isDefault\"\n id=\"isDefault\" />\n <label class=\"form-check-label\" for=\"isDefault\"> {{'Cms::Default' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\n id=\"isActive\" />\n <label class=\"form-check-label\" for=\"isActive\"> {{'Cms::IsActive' | abpLocalization}}</label>\n </div>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"createOrEditModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' |\n abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .sections-page .dignite_page{background:transparent}::ng-deep .sections-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sections-page .card-header input{flex:2 1 auto}::ng-deep .sections-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.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.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i8.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: i8.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: i8.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "directive", type: i3.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i10.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2027
2066
|
}
|
|
2028
2067
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SectionsComponent, decorators: [{
|
|
2029
2068
|
type: Component,
|
|
@@ -2038,20 +2077,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
2038
2077
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2039
2078
|
useValue: ECmsComponent.Sections,
|
|
2040
2079
|
},
|
|
2041
|
-
], template: "<abp-page [title]=\"'Cms::Sections' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sections-page\">\n <div class=\"card \" >\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"row align-items-end\">\n <div class=\"mb-2 col-3\">\n <label class=\"form-label\">{{'Cms::IsActive' | abpLocalization}}\uFF1A</label>\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.isActive\" (change)=\"siteIdChange()\">\n <option [value]=\"\"></option>\n <option [value]=\"true\">\u662F</option>\n <option [value]=\"false\">\u5426</option>\n </select>\n </div>\n <div class=\"mb-2 col-3\">\n <label class=\"form-label\">{{'AbpUi::Search' | abpLocalization}}\uFF1A</label>\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n </div>\n <div class=\"mb-2 col-4\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div> \n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"type\" [width]=\"80\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{('Cms::Enum:SectionType:'+_SectionType[value]) | abpLocalization}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsDefault' | abpLocalization\" prop=\"isDefault\" [width]=\"60\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\" [width]=\"60\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"SiteId\" [width]=\"100\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-link\" ngbDropdownToggle id=\"dropdownBasic1\">\n {{'Cms::EntryType' | abpLocalization}}\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <ng-container *ngFor=\"let item of row.entryTypes;let i =index\">\n <li ngbDropdownItem\n class=\"d-flex align-items-center justify-content-between\" [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/'+item.id+'/edit'\"\n >{{item.displayName}}\n <button class=\"btn btn-light btn-sm p-0\"\n (click.stop)=\"deleteEntryType(item)\"><i class=\"fas fa-trash p-sm-1\"\n style=\"font-size: 12px;\" role=\"button\"></i></button>\n </li>\n </ng-container>\n <li ngbDropdownItem [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/create'\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\" [minWidth]=\"190\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'yyyy/MM/dd hh:mm:ss' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\" [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"editSectionBtn(row)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n</abp-page>\n<abp-modal [(visible)]=\"visibleOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"createOrEditForm; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"createOrEditForm\" (ngSubmit)=\"createOrEditSave()\">\n <button type=\"submit\" #createOrEditModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</label>\n <div>\n <ng-container *ngFor=\"let item of _sectionTypeOptions;let i =index\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"item.value\"\n (change)=\"radiochange()\" formControlName=\"type\" id=\"flexRadioDefault{{i}}\">\n <label class=\"form-check-label\" for=\"flexRadioDefault{{i}}\">\n {{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}\n </label>\n </div>\n </ng-container>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Route' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"route\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"routeInput.errors?.repetition\">\n {{routeInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">\n {{'Cms::RouteTips' | abpLocalization}}<br>\n blog<br>\n {{'blog/{slug}'}}<br>\n {{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Template' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"template\" placeholder=\"\" />\n <div class=\"form-text\">\n {{\"Cms::TemplateTips\" | abpLocalization}}\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isDefault\"\n id=\"isDefault\" />\n <label class=\"form-check-label\" for=\"isDefault\"> {{'Cms::Default' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\n id=\"isActive\" />\n <label class=\"form-check-label\" for=\"isActive\"> {{'Cms::IsActive' | abpLocalization}}</label>\n </div>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"createOrEditModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' |\n abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .sections-page .dignite_page{background:transparent}::ng-deep .sections-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sections-page .card-header input{flex:2 1 auto}::ng-deep .sections-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"] }]
|
|
2080
|
+
], template: "<abp-page [title]=\"'Cms::Sections' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sections-page\">\n <div class=\"card \" >\n <div class=\"card-body px-2 py-sm-2 border-bottom\">\n <div class=\"row align-items-end\">\n <div class=\"mb-2 col-3\">\n <label class=\"form-label\">{{'Cms::IsActive' | abpLocalization}}\uFF1A</label>\n <select class=\"form-select col-auto\" [(ngModel)]=\"filters.isActive\" (change)=\"siteIdChange()\">\n <option [value]=\"\"></option>\n <option [value]=\"true\">\u662F</option>\n <option [value]=\"false\">\u5426</option>\n </select>\n </div>\n <div class=\"mb-2 col-3\">\n <label class=\"form-label\">{{'AbpUi::Search' | abpLocalization}}\uFF1A</label>\n <input type=\"text\" class=\"form-control\" [(ngModel)]=\"filters.filter\"\n [placeholder]=\"'AbpUi::Search' | abpLocalization\" />\n </div>\n <div class=\"mb-2 col-4\">\n <button class=\"btn btn-primary px-3\" type=\"button\" id=\"button-addon2\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\n </div>\n </div> \n </div>\n </div>\n <div class=\"card mb-0\">\n <div class=\"card-body p-0\">\n <div class=\"table-responsive table-fixed-header\">\n <ngx-datatable class=\"material \" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"ColumnMode.force\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\" [scrollbarH]=\"true\">\n <ngx-datatable-column [name]=\"'Cms::DisplayName' | abpLocalization\" prop=\"displayName\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::Name' | abpLocalization\" prop=\"name\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::SectionType' | abpLocalization\" prop=\"type\" [width]=\"80\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{('Cms::Enum:SectionType:'+_SectionType[value]) | abpLocalization}}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsDefault' | abpLocalization\" prop=\"isDefault\" [width]=\"60\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::IsActive' | abpLocalization\" prop=\"isActive\" [width]=\"60\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <i class=\"fas fa-check text-success\" *ngIf=\"value\"></i>\n <i class=\"fas fa-times text-danger\" *ngIf=\"!value\"></i>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::EntryType' | abpLocalization\" prop=\"SiteId\" [width]=\"100\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-link\" ngbDropdownToggle id=\"dropdownBasic1\">\n {{'Cms::EntryType' | abpLocalization}}\n </button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\">\n <ng-container *ngFor=\"let item of row.entryTypes;let i =index\">\n <li ngbDropdownItem\n class=\"d-flex align-items-center justify-content-between\" [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/'+item.id+'/edit'\"\n >{{item.displayName}}\n <button class=\"btn btn-light btn-sm p-0\"\n (click.stop)=\"deleteEntryType(item)\"><i class=\"fas fa-trash p-sm-1\"\n style=\"font-size: 12px;\" role=\"button\"></i></button>\n </li>\n </ng-container>\n <li ngbDropdownItem [routerLink]=\"'/cms/admin/sections/'+row.id+'/entry-types/create'\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [name]=\"'Cms::CreationTime' | abpLocalization\" prop=\"creationTime\" [minWidth]=\"190\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n {{ value | date : 'yyyy/MM/dd hh:mm:ss' }}\n </ng-template>\n </ngx-datatable-column>\n <ngx-datatable-column [sortable]=\"false\" [name]=\"'AbpUi::Actions' | abpLocalization\" [frozenLeft]=\"true\" [width]=\"110\" [maxWidth]=\"110\">\n <ng-template let-row=\"row\" let-value=\"value\" ngx-datatable-cell-template>\n <div ngbDropdown container=\"body\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\" ngbDropdownToggle>\n <i class=\"me-1 fa fa-cog\"></i> {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem (click)=\"editSectionBtn(row)\">{{'AbpUi::Edit' |\n abpLocalization}}</button>\n <button ngbDropdownItem (click)=\"deletefield(row)\">{{'AbpUi::Delete' |\n abpLocalization}}</button>\n </div>\n </div>\n </ng-template>\n </ngx-datatable-column>\n </ngx-datatable>\n </div>\n </div>\n </div>\n </div>\n</abp-page>\n<abp-modal [(visible)]=\"visibleOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleChange($event)\">\n <ng-template #abpHeader>\n <h3>{{selected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"createOrEditForm; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"createOrEditForm\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #createOrEditModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::EntryType' | abpLocalization}}</label>\n <div>\n <ng-container *ngFor=\"let item of _sectionTypeOptions;let i =index\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"radio\" [value]=\"item.value\"\n (change)=\"radiochange()\" formControlName=\"type\" id=\"flexRadioDefault{{i}}\">\n <label class=\"form-check-label\" for=\"flexRadioDefault{{i}}\">\n {{ 'Cms::Enum:SectionType:'+item.key | abpLocalization }}\n </label>\n </div>\n </ng-container>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"nameInput.errors?.repetition\">\n {{nameInput.errors?.repetition}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Route' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"route\" placeholder=\"\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"routeInput.errors?.repetition\">\n {{routeInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">\n {{'Cms::RouteTips' | abpLocalization}}<br>\n blog<br>\n {{'blog/{slug}'}}<br>\n {{'blog/{publishTime:yyyy}/{publishTime:MM}/{slug}'}}\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Template' | abpLocalization}} </label>\n <input type=\"text\" class=\"form-control\" formControlName=\"template\" placeholder=\"\" />\n <div class=\"form-text\">\n {{\"Cms::TemplateTips\" | abpLocalization}}\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isDefault\"\n id=\"isDefault\" />\n <label class=\"form-check-label\" for=\"isDefault\"> {{'Cms::Default' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"isActive\"\n id=\"isActive\" />\n <label class=\"form-check-label\" for=\"isActive\"> {{'Cms::IsActive' | abpLocalization}}</label>\n </div>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" (click)=\"createOrEditModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' |\n abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .sections-page .dignite_page{background:transparent}::ng-deep .sections-page .list-group-flush>.list-group-item:first-child{border-top-width:var(--bs-list-group-border-width)}::ng-deep .sections-page .card-header input{flex:2 1 auto}::ng-deep .sections-page .card-header .form-select{padding:.475rem 3.75rem .475rem 1.25rem}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"] }]
|
|
2042
2081
|
}], ctorParameters: () => [{ type: i1.ListService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1$1.FormBuilder }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }, { type: CmsApiService }], propDecorators: { createOrEditModalSubmitBtn: [{
|
|
2043
2082
|
type: ViewChild,
|
|
2044
2083
|
args: ['createOrEditModalSubmitBtn', { static: false }]
|
|
2045
2084
|
}] } });
|
|
2046
2085
|
|
|
2047
2086
|
class CreateOrEditEntryTypeInputBase {
|
|
2048
|
-
/**显示名称 Display name of this field */
|
|
2049
|
-
displayName = ['', [Validators.required]];
|
|
2050
|
-
/**名称 Unique Name*/
|
|
2051
|
-
name = ['', [Validators.required]];
|
|
2052
|
-
/**条目路由 */
|
|
2053
|
-
fieldTabs = new FormArray([]);
|
|
2054
2087
|
constructor(data) {
|
|
2088
|
+
/**显示名称 Display name of this field */
|
|
2089
|
+
this.displayName = ['', [Validators.required]];
|
|
2090
|
+
/**名称 Unique Name*/
|
|
2091
|
+
this.name = ['', [Validators.required]];
|
|
2092
|
+
/**条目路由 */
|
|
2093
|
+
this.fieldTabs = new FormArray([]);
|
|
2055
2094
|
if (data) {
|
|
2056
2095
|
for (const key in data) {
|
|
2057
2096
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2062,10 +2101,10 @@ class CreateOrEditEntryTypeInputBase {
|
|
|
2062
2101
|
}
|
|
2063
2102
|
}
|
|
2064
2103
|
class fieldTabsBase {
|
|
2065
|
-
/**名称 Unique Name*/
|
|
2066
|
-
name = ['', [Validators.required]];
|
|
2067
|
-
fields = [[], []];
|
|
2068
2104
|
constructor(data) {
|
|
2105
|
+
/**名称 Unique Name*/
|
|
2106
|
+
this.name = ['', [Validators.required]];
|
|
2107
|
+
this.fields = [[], []];
|
|
2069
2108
|
if (data) {
|
|
2070
2109
|
for (const key in data) {
|
|
2071
2110
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2076,15 +2115,15 @@ class fieldTabsBase {
|
|
|
2076
2115
|
}
|
|
2077
2116
|
}
|
|
2078
2117
|
class fieldsBase {
|
|
2079
|
-
/**字段id Unique Name*/
|
|
2080
|
-
fieldId = ['', [Validators.required]];
|
|
2081
|
-
/**显示名称 Unique Name*/
|
|
2082
|
-
displayName = ['', [Validators.required]];
|
|
2083
|
-
/**必填 Unique Name*/
|
|
2084
|
-
required = [false, []];
|
|
2085
|
-
/**是否在列表中显示 Unique Name*/
|
|
2086
|
-
showOnList = [false, []];
|
|
2087
2118
|
constructor(data) {
|
|
2119
|
+
/**字段id Unique Name*/
|
|
2120
|
+
this.fieldId = ['', [Validators.required]];
|
|
2121
|
+
/**显示名称 Unique Name*/
|
|
2122
|
+
this.displayName = ['', [Validators.required]];
|
|
2123
|
+
/**必填 Unique Name*/
|
|
2124
|
+
this.required = [false, []];
|
|
2125
|
+
/**是否在列表中显示 Unique Name*/
|
|
2126
|
+
this.showOnList = [false, []];
|
|
2088
2127
|
if (data) {
|
|
2089
2128
|
for (const key in data) {
|
|
2090
2129
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2095,15 +2134,15 @@ class fieldsBase {
|
|
|
2095
2134
|
}
|
|
2096
2135
|
}
|
|
2097
2136
|
class fieldsInputBase {
|
|
2098
|
-
/**字段id */
|
|
2099
|
-
fieldId = ['', [Validators.required]];
|
|
2100
|
-
/**显示名称 Display name of this field */
|
|
2101
|
-
displayName = ['', [Validators.required]];
|
|
2102
|
-
/**是否必填 Unique Name*/
|
|
2103
|
-
required = [false, []];
|
|
2104
|
-
/**在列表中展示 Unique Name*/
|
|
2105
|
-
showOnList = [false, []];
|
|
2106
2137
|
constructor(data) {
|
|
2138
|
+
/**字段id */
|
|
2139
|
+
this.fieldId = ['', [Validators.required]];
|
|
2140
|
+
/**显示名称 Display name of this field */
|
|
2141
|
+
this.displayName = ['', [Validators.required]];
|
|
2142
|
+
/**是否必填 Unique Name*/
|
|
2143
|
+
this.required = [false, []];
|
|
2144
|
+
/**在列表中展示 Unique Name*/
|
|
2145
|
+
this.showOnList = [false, []];
|
|
2107
2146
|
if (data) {
|
|
2108
2147
|
for (const key in data) {
|
|
2109
2148
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2115,14 +2154,6 @@ class fieldsInputBase {
|
|
|
2115
2154
|
}
|
|
2116
2155
|
|
|
2117
2156
|
class CreateOrEditComponent {
|
|
2118
|
-
toaster;
|
|
2119
|
-
_location;
|
|
2120
|
-
route;
|
|
2121
|
-
_FieldGroupAdminService;
|
|
2122
|
-
_FieldAdminService;
|
|
2123
|
-
_EntryTypeAdminService;
|
|
2124
|
-
_LocalizationService;
|
|
2125
|
-
_CmsApiService;
|
|
2126
2157
|
constructor(toaster, _location, route, _FieldGroupAdminService, _FieldAdminService, _EntryTypeAdminService, _LocalizationService, _CmsApiService) {
|
|
2127
2158
|
this.toaster = toaster;
|
|
2128
2159
|
this._location = _location;
|
|
@@ -2132,22 +2163,44 @@ class CreateOrEditComponent {
|
|
|
2132
2163
|
this._EntryTypeAdminService = _EntryTypeAdminService;
|
|
2133
2164
|
this._LocalizationService = _LocalizationService;
|
|
2134
2165
|
this._CmsApiService = _CmsApiService;
|
|
2166
|
+
this.fb = inject(FormBuilder);
|
|
2167
|
+
this._UpdateListService = inject(UpdateListService);
|
|
2168
|
+
/**表单实体 */
|
|
2169
|
+
this.newEntity = this.fb.group(new CreateOrEditEntryTypeInputBase());
|
|
2170
|
+
/**版块id */
|
|
2171
|
+
this.sectionId = '';
|
|
2172
|
+
/**条目类型id */
|
|
2173
|
+
this.entryTypesId = '';
|
|
2174
|
+
/**
|
|
2175
|
+
* 拖拽 功能*/
|
|
2176
|
+
/**数据源 */
|
|
2177
|
+
/**数据源-字段分组数据-包含字段数据 fields */
|
|
2178
|
+
this.fieldGroupList = [];
|
|
2179
|
+
/**数据源-所有字段列表 */
|
|
2180
|
+
this.fieldList = [];
|
|
2181
|
+
/**目标源 结果*/
|
|
2182
|
+
this.resultSource = [];
|
|
2183
|
+
/**来自数据源的集合,用于从目标源拖回数据源时的判断,与取值 */
|
|
2184
|
+
this.formRightGroup = [];
|
|
2185
|
+
this._ValidatorsService = inject(ValidatorsService);
|
|
2186
|
+
/**表单验证状态
|
|
2187
|
+
* {
|
|
2188
|
+
* title:true,
|
|
2189
|
+
* }
|
|
2190
|
+
*/
|
|
2191
|
+
this.formValidation = '';
|
|
2192
|
+
/**模态框状态 */
|
|
2193
|
+
this.visibleTabsOpen = false;
|
|
2194
|
+
/**是否是忙碌状态 */
|
|
2195
|
+
this.modalBusy = false;
|
|
2196
|
+
/**正在选中的nav */
|
|
2197
|
+
this.navActive = 0;
|
|
2198
|
+
/**编辑字段模态框状态 */
|
|
2199
|
+
this.visibleEditFieldOpen = false;
|
|
2135
2200
|
}
|
|
2136
|
-
fb = inject(FormBuilder);
|
|
2137
|
-
_UpdateListService = inject(UpdateListService);
|
|
2138
|
-
/**表单实体 */
|
|
2139
|
-
newEntity = this.fb.group(new CreateOrEditEntryTypeInputBase());
|
|
2140
|
-
/**版块id */
|
|
2141
|
-
sectionId = '';
|
|
2142
|
-
/**条目类型id */
|
|
2143
|
-
entryTypesId = '';
|
|
2144
|
-
/**条目类型详情 */
|
|
2145
|
-
entryTypesSelect;
|
|
2146
2201
|
get fieldTabs() {
|
|
2147
2202
|
return this.newEntity.get('fieldTabs');
|
|
2148
2203
|
}
|
|
2149
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
2150
|
-
submitclick;
|
|
2151
2204
|
/**触发提交按钮 */
|
|
2152
2205
|
submitclickBtn() {
|
|
2153
2206
|
this.submitclick.nativeElement.click();
|
|
@@ -2260,25 +2313,6 @@ class CreateOrEditComponent {
|
|
|
2260
2313
|
});
|
|
2261
2314
|
});
|
|
2262
2315
|
}
|
|
2263
|
-
/**
|
|
2264
|
-
* 拖拽 功能*/
|
|
2265
|
-
/**数据源 */
|
|
2266
|
-
/**数据源-字段分组数据-包含字段数据 fields */
|
|
2267
|
-
fieldGroupList = [];
|
|
2268
|
-
/**数据源-所有字段列表 */
|
|
2269
|
-
fieldList = [];
|
|
2270
|
-
/**数据源拖拽的分组下标 */
|
|
2271
|
-
DataSourceGroupIndex;
|
|
2272
|
-
/**数据源拖拽的字段下标 */
|
|
2273
|
-
DataSourceFieldIndex;
|
|
2274
|
-
/**目标源 结果*/
|
|
2275
|
-
resultSource = [];
|
|
2276
|
-
/**从数据源拖拽的元素 */
|
|
2277
|
-
fromDataSourceDragEl;
|
|
2278
|
-
/**从目标源拖拽的元素 */
|
|
2279
|
-
fromResultSourceDragEl;
|
|
2280
|
-
/**来自数据源的集合,用于从目标源拖回数据源时的判断,与取值 */
|
|
2281
|
-
formRightGroup = [];
|
|
2282
2316
|
/**从数据源开始拖拽 */
|
|
2283
2317
|
fromDataSourceDragStart(element, fieldIndex, groupIndex) {
|
|
2284
2318
|
this.fromDataSourceDragEl = element;
|
|
@@ -2369,6 +2403,9 @@ class CreateOrEditComponent {
|
|
|
2369
2403
|
/**保存表单 */
|
|
2370
2404
|
save() {
|
|
2371
2405
|
let input = this.newEntity.value;
|
|
2406
|
+
this.formValidation = this._ValidatorsService.getFormValidationStatus(this.newEntity);
|
|
2407
|
+
if (this._ValidatorsService.isCheckForm(this.formValidation))
|
|
2408
|
+
return;
|
|
2372
2409
|
if (this.entryTypesSelect) {
|
|
2373
2410
|
this._EntryTypeAdminService.update(this.entryTypesSelect.id, input).subscribe(res => {
|
|
2374
2411
|
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
@@ -2384,18 +2421,6 @@ class CreateOrEditComponent {
|
|
|
2384
2421
|
this._UpdateListService.updateList();
|
|
2385
2422
|
});
|
|
2386
2423
|
}
|
|
2387
|
-
/**编辑Tabs表单 */
|
|
2388
|
-
editFieldTabsFrom;
|
|
2389
|
-
/**模态框状态 */
|
|
2390
|
-
visibleTabsOpen = false;
|
|
2391
|
-
/**是否是忙碌状态 */
|
|
2392
|
-
modalBusy = false;
|
|
2393
|
-
/**正在编辑的tabs */
|
|
2394
|
-
editFieldTabsSelect;
|
|
2395
|
-
/**正在选中的nav */
|
|
2396
|
-
navActive = 0;
|
|
2397
|
-
/**表单控件模板-动态赋值表单控件 */
|
|
2398
|
-
editFieldTabsModalSubmitBtn;
|
|
2399
2424
|
/**模态框状态改变回调 */
|
|
2400
2425
|
VisibleTabsChange(event) {
|
|
2401
2426
|
if (!event) {
|
|
@@ -2408,8 +2433,6 @@ class CreateOrEditComponent {
|
|
|
2408
2433
|
this.editFieldTabsFrom = this.fb.group(new fieldTabsBase());
|
|
2409
2434
|
this.visibleTabsOpen = true;
|
|
2410
2435
|
}
|
|
2411
|
-
/**正在编辑的tab下标 */
|
|
2412
|
-
newEditFieldTabsIndex;
|
|
2413
2436
|
/**编辑FieldTabs */
|
|
2414
2437
|
editFieldTabs(item, i) {
|
|
2415
2438
|
this.editFieldTabsFrom = this.fb.group(new fieldTabsBase({
|
|
@@ -2438,14 +2461,6 @@ class CreateOrEditComponent {
|
|
|
2438
2461
|
this.fieldTabs.removeAt(index);
|
|
2439
2462
|
this.resultSource.splice(index, 1);
|
|
2440
2463
|
}
|
|
2441
|
-
/**编辑字段模态框状态 */
|
|
2442
|
-
visibleEditFieldOpen = false;
|
|
2443
|
-
/**编辑字段模态框表单 */
|
|
2444
|
-
editFieldFrom;
|
|
2445
|
-
/**表单控件模板-动态赋值表单控件-编辑字段 */
|
|
2446
|
-
editFieldModalSubmitBtn;
|
|
2447
|
-
/**正在编辑的字段下标 */
|
|
2448
|
-
EditFieldIndex;
|
|
2449
2464
|
/**编辑字段模态框状态状态改变回调 */
|
|
2450
2465
|
VisibleEditFieldChange(event) {
|
|
2451
2466
|
if (!event) {
|
|
@@ -2481,13 +2496,13 @@ class CreateOrEditComponent {
|
|
|
2481
2496
|
return;
|
|
2482
2497
|
nameInput.patchValue(pinyin);
|
|
2483
2498
|
}
|
|
2484
|
-
static
|
|
2485
|
-
static
|
|
2499
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditComponent, deps: [{ token: i3.ToasterService }, { token: i2.Location }, { token: i3$1.ActivatedRoute }, { token: FieldGroupAdminService }, { token: FieldAdminService }, { token: EntryTypeAdminService }, { token: i1.LocalizationService }, { token: CmsApiService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2500
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CreateOrEditComponent, selector: "cms-create-or-edit", providers: [
|
|
2486
2501
|
{
|
|
2487
2502
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2488
2503
|
useValue: ECmsComponent.SectionsCreateOrEdit,
|
|
2489
2504
|
},
|
|
2490
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "editFieldTabsModalSubmitBtn", first: true, predicate: ["editFieldTabsModalSubmitBtn"], descendants: true }, { propertyName: "editFieldModalSubmitBtn", first: true, predicate: ["editFieldModalSubmitBtn"], descendants: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\"\n [toolbar]=\"true\">\n <div class=\"create-or-edit-entry-type-page\">\n <div class=\"card\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card-body\">\n <div class=\"\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n <div formArrayName=\"fieldTabs\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::FieldLayout' | abpLocalization}}</label>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-8\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"navActive\" class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let item of resultSource; let i = index\">\n <li [ngbNavItem]=\"i\">\n <button type=\"button\" ngbDropdown ngbNavLink>\n {{ item.name }}\n <span class=\"ms-1\" (click.stop)=\"$event.stopPropagation()\"\n ngbDropdownToggle></span>\n <div ngbDropdownMenu style=\"z-index: 999;\">\n <li ngbDropdownItem type=\"button\"\n (click.stop)=\"editFieldTabs(item,i)\">\n <i class=\"fas fa-edit\"></i>\n {{'AbpUi::Edit' | abpLocalization}}\n </li>\n <li ngbDropdownItem *ngIf=\"resultSource.length !== 1\" type=\"button\"\n (click.stop)=\"deleteFieldTabs(i)\">\n <i class=\"fas fa-trash\"></i>\n {{'AbpUi::Delete' | abpLocalization}}\n </li>\n </div>\n </button>\n <ng-template ngbNavContent>\n <div class=\"p-2\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToResultSourceDropped(item,i)\" style=\"height: 100%;\">\n <p class=\"form-text\" *ngIf=\"item.fields.length === 0\">\n {{'Cms::DragAndDropFieldTips' | abpLocalization}}\n </p>\n <ul class=\"list-group\" style=\"height: 100%;\">\n <ng-container *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\" (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\"\n style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul>\n\n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\" (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToDataSourceDropped()\" style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n\n\n </div>\n </abp-page>\n\n</form>\n\n<abp-modal [(visible)]=\"visibleTabsOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleTabsChange($event)\">\n <ng-template #abpHeader>\n <h3>{{ editFieldTabsSelect ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldTabsFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldTabsFrom\" (ngSubmit)=\"editFieldTabsSave()\">\n <button type=\"submit\" #editFieldTabsModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldTabsFrom.valid\"\n (click)=\"editFieldTabsModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n\n<abp-modal [(visible)]=\"visibleEditFieldOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleEditFieldChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldFrom\" (ngSubmit)=\"editFieldSave()\">\n <button type=\"submit\" #editFieldModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"required\"\n id=\"required\" />\n <label class=\"form-check-label\" for=\"required\"> {{'Cms::Required' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"showOnList\"\n id=\"showOnList\" />\n <label class=\"form-check-label\" for=\"showOnList\"> {{'Cms::ShowOnList' | abpLocalization}}\n </label>\n </div>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldFrom.valid\"\n (click)=\"editFieldModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .create-or-edit-entry-type-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-or-edit-entry-type-page .form-control,::ng-deep .create-or-edit-entry-type-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-type-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-type-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit;height:calc(100% - 60px)}::ng-deep .create-or-edit-entry-type-page .tab-pane{height:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i10.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i10.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i10.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i10.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i10.NgbNavLinkButton, selector: "button[ngbNavLink]" }, { kind: "directive", type: i10.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i10.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i10.NgbAccordionButton, selector: "button[ngbAccordionButton]" }, { kind: "directive", type: i10.NgbAccordionDirective, selector: "[ngbAccordion]", inputs: ["animation", "closeOthers", "destroyOnHide"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordion"] }, { kind: "directive", type: i10.NgbAccordionItem, selector: "[ngbAccordionItem]", inputs: ["ngbAccordionItem", "destroyOnHide", "disabled", "collapsed"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordionItem"] }, { kind: "directive", type: i10.NgbAccordionHeader, selector: "[ngbAccordionHeader]" }, { kind: "directive", type: i10.NgbAccordionBody, selector: "[ngbAccordionBody]" }, { kind: "directive", type: i10.NgbAccordionCollapse, selector: "[ngbAccordionCollapse]", exportAs: ["ngbAccordionCollapse"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
|
|
2505
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "editFieldTabsModalSubmitBtn", first: true, predicate: ["editFieldTabsModalSubmitBtn"], descendants: true }, { propertyName: "editFieldModalSubmitBtn", first: true, predicate: ["editFieldModalSubmitBtn"], descendants: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\"\n [toolbar]=\"true\">\n <div class=\"create-or-edit-entry-type-page\">\n <div class=\"card\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card-body\">\n <div class=\"\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n <div formArrayName=\"fieldTabs\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::FieldLayout' | abpLocalization}}</label>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-8\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"navActive\" class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let item of resultSource; let i = index\">\n <li [ngbNavItem]=\"i\">\n <button type=\"button\" ngbDropdown ngbNavLink>\n {{ item.name }}\n <span class=\"ms-1\" (click.stop)=\"$event.stopPropagation()\"\n ngbDropdownToggle></span>\n <div ngbDropdownMenu style=\"z-index: 999;\">\n <li ngbDropdownItem type=\"button\"\n (click.stop)=\"editFieldTabs(item,i)\">\n <i class=\"fas fa-edit\"></i>\n {{'AbpUi::Edit' | abpLocalization}}\n </li>\n <li ngbDropdownItem *ngIf=\"resultSource.length !== 1\" type=\"button\"\n (click.stop)=\"deleteFieldTabs(i)\">\n <i class=\"fas fa-trash\"></i>\n {{'AbpUi::Delete' | abpLocalization}}\n </li>\n </div>\n </button>\n <ng-template ngbNavContent>\n <div class=\"p-2\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToResultSourceDropped(item,i)\" style=\"height: 100%;\">\n <p class=\"form-text\" *ngIf=\"item.fields.length === 0\">\n {{'Cms::DragAndDropFieldTips' | abpLocalization}}\n </p>\n <ul class=\"list-group\" style=\"height: 100%;\">\n <ng-container *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\" (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\"\n style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul>\n\n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\" (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToDataSourceDropped()\" style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n\n\n </div>\n </abp-page>\n\n</form>\n\n<abp-modal [(visible)]=\"visibleTabsOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleTabsChange($event)\">\n <ng-template #abpHeader>\n <h3>{{ editFieldTabsSelect ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldTabsFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldTabsFrom\" (keydown.enter)=\"$event.preventDefault()\" (submit)=\"editFieldTabsSave()\">\n <button type=\"submit\" #editFieldTabsModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldTabsFrom.valid\"\n (click)=\"editFieldTabsModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n\n<abp-modal [(visible)]=\"visibleEditFieldOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleEditFieldChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldFrom\" (keydown.enter)=\"$event.preventDefault()\" (submit)=\"editFieldSave()\">\n <button type=\"submit\" #editFieldModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"required\"\n id=\"required\" />\n <label class=\"form-check-label\" for=\"required\"> {{'Cms::Required' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"showOnList\"\n id=\"showOnList\" />\n <label class=\"form-check-label\" for=\"showOnList\"> {{'Cms::ShowOnList' | abpLocalization}}\n </label>\n </div>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldFrom.valid\"\n (click)=\"editFieldModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .create-or-edit-entry-type-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-or-edit-entry-type-page .form-control,::ng-deep .create-or-edit-entry-type-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-type-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-type-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit;height:calc(100% - 60px)}::ng-deep .create-or-edit-entry-type-page .tab-pane{height:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i10.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i10.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i10.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i10.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i10.NgbNavLinkButton, selector: "button[ngbNavLink]" }, { kind: "directive", type: i10.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i10.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "directive", type: i10.NgbAccordionButton, selector: "button[ngbAccordionButton]" }, { kind: "directive", type: i10.NgbAccordionDirective, selector: "[ngbAccordion]", inputs: ["animation", "closeOthers", "destroyOnHide"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordion"] }, { kind: "directive", type: i10.NgbAccordionItem, selector: "[ngbAccordionItem]", inputs: ["ngbAccordionItem", "destroyOnHide", "disabled", "collapsed"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordionItem"] }, { kind: "directive", type: i10.NgbAccordionHeader, selector: "[ngbAccordionHeader]" }, { kind: "directive", type: i10.NgbAccordionBody, selector: "[ngbAccordionBody]" }, { kind: "directive", type: i10.NgbAccordionCollapse, selector: "[ngbAccordionCollapse]", exportAs: ["ngbAccordionCollapse"] }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2491
2506
|
}
|
|
2492
2507
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CreateOrEditComponent, decorators: [{
|
|
2493
2508
|
type: Component,
|
|
@@ -2496,7 +2511,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
2496
2511
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2497
2512
|
useValue: ECmsComponent.SectionsCreateOrEdit,
|
|
2498
2513
|
},
|
|
2499
|
-
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\"\n [toolbar]=\"true\">\n <div class=\"create-or-edit-entry-type-page\">\n <div class=\"card\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card-body\">\n <div class=\"\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n <div formArrayName=\"fieldTabs\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::FieldLayout' | abpLocalization}}</label>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-8\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"navActive\" class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let item of resultSource; let i = index\">\n <li [ngbNavItem]=\"i\">\n <button type=\"button\" ngbDropdown ngbNavLink>\n {{ item.name }}\n <span class=\"ms-1\" (click.stop)=\"$event.stopPropagation()\"\n ngbDropdownToggle></span>\n <div ngbDropdownMenu style=\"z-index: 999;\">\n <li ngbDropdownItem type=\"button\"\n (click.stop)=\"editFieldTabs(item,i)\">\n <i class=\"fas fa-edit\"></i>\n {{'AbpUi::Edit' | abpLocalization}}\n </li>\n <li ngbDropdownItem *ngIf=\"resultSource.length !== 1\" type=\"button\"\n (click.stop)=\"deleteFieldTabs(i)\">\n <i class=\"fas fa-trash\"></i>\n {{'AbpUi::Delete' | abpLocalization}}\n </li>\n </div>\n </button>\n <ng-template ngbNavContent>\n <div class=\"p-2\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToResultSourceDropped(item,i)\" style=\"height: 100%;\">\n <p class=\"form-text\" *ngIf=\"item.fields.length === 0\">\n {{'Cms::DragAndDropFieldTips' | abpLocalization}}\n </p>\n <ul class=\"list-group\" style=\"height: 100%;\">\n <ng-container *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\" (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\"\n style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul>\n\n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\" (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToDataSourceDropped()\" style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n\n\n </div>\n </abp-page>\n\n</form>\n\n<abp-modal [(visible)]=\"visibleTabsOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleTabsChange($event)\">\n <ng-template #abpHeader>\n <h3>{{ editFieldTabsSelect ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldTabsFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldTabsFrom\" (ngSubmit)=\"editFieldTabsSave()\">\n <button type=\"submit\" #editFieldTabsModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldTabsFrom.valid\"\n (click)=\"editFieldTabsModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n\n<abp-modal [(visible)]=\"visibleEditFieldOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleEditFieldChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldFrom\" (ngSubmit)=\"editFieldSave()\">\n <button type=\"submit\" #editFieldModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"required\"\n id=\"required\" />\n <label class=\"form-check-label\" for=\"required\"> {{'Cms::Required' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"showOnList\"\n id=\"showOnList\" />\n <label class=\"form-check-label\" for=\"showOnList\"> {{'Cms::ShowOnList' | abpLocalization}}\n </label>\n </div>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldFrom.valid\"\n (click)=\"editFieldModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .create-or-edit-entry-type-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-or-edit-entry-type-page .form-control,::ng-deep .create-or-edit-entry-type-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-type-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-type-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit;height:calc(100% - 60px)}::ng-deep .create-or-edit-entry-type-page .tab-pane{height:100%}\n"] }]
|
|
2514
|
+
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (keydown.enter)=\"$event.preventDefault()\" [class]=\"{'was-validated':formValidation}\" (submit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\"\n [toolbar]=\"true\">\n <div class=\"create-or-edit-entry-type-page\">\n <div class=\"card\">\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n <div class=\"card-body\">\n <div class=\"\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"disPlayNameInputBlur($event)\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n <div formArrayName=\"fieldTabs\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::FieldLayout' | abpLocalization}}</label>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-sm-8\">\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"navActive\" class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let item of resultSource; let i = index\">\n <li [ngbNavItem]=\"i\">\n <button type=\"button\" ngbDropdown ngbNavLink>\n {{ item.name }}\n <span class=\"ms-1\" (click.stop)=\"$event.stopPropagation()\"\n ngbDropdownToggle></span>\n <div ngbDropdownMenu style=\"z-index: 999;\">\n <li ngbDropdownItem type=\"button\"\n (click.stop)=\"editFieldTabs(item,i)\">\n <i class=\"fas fa-edit\"></i>\n {{'AbpUi::Edit' | abpLocalization}}\n </li>\n <li ngbDropdownItem *ngIf=\"resultSource.length !== 1\" type=\"button\"\n (click.stop)=\"deleteFieldTabs(i)\">\n <i class=\"fas fa-trash\"></i>\n {{'AbpUi::Delete' | abpLocalization}}\n </li>\n </div>\n </button>\n <ng-template ngbNavContent>\n <div class=\"p-2\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToResultSourceDropped(item,i)\" style=\"height: 100%;\">\n <p class=\"form-text\" *ngIf=\"item.fields.length === 0\">\n {{'Cms::DragAndDropFieldTips' | abpLocalization}}\n </p>\n <ul class=\"list-group\" style=\"height: 100%;\">\n <ng-container *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\" (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\"\n style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul>\n\n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\" (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\" ondragover=\"event.preventDefault();\"\n (drop)=\"dragToDataSourceDropped()\" style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n </div>\n\n\n </div>\n </abp-page>\n\n</form>\n\n<abp-modal [(visible)]=\"visibleTabsOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleTabsChange($event)\">\n <ng-template #abpHeader>\n <h3>{{ editFieldTabsSelect ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldTabsFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldTabsFrom\" (keydown.enter)=\"$event.preventDefault()\" (submit)=\"editFieldTabsSave()\">\n <button type=\"submit\" #editFieldTabsModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\" placeholder=\"\" />\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldTabsFrom.valid\"\n (click)=\"editFieldTabsModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>\n\n\n<abp-modal [(visible)]=\"visibleEditFieldOpen\" [busy]=\"modalBusy\" (visibleChange)=\"VisibleEditFieldChange($event)\">\n <ng-template #abpHeader>\n <h3>{{'AbpUi::Edit' | abpLocalization}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"editFieldFrom; else loaderRef\">\n <form class=\"sites-modal-form\" [formGroup]=\"editFieldFrom\" (keydown.enter)=\"$event.preventDefault()\" (submit)=\"editFieldSave()\">\n <button type=\"submit\" #editFieldModalSubmitBtn style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\" placeholder=\"\" />\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"required\"\n id=\"required\" />\n <label class=\"form-check-label\" for=\"required\"> {{'Cms::Required' | abpLocalization}} </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"true\" formControlName=\"showOnList\"\n id=\"showOnList\" />\n <label class=\"form-check-label\" for=\"showOnList\"> {{'Cms::ShowOnList' | abpLocalization}}\n </label>\n </div>\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"!editFieldFrom.valid\"\n (click)=\"editFieldModalSubmitBtn.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: ["::ng-deep .create-or-edit-entry-type-page .dignite_page{height:calc(100vh - 125px);overflow:auto}::ng-deep .create-or-edit-entry-type-page .form-control,::ng-deep .create-or-edit-entry-type-page .form-select{padding:.475rem 1.25rem}::ng-deep .create-or-edit-entry-type-page .cursor-move{cursor:move}::ng-deep .create-or-edit-entry-type-page .bordernNavs{border:var(--bs-border-width) solid var(--lpx-border-color);padding-left:inherit;padding-right:inherit;height:calc(100% - 60px)}::ng-deep .create-or-edit-entry-type-page .tab-pane{height:100%}\n"] }]
|
|
2500
2515
|
}], ctorParameters: () => [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: FieldGroupAdminService }, { type: FieldAdminService }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }, { type: CmsApiService }], propDecorators: { submitclick: [{
|
|
2501
2516
|
type: ViewChild,
|
|
2502
2517
|
args: ['submitclick', { static: true }]
|
|
@@ -2509,13 +2524,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
2509
2524
|
}] } });
|
|
2510
2525
|
|
|
2511
2526
|
class EntryConfig {
|
|
2512
|
-
/**多选 */
|
|
2513
|
-
'Entry.Multiple' = [false, []];
|
|
2514
|
-
/**占位符 */
|
|
2515
|
-
'Entry.Placeholder' = ['', []];
|
|
2516
|
-
/**版块id */
|
|
2517
|
-
'Entry.SectionId' = ['', []];
|
|
2518
2527
|
constructor(data) {
|
|
2528
|
+
/**多选 */
|
|
2529
|
+
this['Entry.Multiple'] = [false, []];
|
|
2530
|
+
/**占位符 */
|
|
2531
|
+
this['Entry.Placeholder'] = ['', []];
|
|
2532
|
+
/**版块id */
|
|
2533
|
+
this['Entry.SectionId'] = ['', []];
|
|
2519
2534
|
if (data) {
|
|
2520
2535
|
for (const key in data) {
|
|
2521
2536
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2527,47 +2542,36 @@ class EntryConfig {
|
|
|
2527
2542
|
}
|
|
2528
2543
|
|
|
2529
2544
|
class EntryConfigComponent {
|
|
2530
|
-
fb;
|
|
2531
|
-
_SectionAdminService;
|
|
2532
2545
|
constructor(fb,
|
|
2533
2546
|
// private _SiteAdminService: SiteAdminService,
|
|
2534
2547
|
_SectionAdminService) {
|
|
2535
2548
|
this.fb = fb;
|
|
2536
2549
|
this._SectionAdminService = _SectionAdminService;
|
|
2550
|
+
/**站点列表 */
|
|
2551
|
+
this.siteList = [];
|
|
2552
|
+
/**选择的站点id */
|
|
2553
|
+
// siteId: string = ''
|
|
2554
|
+
this.siteId = new FormControl('');
|
|
2555
|
+
/**站点下的版块 */
|
|
2556
|
+
this.SiteOfSectionList = [];
|
|
2537
2557
|
}
|
|
2538
|
-
/**表单控件类型 */
|
|
2539
|
-
_type;
|
|
2540
2558
|
set type(v) {
|
|
2541
2559
|
if (v == this._type)
|
|
2542
2560
|
return;
|
|
2543
2561
|
this._type = v;
|
|
2544
2562
|
}
|
|
2545
|
-
/**表单实体 */
|
|
2546
|
-
_Entity;
|
|
2547
2563
|
set Entity(v) {
|
|
2548
2564
|
this._Entity = v;
|
|
2549
2565
|
}
|
|
2550
|
-
/**选择的表单信息 */
|
|
2551
|
-
_selected;
|
|
2552
2566
|
set selected(v) {
|
|
2553
2567
|
this._selected = v;
|
|
2554
2568
|
}
|
|
2555
|
-
/**语言 */
|
|
2556
|
-
_culture;
|
|
2557
2569
|
set culture(v) {
|
|
2558
2570
|
this._culture = v;
|
|
2559
2571
|
}
|
|
2560
2572
|
get formConfiguration() {
|
|
2561
2573
|
return this._Entity.get('formConfiguration');
|
|
2562
2574
|
}
|
|
2563
|
-
submitclick;
|
|
2564
|
-
/**站点列表 */
|
|
2565
|
-
siteList = [];
|
|
2566
|
-
/**选择的站点id */
|
|
2567
|
-
// siteId: string = ''
|
|
2568
|
-
siteId = new FormControl('');
|
|
2569
|
-
/**站点下的版块 */
|
|
2570
|
-
SiteOfSectionList = [];
|
|
2571
2575
|
ngAfterContentInit() {
|
|
2572
2576
|
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
2573
2577
|
//Add 'implements AfterContentInit' to the class.
|
|
@@ -2621,8 +2625,8 @@ class EntryConfigComponent {
|
|
|
2621
2625
|
async siteIdChange() {
|
|
2622
2626
|
await this.getSiteOfSectionList();
|
|
2623
2627
|
}
|
|
2624
|
-
static
|
|
2625
|
-
static
|
|
2628
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: SectionAdminService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2629
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: EntryConfigComponent, selector: "cms-entry-config", inputs: { type: "type", Entity: "Entity", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<!-- <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Sites' | abpLocalization}}</label>\n <select class=\"form-select col-auto\" [(ngModel)]=\"siteId\" (change)=\"siteIdChange()\">\n <ng-container *ngFor=\"let item of siteList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n</div> -->\n<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n \n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Sections' | abpLocalization}}</label>\n <select class=\"form-select col-auto\" formControlName=\"Entry.SectionId\">\n <ng-container *ngFor=\"let item of SiteOfSectionList\">\n <option [value]=\"item.id\">{{item.displayName}}</option>\n </ng-container>\n </select>\n </div>\n\n <div class=\"mb-2\">\n <div class=\"form-check form-check-inline\">\n <input class=\"form-check-input\" type=\"checkbox\" formControlName=\"Entry.Multiple\" id=\"Multiple\">\n <label class=\"form-check-label\" for=\"Multiple\">\n {{'Cms::Multiple' | abpLocalization}}\n </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Placeholder' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Entry.Placeholder\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [":ng-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{background-color:transparent!important;border:none!important}:ng-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-color:transparent!important;box-shadow:none!important}.selectclassliveview{overflow:hidden}::ng-deep .ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:transparent}::ng-deep .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-color:transparent;box-shadow:none}::ng-deep .ant-select:not(.ant-select-customize-input) .ant-select-selector{background:transparent;border:1px solid transparent}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2626
2630
|
}
|
|
2627
2631
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryConfigComponent, decorators: [{
|
|
2628
2632
|
type: Component,
|
|
@@ -2643,49 +2647,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
2643
2647
|
/* eslint-disable @angular-eslint/component-selector */
|
|
2644
2648
|
class EntryControlComponent {
|
|
2645
2649
|
constructor() {
|
|
2650
|
+
this.fb = inject(FormBuilder);
|
|
2651
|
+
this._EntryAdminService = inject(EntryAdminService);
|
|
2652
|
+
/**字段配置列表 */
|
|
2653
|
+
this._fields = '';
|
|
2654
|
+
/** */
|
|
2655
|
+
this.listOfOption = [];
|
|
2646
2656
|
}
|
|
2647
|
-
fb = inject(FormBuilder);
|
|
2648
|
-
_EntryAdminService = inject(EntryAdminService);
|
|
2649
|
-
/**表单实体 */
|
|
2650
|
-
_entity;
|
|
2651
2657
|
set entity(v) {
|
|
2652
2658
|
this._entity = v;
|
|
2653
2659
|
if (v)
|
|
2654
2660
|
this.dataLoaded();
|
|
2655
2661
|
}
|
|
2656
|
-
/**字段配置列表 */
|
|
2657
|
-
_fields = '';
|
|
2658
2662
|
set fields(v) {
|
|
2659
2663
|
this._fields = v;
|
|
2660
2664
|
if (v)
|
|
2661
2665
|
this.dataLoaded();
|
|
2662
2666
|
}
|
|
2663
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
2664
|
-
_parentFiledName;
|
|
2665
2667
|
set parentFiledName(v) {
|
|
2666
2668
|
this._parentFiledName = v;
|
|
2667
2669
|
if (v)
|
|
2668
2670
|
this.dataLoaded();
|
|
2669
2671
|
}
|
|
2670
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
2671
|
-
_selected;
|
|
2672
2672
|
set selected(v) {
|
|
2673
2673
|
this._selected = v || [];
|
|
2674
2674
|
if (v)
|
|
2675
2675
|
this.dataLoaded();
|
|
2676
2676
|
}
|
|
2677
|
-
/**语言 */
|
|
2678
|
-
_culture;
|
|
2679
2677
|
set culture(v) {
|
|
2680
2678
|
if (v) {
|
|
2681
2679
|
this._culture = v;
|
|
2682
2680
|
this.dataLoaded();
|
|
2683
2681
|
}
|
|
2684
2682
|
}
|
|
2685
|
-
submitclick;
|
|
2686
|
-
extraProperties;
|
|
2687
|
-
/** */
|
|
2688
|
-
listOfOption = [];
|
|
2689
2683
|
async dataLoaded() {
|
|
2690
2684
|
if (this._fields && this._entity && this._parentFiledName && this._culture) {
|
|
2691
2685
|
await this.AfterInit();
|
|
@@ -2725,8 +2719,8 @@ class EntryControlComponent {
|
|
|
2725
2719
|
async SelectChange(event) {
|
|
2726
2720
|
await this.getEntryAssignList(event);
|
|
2727
2721
|
}
|
|
2728
|
-
static
|
|
2729
|
-
static
|
|
2722
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2723
|
+
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-2\">\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 <div class=\"form-select\">\r\n <nz-select [nzMaxTagCount]=\"5\" (nzOnSearch)=\"SelectChange($event)\" nzShowSearch nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </div>\r\n </ng-container>\r\n <ng-template #elseTemplate>\r\n <div class=\"form-select\">\r\n <nz-select nzShowSearch (nzOnSearch)=\"SelectChange($event)\" [nzMaxMultipleCount]=\"1\" nzMode=\"multiple\" [nzPlaceHolder]=\"_fields.field.formConfiguration['Entry.Placeholder']\"\r\n formControlName=\"{{_fields.field.name}}\">\r\n <nz-option *ngFor=\"let item of listOfOption\" [nzLabel]=\"item.title\" [nzValue]=\"item.id\"></nz-option>\r\n </nz-select>\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\r\n </div>\r\n </div>\r\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\r\n</form>", styles: ["::ng-deep .entry-control-page .form-select{padding:0}::ng-deep .entry-control-page nz-select{width:100%}::ng-deep .entry-control-page nz-select .ant-select-selector{background:transparent!important;border:none!important;padding:.275rem 1.25rem!important;box-shadow:none!important;height:auto!important}::ng-deep .entry-control-page nz-select .anticon-search,::ng-deep .entry-control-page nz-select .anticon-down{display:none}\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.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: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i4.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"] }] }); }
|
|
2730
2724
|
}
|
|
2731
2725
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: EntryControlComponent, decorators: [{
|
|
2732
2726
|
type: Component,
|
|
@@ -2747,9 +2741,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
2747
2741
|
}] } });
|
|
2748
2742
|
|
|
2749
2743
|
class MatrixConfig {
|
|
2750
|
-
// 矩阵类型
|
|
2751
|
-
'MatrixBlockTypes' = new FormArray([]);
|
|
2752
2744
|
constructor(data) {
|
|
2745
|
+
// 矩阵类型
|
|
2746
|
+
this['MatrixBlockTypes'] = new FormArray([]);
|
|
2753
2747
|
if (data) {
|
|
2754
2748
|
for (const key in data) {
|
|
2755
2749
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2760,10 +2754,10 @@ class MatrixConfig {
|
|
|
2760
2754
|
}
|
|
2761
2755
|
}
|
|
2762
2756
|
class MatrixItemConfig {
|
|
2763
|
-
displayName = ['', [Validators.required]];
|
|
2764
|
-
/**字段名字 */
|
|
2765
|
-
name = ['', [Validators.required]];
|
|
2766
2757
|
constructor(data) {
|
|
2758
|
+
this.displayName = ['', [Validators.required]];
|
|
2759
|
+
/**字段名字 */
|
|
2760
|
+
this.name = ['', [Validators.required]];
|
|
2767
2761
|
if (data) {
|
|
2768
2762
|
for (const key in data) {
|
|
2769
2763
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2774,17 +2768,17 @@ class MatrixItemConfig {
|
|
|
2774
2768
|
}
|
|
2775
2769
|
}
|
|
2776
2770
|
class matrixFieldInputBase {
|
|
2777
|
-
/**字段名称 Display name of this field */
|
|
2778
|
-
displayName = ['', [Validators.required]];
|
|
2779
|
-
/**字段唯一名称 Unique Name*/
|
|
2780
|
-
name = ['', [Validators.required]];
|
|
2781
|
-
/**描述 说明 */
|
|
2782
|
-
description = ['', []];
|
|
2783
|
-
/**FieldType字段类型 表单控件名称 */
|
|
2784
|
-
formControlName = ['TextEdit', [Validators.required]];
|
|
2785
|
-
/**动态表单配置 */
|
|
2786
|
-
formConfiguration = new FormGroup({});
|
|
2787
2771
|
constructor(data) {
|
|
2772
|
+
/**字段名称 Display name of this field */
|
|
2773
|
+
this.displayName = ['', [Validators.required]];
|
|
2774
|
+
/**字段唯一名称 Unique Name*/
|
|
2775
|
+
this.name = ['', [Validators.required]];
|
|
2776
|
+
/**描述 说明 */
|
|
2777
|
+
this.description = ['', []];
|
|
2778
|
+
/**FieldType字段类型 表单控件名称 */
|
|
2779
|
+
this.formControlName = ['TextEdit', [Validators.required]];
|
|
2780
|
+
/**动态表单配置 */
|
|
2781
|
+
this.formConfiguration = new FormGroup({});
|
|
2788
2782
|
if (data) {
|
|
2789
2783
|
for (const key in data) {
|
|
2790
2784
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2797,37 +2791,35 @@ class matrixFieldInputBase {
|
|
|
2797
2791
|
|
|
2798
2792
|
/* eslint-disable @angular-eslint/component-selector */
|
|
2799
2793
|
class MatrixConfigComponent {
|
|
2800
|
-
fb;
|
|
2801
|
-
_CmsApiService;
|
|
2802
|
-
_FieldAbstractsService;
|
|
2803
2794
|
constructor(fb, _CmsApiService, _FieldAbstractsService) {
|
|
2804
2795
|
this.fb = fb;
|
|
2805
2796
|
this._CmsApiService = _CmsApiService;
|
|
2806
2797
|
this._FieldAbstractsService = _FieldAbstractsService;
|
|
2798
|
+
/**模态框-状态 */
|
|
2799
|
+
this.matrixModalOpen = false;
|
|
2800
|
+
/**模态框-是否正在编辑 */
|
|
2801
|
+
this.isMatrixModalEdit = false;
|
|
2802
|
+
/**模态框-用于确定模态的繁忙状态是否为真 */
|
|
2803
|
+
this.modalBusy = false;
|
|
2804
|
+
/**矩阵块-选择的下标 */
|
|
2805
|
+
this.selectMatrixBlockIndex = 0;
|
|
2806
|
+
/**矩阵块-选择的矩阵下字段的下标 */
|
|
2807
|
+
this.selectMatrixFieldIndex = 0;
|
|
2807
2808
|
}
|
|
2808
|
-
/**表单控件组 */
|
|
2809
|
-
_FieldControlGroup;
|
|
2810
|
-
/**表单控件类型 */
|
|
2811
|
-
_type;
|
|
2812
2809
|
set type(v) {
|
|
2813
2810
|
this._type = v;
|
|
2814
2811
|
this.dataLoaded();
|
|
2815
2812
|
}
|
|
2816
|
-
/**表单实体 */
|
|
2817
|
-
_Entity;
|
|
2818
2813
|
set Entity(v) {
|
|
2819
2814
|
this._Entity = v;
|
|
2820
2815
|
this.dataLoaded();
|
|
2821
2816
|
}
|
|
2822
|
-
/**选择的表单信息 */
|
|
2823
|
-
_selected;
|
|
2824
2817
|
set selected(v) {
|
|
2825
2818
|
if (v) {
|
|
2826
2819
|
this._selected = v;
|
|
2827
2820
|
this.dataLoaded();
|
|
2828
2821
|
}
|
|
2829
2822
|
}
|
|
2830
|
-
submitclick;
|
|
2831
2823
|
async dataLoaded() {
|
|
2832
2824
|
if (this._Entity && this._type) {
|
|
2833
2825
|
await this.AfterInit();
|
|
@@ -2864,20 +2856,6 @@ class MatrixConfigComponent {
|
|
|
2864
2856
|
get MatrixBlockTypes() {
|
|
2865
2857
|
return this.formConfiguration.controls['MatrixBlockTypes'];
|
|
2866
2858
|
}
|
|
2867
|
-
/**模态框-状态 */
|
|
2868
|
-
matrixModalOpen = false;
|
|
2869
|
-
/**模态框-是否正在编辑 */
|
|
2870
|
-
isMatrixModalEdit = false;
|
|
2871
|
-
/**模态框-用于确定模态的繁忙状态是否为真 */
|
|
2872
|
-
modalBusy = false;
|
|
2873
|
-
/**模态框-表单 */
|
|
2874
|
-
matrixModalForm;
|
|
2875
|
-
/**表单控件模板-用于在form外提交submit */
|
|
2876
|
-
matrixModalModalSubmit;
|
|
2877
|
-
/**矩阵块-选择的下标 */
|
|
2878
|
-
selectMatrixBlockIndex = 0;
|
|
2879
|
-
/**矩阵块-选择的矩阵下字段的下标 */
|
|
2880
|
-
selectMatrixFieldIndex = 0;
|
|
2881
2859
|
/**模态框-状态改变 */
|
|
2882
2860
|
matrixModalVisibleChange(event) {
|
|
2883
2861
|
if (!event) {
|
|
@@ -2993,12 +2971,12 @@ class MatrixConfigComponent {
|
|
|
2993
2971
|
return;
|
|
2994
2972
|
FieldnameInput.patchValue(pinyin);
|
|
2995
2973
|
}
|
|
2996
|
-
static
|
|
2997
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: MatrixConfigComponent, selector: "df-matrix-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "matrixModalModalSubmit", first: true, predicate: ["matrixModalModalSubmit"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::::FormControl:Matrix' | abpLocalization}}</label>\n <div class=\"row\">\n <div class=\"col-md-3\">\n <div class=\"list-group\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::MatrixBlockType' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" (click.stop)=\"addMatrixBlockType()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixBlockChange(i)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action \"\n [class.active]=\"i===selectMatrixBlockIndex\">\n <div>\n <div>{{item.value.displayName}}</div>\n <div>{{item.value.name}}</div>\n </div>\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-light btn-sm\" id=\"dropdownBasic1\"\n style=\"z-index: 8;\" ngbDropdownToggle></button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\" style=\"z-index: 9;\">\n <button ngbDropdownItem\n (click.stop)=\"EditMatrixBlock(item.value)\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"DeleteMatrixBlock(i)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </button>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"list-group\" *ngIf=\"MatrixBlockTypes?.controls.length>0\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::Fields' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" (click.stop)=\"addMatrixField()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <ng-container *ngIf=\"i === selectMatrixBlockIndex\">\n <ng-container *ngFor=\"let el of item.controls['fields'].controls;let fi =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixFieldChange(i,fi)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action \"\n [class.active]=\"fi===selectMatrixFieldIndex\">\n <div>\n <div>{{el.value.displayName}}</div>\n <div>{{el.value.name}}</div>\n </div>\n <button type=\"button\"\n (click.stop)=\"deleteMatrixField(item.controls['fields'],fi)\"\n class=\"btn btn-sm btn-li\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </button>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-6\" formArrayName=\"MatrixBlockTypes\">\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <div [formGroupName]=\"i\" [hidden]=\"i !== selectMatrixBlockIndex\">\n <div formArrayName=\"fields\">\n <ng-container *ngFor=\"let itemf of item.controls['fields'].controls;let fi =index\">\n <div [formGroupName]=\"fi\" [hidden]=\"fi !== selectMatrixFieldIndex\">\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"MatrixFieldDisplayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"name\">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n <div class=\"form-text\">\n {{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"formControlName\">{{'Cms::FieldType' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\" (change)=\"setConfigComponent()\">\n <ng-container *ngFor=\"let itemC of _FieldControlGroup;let i =index\">\n <option [value]=\"itemC.name\">{{itemC.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"itemf.value.formControlName&&itemf\">\n <df-dynamic [type]=\"itemf.value.formControlName\" [entity]=\"itemf\"\n [selected]=\"_selected?_selected.formConfiguration?.MatrixBlockTypes[i]?.fields[fi]:''\"></df-dynamic>\n \n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>\n\n\n\n<abp-modal [(visible)]=\"matrixModalOpen\" [busy]=\"modalBusy\" (visibleChange)=\"matrixModalVisibleChange($event)\" >\n <ng-template #abpHeader>\n <h3>{{isMatrixEdit?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"matrixModalForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"matrixModalForm\"\n (ngSubmit)=\"createOrEditSave()\">\n <button type=\"submit\" #matrixModalModalSubmit style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"displayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"name\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"matrixModalModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i10.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8$2.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
|
|
2974
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: CmsApiService }, { token: FieldAbstractsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2975
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: MatrixConfigComponent, selector: "df-matrix-config", inputs: { type: "type", Entity: "Entity", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "matrixModalModalSubmit", first: true, predicate: ["matrixModalModalSubmit"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::::FormControl:Matrix' | abpLocalization}}</label>\n <div class=\"row\">\n <div class=\"col-md-3\">\n <div class=\"list-group\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::MatrixBlockType' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" (click.stop)=\"addMatrixBlockType()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixBlockChange(i)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action \"\n [class.active]=\"i===selectMatrixBlockIndex\">\n <div>\n <div>{{item.value.displayName}}</div>\n <div>{{item.value.name}}</div>\n </div>\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-light btn-sm\" id=\"dropdownBasic1\"\n style=\"z-index: 8;\" ngbDropdownToggle></button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\" style=\"z-index: 9;\">\n <button ngbDropdownItem\n (click.stop)=\"EditMatrixBlock(item.value)\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"DeleteMatrixBlock(i)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </button>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"list-group\" *ngIf=\"MatrixBlockTypes?.controls.length>0\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::Fields' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" (click.stop)=\"addMatrixField()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <ng-container *ngIf=\"i === selectMatrixBlockIndex\">\n <ng-container *ngFor=\"let el of item.controls['fields'].controls;let fi =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixFieldChange(i,fi)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action \"\n [class.active]=\"fi===selectMatrixFieldIndex\">\n <div>\n <div>{{el.value.displayName}}</div>\n <div>{{el.value.name}}</div>\n </div>\n <button type=\"button\"\n (click.stop)=\"deleteMatrixField(item.controls['fields'],fi)\"\n class=\"btn btn-sm btn-li\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </button>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-6\" formArrayName=\"MatrixBlockTypes\">\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <div [formGroupName]=\"i\" [hidden]=\"i !== selectMatrixBlockIndex\">\n <div formArrayName=\"fields\">\n <ng-container *ngFor=\"let itemf of item.controls['fields'].controls;let fi =index\">\n <div [formGroupName]=\"fi\" [hidden]=\"fi !== selectMatrixFieldIndex\">\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"MatrixFieldDisplayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"name\">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n <div class=\"form-text\">\n {{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"formControlName\">{{'Cms::FieldType' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\" (change)=\"setConfigComponent()\">\n <ng-container *ngFor=\"let itemC of _FieldControlGroup;let i =index\">\n <option [value]=\"itemC.name\">{{itemC.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"itemf.value.formControlName&&itemf\">\n <df-dynamic [type]=\"itemf.value.formControlName\" [entity]=\"itemf\"\n [selected]=\"_selected?_selected.formConfiguration?.MatrixBlockTypes[i]?.fields[fi]:''\"></df-dynamic>\n \n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>\n\n\n\n<abp-modal [(visible)]=\"matrixModalOpen\" [busy]=\"modalBusy\" (visibleChange)=\"matrixModalVisibleChange($event)\" >\n <ng-template #abpHeader>\n <h3>{{isMatrixEdit?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"matrixModalForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"matrixModalForm\"\n (keydown.enter)=\"$event.preventDefault()\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #matrixModalModalSubmit style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"displayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"name\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"matrixModalModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "directive", type: i10.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i10.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i10.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "directive", type: i10.NgbDropdownItem, selector: "[ngbDropdownItem]", inputs: ["tabindex", "disabled"] }, { kind: "directive", type: i10.NgbDropdownButtonItem, selector: "button[ngbDropdownItem]" }, { kind: "component", type: i8$2.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2998
2976
|
}
|
|
2999
2977
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixConfigComponent, decorators: [{
|
|
3000
2978
|
type: Component,
|
|
3001
|
-
args: [{ selector: 'df-matrix-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::::FormControl:Matrix' | abpLocalization}}</label>\n <div class=\"row\">\n <div class=\"col-md-3\">\n <div class=\"list-group\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::MatrixBlockType' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" (click.stop)=\"addMatrixBlockType()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixBlockChange(i)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action \"\n [class.active]=\"i===selectMatrixBlockIndex\">\n <div>\n <div>{{item.value.displayName}}</div>\n <div>{{item.value.name}}</div>\n </div>\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-light btn-sm\" id=\"dropdownBasic1\"\n style=\"z-index: 8;\" ngbDropdownToggle></button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\" style=\"z-index: 9;\">\n <button ngbDropdownItem\n (click.stop)=\"EditMatrixBlock(item.value)\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"DeleteMatrixBlock(i)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </button>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"list-group\" *ngIf=\"MatrixBlockTypes?.controls.length>0\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::Fields' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" (click.stop)=\"addMatrixField()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <ng-container *ngIf=\"i === selectMatrixBlockIndex\">\n <ng-container *ngFor=\"let el of item.controls['fields'].controls;let fi =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixFieldChange(i,fi)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action \"\n [class.active]=\"fi===selectMatrixFieldIndex\">\n <div>\n <div>{{el.value.displayName}}</div>\n <div>{{el.value.name}}</div>\n </div>\n <button type=\"button\"\n (click.stop)=\"deleteMatrixField(item.controls['fields'],fi)\"\n class=\"btn btn-sm btn-li\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </button>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-6\" formArrayName=\"MatrixBlockTypes\">\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <div [formGroupName]=\"i\" [hidden]=\"i !== selectMatrixBlockIndex\">\n <div formArrayName=\"fields\">\n <ng-container *ngFor=\"let itemf of item.controls['fields'].controls;let fi =index\">\n <div [formGroupName]=\"fi\" [hidden]=\"fi !== selectMatrixFieldIndex\">\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"MatrixFieldDisplayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"name\">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n <div class=\"form-text\">\n {{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"formControlName\">{{'Cms::FieldType' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\" (change)=\"setConfigComponent()\">\n <ng-container *ngFor=\"let itemC of _FieldControlGroup;let i =index\">\n <option [value]=\"itemC.name\">{{itemC.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"itemf.value.formControlName&&itemf\">\n <df-dynamic [type]=\"itemf.value.formControlName\" [entity]=\"itemf\"\n [selected]=\"_selected?_selected.formConfiguration?.MatrixBlockTypes[i]?.fields[fi]:''\"></df-dynamic>\n \n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>\n\n\n\n<abp-modal [(visible)]=\"matrixModalOpen\" [busy]=\"modalBusy\" (visibleChange)=\"matrixModalVisibleChange($event)\" >\n <ng-template #abpHeader>\n <h3>{{isMatrixEdit?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"matrixModalForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"matrixModalForm\"\n (ngSubmit)=\"createOrEditSave()\">\n <button type=\"submit\" #matrixModalModalSubmit style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"displayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"name\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"matrixModalModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>" }]
|
|
2979
|
+
args: [{ selector: 'df-matrix-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::::FormControl:Matrix' | abpLocalization}}</label>\n <div class=\"row\">\n <div class=\"col-md-3\">\n <div class=\"list-group\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::MatrixBlockType' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" (click.stop)=\"addMatrixBlockType()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixBlockChange(i)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action \"\n [class.active]=\"i===selectMatrixBlockIndex\">\n <div>\n <div>{{item.value.displayName}}</div>\n <div>{{item.value.name}}</div>\n </div>\n <div ngbDropdown class=\"d-inline-block\">\n <button type=\"button\" class=\"btn btn-light btn-sm\" id=\"dropdownBasic1\"\n style=\"z-index: 8;\" ngbDropdownToggle></button>\n <div ngbDropdownMenu aria-labelledby=\"dropdownBasic1\" style=\"z-index: 9;\">\n <button ngbDropdownItem\n (click.stop)=\"EditMatrixBlock(item.value)\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click.stop)=\"DeleteMatrixBlock(i)\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </div>\n </div>\n </button>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-3\">\n <div class=\"list-group\" *ngIf=\"MatrixBlockTypes?.controls.length>0\">\n <li class=\"list-group-item d-flex align-items-center justify-content-between\"\n aria-current=\"true\">\n {{'Cms::Fields' | abpLocalization}}\n <button class=\"btn btn-light btn-sm p-0\" (click.stop)=\"addMatrixField()\">\n <i class=\"fas fa-plus-circle p-1\"></i>\n </button>\n </li>\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <ng-container *ngIf=\"i === selectMatrixBlockIndex\">\n <ng-container *ngFor=\"let el of item.controls['fields'].controls;let fi =index\">\n <button type=\"button\" (click.stop)=\"selectMatrixFieldChange(i,fi)\"\n class=\"list-group-item d-flex align-items-center justify-content-between list-group-item-action \"\n [class.active]=\"fi===selectMatrixFieldIndex\">\n <div>\n <div>{{el.value.displayName}}</div>\n <div>{{el.value.name}}</div>\n </div>\n <button type=\"button\"\n (click.stop)=\"deleteMatrixField(item.controls['fields'],fi)\"\n class=\"btn btn-sm btn-li\">{{'AbpUi::Delete' | abpLocalization}}</button>\n </button>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"col-md-6\" formArrayName=\"MatrixBlockTypes\">\n <ng-container *ngFor=\"let item of MatrixBlockTypes.controls;let i =index\">\n <div [formGroupName]=\"i\" [hidden]=\"i !== selectMatrixBlockIndex\">\n <div formArrayName=\"fields\">\n <ng-container *ngFor=\"let itemf of item.controls['fields'].controls;let fi =index\">\n <div [formGroupName]=\"fi\" [hidden]=\"fi !== selectMatrixFieldIndex\">\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"MatrixFieldDisplayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"name\">{{'DigniteAbpForms::FieldName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n <div class=\"form-text\">\n {{'DigniteAbpForms::FieldNameHelpText' | abpLocalization}}</div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"description\">{{'Cms::Description' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"description\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\"\n for=\"formControlName\">{{'Cms::FieldType' | abpLocalization}}</label>\n <select class=\"form-select\" formControlName=\"formControlName\" (change)=\"setConfigComponent()\">\n <ng-container *ngFor=\"let itemC of _FieldControlGroup;let i =index\">\n <option [value]=\"itemC.name\">{{itemC.displayName}}</option>\n </ng-container>\n </select>\n </div>\n <ng-container *ngIf=\"itemf.value.formControlName&&itemf\">\n <df-dynamic [type]=\"itemf.value.formControlName\" [entity]=\"itemf\"\n [selected]=\"_selected?_selected.formConfiguration?.MatrixBlockTypes[i]?.fields[fi]:''\"></df-dynamic>\n \n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n\n </div>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>\n\n\n\n<abp-modal [(visible)]=\"matrixModalOpen\" [busy]=\"modalBusy\" (visibleChange)=\"matrixModalVisibleChange($event)\" >\n <ng-template #abpHeader>\n <h3>{{isMatrixEdit?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"matrixModalForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"matrixModalForm\"\n (keydown.enter)=\"$event.preventDefault()\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #matrixModalModalSubmit style=\"display: none\"></button>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"displayName\">{{'Cms::DisplayName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"displayName\"\n (blur)=\"displayNameInputBlur($event)\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\" for=\"name\">{{'Cms::Name' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"name\">\n </div>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"matrixModalModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>" }]
|
|
3002
2980
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: CmsApiService }, { type: FieldAbstractsService }], propDecorators: { type: [{
|
|
3003
2981
|
type: Input
|
|
3004
2982
|
}], Entity: [{
|
|
@@ -3015,44 +2993,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
3015
2993
|
|
|
3016
2994
|
/* eslint-disable @angular-eslint/component-selector */
|
|
3017
2995
|
class MatrixControlComponent {
|
|
3018
|
-
fb;
|
|
3019
2996
|
constructor(fb) {
|
|
3020
2997
|
this.fb = fb;
|
|
2998
|
+
/**字段配置列表 */
|
|
2999
|
+
this._fields = '';
|
|
3000
|
+
/**矩阵列表 */
|
|
3001
|
+
this.MatrixBlockTypesList = [];
|
|
3021
3002
|
}
|
|
3022
|
-
/**表单实体 */
|
|
3023
|
-
_entity;
|
|
3024
3003
|
set entity(v) {
|
|
3025
3004
|
this._entity = v;
|
|
3026
3005
|
this.dataLoaded();
|
|
3027
3006
|
}
|
|
3028
|
-
/**字段配置列表 */
|
|
3029
|
-
_fields = '';
|
|
3030
3007
|
set fields(v) {
|
|
3031
3008
|
this._fields = v;
|
|
3032
3009
|
this.dataLoaded();
|
|
3033
3010
|
}
|
|
3034
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
3035
|
-
_parentFiledName;
|
|
3036
3011
|
set parentFiledName(v) {
|
|
3037
3012
|
this._parentFiledName = v;
|
|
3038
3013
|
this.dataLoaded();
|
|
3039
3014
|
}
|
|
3040
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
3041
|
-
_selected;
|
|
3042
3015
|
set selected(v) {
|
|
3043
3016
|
this._selected = v;
|
|
3044
3017
|
if (v) {
|
|
3045
3018
|
this.dataLoaded();
|
|
3046
3019
|
}
|
|
3047
3020
|
}
|
|
3048
|
-
/**语言 */
|
|
3049
|
-
_culture;
|
|
3050
3021
|
set culture(v) {
|
|
3051
3022
|
this._culture = v;
|
|
3052
3023
|
}
|
|
3053
|
-
submitclick;
|
|
3054
|
-
/** 获取父级字段代表的表单组*/
|
|
3055
|
-
extraProperties;
|
|
3056
3024
|
/**数据加载完成 */
|
|
3057
3025
|
async dataLoaded() {
|
|
3058
3026
|
if (this._fields && this._entity && this._parentFiledName) {
|
|
@@ -3063,9 +3031,6 @@ class MatrixControlComponent {
|
|
|
3063
3031
|
this.fieldNameControl.patchValue(this._selected);
|
|
3064
3032
|
}
|
|
3065
3033
|
}
|
|
3066
|
-
formConfiguration;
|
|
3067
|
-
/**获取表格字段代表的控件 */
|
|
3068
|
-
fieldNameControl;
|
|
3069
3034
|
AfterInit() {
|
|
3070
3035
|
return new Promise((resolve, rejects) => {
|
|
3071
3036
|
let formConfiguration = this._fields.field.formConfiguration;
|
|
@@ -3081,8 +3046,6 @@ class MatrixControlComponent {
|
|
|
3081
3046
|
resolve(true);
|
|
3082
3047
|
});
|
|
3083
3048
|
}
|
|
3084
|
-
/**矩阵列表 */
|
|
3085
|
-
MatrixBlockTypesList = [];
|
|
3086
3049
|
/**增加指定矩阵控件项 */
|
|
3087
3050
|
addMatrixControl(item) {
|
|
3088
3051
|
this.fieldNameControl.push(this.fb.group({
|
|
@@ -3097,8 +3060,8 @@ class MatrixControlComponent {
|
|
|
3097
3060
|
deleteMatrixControl(index) {
|
|
3098
3061
|
this.fieldNameControl.removeAt(index);
|
|
3099
3062
|
}
|
|
3100
|
-
static
|
|
3101
|
-
static
|
|
3063
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixControlComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3064
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: MatrixControlComponent, selector: "df-matrix-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-2\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <div [formArrayName]=\"_fields.field.name\">\n <ng-container *ngFor=\"let item of fieldNameControl.controls;let i=index\">\n <div class=\"card mb-3 border \" [formGroupName]=\"i\">\n <div class=\"card-header d-flex align-items-center justify-content-between border-bottom pt-1\">\n <div>{{item.value.displayName}}</div>\n <button class=\"btn btn-sm btn-light p-0\" (click.stop)=\"deleteMatrixControl(i)\"><i\n class=\"fas fa-trash p-2\"></i></button>\n </div>\n <div class=\"card-body\">\n <ng-container *ngFor=\"let el of MatrixBlockTypesList;let il =index\">\n <ng-container *ngIf=\"el.name===item.value.matrixBlockTypeName\">\n <ng-container *ngFor=\"let elf of el.fields; let fi=index\">\n <ng-container *ngIf=\"item&&elf&&_culture\">\n <df-dynamic [entity]=\"item\"\n [fields]=\"{ field: elf,displayName:elf.displayName }\"\n [selected]=\"_selected ? _selected[i]?_selected[i][_parentFiledName][elf.name]:'': ''\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"_culture\"></df-dynamic>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n <div>\n <div class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">\n <ng-container *ngFor=\"let item of MatrixBlockTypesList;let i =index\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\" (click.stop)=\"addMatrixControl(item)\"><i\n class=\"fas fa-plus me-1\"></i>{{item.displayName}}</button>\n </ng-container>\n </div>\n </div>\n <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i8$2.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }] }); }
|
|
3102
3065
|
}
|
|
3103
3066
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: MatrixControlComponent, decorators: [{
|
|
3104
3067
|
type: Component,
|
|
@@ -3119,9 +3082,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
3119
3082
|
}] } });
|
|
3120
3083
|
|
|
3121
3084
|
class TableConfig {
|
|
3122
|
-
// 选项
|
|
3123
|
-
TableColumns = new FormArray([]);
|
|
3124
3085
|
constructor(data) {
|
|
3086
|
+
// 选项
|
|
3087
|
+
this.TableColumns = new FormArray([]);
|
|
3125
3088
|
if (data) {
|
|
3126
3089
|
for (const key in data) {
|
|
3127
3090
|
if (data.hasOwnProperty(key)) {
|
|
@@ -3132,19 +3095,19 @@ class TableConfig {
|
|
|
3132
3095
|
}
|
|
3133
3096
|
}
|
|
3134
3097
|
class TableFormControl {
|
|
3135
|
-
/**列标题 */
|
|
3136
|
-
displayName = ['', [Validators.required]];
|
|
3137
|
-
/**空间配置 */
|
|
3138
|
-
formConfiguration = new FormGroup({});
|
|
3139
|
-
/**列名 */
|
|
3140
|
-
name = ['', [Validators.required]];
|
|
3141
|
-
//控件标识
|
|
3142
|
-
formControlName = ['', [Validators.required]];
|
|
3143
|
-
/**是否必填 */
|
|
3144
|
-
required = [false];
|
|
3145
|
-
/**描述 */
|
|
3146
|
-
description = [''];
|
|
3147
3098
|
constructor(data) {
|
|
3099
|
+
/**列标题 */
|
|
3100
|
+
this.displayName = ['', [Validators.required]];
|
|
3101
|
+
/**空间配置 */
|
|
3102
|
+
this.formConfiguration = new FormGroup({});
|
|
3103
|
+
/**列名 */
|
|
3104
|
+
this.name = ['', [Validators.required]];
|
|
3105
|
+
//控件标识
|
|
3106
|
+
this.formControlName = ['', [Validators.required]];
|
|
3107
|
+
/**是否必填 */
|
|
3108
|
+
this.required = [false];
|
|
3109
|
+
/**描述 */
|
|
3110
|
+
this.description = [''];
|
|
3148
3111
|
if (data) {
|
|
3149
3112
|
for (const key in data) {
|
|
3150
3113
|
if (data.hasOwnProperty(key)) {
|
|
@@ -3157,32 +3120,25 @@ class TableFormControl {
|
|
|
3157
3120
|
|
|
3158
3121
|
/* eslint-disable @angular-eslint/component-selector */
|
|
3159
3122
|
class TableConfigComponent {
|
|
3160
|
-
fb;
|
|
3161
|
-
_CmsApiService;
|
|
3162
|
-
_FieldAbstractsService;
|
|
3163
3123
|
constructor(fb, _CmsApiService, _FieldAbstractsService) {
|
|
3164
3124
|
this.fb = fb;
|
|
3165
3125
|
this._CmsApiService = _CmsApiService;
|
|
3166
3126
|
this._FieldAbstractsService = _FieldAbstractsService;
|
|
3127
|
+
/**创建站点模态框状态 */
|
|
3128
|
+
this.tableSelectOpen = false;
|
|
3129
|
+
/**用于确定模态的繁忙状态是否为真 */
|
|
3130
|
+
this.modalBusy = false;
|
|
3167
3131
|
}
|
|
3168
|
-
/**表单实体 */
|
|
3169
|
-
_Entity;
|
|
3170
3132
|
set Entity(v) {
|
|
3171
3133
|
this._Entity = v;
|
|
3172
3134
|
this.dataLoaded();
|
|
3173
3135
|
}
|
|
3174
|
-
/**选择的表单信息 */
|
|
3175
|
-
_selected;
|
|
3176
3136
|
set selected(v) {
|
|
3177
3137
|
if (v) {
|
|
3178
3138
|
this._selected = v;
|
|
3179
3139
|
this.dataLoaded();
|
|
3180
3140
|
}
|
|
3181
3141
|
}
|
|
3182
|
-
/**表单控件组 */
|
|
3183
|
-
_fieldControlGroup;
|
|
3184
|
-
/**表单控件类型 */
|
|
3185
|
-
_type;
|
|
3186
3142
|
set type(v) {
|
|
3187
3143
|
this._type = v;
|
|
3188
3144
|
this.dataLoaded();
|
|
@@ -3193,7 +3149,6 @@ class TableConfigComponent {
|
|
|
3193
3149
|
get TableColumns() {
|
|
3194
3150
|
return this.formConfiguration.controls['TableColumns'];
|
|
3195
3151
|
}
|
|
3196
|
-
submitclick;
|
|
3197
3152
|
async dataLoaded() {
|
|
3198
3153
|
if (this._Entity && this._type) {
|
|
3199
3154
|
await this.AfterInit();
|
|
@@ -3227,7 +3182,6 @@ class TableConfigComponent {
|
|
|
3227
3182
|
resolve(true);
|
|
3228
3183
|
});
|
|
3229
3184
|
}
|
|
3230
|
-
itemForm;
|
|
3231
3185
|
/**选择表格的表单控件 */
|
|
3232
3186
|
selectTableControl(event, i, item) {
|
|
3233
3187
|
this.CurrentSelectionTableControlName = event.target.value;
|
|
@@ -3236,19 +3190,6 @@ class TableConfigComponent {
|
|
|
3236
3190
|
this.TableColumnsIndex = i;
|
|
3237
3191
|
this.itemForm = item;
|
|
3238
3192
|
}
|
|
3239
|
-
CurrentSelectionTableControlName;
|
|
3240
|
-
/**正在创建或编辑的表格项下标 */
|
|
3241
|
-
TableColumnsIndex;
|
|
3242
|
-
/**创建站点模态框状态 */
|
|
3243
|
-
tableSelectOpen = false;
|
|
3244
|
-
/**用于确定模态的繁忙状态是否为真 */
|
|
3245
|
-
modalBusy = false;
|
|
3246
|
-
/**创建站点表单 */
|
|
3247
|
-
tableSelectForm;
|
|
3248
|
-
/**表格已选择数据 */
|
|
3249
|
-
_tableSelected;
|
|
3250
|
-
/**表单控件模板-动态赋值表单控件 */
|
|
3251
|
-
tableSelectModalSubmit;
|
|
3252
3193
|
/**创建站点模态框状态改变 */
|
|
3253
3194
|
tableSelectVisibleChange(event) {
|
|
3254
3195
|
if (!event) {
|
|
@@ -3298,12 +3239,12 @@ class TableConfigComponent {
|
|
|
3298
3239
|
return;
|
|
3299
3240
|
nameInput.patchValue(pinyin);
|
|
3300
3241
|
}
|
|
3301
|
-
static
|
|
3302
|
-
static
|
|
3242
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: CmsApiService }, { token: FieldAbstractsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3243
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TableConfigComponent, selector: "df-table-config", inputs: { Entity: "Entity", selected: "selected", type: "type" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }, { propertyName: "tableSelectModalSubmit", first: true, predicate: ["tableSelectModalSubmit"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::SelectListItem' | abpLocalization}}</label>\n <table class=\"table\">\n <thead>\n <tr>\n <th scope=\"col\">{{'Cms::TableColumnDisplayName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnForm' | abpLocalization}}</th>\n <th scope=\"col\" class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" (click.stop)=\"addTableColumns()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button>\n </th>\n </tr>\n </thead>\n <tbody formArrayName=\"TableColumns\">\n <ng-container *ngFor=\"let item of TableColumns.controls;let i=index\">\n <tr [formGroupName]=\"i\">\n <td><input type=\"text\" class=\"form-control\" formControlName=\"displayName\" (blur)=\"disPlayNameInputBlur($event,item)\" ></td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"name\"></td>\n <td>\n <select class=\"form-select\" formControlName=\"formControlName\"\n (change)=\"selectTableControl($event,i,item)\">\n <option value=\"\">SelectFrom</option>\n <ng-container *ngFor=\"let item_f of _fieldControlGroup;let i_f =index\">\n <option [value]=\"item_f.name\">{{item_f.displayName}}</option>\n </ng-container>\n </select>\n </td>\n <td scope=\"row\">\n <div class=\"flex-start\">\n <button class=\"btn btn-light btn-sm \" (click.stop)=\"EditSitesBtn(item,i)\">\n <i class=\"fas fa-edit\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" (click.stop)=\"deleteTableColumns(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" *ngIf=\"i!==0\"\n (click.stop)=\"TableArrowUpOrDown('up',i)\">\n <i class=\"fas fa-arrow-up\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" *ngIf=\"i!==TableColumns.controls.length-1\"\n (click.stop)=\"TableArrowUpOrDown('down',i)\">\n <i class=\"fas fa-arrow-down\"></i>\n </button>\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>\n\n\n<abp-modal [(visible)]=\"tableSelectOpen\" [busy]=\"modalBusy\" (visibleChange)=\"tableSelectVisibleChange($event)\" [options]=\"{ size: CurrentSelectionTableControlName=='Matrix'?'xl':'' ,scrollable:false }\">\n <ng-template #abpHeader>\n <h3>{{_tableSelected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"tableSelectForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"tableSelectForm\"\n (keydown.enter)=\"$event.preventDefault()\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #tableSelectModalSubmit style=\"display: none\"></button>\n <ng-container *ngIf=\"CurrentSelectionTableControlName&&tableSelectForm\">\n <df-dynamic [type]=\"CurrentSelectionTableControlName\" [entity]=\"tableSelectForm\"\n [selected]=\"_tableSelected\" [formGroup]=\"tableSelectForm\"></df-dynamic>\n </ng-container>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"tableSelectModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [".flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-start{display:flex;align-items:center;justify-content:flex-start}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i9.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i3.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "formName", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { kind: "component", type: i3.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { kind: "directive", type: i3.ModalCloseDirective, selector: "[abpClose]" }, { kind: "component", type: i8$2.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3303
3244
|
}
|
|
3304
3245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableConfigComponent, decorators: [{
|
|
3305
3246
|
type: Component,
|
|
3306
|
-
args: [{ selector: 'df-table-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::SelectListItem' | abpLocalization}}</label>\n <table class=\"table\">\n <thead>\n <tr>\n <th scope=\"col\">{{'Cms::TableColumnDisplayName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnForm' | abpLocalization}}</th>\n <th scope=\"col\" class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" (click.stop)=\"addTableColumns()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button>\n </th>\n </tr>\n </thead>\n <tbody formArrayName=\"TableColumns\">\n <ng-container *ngFor=\"let item of TableColumns.controls;let i=index\">\n <tr [formGroupName]=\"i\">\n <td><input type=\"text\" class=\"form-control\" formControlName=\"displayName\" (blur)=\"disPlayNameInputBlur($event,item)\" ></td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"name\"></td>\n <td>\n <select class=\"form-select\" formControlName=\"formControlName\"\n (change)=\"selectTableControl($event,i,item)\">\n <option value=\"\">SelectFrom</option>\n <ng-container *ngFor=\"let item_f of _fieldControlGroup;let i_f =index\">\n <option [value]=\"item_f.name\">{{item_f.displayName}}</option>\n </ng-container>\n </select>\n </td>\n <td scope=\"row\">\n <div class=\"flex-start\">\n <button class=\"btn btn-light btn-sm \" (click.stop)=\"EditSitesBtn(item,i)\">\n <i class=\"fas fa-edit\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" (click.stop)=\"deleteTableColumns(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" *ngIf=\"i!==0\"\n (click.stop)=\"TableArrowUpOrDown('up',i)\">\n <i class=\"fas fa-arrow-up\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" *ngIf=\"i!==TableColumns.controls.length-1\"\n (click.stop)=\"TableArrowUpOrDown('down',i)\">\n <i class=\"fas fa-arrow-down\"></i>\n </button>\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>\n\n\n<abp-modal [(visible)]=\"tableSelectOpen\" [busy]=\"modalBusy\" (visibleChange)=\"tableSelectVisibleChange($event)\" [options]=\"{ size: CurrentSelectionTableControlName=='Matrix'?'xl':'' ,scrollable:false }\">\n <ng-template #abpHeader>\n <h3>{{_tableSelected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"tableSelectForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"tableSelectForm\"\n (
|
|
3247
|
+
args: [{ selector: 'df-table-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpForms::SelectListItem' | abpLocalization}}</label>\n <table class=\"table\">\n <thead>\n <tr>\n <th scope=\"col\">{{'Cms::TableColumnDisplayName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnName' | abpLocalization}}</th>\n <th scope=\"col\">{{'Cms::TableColumnForm' | abpLocalization}}</th>\n <th scope=\"col\" class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" (click.stop)=\"addTableColumns()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button>\n </th>\n </tr>\n </thead>\n <tbody formArrayName=\"TableColumns\">\n <ng-container *ngFor=\"let item of TableColumns.controls;let i=index\">\n <tr [formGroupName]=\"i\">\n <td><input type=\"text\" class=\"form-control\" formControlName=\"displayName\" (blur)=\"disPlayNameInputBlur($event,item)\" ></td>\n <td><input type=\"text\" class=\"form-control\" formControlName=\"name\"></td>\n <td>\n <select class=\"form-select\" formControlName=\"formControlName\"\n (change)=\"selectTableControl($event,i,item)\">\n <option value=\"\">SelectFrom</option>\n <ng-container *ngFor=\"let item_f of _fieldControlGroup;let i_f =index\">\n <option [value]=\"item_f.name\">{{item_f.displayName}}</option>\n </ng-container>\n </select>\n </td>\n <td scope=\"row\">\n <div class=\"flex-start\">\n <button class=\"btn btn-light btn-sm \" (click.stop)=\"EditSitesBtn(item,i)\">\n <i class=\"fas fa-edit\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" (click.stop)=\"deleteTableColumns(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" *ngIf=\"i!==0\"\n (click.stop)=\"TableArrowUpOrDown('up',i)\">\n <i class=\"fas fa-arrow-up\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" *ngIf=\"i!==TableColumns.controls.length-1\"\n (click.stop)=\"TableArrowUpOrDown('down',i)\">\n <i class=\"fas fa-arrow-down\"></i>\n </button>\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>\n\n\n<abp-modal [(visible)]=\"tableSelectOpen\" [busy]=\"modalBusy\" (visibleChange)=\"tableSelectVisibleChange($event)\" [options]=\"{ size: CurrentSelectionTableControlName=='Matrix'?'xl':'' ,scrollable:false }\">\n <ng-template #abpHeader>\n <h3>{{_tableSelected?('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)}}</h3>\n </ng-template>\n <ng-template #abpBody>\n <ng-template #loaderRef>\n <div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\" aria-hidden=\"true\"></i></div>\n </ng-template>\n <ng-container *ngIf=\"tableSelectForm; else loaderRef\">\n <form class=\"sites-modal-form\" #myForm=\"ngForm\" [formGroup]=\"tableSelectForm\"\n (keydown.enter)=\"$event.preventDefault()\" (submit)=\"createOrEditSave()\">\n <button type=\"submit\" #tableSelectModalSubmit style=\"display: none\"></button>\n <ng-container *ngIf=\"CurrentSelectionTableControlName&&tableSelectForm\">\n <df-dynamic [type]=\"CurrentSelectionTableControlName\" [entity]=\"tableSelectForm\"\n [selected]=\"_tableSelected\" [formGroup]=\"tableSelectForm\"></df-dynamic>\n </ng-container>\n </form>\n </ng-container>\n </ng-template>\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>{{'AbpUi::Close' | abpLocalization}}</button>\n <abp-button iconClass=\"fa fa-check\"\n (click)=\"tableSelectModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal>", styles: [".flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-start{display:flex;align-items:center;justify-content:flex-start}\n"] }]
|
|
3307
3248
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: CmsApiService }, { type: FieldAbstractsService }], propDecorators: { Entity: [{
|
|
3308
3249
|
type: Input
|
|
3309
3250
|
}], selected: [{
|
|
@@ -3320,42 +3261,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
3320
3261
|
|
|
3321
3262
|
class TableControlComponent {
|
|
3322
3263
|
constructor() {
|
|
3264
|
+
this.fb = inject(FormBuilder);
|
|
3265
|
+
/**字段配置列表 */
|
|
3266
|
+
this._fields = '';
|
|
3323
3267
|
}
|
|
3324
|
-
fb = inject(FormBuilder);
|
|
3325
|
-
/**表单实体 */
|
|
3326
|
-
_entity;
|
|
3327
3268
|
set entity(v) {
|
|
3328
3269
|
this._entity = v;
|
|
3329
3270
|
this.dataLoaded();
|
|
3330
3271
|
}
|
|
3331
|
-
/**字段配置列表 */
|
|
3332
|
-
_fields = '';
|
|
3333
3272
|
set fields(v) {
|
|
3334
3273
|
this._fields = v;
|
|
3335
3274
|
this.dataLoaded();
|
|
3336
3275
|
}
|
|
3337
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
3338
|
-
_parentFiledName;
|
|
3339
3276
|
set parentFiledName(v) {
|
|
3340
3277
|
this._parentFiledName = v;
|
|
3341
3278
|
this.dataLoaded();
|
|
3342
3279
|
}
|
|
3343
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
3344
|
-
_selected;
|
|
3345
3280
|
set selected(v) {
|
|
3346
3281
|
this._selected = v;
|
|
3347
3282
|
if (v) {
|
|
3348
3283
|
this.dataLoaded();
|
|
3349
3284
|
}
|
|
3350
3285
|
}
|
|
3351
|
-
/**语言 */
|
|
3352
|
-
_culture;
|
|
3353
3286
|
set culture(v) {
|
|
3354
3287
|
this._culture = v;
|
|
3355
3288
|
}
|
|
3356
|
-
submitclick;
|
|
3357
|
-
/** 获取父级字段代表的表单组*/
|
|
3358
|
-
extraProperties;
|
|
3359
3289
|
/**数据加载完成 */
|
|
3360
3290
|
async dataLoaded() {
|
|
3361
3291
|
if (this._fields && this._entity && this._parentFiledName) {
|
|
@@ -3364,9 +3294,6 @@ class TableControlComponent {
|
|
|
3364
3294
|
this.submitclick.nativeElement.click();
|
|
3365
3295
|
}
|
|
3366
3296
|
}
|
|
3367
|
-
formConfiguration;
|
|
3368
|
-
/**获取表格字段代表的控件 */
|
|
3369
|
-
fieldNameControl;
|
|
3370
3297
|
AfterInit() {
|
|
3371
3298
|
return new Promise((resolve, rejects) => {
|
|
3372
3299
|
let ValidatorsArray = [];
|
|
@@ -3408,8 +3335,8 @@ class TableControlComponent {
|
|
|
3408
3335
|
this.fieldNameControl.insert(lastindex, controlAt);
|
|
3409
3336
|
this._selected = this.fieldNameControl.value;
|
|
3410
3337
|
}
|
|
3411
|
-
static
|
|
3412
|
-
static
|
|
3338
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3339
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TableControlComponent, selector: "df-table-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected", culture: "culture" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-2\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <table class=\"table\">\n <thead>\n <tr>\n <ng-container *ngFor=\"let item of formConfiguration.TableColumns\">\n <th scope=\"col\">{{ item.displayName }}</th>\n </ng-container>\n <th scope=\"col\" class=\"flex-end\">\n <button class=\"btn btn-light btn-sm\" (click.stop)=\"addTableControlItem()\">\n <i class=\"fas fa-plus-circle\"></i>\n </button>\n </th>\n </tr>\n </thead>\n <tbody [formArrayName]=\"_fields.field.name\">\n <ng-container *ngFor=\"let item of fieldNameControl.controls; let i = index\">\n <tr>\n <ng-container *ngFor=\"let el of formConfiguration.TableColumns\">\n <td>\n <ng-container *ngIf=\"item&&el\">\n <df-dynamic [entity]=\"item\" [fields]=\"{ field: el }\"\n [selected]=\"_selected[i]?.extraProperties[''+el.name+'']\"\n [parentFiledName]=\"'extraProperties'\" [culture]=\"_culture\"></df-dynamic>\n </ng-container>\n </td>\n </ng-container>\n <td scope=\"row\" class=\"\">\n <div class=\"flex-end mb-2\">\n <button class=\"btn btn-light btn-sm ms-1\" (click.stop)=\"minusTableControlItem(i)\">\n <i class=\"fas fa-minus\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\" (click.stop)=\"TableArrowUpOrDown('up',i)\"\n *ngIf=\"i!==0\">\n <i class=\"fas fa-arrow-up\"></i>\n </button>\n <button class=\"btn btn-light btn-sm ms-1\"\n (click.stop)=\"TableArrowUpOrDown('down',i)\"\n *ngIf=\"i!==fieldNameControl.controls.length-1\">\n <i class=\"fas fa-arrow-down\"></i>\n </button>\n </div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none\" #submitclick></button>\n</form>", styles: [".flex-end{display:flex;align-items:center;justify-content:flex-end}.flex-start{display:flex;align-items:center;justify-content:flex-start}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type: i8$2.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }] }); }
|
|
3413
3340
|
}
|
|
3414
3341
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TableControlComponent, decorators: [{
|
|
3415
3342
|
type: Component,
|
|
@@ -3453,6 +3380,40 @@ const FieldControlGroup = [
|
|
|
3453
3380
|
},
|
|
3454
3381
|
];
|
|
3455
3382
|
|
|
3383
|
+
var styles = `
|
|
3384
|
+
.lpx-content-container .lpx-content{min-height:calc(100vh - 34px);padding:1.25em 2em 1.25em}h1,h2,h3,h4,h5,h6{color:inherit}.lpx-settings .lpx-context-menu{overflow:auto}
|
|
3385
|
+
a {
|
|
3386
|
+
text-decoration: unset;
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
.form-label{
|
|
3390
|
+
font-size: 12px;
|
|
3391
|
+
}
|
|
3392
|
+
:root select{
|
|
3393
|
+
cursor: pointer; /* this will show the pointer when hovering */
|
|
3394
|
+
}
|
|
3395
|
+
.cdk-global-overlay-wrapper, .cdk-overlay-container {pointer-events: none;top: 0;left: 0;height: 100%;width: 100% }.cdk-overlay-container {position: fixed;z-index: 1000 }.cdk-overlay-container:empty {display: none }.cdk-global-overlay-wrapper, .cdk-overlay-connected-position-bounding-box, .cdk-overlay-pane {position: absolute;z-index: 1000;display: flex }.cdk-overlay-pane {pointer-events: auto;box-sizing: border-box;max-width: 100%;max-height: 100% }.cdk-overlay-backdrop {position: absolute;top: 0;bottom: 0;left: 0;right: 0;z-index: 1000;pointer-events: auto;transition: opacity .4s cubic-bezier(.25, .8, .25, 1);opacity: 0 }.cdk-overlay-backdrop.cdk-overlay-backdrop-showing {opacity: 1 }.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing {opacity: .6 }.cdk-overlay-dark-backdrop {background: rgba(0, 0, 0, .32) }.cdk-overlay-transparent-backdrop {transition: visibility 1ms linear, opacity 1ms linear;visibility: hidden;opacity: 1 }.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing {opacity: 0;visibility: visible }.cdk-overlay-backdrop-noop-animation {transition: none }.cdk-overlay-connected-position-bounding-box {flex-direction: column;min-width: 1px;min-height: 1px }.cdk-global-scrollblock {position: fixed;width: 100%;overflow-y: scroll }.cdk-visually-hidden {border: 0;clip: rect(0 0 0 0);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;outline: 0;-webkit-appearance: none;-moz-appearance: none }.nz-overlay-transparent-backdrop, .nz-overlay-transparent-backdrop.cdk-overlay-backdrop-showing {opacity: 0 }.ant-select, .ant-select-dropdown {margin: 0;line-height: 1.5715;box-sizing: border-box;font-feature-settings: 'tnum';list-style: none }.ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottom, .ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottomLeft, .ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottomRight, .ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottom, .ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottomLeft, .ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottomRight, .ant-select-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-select-dropdown-placement-bottomLeft, .ant-select-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-select-dropdown-placement-bottomLeft {animation-name: antSlideUpIn }.ant-select-dropdown.ant-select-tree-dropdown {top: 100%;left: 0;position: relative;width: 100%;margin-top: 4px;margin-bottom: 4px;overflow: auto }.ant-select-dropdown-hidden, .ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-delete, .ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-eye, .ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info::before {display: none }.ant-select-dropdown {top: 100%;left: 0;position: relative;width: 100%;margin-top: 4px;margin-bottom: 4px;display: block }.ant-select-dropdown .cdk-virtual-scroll-content-wrapper {right: 0 }.ant-select-dropdown .full-width {contain: initial }.ant-select-dropdown .full-width .cdk-virtual-scroll-content-wrapper {position: static }.ant-select-dropdown .full-width .cdk-virtual-scroll-spacer {position: absolute;top: 0;width: 1px }.ant-select-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-select-dropdown-placement-topLeft, .ant-select-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-select-dropdown-placement-topLeft {animation-name: antSlideDownIn }.ant-select-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-select-dropdown-placement-bottomLeft {animation-name: antSlideUpOut }.ant-select-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-select-dropdown-placement-topLeft {animation-name: antSlideDownOut }
|
|
3396
|
+
|
|
3397
|
+
/*** 表单验证样式 start */
|
|
3398
|
+
.was-validated .form-control:invalid, .form-control.is-invalid{
|
|
3399
|
+
border-color: #c00d49 !important;
|
|
3400
|
+
}
|
|
3401
|
+
/*** 表单验证样式 end */
|
|
3402
|
+
`;
|
|
3403
|
+
|
|
3404
|
+
let isAppentStyle = false;
|
|
3405
|
+
function appentStyle() {
|
|
3406
|
+
/**确保该路由守卫只会执行一次 */
|
|
3407
|
+
if (isAppentStyle)
|
|
3408
|
+
return;
|
|
3409
|
+
isAppentStyle = true;
|
|
3410
|
+
const rendererFactory = inject(RendererFactory2);
|
|
3411
|
+
let renderer = rendererFactory.createRenderer(null, null);
|
|
3412
|
+
const style = renderer.createElement('style');
|
|
3413
|
+
renderer.setProperty(style, 'innerHTML', styles);
|
|
3414
|
+
renderer.appendChild(document.head, style);
|
|
3415
|
+
}
|
|
3416
|
+
|
|
3456
3417
|
/**版块 */
|
|
3457
3418
|
const Sections_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
3458
3419
|
{
|
|
@@ -3611,41 +3572,48 @@ const Entries_Edit_Defaults_Toolbar_Action = ToolbarAction.createMany([
|
|
|
3611
3572
|
},
|
|
3612
3573
|
]);
|
|
3613
3574
|
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
Entries_Edit: Entries_Edit_Defaults_Toolbar_Action,
|
|
3618
|
-
Fields: Fields_Defaults_Toolbar_Action,
|
|
3619
|
-
FieldsCreate: Fields_Create_Defaults_Toolbar_Action,
|
|
3620
|
-
FieldsEdit: Fields_Edit_Defaults_Toolbar_Action,
|
|
3621
|
-
Sections: Sections_Defaults_Toolbar_Action,
|
|
3622
|
-
SectionsCreateOrEdit: Sections_Create_Or_Edit_Defaults_Toolbar_Action,
|
|
3575
|
+
/**默认-实体-操作 */
|
|
3576
|
+
const Default_Entity_Actions = {
|
|
3577
|
+
// [ModuleComponent.AbpTable]: Abp_Table_Entity_Action,
|
|
3623
3578
|
};
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3579
|
+
/**默认实体属性-表格列名 */
|
|
3580
|
+
const Default_Entity_Props = {
|
|
3581
|
+
// [PageName.Guides]: Guides_Entity_Props,
|
|
3582
|
+
};
|
|
3583
|
+
/**默认-工具栏-操作 */
|
|
3584
|
+
const Default_Toolbar_Actions = {
|
|
3585
|
+
// [ModuleComponent.Page]: Page_Toolbar_Action,
|
|
3586
|
+
// [eCmsKitPageName.FaqQuestion]:FaqQuestion_Toolbar_Action
|
|
3587
|
+
[ECmsComponent.Entries]: Entries_Defaults_Toolbar_Action,
|
|
3588
|
+
[ECmsComponent.Entries_Create]: Entries_Create_Defaults_Toolbar_Action,
|
|
3589
|
+
[ECmsComponent.Entries_Edit]: Entries_Edit_Defaults_Toolbar_Action,
|
|
3590
|
+
[ECmsComponent.Fields]: Fields_Defaults_Toolbar_Action,
|
|
3591
|
+
[ECmsComponent.FieldsCreate]: Fields_Create_Defaults_Toolbar_Action,
|
|
3592
|
+
[ECmsComponent.FieldsEdit]: Fields_Edit_Defaults_Toolbar_Action,
|
|
3593
|
+
[ECmsComponent.Sections]: Sections_Defaults_Toolbar_Action,
|
|
3594
|
+
[ECmsComponent.SectionsCreateOrEdit]: Sections_Create_Or_Edit_Defaults_Toolbar_Action,
|
|
3630
3595
|
};
|
|
3631
|
-
/**用于路由守卫增加工具栏按钮 */
|
|
3632
|
-
const Cms_Default_Toolbar_Actions = setCmsAction();
|
|
3633
3596
|
/**
|
|
3634
3597
|
*
|
|
3635
|
-
* @param 在
|
|
3636
|
-
*
|
|
3637
|
-
* @param 在cms.module.ts中使用,
|
|
3598
|
+
* @param 在Extensions_Props_Action_Token_Resolver方法中使用
|
|
3599
|
+
* @param 在.module.ts中使用,
|
|
3638
3600
|
export class CmsModule {
|
|
3639
3601
|
static forChild(options: any = {}): ModuleWithProviders<CmsModule> {
|
|
3640
3602
|
return {
|
|
3641
3603
|
ngModule: CmsModule,
|
|
3642
3604
|
providers: [
|
|
3643
3605
|
{
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3606
|
+
provide: Toolbar_Action_Contributors,
|
|
3607
|
+
useValue: options.toolbarActionContributors,
|
|
3608
|
+
},
|
|
3609
|
+
{
|
|
3610
|
+
provide: Entity_Action_Contributors,
|
|
3611
|
+
useValue: options.entityActionContributors,
|
|
3612
|
+
},
|
|
3613
|
+
{
|
|
3614
|
+
provide: Entity_Props_Contributors,
|
|
3615
|
+
useValue: options.entityPropContributors,
|
|
3647
3616
|
},
|
|
3648
|
-
// IdentityExtensionsGuard,
|
|
3649
3617
|
]
|
|
3650
3618
|
};
|
|
3651
3619
|
}
|
|
@@ -3656,68 +3624,85 @@ const Cms_Default_Toolbar_Actions = setCmsAction();
|
|
|
3656
3624
|
*
|
|
3657
3625
|
*
|
|
3658
3626
|
*/
|
|
3659
|
-
|
|
3660
|
-
|
|
3627
|
+
/**实体-操作-贡献者 */
|
|
3628
|
+
const Entity_Action_Contributors = new InjectionToken('Entity_Action_Contributors');
|
|
3629
|
+
/**实体-属性-贡献者 */
|
|
3630
|
+
const Entity_Props_Contributors = new InjectionToken('Entity_Props_Contributors');
|
|
3631
|
+
const Toolbar_Action_Contributors = new InjectionToken('Toolbar_Action_Contributors');
|
|
3632
|
+
/**
|
|
3633
|
+
* 属性-操作-贡献者-解析器
|
|
3634
|
+
*
|
|
3635
|
+
* 用于放在-routing.module.ts路由守卫中
|
|
3661
3636
|
*
|
|
3662
3637
|
*
|
|
3663
3638
|
const routes: Routes = [
|
|
3664
3639
|
{
|
|
3665
3640
|
path: 'demo',
|
|
3666
3641
|
canActivate: [AuthGuard, PermissionGuard],
|
|
3667
|
-
resolve: [
|
|
3642
|
+
resolve: [Extensions_Props_Action_Token_Resolver],
|
|
3668
3643
|
children: []
|
|
3669
3644
|
},
|
|
3670
3645
|
]
|
|
3671
3646
|
*
|
|
3672
3647
|
*
|
|
3673
3648
|
*/
|
|
3674
|
-
const
|
|
3649
|
+
const Extensions_Props_Action_Token_Resolver = () => {
|
|
3675
3650
|
const configState = inject(ConfigStateService);
|
|
3676
3651
|
const extensions = inject(ExtensionsService);
|
|
3677
3652
|
const config = { optional: true };
|
|
3678
|
-
const
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3653
|
+
const actionContributors = inject(Entity_Action_Contributors, config) || {};
|
|
3654
|
+
const propContributors = inject(Entity_Props_Contributors, config) || {};
|
|
3655
|
+
const toolbarContributors = inject(Toolbar_Action_Contributors, config) || {};
|
|
3656
|
+
return getObjectExtensionEntitiesFromStore(configState, 'TenantManagement').pipe(map(entities => ({
|
|
3657
|
+
// [ModuleComponent.AbpTable]: entities.Tenant,
|
|
3658
|
+
})), mapEntitiesToContributors(configState, 'TenantManagement'), tap(objectExtensionContributors => {
|
|
3659
|
+
//actions
|
|
3660
|
+
mergeWithDefaultActions(extensions.entityActions, Default_Entity_Actions, actionContributors);
|
|
3661
|
+
//props
|
|
3662
|
+
mergeWithDefaultProps(extensions.entityProps, Default_Entity_Props, objectExtensionContributors.prop, propContributors);
|
|
3663
|
+
//Toolbar
|
|
3664
|
+
mergeWithDefaultActions(extensions.toolbarActions, Default_Toolbar_Actions, toolbarContributors);
|
|
3684
3665
|
}));
|
|
3685
3666
|
};
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
}
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
}
|
|
3667
|
+
// /**
|
|
3668
|
+
// * @deprecated Use `tenantManagementExtensions_Props_Action_Token_Resolver` *function* instead.
|
|
3669
|
+
// */
|
|
3670
|
+
// @Injectable()
|
|
3671
|
+
// export class TenantManagementExtensionsGuard implements IAbpGuard {
|
|
3672
|
+
// protected readonly configState = inject(ConfigStateService);
|
|
3673
|
+
// protected readonly extensions = inject(ExtensionsService);
|
|
3674
|
+
// canActivate(): Observable<boolean> {
|
|
3675
|
+
// const config = { optional: true };
|
|
3676
|
+
// const actionContributors = inject(TENANT_MANAGEMENT_Entity_Action_Contributors, config) || {};
|
|
3677
|
+
// const propContributors = inject(TENANT_MANAGEMENT_Entity_Props_Contributors, config) || {};
|
|
3678
|
+
// return getObjectExtensionEntitiesFromStore(this.configState, 'TenantManagement').pipe(
|
|
3679
|
+
// map(entities => ({
|
|
3680
|
+
// // [eTenantManagementComponents.Tenants]: entities.Tenant,
|
|
3681
|
+
// })),
|
|
3682
|
+
// mapEntitiesToContributors(this.configState, 'TenantManagement'),
|
|
3683
|
+
// tap(objectExtensionContributors => {
|
|
3684
|
+
// mergeWithDefaultActions(
|
|
3685
|
+
// this.extensions.entityActions,
|
|
3686
|
+
// DEFAULT_TENANT_MANAGEMENT_ENTITY_ACTIONS,
|
|
3687
|
+
// actionContributors,
|
|
3688
|
+
// );
|
|
3689
|
+
// mergeWithDefaultProps(
|
|
3690
|
+
// this.extensions.entityProps,
|
|
3691
|
+
// DEFAULT_TENANT_MANAGEMENT_ENTITY_PROPS,
|
|
3692
|
+
// objectExtensionContributors.prop,
|
|
3693
|
+
// propContributors,
|
|
3694
|
+
// );
|
|
3695
|
+
// }),
|
|
3696
|
+
// map(() => true),
|
|
3697
|
+
// );
|
|
3698
|
+
// }
|
|
3699
|
+
// }
|
|
3715
3700
|
|
|
3716
3701
|
const routes = [
|
|
3717
3702
|
{
|
|
3718
3703
|
path: 'admin',
|
|
3719
3704
|
canActivate: [AuthGuard, PermissionGuard],
|
|
3720
|
-
resolve: [
|
|
3705
|
+
resolve: [Extensions_Props_Action_Token_Resolver, appentStyle],
|
|
3721
3706
|
children: [
|
|
3722
3707
|
{
|
|
3723
3708
|
path: 'entries',
|
|
@@ -3787,9 +3772,9 @@ const routes = [
|
|
|
3787
3772
|
},
|
|
3788
3773
|
];
|
|
3789
3774
|
class CmsRoutingModule {
|
|
3790
|
-
static
|
|
3791
|
-
static
|
|
3792
|
-
static
|
|
3775
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3776
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CmsRoutingModule, imports: [i3$1.RouterModule], exports: [RouterModule] }); }
|
|
3777
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
3793
3778
|
}
|
|
3794
3779
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsRoutingModule, decorators: [{
|
|
3795
3780
|
type: NgModule,
|
|
@@ -3805,17 +3790,25 @@ class CmsModule {
|
|
|
3805
3790
|
ngModule: CmsModule,
|
|
3806
3791
|
providers: [
|
|
3807
3792
|
{
|
|
3808
|
-
provide:
|
|
3793
|
+
provide: Toolbar_Action_Contributors,
|
|
3809
3794
|
useValue: options.toolbarActionContributors,
|
|
3810
3795
|
},
|
|
3796
|
+
{
|
|
3797
|
+
provide: Entity_Action_Contributors,
|
|
3798
|
+
useValue: options.entityActionContributors,
|
|
3799
|
+
},
|
|
3800
|
+
{
|
|
3801
|
+
provide: Entity_Props_Contributors,
|
|
3802
|
+
useValue: options.entityPropContributors,
|
|
3803
|
+
},
|
|
3811
3804
|
],
|
|
3812
3805
|
};
|
|
3813
3806
|
}
|
|
3814
3807
|
static forLazy(options = {}) {
|
|
3815
3808
|
return new LazyModuleFactory(CmsModule.forChild(options));
|
|
3816
3809
|
}
|
|
3817
|
-
static
|
|
3818
|
-
static
|
|
3810
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3811
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CmsModule, declarations: [EntriesComponent,
|
|
3819
3812
|
FieldsComponent,
|
|
3820
3813
|
SectionsComponent,
|
|
3821
3814
|
FieldGroupComponent,
|
|
@@ -3844,8 +3837,8 @@ class CmsModule {
|
|
|
3844
3837
|
MatrixConfigComponent,
|
|
3845
3838
|
MatrixControlComponent,
|
|
3846
3839
|
EntryConfigComponent,
|
|
3847
|
-
EntryControlComponent] });
|
|
3848
|
-
static
|
|
3840
|
+
EntryControlComponent] }); }
|
|
3841
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsModule, imports: [CoreModule,
|
|
3849
3842
|
ThemeSharedModule,
|
|
3850
3843
|
FormsModule,
|
|
3851
3844
|
CmsRoutingModule,
|
|
@@ -3856,7 +3849,7 @@ class CmsModule {
|
|
|
3856
3849
|
NzSelectModule,
|
|
3857
3850
|
DynamicFormModule.forRoot({
|
|
3858
3851
|
cmsFieldControlGroup: [...FieldControlGroup, ...fielFieldControlGroup, ...ckEditorFieldControlGroup]
|
|
3859
|
-
})] });
|
|
3852
|
+
})] }); }
|
|
3860
3853
|
}
|
|
3861
3854
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CmsModule, decorators: [{
|
|
3862
3855
|
type: NgModule,
|
|
@@ -3909,8 +3902,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
3909
3902
|
/*
|
|
3910
3903
|
* Public API Surface of cms
|
|
3911
3904
|
*/
|
|
3912
|
-
// export * from './lib/proxy';
|
|
3913
|
-
// export * from './lib/services/simple-reuse-strategy';
|
|
3914
3905
|
|
|
3915
3906
|
/**
|
|
3916
3907
|
* Generated bundle index. Do not edit.
|