@dignite-ng/expand.cms 0.0.37 → 0.0.39
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/README.md +24 -24
- package/esm2022/config/cms-config.module.mjs +4 -4
- package/esm2022/config/providers/route.provider.mjs +9 -19
- package/esm2022/lib/cms-routing.module.mjs +4 -9
- package/esm2022/lib/cms.module.mjs +8 -11
- package/esm2022/lib/components/admin/domains/domains.component.mjs +10 -10
- package/esm2022/lib/components/admin/entries/create-or-edit-entries.component.mjs +29 -42
- package/esm2022/lib/components/admin/entries/create-or-update-entry-input-base.mjs +20 -20
- package/esm2022/lib/components/admin/entries/create.component.mjs +16 -29
- package/esm2022/lib/components/admin/entries/edit.component.mjs +16 -29
- package/esm2022/lib/components/admin/entries/entries.component.mjs +38 -50
- package/esm2022/lib/components/admin/fields/create-field.component.mjs +12 -27
- package/esm2022/lib/components/admin/fields/create-or-edit-field.component.mjs +3 -14
- 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 +11 -29
- package/esm2022/lib/components/admin/fields/field-group.component.mjs +15 -25
- package/esm2022/lib/components/admin/fields/fields.component.mjs +22 -31
- package/esm2022/lib/components/admin/index.mjs +1 -2
- 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 +57 -94
- package/esm2022/lib/components/admin/sections/sections.component.mjs +21 -90
- package/esm2022/lib/components/dynamic-form/entry/entry-config.component.mjs +11 -22
- 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 +7 -29
- 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 +2 -1
- package/esm2022/lib/proxy/admin/domains/domain-admin.service.mjs +18 -19
- 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/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 +51 -33
- package/esm2022/lib/services/update-list.service.mjs +6 -5
- package/esm2022/lib/toolbar/toolbar-btn-default-action.mjs +1 -1
- package/fesm2022/dignite-ng-expand.cms-config.mjs +11 -21
- package/fesm2022/dignite-ng-expand.cms-config.mjs.map +1 -1
- package/fesm2022/dignite-ng-expand.cms.mjs +677 -1022
- package/fesm2022/dignite-ng-expand.cms.mjs.map +1 -1
- package/lib/components/admin/entries/create.component.d.ts +2 -3
- package/lib/components/admin/entries/edit.component.d.ts +2 -3
- package/lib/components/admin/fields/create-field.component.d.ts +1 -3
- package/lib/components/admin/fields/edit-field.component.d.ts +2 -3
- package/lib/components/admin/fields/fields.component.d.ts +1 -3
- package/lib/components/admin/index.d.ts +0 -1
- package/lib/components/admin/sections/entry-types/create-or-edit.component.d.ts +2 -3
- package/lib/components/admin/sections/sections.component.d.ts +1 -34
- package/lib/constants/styles.d.ts +1 -1
- package/lib/services/simple-reuse-strategy.d.ts +7 -5
- package/package.json +1 -1
- package/esm2022/lib/components/admin/sites/create-or-update-sites-input-base.mjs +0 -18
- package/esm2022/lib/components/admin/sites/index.mjs +0 -3
- package/esm2022/lib/components/admin/sites/sites.component.mjs +0 -29
- package/lib/components/admin/sites/create-or-update-sites-input-base.d.ts +0 -8
- package/lib/components/admin/sites/index.d.ts +0 -2
- package/lib/components/admin/sites/sites.component.d.ts +0 -5
|
@@ -16,11 +16,11 @@ import * as i2 from '@angular/common';
|
|
|
16
16
|
import * as i9 from '@ngx-validate/core';
|
|
17
17
|
import * as i10 from '@ng-bootstrap/ng-bootstrap';
|
|
18
18
|
import { NgbNavModule, NgbAccordionModule, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i8$1 from '@abp/ng.components/page';
|
|
20
20
|
import { PageModule } from '@abp/ng.components/page';
|
|
21
21
|
import { pinyin } from 'pinyin-pro';
|
|
22
22
|
import * as i1$2 from '@angular/platform-browser';
|
|
23
|
-
import * as i8$
|
|
23
|
+
import * as i8$2 from '@dignite-ng/expand.dynamic-form';
|
|
24
24
|
import { DynamicFormModule } from '@dignite-ng/expand.dynamic-form';
|
|
25
25
|
import * as i4 from 'ng-zorro-antd/select';
|
|
26
26
|
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
@@ -49,13 +49,14 @@ var ECmsComponent;
|
|
|
49
49
|
})(ECmsComponent || (ECmsComponent = {}));
|
|
50
50
|
|
|
51
51
|
class UpdateListService {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
constructor() {
|
|
53
|
+
this.updateListEvent = new EventEmitter();
|
|
54
|
+
}
|
|
54
55
|
updateList() {
|
|
55
56
|
this.updateListEvent.emit();
|
|
56
57
|
}
|
|
57
|
-
static
|
|
58
|
-
static
|
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UpdateListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
59
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UpdateListService, providedIn: 'root' }); }
|
|
59
60
|
}
|
|
60
61
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UpdateListService, decorators: [{
|
|
61
62
|
type: Injectable,
|
|
@@ -65,26 +66,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
65
66
|
}], ctorParameters: function () { return []; } });
|
|
66
67
|
|
|
67
68
|
class SiteSettingsAdminService {
|
|
68
|
-
restService;
|
|
69
|
-
apiName = 'CmsAdmin';
|
|
70
|
-
getAllLanguages = (config) => this.restService.request({
|
|
71
|
-
method: 'GET',
|
|
72
|
-
url: '/api/cms-admin/site-settings/all-languages',
|
|
73
|
-
}, { apiName: this.apiName, ...config });
|
|
74
|
-
getBrand = (config) => this.restService.request({
|
|
75
|
-
method: 'GET',
|
|
76
|
-
url: '/api/cms-admin/site-settings/brand',
|
|
77
|
-
}, { apiName: this.apiName, ...config });
|
|
78
|
-
getDefaultLanguage = (config) => this.restService.request({
|
|
79
|
-
method: 'GET',
|
|
80
|
-
responseType: 'text',
|
|
81
|
-
url: '/api/cms-admin/site-settings/default-language',
|
|
82
|
-
}, { apiName: this.apiName, ...config });
|
|
83
69
|
constructor(restService) {
|
|
84
70
|
this.restService = restService;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
71
|
+
this.apiName = 'CmsAdmin';
|
|
72
|
+
this.getAllLanguages = (config) => this.restService.request({
|
|
73
|
+
method: 'GET',
|
|
74
|
+
url: '/api/cms-admin/site-settings/all-languages',
|
|
75
|
+
}, { apiName: this.apiName, ...config });
|
|
76
|
+
this.getBrand = (config) => this.restService.request({
|
|
77
|
+
method: 'GET',
|
|
78
|
+
url: '/api/cms-admin/site-settings/brand',
|
|
79
|
+
}, { apiName: this.apiName, ...config });
|
|
80
|
+
this.getDefaultLanguage = (config) => this.restService.request({
|
|
81
|
+
method: 'GET',
|
|
82
|
+
responseType: 'text',
|
|
83
|
+
url: '/api/cms-admin/site-settings/default-language',
|
|
84
|
+
}, { apiName: this.apiName, ...config });
|
|
85
|
+
}
|
|
86
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SiteSettingsAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
87
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SiteSettingsAdminService, providedIn: 'root' }); }
|
|
88
88
|
}
|
|
89
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SiteSettingsAdminService, decorators: [{
|
|
90
90
|
type: Injectable,
|
|
@@ -94,65 +94,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
94
94
|
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
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: "16.2.12", ngImport: i0, type: EntryAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
154
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryAdminService, providedIn: 'root' }); }
|
|
156
155
|
}
|
|
157
156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryAdminService, decorators: [{
|
|
158
157
|
type: Injectable,
|
|
@@ -162,36 +161,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
162
161
|
}], ctorParameters: function () { return [{ 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: "16.2.12", ngImport: i0, type: EntryTypeAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
192
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryTypeAdminService, providedIn: 'root' }); }
|
|
195
193
|
}
|
|
196
194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryTypeAdminService, decorators: [{
|
|
197
195
|
type: Injectable,
|
|
@@ -201,46 +199,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
201
199
|
}], ctorParameters: function () { return [{ 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: "16.2.12", ngImport: i0, type: SectionAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
240
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SectionAdminService, providedIn: 'root' }); }
|
|
244
241
|
}
|
|
245
242
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SectionAdminService, decorators: [{
|
|
246
243
|
type: Injectable,
|
|
@@ -250,16 +247,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
250
247
|
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
251
248
|
|
|
252
249
|
class EntriesComponent {
|
|
253
|
-
_EntryAdminService
|
|
254
|
-
_SectionAdminService;
|
|
255
|
-
toaster;
|
|
256
|
-
confirmation;
|
|
257
|
-
configState;
|
|
258
|
-
router;
|
|
259
|
-
_LocalizationService;
|
|
260
|
-
constructor(_EntryAdminService,
|
|
261
|
-
// private _SiteAdminService: SiteAdminService,
|
|
262
|
-
_SectionAdminService, toaster, confirmation, configState, router, _LocalizationService) {
|
|
250
|
+
constructor(_EntryAdminService, _SectionAdminService, toaster, confirmation, configState, router, _LocalizationService) {
|
|
263
251
|
this._EntryAdminService = _EntryAdminService;
|
|
264
252
|
this._SectionAdminService = _SectionAdminService;
|
|
265
253
|
this.toaster = toaster;
|
|
@@ -267,31 +255,47 @@ class EntriesComponent {
|
|
|
267
255
|
this.configState = configState;
|
|
268
256
|
this.router = router;
|
|
269
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
|
+
});
|
|
270
290
|
}
|
|
271
|
-
fb = inject(FormBuilder);
|
|
272
|
-
_UpdateListService = inject(UpdateListService);
|
|
273
|
-
list = inject(ListService);
|
|
274
291
|
ngOnInit() {
|
|
275
292
|
this.getPageDate();
|
|
276
293
|
this._UpdateListService.updateListEvent.subscribe(() => {
|
|
277
294
|
this.list.get();
|
|
278
295
|
});
|
|
279
296
|
}
|
|
280
|
-
/**站点列表 */
|
|
281
|
-
// siteList: any[any] = []
|
|
282
|
-
/**选择的站点id */
|
|
283
|
-
// siteId: string = ''
|
|
284
|
-
/**站点下的版块 */
|
|
285
|
-
SiteOfSectionList = [];
|
|
286
|
-
/**版块下的语言列表 */
|
|
287
|
-
sectionLanguagesList = [];
|
|
288
|
-
/**版块下的条目类型列表 */
|
|
289
|
-
entryTypeList = [];
|
|
290
|
-
/**状态编码 */
|
|
291
|
-
_entryStatusOptions = entryStatusOptions;
|
|
292
297
|
/**获取页面数据 */
|
|
293
298
|
async getPageDate() {
|
|
294
|
-
// await this.getsiteList()
|
|
295
299
|
await this.getSiteOfSectionList();
|
|
296
300
|
await this.getSectionLanguagesList();
|
|
297
301
|
this.filters = this.filtersForm.value;
|
|
@@ -310,10 +314,8 @@ class EntriesComponent {
|
|
|
310
314
|
/**获取站点下的版块 */
|
|
311
315
|
getSiteOfSectionList() {
|
|
312
316
|
return new Promise((resolve, rejects) => {
|
|
313
|
-
// let siteId = this.filtersForm.get('siteId').value
|
|
314
317
|
this._SectionAdminService.getList({
|
|
315
318
|
maxResultCount: 1000,
|
|
316
|
-
// siteId: siteId
|
|
317
319
|
}).subscribe(res => {
|
|
318
320
|
this.SiteOfSectionList = res.items;
|
|
319
321
|
this.filtersForm.get('sectionId').patchValue(res.items[0]?.id || '');
|
|
@@ -327,8 +329,6 @@ class EntriesComponent {
|
|
|
327
329
|
let sectionId = this.filtersForm.get('sectionId').value;
|
|
328
330
|
this.entryTypeList = this.SiteOfSectionList.find(el => el.id == sectionId)?.entryTypes || [];
|
|
329
331
|
}
|
|
330
|
-
config = inject(ConfigStateService);
|
|
331
|
-
_SiteSettingsAdminService = inject(SiteSettingsAdminService);
|
|
332
332
|
/**获取版块下的语言列表 */
|
|
333
333
|
getSectionLanguagesList() {
|
|
334
334
|
return new Promise(async (resolve, rejects) => {
|
|
@@ -351,8 +351,6 @@ class EntriesComponent {
|
|
|
351
351
|
resolve(LanguagesArray);
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
/**站点设置语言 */
|
|
355
|
-
SiteSettingsAdminLanguages = [];
|
|
356
354
|
/**
|
|
357
355
|
* 获取站点设置语言
|
|
358
356
|
*/
|
|
@@ -376,19 +374,6 @@ class EntriesComponent {
|
|
|
376
374
|
queryParams: { cultureName: this.filters.culture, sectionId: this.filters.sectionId, entryTypeId: this.entryTypeList[0].id }
|
|
377
375
|
});
|
|
378
376
|
}
|
|
379
|
-
/**列表相关 */
|
|
380
|
-
ColumnMode = ColumnMode;
|
|
381
|
-
data = {
|
|
382
|
-
items: [],
|
|
383
|
-
totalCount: 0,
|
|
384
|
-
};
|
|
385
|
-
filters = {};
|
|
386
|
-
filtersForm = this.fb.group({
|
|
387
|
-
siteId: [''],
|
|
388
|
-
sectionId: [''],
|
|
389
|
-
culture: [''],
|
|
390
|
-
filter: [''],
|
|
391
|
-
});
|
|
392
377
|
hookToQuery() {
|
|
393
378
|
const getData = (query) => this._EntryAdminService.getList({
|
|
394
379
|
...query,
|
|
@@ -411,8 +396,8 @@ class EntriesComponent {
|
|
|
411
396
|
}
|
|
412
397
|
});
|
|
413
398
|
}
|
|
414
|
-
static
|
|
415
|
-
static
|
|
399
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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: "16.2.12", type: EntriesComponent, selector: "cms-entries", providers: [
|
|
416
401
|
ListService,
|
|
417
402
|
// Provide this token if you want a different debounce time.
|
|
418
403
|
// Default is 300. Cannot be 0. Any value below 100 is not recommended.
|
|
@@ -421,7 +406,7 @@ class EntriesComponent {
|
|
|
421
406
|
provide: EXTENSIONS_IDENTIFIER,
|
|
422
407
|
useValue: ECmsComponent.Entries,
|
|
423
408
|
},
|
|
424
|
-
], 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::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::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::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 cellClass=\"cellClassRight\" [frozenRight]=\"true\" [width]=\"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", "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: ["disabled"] }, { kind: "component", type: i11.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "component", type: i11.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 cellClass=\"cellClassRight\" [frozenRight]=\"true\" [width]=\"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", "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: ["disabled"] }, { 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" }] }); }
|
|
425
410
|
}
|
|
426
411
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntriesComponent, decorators: [{
|
|
427
412
|
type: Component,
|
|
@@ -434,30 +419,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
434
419
|
provide: EXTENSIONS_IDENTIFIER,
|
|
435
420
|
useValue: ECmsComponent.Entries,
|
|
436
421
|
},
|
|
437
|
-
], 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::
|
|
422
|
+
], 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 cellClass=\"cellClassRight\" [frozenRight]=\"true\" [width]=\"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"] }]
|
|
438
423
|
}], ctorParameters: function () { return [{ type: EntryAdminService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.ConfigStateService }, { type: i3$1.Router }, { type: i1.LocalizationService }]; } });
|
|
439
424
|
|
|
440
425
|
class CreateOrUpdateEntryInputBase {
|
|
441
|
-
/**语言 */
|
|
442
|
-
culture = ['', [Validators.required]];
|
|
443
|
-
/**条目id */
|
|
444
|
-
entryTypeId = [''];
|
|
445
|
-
/**标题 */
|
|
446
|
-
title = ['', [Validators.required]];
|
|
447
|
-
/**别名 */
|
|
448
|
-
slug = ['', [Validators.required]];
|
|
449
|
-
/**是否是草稿 */
|
|
450
|
-
draft = ['', []];
|
|
451
|
-
/**发布时间 */
|
|
452
|
-
publishTime = ['', [Validators.required]];
|
|
453
|
-
/**上级目录 */
|
|
454
|
-
parentId = [null];
|
|
455
|
-
/**修订说明 */
|
|
456
|
-
versionNotes = [null];
|
|
457
|
-
/**版本 */
|
|
458
|
-
initialVersionId = [null];
|
|
459
|
-
extraProperties = new FormGroup({});
|
|
460
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({});
|
|
461
446
|
if (data) {
|
|
462
447
|
for (const key in data) {
|
|
463
448
|
if (data.hasOwnProperty(key)) {
|
|
@@ -469,36 +454,35 @@ class CreateOrUpdateEntryInputBase {
|
|
|
469
454
|
}
|
|
470
455
|
|
|
471
456
|
class FieldGroupAdminService {
|
|
472
|
-
restService;
|
|
473
|
-
apiName = 'CmsAdmin';
|
|
474
|
-
create = (input, config) => this.restService.request({
|
|
475
|
-
method: 'POST',
|
|
476
|
-
url: '/api/cms-admin/field-groups',
|
|
477
|
-
body: input,
|
|
478
|
-
}, { apiName: this.apiName, ...config });
|
|
479
|
-
delete = (id, config) => this.restService.request({
|
|
480
|
-
method: 'DELETE',
|
|
481
|
-
url: `/api/cms-admin/field-groups/${id}`,
|
|
482
|
-
}, { apiName: this.apiName, ...config });
|
|
483
|
-
get = (id, config) => this.restService.request({
|
|
484
|
-
method: 'GET',
|
|
485
|
-
url: `/api/cms-admin/field-groups/${id}`,
|
|
486
|
-
}, { apiName: this.apiName, ...config });
|
|
487
|
-
getList = (input, config) => this.restService.request({
|
|
488
|
-
method: 'GET',
|
|
489
|
-
url: '/api/cms-admin/field-groups',
|
|
490
|
-
params: { input },
|
|
491
|
-
}, { apiName: this.apiName, ...config });
|
|
492
|
-
update = (id, input, config) => this.restService.request({
|
|
493
|
-
method: 'PUT',
|
|
494
|
-
url: `/api/cms-admin/field-groups/${id}`,
|
|
495
|
-
body: input,
|
|
496
|
-
}, { apiName: this.apiName, ...config });
|
|
497
457
|
constructor(restService) {
|
|
498
458
|
this.restService = restService;
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
459
|
+
this.apiName = 'CmsAdmin';
|
|
460
|
+
this.create = (input, config) => this.restService.request({
|
|
461
|
+
method: 'POST',
|
|
462
|
+
url: '/api/cms-admin/field-groups',
|
|
463
|
+
body: input,
|
|
464
|
+
}, { apiName: this.apiName, ...config });
|
|
465
|
+
this.delete = (id, config) => this.restService.request({
|
|
466
|
+
method: 'DELETE',
|
|
467
|
+
url: `/api/cms-admin/field-groups/${id}`,
|
|
468
|
+
}, { apiName: this.apiName, ...config });
|
|
469
|
+
this.get = (id, config) => this.restService.request({
|
|
470
|
+
method: 'GET',
|
|
471
|
+
url: `/api/cms-admin/field-groups/${id}`,
|
|
472
|
+
}, { apiName: this.apiName, ...config });
|
|
473
|
+
this.getList = (input, config) => this.restService.request({
|
|
474
|
+
method: 'GET',
|
|
475
|
+
url: '/api/cms-admin/field-groups',
|
|
476
|
+
params: { input },
|
|
477
|
+
}, { apiName: this.apiName, ...config });
|
|
478
|
+
this.update = (id, input, config) => this.restService.request({
|
|
479
|
+
method: 'PUT',
|
|
480
|
+
url: `/api/cms-admin/field-groups/${id}`,
|
|
481
|
+
body: input,
|
|
482
|
+
}, { apiName: this.apiName, ...config });
|
|
483
|
+
}
|
|
484
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldGroupAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
485
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldGroupAdminService, providedIn: 'root' }); }
|
|
502
486
|
}
|
|
503
487
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldGroupAdminService, decorators: [{
|
|
504
488
|
type: Injectable,
|
|
@@ -508,17 +492,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
508
492
|
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
509
493
|
|
|
510
494
|
class FormAdminService {
|
|
511
|
-
restService;
|
|
512
|
-
apiName = 'CmsAdmin';
|
|
513
|
-
getFormControls = (config) => this.restService.request({
|
|
514
|
-
method: 'GET',
|
|
515
|
-
url: '/api/cms-admin/dynamic-forms/forms',
|
|
516
|
-
}, { apiName: this.apiName, ...config });
|
|
517
495
|
constructor(restService) {
|
|
518
496
|
this.restService = restService;
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
497
|
+
this.apiName = 'CmsAdmin';
|
|
498
|
+
this.getFormControls = (config) => this.restService.request({
|
|
499
|
+
method: 'GET',
|
|
500
|
+
url: '/api/cms-admin/dynamic-forms/forms',
|
|
501
|
+
}, { apiName: this.apiName, ...config });
|
|
502
|
+
}
|
|
503
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
504
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormAdminService, providedIn: 'root' }); }
|
|
522
505
|
}
|
|
523
506
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormAdminService, decorators: [{
|
|
524
507
|
type: Injectable,
|
|
@@ -528,22 +511,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
528
511
|
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
529
512
|
|
|
530
513
|
class FieldAbstractsService {
|
|
531
|
-
_FieldGroupAdminService;
|
|
532
|
-
_FormAdminService;
|
|
533
514
|
constructor(_FieldGroupAdminService, _FormAdminService) {
|
|
534
515
|
this._FieldGroupAdminService = _FieldGroupAdminService;
|
|
535
516
|
this._FormAdminService = _FormAdminService;
|
|
517
|
+
/**字段分组列表 */
|
|
518
|
+
this.fieldGroupList = [];
|
|
519
|
+
/**表单控件类型 */
|
|
520
|
+
this.fromControlList = [];
|
|
536
521
|
}
|
|
537
|
-
/**字段分组列表 */
|
|
538
|
-
fieldGroupList = [];
|
|
539
522
|
/**获取字段分组列表 */
|
|
540
523
|
getfieldGroupList() {
|
|
541
524
|
this._FieldGroupAdminService.getList({}).subscribe(res => {
|
|
542
525
|
this.fieldGroupList = res.items;
|
|
543
526
|
});
|
|
544
527
|
}
|
|
545
|
-
/**表单控件类型 */
|
|
546
|
-
fromControlList = [];
|
|
547
528
|
/**获取表单控件类型 */
|
|
548
529
|
getFromControlList() {
|
|
549
530
|
return new Promise((resolve, reject) => {
|
|
@@ -557,8 +538,8 @@ class FieldAbstractsService {
|
|
|
557
538
|
// return this.fromControlList.filter(el => el.name !== typeName)
|
|
558
539
|
return this.fromControlList;
|
|
559
540
|
}
|
|
560
|
-
static
|
|
561
|
-
static
|
|
541
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAbstractsService, deps: [{ token: FieldGroupAdminService }, { token: FormAdminService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
542
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAbstractsService, providedIn: 'root' }); }
|
|
562
543
|
}
|
|
563
544
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAbstractsService, decorators: [{
|
|
564
545
|
type: Injectable,
|
|
@@ -568,16 +549,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
568
549
|
}], ctorParameters: function () { return [{ type: FieldGroupAdminService }, { type: FormAdminService }]; } });
|
|
569
550
|
|
|
570
551
|
class CmsService {
|
|
571
|
-
restService;
|
|
572
|
-
apiName = 'Cms';
|
|
573
552
|
constructor(restService) {
|
|
574
553
|
this.restService = restService;
|
|
554
|
+
this.apiName = 'Cms';
|
|
575
555
|
}
|
|
576
556
|
sample() {
|
|
577
557
|
return this.restService.request({ method: 'GET', url: '/api/Cms/sample' }, { apiName: this.apiName });
|
|
578
558
|
}
|
|
579
|
-
static
|
|
580
|
-
static
|
|
559
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
560
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsService, providedIn: 'root' }); }
|
|
581
561
|
}
|
|
582
562
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsService, decorators: [{
|
|
583
563
|
type: Injectable,
|
|
@@ -587,7 +567,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
587
567
|
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
588
568
|
|
|
589
569
|
class CmsApiService {
|
|
590
|
-
titleService;
|
|
591
570
|
constructor(titleService) {
|
|
592
571
|
this.titleService = titleService;
|
|
593
572
|
}
|
|
@@ -651,8 +630,8 @@ class CmsApiService {
|
|
|
651
630
|
}
|
|
652
631
|
return result;
|
|
653
632
|
}
|
|
654
|
-
static
|
|
655
|
-
static
|
|
633
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsApiService, deps: [{ token: i1$2.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
634
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsApiService, providedIn: 'root' }); }
|
|
656
635
|
}
|
|
657
636
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsApiService, decorators: [{
|
|
658
637
|
type: Injectable,
|
|
@@ -662,58 +641,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
662
641
|
}], ctorParameters: function () { return [{ type: i1$2.Title }]; } });
|
|
663
642
|
|
|
664
643
|
class SimpleReuseStrategy {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
644
|
+
static { this.cacheRouters = new Map(); }
|
|
645
|
+
static deleteRouteCache(url) {
|
|
646
|
+
if (SimpleReuseStrategy.cacheRouters.has(url)) {
|
|
647
|
+
const handle = SimpleReuseStrategy.cacheRouters.get(url);
|
|
648
|
+
try {
|
|
649
|
+
handle.componentRef.destory();
|
|
650
|
+
}
|
|
651
|
+
catch (e) { }
|
|
652
|
+
SimpleReuseStrategy.cacheRouters.delete(url);
|
|
672
653
|
}
|
|
673
|
-
return true;
|
|
674
654
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
this.handlers[key] = handle;
|
|
680
|
-
}
|
|
655
|
+
static deleteAllRouteCache() {
|
|
656
|
+
SimpleReuseStrategy.cacheRouters.forEach((handle, key) => {
|
|
657
|
+
SimpleReuseStrategy.deleteRouteCache(key);
|
|
658
|
+
});
|
|
681
659
|
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
}
|
|
687
|
-
return false;
|
|
660
|
+
// one 进入路由触发,是否同一路由时复用路由
|
|
661
|
+
shouldReuseRoute(future, curr) {
|
|
662
|
+
return future.routeConfig === curr.routeConfig &&
|
|
663
|
+
JSON.stringify(future.params) === JSON.stringify(curr.params);
|
|
688
664
|
}
|
|
689
|
-
//
|
|
665
|
+
// 获取存储路由
|
|
690
666
|
retrieve(route) {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
667
|
+
const url = this.getFullRouteURL(route);
|
|
668
|
+
if (route.data.keep && SimpleReuseStrategy.cacheRouters.has(url)) {
|
|
669
|
+
return SimpleReuseStrategy.cacheRouters.get(url);
|
|
670
|
+
}
|
|
671
|
+
else {
|
|
695
672
|
return null;
|
|
696
|
-
if (route.component?.name) {
|
|
697
|
-
return this.handlers[route.component?.name];
|
|
698
673
|
}
|
|
699
|
-
return null;
|
|
700
674
|
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
return
|
|
675
|
+
// 是否允许复用路由
|
|
676
|
+
shouldDetach(route) {
|
|
677
|
+
return Boolean(route.data.keep);
|
|
678
|
+
}
|
|
679
|
+
// 当路由离开时会触发,存储路由
|
|
680
|
+
store(route, handle) {
|
|
681
|
+
const url = this.getFullRouteURL(route);
|
|
682
|
+
SimpleReuseStrategy.cacheRouters.set(url, handle);
|
|
683
|
+
}
|
|
684
|
+
// 是否允许还原路由
|
|
685
|
+
shouldAttach(route) {
|
|
686
|
+
const url = this.getFullRouteURL(route);
|
|
687
|
+
return Boolean(route.data.keep) && SimpleReuseStrategy.cacheRouters.has(url);
|
|
688
|
+
}
|
|
689
|
+
// 获取当前路由url
|
|
690
|
+
getFullRouteURL(route) {
|
|
691
|
+
const { pathFromRoot } = route;
|
|
692
|
+
let fullRouteUrlPath = [];
|
|
693
|
+
pathFromRoot.forEach((item) => {
|
|
694
|
+
fullRouteUrlPath = fullRouteUrlPath.concat(this.getRouteUrlPath(item));
|
|
695
|
+
});
|
|
696
|
+
return `/${fullRouteUrlPath.join('/')}`;
|
|
697
|
+
}
|
|
698
|
+
getRouteUrlPath(route) {
|
|
699
|
+
return route.url.map(urlSegment => urlSegment.path);
|
|
704
700
|
}
|
|
705
701
|
}
|
|
706
702
|
|
|
707
703
|
class CreateOrEditEntriesComponent {
|
|
708
|
-
toaster;
|
|
709
|
-
_location;
|
|
710
|
-
configState;
|
|
711
|
-
_SectionAdminService;
|
|
712
|
-
_EntryAdminService;
|
|
713
|
-
datePipe;
|
|
714
|
-
_LocalizationService;
|
|
715
|
-
router;
|
|
716
|
-
_CmsApiService;
|
|
717
704
|
constructor(toaster, _location, configState, _SectionAdminService, _EntryAdminService, datePipe, _LocalizationService, router, _CmsApiService) {
|
|
718
705
|
this.toaster = toaster;
|
|
719
706
|
this._location = _location;
|
|
@@ -724,43 +711,43 @@ class CreateOrEditEntriesComponent {
|
|
|
724
711
|
this._LocalizationService = _LocalizationService;
|
|
725
712
|
this.router = router;
|
|
726
713
|
this._CmsApiService = _CmsApiService;
|
|
714
|
+
/**语言 */
|
|
715
|
+
this.cultureName = '';
|
|
716
|
+
/**条目id */
|
|
717
|
+
this.entryTypeId = '';
|
|
718
|
+
/**新建版本的版本id,同条目id */
|
|
719
|
+
this.RevisionEntryId = '';
|
|
720
|
+
/**选择的条目项 */
|
|
721
|
+
this.entryTypesItem = '';
|
|
722
|
+
/**版块id */
|
|
723
|
+
this.sectionId = '';
|
|
724
|
+
/**版块详情 */
|
|
725
|
+
this.SectionSelect = '';
|
|
726
|
+
/**语言列表 */
|
|
727
|
+
this.languagesList = [];
|
|
728
|
+
/**条目类型列表-用于选择上级条目 */
|
|
729
|
+
this.entryTypesList = [];
|
|
730
|
+
/**版本列表 */
|
|
731
|
+
this.AllVersionsList = [];
|
|
732
|
+
/**是否是编辑 */
|
|
733
|
+
this.isEdit = false;
|
|
734
|
+
/**来自父组件的传值 */
|
|
735
|
+
this.FromParentQueryParams = '';
|
|
736
|
+
/**指定id的条目信息 */
|
|
737
|
+
this.entrySelect = '';
|
|
738
|
+
this.time = 0;
|
|
739
|
+
this.config = inject(ConfigStateService);
|
|
727
740
|
}
|
|
728
|
-
/**语言 */
|
|
729
|
-
cultureName = '';
|
|
730
|
-
/**条目id */
|
|
731
|
-
entryTypeId = '';
|
|
732
|
-
/**新建版本的版本id,同条目id */
|
|
733
|
-
RevisionEntryId = '';
|
|
734
|
-
/**选择的条目项 */
|
|
735
|
-
entryTypesItem = '';
|
|
736
|
-
/**版块id */
|
|
737
|
-
sectionId = '';
|
|
738
|
-
/**版块详情 */
|
|
739
|
-
SectionSelect = '';
|
|
740
|
-
/**语言列表 */
|
|
741
|
-
languagesList = [];
|
|
742
|
-
/**条目类型列表-用于选择上级条目 */
|
|
743
|
-
entryTypesList = [];
|
|
744
|
-
/**版本列表 */
|
|
745
|
-
AllVersionsList = [];
|
|
746
|
-
/**是否是编辑 */
|
|
747
|
-
isEdit = false;
|
|
748
|
-
/**来自父组件的传值 */
|
|
749
|
-
FromParentQueryParams = '';
|
|
750
741
|
set ParentQueryParams(v) {
|
|
751
742
|
if (v) {
|
|
752
743
|
this.FromParentQueryParams = v;
|
|
753
744
|
}
|
|
754
745
|
}
|
|
755
|
-
/**表单实体 */
|
|
756
|
-
_entity;
|
|
757
746
|
set entity(v) {
|
|
758
747
|
if (v) {
|
|
759
748
|
this._entity = v;
|
|
760
749
|
}
|
|
761
750
|
}
|
|
762
|
-
/**指定id的条目信息 */
|
|
763
|
-
entrySelect = '';
|
|
764
751
|
set parentEntrySelect(v) {
|
|
765
752
|
if (v) {
|
|
766
753
|
let V_extraProperties = this._CmsApiService.deepClone(this.convertExtraProperties(v.extraProperties));
|
|
@@ -825,8 +812,6 @@ class CreateOrEditEntriesComponent {
|
|
|
825
812
|
await this.getAllVersionsList();
|
|
826
813
|
}
|
|
827
814
|
}
|
|
828
|
-
/**表单控件模板-动态表单配置组件 */
|
|
829
|
-
FormDynamicontrolRef;
|
|
830
815
|
/**定义自定义异步验证 */
|
|
831
816
|
cultureAsyncValidator_test() {
|
|
832
817
|
return (ctrl) => {
|
|
@@ -860,7 +845,6 @@ class CreateOrEditEntriesComponent {
|
|
|
860
845
|
this.cultureName = source.culture || source.cultureName;
|
|
861
846
|
this.sectionId = source.sectionId;
|
|
862
847
|
}
|
|
863
|
-
time = 0;
|
|
864
848
|
/**定义自定义异步验证 */
|
|
865
849
|
repetitionAsyncValidator() {
|
|
866
850
|
return (ctrl) => {
|
|
@@ -885,7 +869,6 @@ class CreateOrEditEntriesComponent {
|
|
|
885
869
|
});
|
|
886
870
|
};
|
|
887
871
|
}
|
|
888
|
-
config = inject(ConfigStateService);
|
|
889
872
|
/**获取版块详情 */
|
|
890
873
|
getSectionSelect() {
|
|
891
874
|
return new Promise((resolve, rejects) => {
|
|
@@ -955,8 +938,8 @@ class CreateOrEditEntriesComponent {
|
|
|
955
938
|
this.getAllVersionsList();
|
|
956
939
|
});
|
|
957
940
|
}
|
|
958
|
-
static
|
|
959
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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\">\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.displayName}}</option>\n </ng-container>\n </select>\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 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: 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", "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: ["disabled"] }, { kind: "component", type: i8$1.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" }] });
|
|
941
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 }); }
|
|
942
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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\">\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.displayName}}</option>\n </ng-container>\n </select>\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 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: 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", "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: ["disabled"] }, { 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" }] }); }
|
|
960
943
|
}
|
|
961
944
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateOrEditEntriesComponent, decorators: [{
|
|
962
945
|
type: Component,
|
|
@@ -975,32 +958,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
975
958
|
}] } });
|
|
976
959
|
|
|
977
960
|
class CreateComponent {
|
|
978
|
-
toaster
|
|
979
|
-
_location;
|
|
980
|
-
route;
|
|
981
|
-
_EntryAdminService;
|
|
982
|
-
_LocalizationService;
|
|
983
|
-
router;
|
|
984
|
-
constructor(toaster, _location, route, _EntryAdminService, _LocalizationService, router) {
|
|
961
|
+
constructor(toaster, _location, route, _EntryAdminService, _LocalizationService) {
|
|
985
962
|
this.toaster = toaster;
|
|
986
963
|
this._location = _location;
|
|
987
964
|
this.route = route;
|
|
988
965
|
this._EntryAdminService = _EntryAdminService;
|
|
989
966
|
this._LocalizationService = _LocalizationService;
|
|
990
|
-
this.
|
|
967
|
+
this.fb = inject(FormBuilder);
|
|
968
|
+
this._updateListService = inject(UpdateListService);
|
|
969
|
+
/**是否是草稿 */
|
|
970
|
+
this.draftType = false;
|
|
971
|
+
/**页面传值用于传递到子组件 */
|
|
972
|
+
this.queryParams = '';
|
|
973
|
+
/**指定id的条目信息 */
|
|
974
|
+
this.entrySelect = '';
|
|
991
975
|
}
|
|
992
|
-
fb = inject(FormBuilder);
|
|
993
|
-
_updateListService = inject(UpdateListService);
|
|
994
|
-
/**表单实体 */
|
|
995
|
-
newEntity;
|
|
996
|
-
/**是否是草稿 */
|
|
997
|
-
draftType = false;
|
|
998
|
-
/**页面传值用于传递到子组件 */
|
|
999
|
-
queryParams = '';
|
|
1000
|
-
/**指定id的条目信息 */
|
|
1001
|
-
entrySelect = '';
|
|
1002
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
1003
|
-
submitclick;
|
|
1004
976
|
async ngOnInit() {
|
|
1005
977
|
this.queryParams = this.route.snapshot.queryParams;
|
|
1006
978
|
this.newEntity = this.fb.group(new CreateOrUpdateEntryInputBase());
|
|
@@ -1029,10 +1001,8 @@ class CreateComponent {
|
|
|
1029
1001
|
return;
|
|
1030
1002
|
this._EntryAdminService.create(input).subscribe(res => {
|
|
1031
1003
|
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
1032
|
-
this.
|
|
1033
|
-
|
|
1034
|
-
this._updateListService.updateList();
|
|
1035
|
-
});
|
|
1004
|
+
this._location.back();
|
|
1005
|
+
this._updateListService.updateList();
|
|
1036
1006
|
});
|
|
1037
1007
|
}
|
|
1038
1008
|
/**触发点击按钮替身 */
|
|
@@ -1044,13 +1014,13 @@ class CreateComponent {
|
|
|
1044
1014
|
backTo() {
|
|
1045
1015
|
this._location.back();
|
|
1046
1016
|
}
|
|
1047
|
-
static
|
|
1048
|
-
static
|
|
1017
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateComponent, deps: [{ token: i3.ToasterService }, { token: i2.Location }, { token: i3$1.ActivatedRoute }, { token: EntryAdminService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1018
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateComponent, selector: "cms-create", providers: [
|
|
1049
1019
|
{
|
|
1050
1020
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1051
1021
|
useValue: ECmsComponent.Entries_Create,
|
|
1052
1022
|
},
|
|
1053
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"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: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type:
|
|
1023
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"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: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { 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" }] }); }
|
|
1054
1024
|
}
|
|
1055
1025
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateComponent, decorators: [{
|
|
1056
1026
|
type: Component,
|
|
@@ -1060,38 +1030,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1060
1030
|
useValue: ECmsComponent.Entries_Create,
|
|
1061
1031
|
},
|
|
1062
1032
|
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"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"] }]
|
|
1063
|
-
}], ctorParameters: function () { return [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: EntryAdminService }, { type: i1.LocalizationService }
|
|
1033
|
+
}], ctorParameters: function () { return [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: EntryAdminService }, { type: i1.LocalizationService }]; }, propDecorators: { submitclick: [{
|
|
1064
1034
|
type: ViewChild,
|
|
1065
1035
|
args: ['submitclick', { static: true }]
|
|
1066
1036
|
}] } });
|
|
1067
1037
|
|
|
1068
1038
|
class EditComponent {
|
|
1069
|
-
toaster
|
|
1070
|
-
_location;
|
|
1071
|
-
route;
|
|
1072
|
-
_EntryAdminService;
|
|
1073
|
-
router;
|
|
1074
|
-
_LocalizationService;
|
|
1075
|
-
constructor(toaster, _location, route, _EntryAdminService, router, _LocalizationService) {
|
|
1039
|
+
constructor(toaster, _location, route, _EntryAdminService, _LocalizationService) {
|
|
1076
1040
|
this.toaster = toaster;
|
|
1077
1041
|
this._location = _location;
|
|
1078
1042
|
this.route = route;
|
|
1079
1043
|
this._EntryAdminService = _EntryAdminService;
|
|
1080
|
-
this.router = router;
|
|
1081
1044
|
this._LocalizationService = _LocalizationService;
|
|
1045
|
+
this.fb = inject(FormBuilder);
|
|
1046
|
+
this._updateListService = inject(UpdateListService);
|
|
1047
|
+
/**是否是草稿 */
|
|
1048
|
+
this.draftType = false;
|
|
1049
|
+
/**页面传值用于传递到子组件 */
|
|
1050
|
+
this.queryParams = '' || {};
|
|
1051
|
+
/**指定id的条目信息 */
|
|
1052
|
+
this.entrySelect = '';
|
|
1082
1053
|
}
|
|
1083
|
-
fb = inject(FormBuilder);
|
|
1084
|
-
_updateListService = inject(UpdateListService);
|
|
1085
|
-
/**表单实体 */
|
|
1086
|
-
newEntity;
|
|
1087
|
-
/**是否是草稿 */
|
|
1088
|
-
draftType = false;
|
|
1089
|
-
/**页面传值用于传递到子组件 */
|
|
1090
|
-
queryParams = '' || {};
|
|
1091
|
-
/**指定id的条目信息 */
|
|
1092
|
-
entrySelect = '';
|
|
1093
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
1094
|
-
submitclick;
|
|
1095
1054
|
async ngOnInit() {
|
|
1096
1055
|
this.queryParams.RevisionEntryId = this.route.snapshot.params.entrieId;
|
|
1097
1056
|
this.newEntity = this.fb.group(new CreateOrUpdateEntryInputBase());
|
|
@@ -1119,10 +1078,8 @@ class EditComponent {
|
|
|
1119
1078
|
return;
|
|
1120
1079
|
this._EntryAdminService.update(this.entrySelect.id, input).subscribe(res => {
|
|
1121
1080
|
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
1122
|
-
this.
|
|
1123
|
-
|
|
1124
|
-
this._updateListService.updateList();
|
|
1125
|
-
});
|
|
1081
|
+
this.backTo();
|
|
1082
|
+
this._updateListService.updateList();
|
|
1126
1083
|
});
|
|
1127
1084
|
}
|
|
1128
1085
|
/**触发点击按钮替身 */
|
|
@@ -1134,13 +1091,13 @@ class EditComponent {
|
|
|
1134
1091
|
backTo() {
|
|
1135
1092
|
this._location.back();
|
|
1136
1093
|
}
|
|
1137
|
-
static
|
|
1138
|
-
static
|
|
1094
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditComponent, deps: [{ token: i3.ToasterService }, { token: i2.Location }, { token: i3$1.ActivatedRoute }, { token: EntryAdminService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1095
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EditComponent, selector: "cms-edit", providers: [
|
|
1139
1096
|
{
|
|
1140
1097
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1141
1098
|
useValue: ECmsComponent.Entries_Edit,
|
|
1142
1099
|
},
|
|
1143
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"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: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type:
|
|
1100
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"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: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { 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" }] }); }
|
|
1144
1101
|
}
|
|
1145
1102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditComponent, decorators: [{
|
|
1146
1103
|
type: Component,
|
|
@@ -1150,46 +1107,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1150
1107
|
useValue: ECmsComponent.Entries_Edit,
|
|
1151
1108
|
},
|
|
1152
1109
|
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"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"] }]
|
|
1153
|
-
}], ctorParameters: function () { return [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: EntryAdminService }, { type:
|
|
1110
|
+
}], ctorParameters: function () { return [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: EntryAdminService }, { type: i1.LocalizationService }]; }, propDecorators: { submitclick: [{
|
|
1154
1111
|
type: ViewChild,
|
|
1155
1112
|
args: ['submitclick', { static: true }]
|
|
1156
1113
|
}] } });
|
|
1157
1114
|
|
|
1158
1115
|
class FieldAdminService {
|
|
1159
|
-
restService;
|
|
1160
|
-
apiName = 'CmsAdmin';
|
|
1161
|
-
create = (input, config) => this.restService.request({
|
|
1162
|
-
method: 'POST',
|
|
1163
|
-
url: '/api/cms-admin/fields',
|
|
1164
|
-
body: input,
|
|
1165
|
-
}, { apiName: this.apiName, ...config });
|
|
1166
|
-
delete = (id, config) => this.restService.request({
|
|
1167
|
-
method: 'DELETE',
|
|
1168
|
-
url: `/api/cms-admin/fields/${id}`,
|
|
1169
|
-
}, { apiName: this.apiName, ...config });
|
|
1170
|
-
get = (id, config) => this.restService.request({
|
|
1171
|
-
method: 'GET',
|
|
1172
|
-
url: `/api/cms-admin/fields/${id}`,
|
|
1173
|
-
}, { apiName: this.apiName, ...config });
|
|
1174
|
-
getList = (input, config) => this.restService.request({
|
|
1175
|
-
method: 'GET',
|
|
1176
|
-
url: '/api/cms-admin/fields',
|
|
1177
|
-
params: { filter: input.filter, groupId: input.groupId, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
1178
|
-
}, { apiName: this.apiName, ...config });
|
|
1179
|
-
nameExists = (name, config) => this.restService.request({
|
|
1180
|
-
method: 'GET',
|
|
1181
|
-
url: `/api/cms-admin/fields/name-exists/${name}`,
|
|
1182
|
-
}, { apiName: this.apiName, ...config });
|
|
1183
|
-
update = (id, input, config) => this.restService.request({
|
|
1184
|
-
method: 'PUT',
|
|
1185
|
-
url: `/api/cms-admin/fields/${id}`,
|
|
1186
|
-
body: input,
|
|
1187
|
-
}, { apiName: this.apiName, ...config });
|
|
1188
1116
|
constructor(restService) {
|
|
1189
1117
|
this.restService = restService;
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1118
|
+
this.apiName = 'CmsAdmin';
|
|
1119
|
+
this.create = (input, config) => this.restService.request({
|
|
1120
|
+
method: 'POST',
|
|
1121
|
+
url: '/api/cms-admin/fields',
|
|
1122
|
+
body: input,
|
|
1123
|
+
}, { apiName: this.apiName, ...config });
|
|
1124
|
+
this.delete = (id, config) => this.restService.request({
|
|
1125
|
+
method: 'DELETE',
|
|
1126
|
+
url: `/api/cms-admin/fields/${id}`,
|
|
1127
|
+
}, { apiName: this.apiName, ...config });
|
|
1128
|
+
this.get = (id, config) => this.restService.request({
|
|
1129
|
+
method: 'GET',
|
|
1130
|
+
url: `/api/cms-admin/fields/${id}`,
|
|
1131
|
+
}, { apiName: this.apiName, ...config });
|
|
1132
|
+
this.getList = (input, config) => this.restService.request({
|
|
1133
|
+
method: 'GET',
|
|
1134
|
+
url: '/api/cms-admin/fields',
|
|
1135
|
+
params: { filter: input.filter, groupId: input.groupId, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
1136
|
+
}, { apiName: this.apiName, ...config });
|
|
1137
|
+
this.nameExists = (name, config) => this.restService.request({
|
|
1138
|
+
method: 'GET',
|
|
1139
|
+
url: `/api/cms-admin/fields/name-exists/${name}`,
|
|
1140
|
+
}, { apiName: this.apiName, ...config });
|
|
1141
|
+
this.update = (id, input, config) => this.restService.request({
|
|
1142
|
+
method: 'PUT',
|
|
1143
|
+
url: `/api/cms-admin/fields/${id}`,
|
|
1144
|
+
body: input,
|
|
1145
|
+
}, { apiName: this.apiName, ...config });
|
|
1146
|
+
}
|
|
1147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1148
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAdminService, providedIn: 'root' }); }
|
|
1193
1149
|
}
|
|
1194
1150
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldAdminService, decorators: [{
|
|
1195
1151
|
type: Injectable,
|
|
@@ -1199,12 +1155,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1199
1155
|
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
1200
1156
|
|
|
1201
1157
|
class FieldGroupComponent {
|
|
1202
|
-
fb;
|
|
1203
|
-
_FieldGroupAdminService;
|
|
1204
|
-
toaster;
|
|
1205
|
-
confirmation;
|
|
1206
|
-
_FieldAbstractsService;
|
|
1207
|
-
_LocalizationService;
|
|
1208
1158
|
constructor(fb, _FieldGroupAdminService, toaster, confirmation, _FieldAbstractsService, _LocalizationService) {
|
|
1209
1159
|
this.fb = fb;
|
|
1210
1160
|
this._FieldGroupAdminService = _FieldGroupAdminService;
|
|
@@ -1212,23 +1162,19 @@ class FieldGroupComponent {
|
|
|
1212
1162
|
this.confirmation = confirmation;
|
|
1213
1163
|
this._FieldAbstractsService = _FieldAbstractsService;
|
|
1214
1164
|
this._LocalizationService = _LocalizationService;
|
|
1165
|
+
/**表单已存在的值 */
|
|
1166
|
+
this.selected = {};
|
|
1167
|
+
/**选择的字段分组id */
|
|
1168
|
+
this.fieldGroupId = '';
|
|
1169
|
+
/**创建分组模态框状态 */
|
|
1170
|
+
this.createGroupOpen = false;
|
|
1171
|
+
/**用于确定模态的繁忙状态是否为真 */
|
|
1172
|
+
this.modalBusy = false;
|
|
1173
|
+
/**编辑分组模态框状态 */
|
|
1174
|
+
this.editGroupOpen = false;
|
|
1175
|
+
/**点击分组回调 */
|
|
1176
|
+
this.OnGroupClickBack = new EventEmitter();
|
|
1215
1177
|
}
|
|
1216
|
-
/**创建分组表单 */
|
|
1217
|
-
createForm;
|
|
1218
|
-
/** 编辑分组表单*/
|
|
1219
|
-
editGroupForm;
|
|
1220
|
-
/**表单已存在的值 */
|
|
1221
|
-
selected = {};
|
|
1222
|
-
/**选择的字段分组id */
|
|
1223
|
-
fieldGroupId = '';
|
|
1224
|
-
/**创建分组模态框状态 */
|
|
1225
|
-
createGroupOpen = false;
|
|
1226
|
-
/**用于确定模态的繁忙状态是否为真 */
|
|
1227
|
-
modalBusy = false;
|
|
1228
|
-
/**编辑分组模态框状态 */
|
|
1229
|
-
editGroupOpen = false;
|
|
1230
|
-
/**点击分组回调 */
|
|
1231
|
-
OnGroupClickBack = new EventEmitter();
|
|
1232
1178
|
ngOnInit() {
|
|
1233
1179
|
this._FieldAbstractsService.getfieldGroupList();
|
|
1234
1180
|
}
|
|
@@ -1300,8 +1246,8 @@ class FieldGroupComponent {
|
|
|
1300
1246
|
this.fieldGroupId = event;
|
|
1301
1247
|
this.OnGroupClickBack.emit(event);
|
|
1302
1248
|
}
|
|
1303
|
-
static
|
|
1304
|
-
static
|
|
1249
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 }); }
|
|
1250
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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\" (ngSubmit)=\"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\" (ngSubmit)=\"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.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: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1305
1251
|
}
|
|
1306
1252
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldGroupComponent, decorators: [{
|
|
1307
1253
|
type: Component,
|
|
@@ -1311,32 +1257,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1311
1257
|
}] } });
|
|
1312
1258
|
|
|
1313
1259
|
class FieldsComponent {
|
|
1314
|
-
list
|
|
1315
|
-
_FieldAdminService;
|
|
1316
|
-
toaster;
|
|
1317
|
-
confirmation;
|
|
1318
|
-
_LocalizationService;
|
|
1319
|
-
router;
|
|
1320
|
-
_CmsApiService;
|
|
1321
|
-
constructor(list, _FieldAdminService, toaster, confirmation, _LocalizationService, router, _CmsApiService) {
|
|
1260
|
+
constructor(list, _FieldAdminService, toaster, confirmation, _LocalizationService, router) {
|
|
1322
1261
|
this.list = list;
|
|
1323
1262
|
this._FieldAdminService = _FieldAdminService;
|
|
1324
1263
|
this.toaster = toaster;
|
|
1325
1264
|
this.confirmation = confirmation;
|
|
1326
1265
|
this._LocalizationService = _LocalizationService;
|
|
1327
1266
|
this.router = router;
|
|
1328
|
-
this.
|
|
1267
|
+
this._UpdateListService = inject(UpdateListService);
|
|
1268
|
+
/**表格单元格布局类型 */
|
|
1269
|
+
this.ColumnMode = ColumnMode;
|
|
1270
|
+
/**表格数据 */
|
|
1271
|
+
this.data = {
|
|
1272
|
+
items: [],
|
|
1273
|
+
totalCount: 0,
|
|
1274
|
+
};
|
|
1275
|
+
/**过滤器 */
|
|
1276
|
+
this.filters = {};
|
|
1329
1277
|
}
|
|
1330
|
-
_UpdateListService = inject(UpdateListService);
|
|
1331
|
-
/**表格单元格布局类型 */
|
|
1332
|
-
ColumnMode = ColumnMode;
|
|
1333
|
-
/**表格数据 */
|
|
1334
|
-
data = {
|
|
1335
|
-
items: [],
|
|
1336
|
-
totalCount: 0,
|
|
1337
|
-
};
|
|
1338
|
-
/**过滤器 */
|
|
1339
|
-
filters = {};
|
|
1340
1278
|
ngOnInit() {
|
|
1341
1279
|
this.hookToQuery();
|
|
1342
1280
|
this._UpdateListService.updateListEvent.subscribe(() => {
|
|
@@ -1379,8 +1317,8 @@ class FieldsComponent {
|
|
|
1379
1317
|
}
|
|
1380
1318
|
});
|
|
1381
1319
|
}
|
|
1382
|
-
static
|
|
1383
|
-
static
|
|
1320
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 }); }
|
|
1321
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FieldsComponent, selector: "cms-fields", providers: [
|
|
1384
1322
|
// [Required]
|
|
1385
1323
|
ListService,
|
|
1386
1324
|
// [Optional]
|
|
@@ -1391,7 +1329,7 @@ class FieldsComponent {
|
|
|
1391
1329
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1392
1330
|
useValue: ECmsComponent.Fields,
|
|
1393
1331
|
},
|
|
1394
|
-
], 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 cellClass=\"cellClassRight\" [frozenRight]=\"true\" [width]=\"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", "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: ["disabled"] }, { kind: "component", type:
|
|
1332
|
+
], 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 cellClass=\"cellClassRight\" [frozenRight]=\"true\" [width]=\"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", "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: ["disabled"] }, { 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" }] }); }
|
|
1395
1333
|
}
|
|
1396
1334
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FieldsComponent, decorators: [{
|
|
1397
1335
|
type: Component,
|
|
@@ -1407,22 +1345,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1407
1345
|
useValue: ECmsComponent.Fields,
|
|
1408
1346
|
},
|
|
1409
1347
|
], 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 cellClass=\"cellClassRight\" [frozenRight]=\"true\" [width]=\"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"] }]
|
|
1410
|
-
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: FieldAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.LocalizationService }, { type: i3$1.Router }
|
|
1348
|
+
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: FieldAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1.LocalizationService }, { type: i3$1.Router }]; } });
|
|
1411
1349
|
|
|
1412
1350
|
class CreateOrUpdateFieldInputBase {
|
|
1413
|
-
/**分组id */
|
|
1414
|
-
groupId = ['', []];
|
|
1415
|
-
/**字段名称 Display name of this field */
|
|
1416
|
-
displayName = ['', [Validators.required]];
|
|
1417
|
-
/**字段唯一名称 Unique Name*/
|
|
1418
|
-
name = ['', [Validators.required]];
|
|
1419
|
-
/**描述 说明 */
|
|
1420
|
-
description = ['', []];
|
|
1421
|
-
/**FieldType字段类型 表单控件名称 */
|
|
1422
|
-
formControlName = [undefined, [Validators.required]];
|
|
1423
|
-
/**动态表单配置 */
|
|
1424
|
-
formConfiguration = new FormGroup({});
|
|
1425
1351
|
constructor(data) {
|
|
1352
|
+
/**分组id */
|
|
1353
|
+
this.groupId = ['', []];
|
|
1354
|
+
/**字段名称 Display name of this field */
|
|
1355
|
+
this.displayName = ['', [Validators.required]];
|
|
1356
|
+
/**字段唯一名称 Unique Name*/
|
|
1357
|
+
this.name = ['', [Validators.required]];
|
|
1358
|
+
/**描述 说明 */
|
|
1359
|
+
this.description = ['', []];
|
|
1360
|
+
/**FieldType字段类型 表单控件名称 */
|
|
1361
|
+
this.formControlName = [undefined, [Validators.required]];
|
|
1362
|
+
/**动态表单配置 */
|
|
1363
|
+
this.formConfiguration = new FormGroup({});
|
|
1426
1364
|
if (data) {
|
|
1427
1365
|
for (const key in data) {
|
|
1428
1366
|
if (data.hasOwnProperty(key)) {
|
|
@@ -1434,12 +1372,6 @@ class CreateOrUpdateFieldInputBase {
|
|
|
1434
1372
|
}
|
|
1435
1373
|
|
|
1436
1374
|
class CreateOrEditFieldComponent {
|
|
1437
|
-
_FieldAbstractsService;
|
|
1438
|
-
_CmsApiService;
|
|
1439
|
-
_FieldAdminService;
|
|
1440
|
-
_LocalizationService;
|
|
1441
|
-
/**表单控件模板-动态表单配置组件 */
|
|
1442
|
-
FormDynamicRef;
|
|
1443
1375
|
constructor(_FieldAbstractsService, _CmsApiService, _FieldAdminService, _LocalizationService) {
|
|
1444
1376
|
this._FieldAbstractsService = _FieldAbstractsService;
|
|
1445
1377
|
this._CmsApiService = _CmsApiService;
|
|
@@ -1449,8 +1381,6 @@ class CreateOrEditFieldComponent {
|
|
|
1449
1381
|
this._FieldAbstractsService.getfieldGroupList();
|
|
1450
1382
|
}
|
|
1451
1383
|
}
|
|
1452
|
-
/**表单实体 */
|
|
1453
|
-
_Entity;
|
|
1454
1384
|
set Entity(v) {
|
|
1455
1385
|
if (v) {
|
|
1456
1386
|
this._Entity = v;
|
|
@@ -1460,9 +1390,6 @@ class CreateOrEditFieldComponent {
|
|
|
1460
1390
|
get formControlName() {
|
|
1461
1391
|
return this._Entity.get('formControlName');
|
|
1462
1392
|
}
|
|
1463
|
-
/**选择的表单信息 */
|
|
1464
|
-
_selected_copy;
|
|
1465
|
-
_selected;
|
|
1466
1393
|
set selected(v) {
|
|
1467
1394
|
if (v) {
|
|
1468
1395
|
this._selected = v || '';
|
|
@@ -1525,8 +1452,8 @@ class CreateOrEditFieldComponent {
|
|
|
1525
1452
|
}
|
|
1526
1453
|
formControlNameChange() {
|
|
1527
1454
|
}
|
|
1528
|
-
static
|
|
1529
|
-
static
|
|
1455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateOrEditFieldComponent, deps: [{ token: FieldAbstractsService }, { token: CmsApiService }, { token: FieldAdminService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1456
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 }], ngImport: i0, 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()\">\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>", 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: 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" }] }); }
|
|
1530
1457
|
}
|
|
1531
1458
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateOrEditFieldComponent, decorators: [{
|
|
1532
1459
|
type: Component,
|
|
@@ -1541,27 +1468,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1541
1468
|
}] } });
|
|
1542
1469
|
|
|
1543
1470
|
class CreateFieldComponent {
|
|
1544
|
-
fb
|
|
1545
|
-
_FieldAdminService;
|
|
1546
|
-
toaster;
|
|
1547
|
-
_location;
|
|
1548
|
-
_LocalizationService;
|
|
1549
|
-
_CmsApiService;
|
|
1550
|
-
router;
|
|
1551
|
-
constructor(fb, _FieldAdminService, toaster, _location, _LocalizationService, _CmsApiService, router) {
|
|
1471
|
+
constructor(fb, _FieldAdminService, toaster, _location, _LocalizationService, _CmsApiService) {
|
|
1552
1472
|
this.fb = fb;
|
|
1553
1473
|
this._FieldAdminService = _FieldAdminService;
|
|
1554
1474
|
this.toaster = toaster;
|
|
1555
1475
|
this._location = _location;
|
|
1556
1476
|
this._LocalizationService = _LocalizationService;
|
|
1557
1477
|
this._CmsApiService = _CmsApiService;
|
|
1558
|
-
this.
|
|
1478
|
+
this._UpdateListService = inject(UpdateListService);
|
|
1559
1479
|
}
|
|
1560
|
-
_UpdateListService = inject(UpdateListService);
|
|
1561
|
-
/**表单实体 */
|
|
1562
|
-
newEntity;
|
|
1563
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
1564
|
-
submitclick;
|
|
1565
1480
|
ngOnInit() {
|
|
1566
1481
|
//Called after the constructor, initializing input properties, and the first call to ngOnChanges.
|
|
1567
1482
|
//Add 'implements OnInit' to the class.
|
|
@@ -1578,19 +1493,17 @@ class CreateFieldComponent {
|
|
|
1578
1493
|
return;
|
|
1579
1494
|
this._FieldAdminService.create(input).subscribe(res => {
|
|
1580
1495
|
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
1581
|
-
this.
|
|
1582
|
-
|
|
1583
|
-
this._UpdateListService.updateList();
|
|
1584
|
-
});
|
|
1496
|
+
this._location.back();
|
|
1497
|
+
this._UpdateListService.updateList();
|
|
1585
1498
|
});
|
|
1586
1499
|
}
|
|
1587
|
-
static
|
|
1588
|
-
static
|
|
1500
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 }); }
|
|
1501
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateFieldComponent, selector: "cms-create-field", providers: [
|
|
1589
1502
|
{
|
|
1590
1503
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1591
1504
|
useValue: ECmsComponent.FieldsCreate,
|
|
1592
1505
|
},
|
|
1593
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button 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: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type:
|
|
1506
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button 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: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { 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" }] }); }
|
|
1594
1507
|
}
|
|
1595
1508
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateFieldComponent, decorators: [{
|
|
1596
1509
|
type: Component,
|
|
@@ -1600,22 +1513,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1600
1513
|
useValue: ECmsComponent.FieldsCreate,
|
|
1601
1514
|
},
|
|
1602
1515
|
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"'Cms::CreateField' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"create-field-page\">\n <button 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"] }]
|
|
1603
|
-
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: FieldAdminService }, { type: i3.ToasterService }, { type: i2.Location }, { type: i1.LocalizationService }, { type: CmsApiService }
|
|
1516
|
+
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: FieldAdminService }, { type: i3.ToasterService }, { type: i2.Location }, { type: i1.LocalizationService }, { type: CmsApiService }]; }, propDecorators: { submitclick: [{
|
|
1604
1517
|
type: ViewChild,
|
|
1605
1518
|
args: ['submitclick', { static: true }]
|
|
1606
1519
|
}] } });
|
|
1607
1520
|
|
|
1608
1521
|
class EditFieldComponent {
|
|
1609
|
-
fb
|
|
1610
|
-
_FieldAbstractsService;
|
|
1611
|
-
_FieldAdminService;
|
|
1612
|
-
route;
|
|
1613
|
-
toaster;
|
|
1614
|
-
_location;
|
|
1615
|
-
_LocalizationService;
|
|
1616
|
-
_CmsApiService;
|
|
1617
|
-
router;
|
|
1618
|
-
constructor(fb, _FieldAbstractsService, _FieldAdminService, route, toaster, _location, _LocalizationService, _CmsApiService, router) {
|
|
1522
|
+
constructor(fb, _FieldAbstractsService, _FieldAdminService, route, toaster, _location, _LocalizationService, _CmsApiService) {
|
|
1619
1523
|
this.fb = fb;
|
|
1620
1524
|
this._FieldAbstractsService = _FieldAbstractsService;
|
|
1621
1525
|
this._FieldAdminService = _FieldAdminService;
|
|
@@ -1624,16 +1528,10 @@ class EditFieldComponent {
|
|
|
1624
1528
|
this._location = _location;
|
|
1625
1529
|
this._LocalizationService = _LocalizationService;
|
|
1626
1530
|
this._CmsApiService = _CmsApiService;
|
|
1627
|
-
|
|
1531
|
+
/**字段id */
|
|
1532
|
+
this.fieldId = '';
|
|
1533
|
+
this._UpdateListService = inject(UpdateListService);
|
|
1628
1534
|
}
|
|
1629
|
-
/**表单实体 */
|
|
1630
|
-
newEntity;
|
|
1631
|
-
/**字段id */
|
|
1632
|
-
fieldId = '';
|
|
1633
|
-
/**字段详情 */
|
|
1634
|
-
fieldDetails;
|
|
1635
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
1636
|
-
submitclick;
|
|
1637
1535
|
async ngOnInit() {
|
|
1638
1536
|
const _fieldId = this.route.snapshot.params.id;
|
|
1639
1537
|
if (_fieldId) {
|
|
@@ -1664,7 +1562,6 @@ class EditFieldComponent {
|
|
|
1664
1562
|
submitclickBtn() {
|
|
1665
1563
|
this.submitclick.nativeElement.click();
|
|
1666
1564
|
}
|
|
1667
|
-
_UpdateListService = inject(UpdateListService);
|
|
1668
1565
|
/**保存表单 */
|
|
1669
1566
|
save() {
|
|
1670
1567
|
let input = this.newEntity.value;
|
|
@@ -1672,19 +1569,17 @@ class EditFieldComponent {
|
|
|
1672
1569
|
return;
|
|
1673
1570
|
this._FieldAdminService.update(this.fieldId, input).subscribe((res => {
|
|
1674
1571
|
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
1675
|
-
this.
|
|
1676
|
-
|
|
1677
|
-
this._UpdateListService.updateList();
|
|
1678
|
-
});
|
|
1572
|
+
this._location.back();
|
|
1573
|
+
this._UpdateListService.updateList();
|
|
1679
1574
|
}));
|
|
1680
1575
|
}
|
|
1681
|
-
static
|
|
1682
|
-
static
|
|
1576
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 }); }
|
|
1577
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EditFieldComponent, selector: "cms-edit-field", providers: [
|
|
1683
1578
|
{
|
|
1684
1579
|
provide: EXTENSIONS_IDENTIFIER,
|
|
1685
1580
|
useValue: ECmsComponent.FieldsEdit,
|
|
1686
1581
|
},
|
|
1687
|
-
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"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: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { kind: "directive", type: i9.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "component", type:
|
|
1582
|
+
], viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"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: i1.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { 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" }] }); }
|
|
1688
1583
|
}
|
|
1689
1584
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditFieldComponent, decorators: [{
|
|
1690
1585
|
type: Component,
|
|
@@ -1694,67 +1589,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1694
1589
|
useValue: ECmsComponent.FieldsEdit,
|
|
1695
1590
|
},
|
|
1696
1591
|
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"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>" }]
|
|
1697
|
-
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: FieldAbstractsService }, { type: FieldAdminService }, { type: i3$1.ActivatedRoute }, { type: i3.ToasterService }, { type: i2.Location }, { type: i1.LocalizationService }, { type: CmsApiService }
|
|
1592
|
+
}], ctorParameters: function () { return [{ 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: [{
|
|
1698
1593
|
type: ViewChild,
|
|
1699
1594
|
args: ['submitclick', { static: true }]
|
|
1700
1595
|
}] } });
|
|
1701
1596
|
|
|
1702
|
-
class SitesComponent {
|
|
1703
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SitesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1704
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SitesComponent, selector: "cms-sites", providers: [
|
|
1705
|
-
ListService,
|
|
1706
|
-
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
|
|
1707
|
-
{
|
|
1708
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
1709
|
-
useValue: ECmsComponent.Sites,
|
|
1710
|
-
},
|
|
1711
|
-
], ngImport: i0, template: "<!-- <abp-page [title]=\"'Cms::Sites' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sites-page\">\n <div class=\"card\">\n <div class=\"card-body 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\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\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 container-height\" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"'force'\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [scrollbarV]=\"true\" [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\">\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::IsActive' | abpLocalization\" prop=\"isActive\">\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::Host' | abpLocalization\" prop=\"host\">\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::CreationTime' | abpLocalization\" prop=\"creationTime\">\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\">\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-outline-primary btn-sm\" ngbDropdownToggle>\n {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem\n (click)=\"EditSitesBtn(row)\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click)=\"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</abp-page>\n<abp-modal [(visible)]=\"createSitesOpen\" [busy]=\"modalBusy\" (visibleChange)=\"createGroupVisibleChange($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\" #myForm=\"ngForm\" [formGroup]=\"createOrEditForm\"\n (ngSubmit)=\"createOrEditSave()\">\n <button type=\"submit\" #createModalSubmit 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\"\n (blur)=\"disPlayNameInputBlur($event)\" />\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\" />\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::Host' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"host\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"hostInput.errors?.repetition\">\n {{hostInput.errors?.repetition}}\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=\"flexRadioDefault1\" />\n <label class=\"form-check-label\" for=\"flexRadioDefault1\"> {{'Cms::IsActive' | abpLocalization}}\n </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Languages' | abpLocalization}}</label>\n <ul class=\"list-group list-group-flush\">\n <ng-container *ngFor=\"let item of languages; let i = index\">\n <li class=\"list-group-item d-flex justify-content-between align-items-center\">\n <div>\n <input class=\"form-check-input me-1\" type=\"checkbox\" [value]=\"item.cultureName\"\n id=\"firstRadio{{ i }}\" [checked]=\"item.ischecked\"\n (change)=\"languagesChange($event);!item.ischecked\" />\n <label class=\"form-check-label\" for=\"firstRadio{{ i }}\">{{ item.displayName\n }}</label>\n </div>\n <ng-container *ngIf=\"item.ischecked\">\n <div class=\"text-primary\" *ngIf=\"item.isDefault\">{{'Cms::Default' | abpLocalization}}\n </div>\n <div (click.stop)=\"setDefault(item)\" *ngIf=\"!item.isDefault\">\n {{'Cms::SetDefault' | abpLocalization}}</div>\n </ng-container>\n </li>\n </ng-container>\n </ul>\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)=\"createModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal> -->", 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 .container-height{height:calc(100vh - 220px)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"] });
|
|
1712
|
-
}
|
|
1713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SitesComponent, decorators: [{
|
|
1714
|
-
type: Component,
|
|
1715
|
-
args: [{ selector: 'cms-sites', providers: [
|
|
1716
|
-
ListService,
|
|
1717
|
-
{ provide: LIST_QUERY_DEBOUNCE_TIME, useValue: 500 },
|
|
1718
|
-
{
|
|
1719
|
-
provide: EXTENSIONS_IDENTIFIER,
|
|
1720
|
-
useValue: ECmsComponent.Sites,
|
|
1721
|
-
},
|
|
1722
|
-
], template: "<!-- <abp-page [title]=\"'Cms::Sites' | abpLocalization\" [toolbar]=\"true\">\n <div class=\"sites-page\">\n <div class=\"card\">\n <div class=\"card-body 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\" (click)=\"list.get()\">\n <i class=\"fa fa-search\"></i>\n </button>\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 container-height\" [rows]=\"data.items\" [list]=\"list\"\n [columnMode]=\"'force'\" [headerHeight]=\"50\" [footerHeight]=\"50\" rowHeight=\"auto\"\n [scrollbarV]=\"true\" [virtualization]=\"false\" [externalPaging]=\"true\" [count]=\"data.totalCount\">\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::IsActive' | abpLocalization\" prop=\"isActive\">\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::Host' | abpLocalization\" prop=\"host\">\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::CreationTime' | abpLocalization\" prop=\"creationTime\">\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\">\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-outline-primary btn-sm\" ngbDropdownToggle>\n {{'AbpUi::Actions' | abpLocalization}}\n </button>\n <div ngbDropdownMenu>\n <button ngbDropdownItem\n (click)=\"EditSitesBtn(row)\">{{'AbpUi::Edit' | abpLocalization}}</button>\n <button ngbDropdownItem\n (click)=\"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</abp-page>\n<abp-modal [(visible)]=\"createSitesOpen\" [busy]=\"modalBusy\" (visibleChange)=\"createGroupVisibleChange($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\" #myForm=\"ngForm\" [formGroup]=\"createOrEditForm\"\n (ngSubmit)=\"createOrEditSave()\">\n <button type=\"submit\" #createModalSubmit 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\"\n (blur)=\"disPlayNameInputBlur($event)\" />\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\" />\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::Host' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"host\" />\n <div class=\"text-danger invalid-feedback\" *ngIf=\"hostInput.errors?.repetition\">\n {{hostInput.errors?.repetition}}\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=\"flexRadioDefault1\" />\n <label class=\"form-check-label\" for=\"flexRadioDefault1\"> {{'Cms::IsActive' | abpLocalization}}\n </label>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'Cms::Languages' | abpLocalization}}</label>\n <ul class=\"list-group list-group-flush\">\n <ng-container *ngFor=\"let item of languages; let i = index\">\n <li class=\"list-group-item d-flex justify-content-between align-items-center\">\n <div>\n <input class=\"form-check-input me-1\" type=\"checkbox\" [value]=\"item.cultureName\"\n id=\"firstRadio{{ i }}\" [checked]=\"item.ischecked\"\n (change)=\"languagesChange($event);!item.ischecked\" />\n <label class=\"form-check-label\" for=\"firstRadio{{ i }}\">{{ item.displayName\n }}</label>\n </div>\n <ng-container *ngIf=\"item.ischecked\">\n <div class=\"text-primary\" *ngIf=\"item.isDefault\">{{'Cms::Default' | abpLocalization}}\n </div>\n <div (click.stop)=\"setDefault(item)\" *ngIf=\"!item.isDefault\">\n {{'Cms::SetDefault' | abpLocalization}}</div>\n </ng-container>\n </li>\n </ng-container>\n </ul>\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)=\"createModalSubmit.nativeElement.click()\">{{'AbpUi::Save' | abpLocalization}}</abp-button>\n </ng-template>\n</abp-modal> -->", 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 .container-height{height:calc(100vh - 220px)}::ng-deep .sites-modal-form .form-control{padding:.4rem 1.25rem}\n"] }]
|
|
1723
|
-
}] });
|
|
1724
|
-
|
|
1725
|
-
class CreateOrUpdateSitesInputBase {
|
|
1726
|
-
displayName = ['', [Validators.required]];
|
|
1727
|
-
name = ['', [Validators.required]];
|
|
1728
|
-
host = ['https://', [Validators.required]];
|
|
1729
|
-
isActive = [true, []];
|
|
1730
|
-
languages = [[], [Validators.required]];
|
|
1731
|
-
constructor(data) {
|
|
1732
|
-
if (data) {
|
|
1733
|
-
for (const key in data) {
|
|
1734
|
-
if (data.hasOwnProperty(key)) {
|
|
1735
|
-
this[key] = data[key];
|
|
1736
|
-
}
|
|
1737
|
-
}
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
1597
|
class CreateOrUpdateSectionsInputBase {
|
|
1743
|
-
/**版块类型 */
|
|
1744
|
-
type = [0, [Validators.required]];
|
|
1745
|
-
/**字段名称 Display name of this field */
|
|
1746
|
-
displayName = ['', [Validators.required]];
|
|
1747
|
-
/**字段唯一名称 Unique Name*/
|
|
1748
|
-
name = ['', [Validators.required]];
|
|
1749
|
-
/**条目路由 */
|
|
1750
|
-
route = ['', [Validators.required]];
|
|
1751
|
-
/**页面模板 */
|
|
1752
|
-
template = ['', [Validators.required]];
|
|
1753
|
-
/**是否默认 */
|
|
1754
|
-
isDefault = [false, []];
|
|
1755
|
-
/**是否激活 */
|
|
1756
|
-
isActive = [true, []];
|
|
1757
1598
|
constructor(data) {
|
|
1599
|
+
/**版块类型 */
|
|
1600
|
+
this.type = [0, [Validators.required]];
|
|
1601
|
+
/**字段名称 Display name of this field */
|
|
1602
|
+
this.displayName = ['', [Validators.required]];
|
|
1603
|
+
/**字段唯一名称 Unique Name*/
|
|
1604
|
+
this.name = ['', [Validators.required]];
|
|
1605
|
+
/**条目路由 */
|
|
1606
|
+
this.route = ['', [Validators.required]];
|
|
1607
|
+
/**页面模板 */
|
|
1608
|
+
this.template = ['', [Validators.required]];
|
|
1609
|
+
/**是否默认 */
|
|
1610
|
+
this.isDefault = [false, []];
|
|
1611
|
+
/**是否激活 */
|
|
1612
|
+
this.isActive = [true, []];
|
|
1758
1613
|
if (data) {
|
|
1759
1614
|
for (const key in data) {
|
|
1760
1615
|
if (data.hasOwnProperty(key)) {
|
|
@@ -1774,18 +1629,7 @@ var SectionType;
|
|
|
1774
1629
|
const sectionTypeOptions = mapEnumToOptions(SectionType);
|
|
1775
1630
|
|
|
1776
1631
|
class SectionsComponent {
|
|
1777
|
-
list
|
|
1778
|
-
_SectionAdminService;
|
|
1779
|
-
toaster;
|
|
1780
|
-
confirmation;
|
|
1781
|
-
fb;
|
|
1782
|
-
_EntryTypeAdminService;
|
|
1783
|
-
_LocalizationService;
|
|
1784
|
-
_CmsApiService;
|
|
1785
|
-
router;
|
|
1786
|
-
constructor(list, _SectionAdminService,
|
|
1787
|
-
// private _SiteAdminService: SiteAdminService,
|
|
1788
|
-
toaster, confirmation, fb, _EntryTypeAdminService, _LocalizationService, _CmsApiService, router) {
|
|
1632
|
+
constructor(list, _SectionAdminService, toaster, confirmation, fb, _EntryTypeAdminService, _LocalizationService, _CmsApiService) {
|
|
1789
1633
|
this.list = list;
|
|
1790
1634
|
this._SectionAdminService = _SectionAdminService;
|
|
1791
1635
|
this.toaster = toaster;
|
|
@@ -1794,33 +1638,18 @@ class SectionsComponent {
|
|
|
1794
1638
|
this._EntryTypeAdminService = _EntryTypeAdminService;
|
|
1795
1639
|
this._LocalizationService = _LocalizationService;
|
|
1796
1640
|
this._CmsApiService = _CmsApiService;
|
|
1797
|
-
this.
|
|
1641
|
+
this._UpdateListService = inject(UpdateListService);
|
|
1642
|
+
this.siteList = [];
|
|
1643
|
+
this.ColumnMode = ColumnMode;
|
|
1644
|
+
this.data = { items: [], totalCount: 0 };
|
|
1645
|
+
this.filters = {};
|
|
1646
|
+
this.visibleOpen = false;
|
|
1647
|
+
this.modalBusy = false;
|
|
1648
|
+
this._SectionType = SectionType;
|
|
1649
|
+
this._sectionTypeOptions = sectionTypeOptions;
|
|
1798
1650
|
}
|
|
1799
|
-
_UpdateListService = inject(UpdateListService);
|
|
1800
|
-
/**跳转编辑 */
|
|
1801
|
-
jumpSectionsEdit(row, item) {
|
|
1802
|
-
this.router.navigate([`/cms/admin/sections/${row.id}/entry-types/${item.id}/edit`], {});
|
|
1803
|
-
}
|
|
1804
|
-
/**跳转新建 */
|
|
1805
|
-
jumpSectionsCreate(row) {
|
|
1806
|
-
this.router.navigate([`/cms/admin/sections/${row.id}/entry-types/create`], {});
|
|
1807
|
-
}
|
|
1808
|
-
/**版块列表 */
|
|
1809
|
-
siteList = [];
|
|
1810
|
-
/*** */
|
|
1811
|
-
ColumnMode = ColumnMode;
|
|
1812
|
-
data = {
|
|
1813
|
-
items: [],
|
|
1814
|
-
totalCount: 0,
|
|
1815
|
-
};
|
|
1816
|
-
/** */
|
|
1817
|
-
filters = {};
|
|
1818
|
-
/**获取页面列表 */
|
|
1819
1651
|
hookToQuery() {
|
|
1820
|
-
const getData = (query) => this._SectionAdminService.getList({
|
|
1821
|
-
...query,
|
|
1822
|
-
...this.filters,
|
|
1823
|
-
});
|
|
1652
|
+
const getData = (query) => this._SectionAdminService.getList({ ...query, ...this.filters });
|
|
1824
1653
|
const setData = (list) => (this.data = list);
|
|
1825
1654
|
this.list.hookToQuery(getData).subscribe(setData);
|
|
1826
1655
|
}
|
|
@@ -1830,37 +1659,21 @@ class SectionsComponent {
|
|
|
1830
1659
|
this.list.get();
|
|
1831
1660
|
});
|
|
1832
1661
|
}
|
|
1833
|
-
/**站点切换 */
|
|
1834
1662
|
siteIdChange() {
|
|
1835
1663
|
this.list.page = 0;
|
|
1836
1664
|
this.list.get();
|
|
1837
1665
|
}
|
|
1838
|
-
/**创建版块模态框状态 */
|
|
1839
|
-
visibleOpen = false;
|
|
1840
|
-
/**用于确定模态的繁忙状态是否为真 */
|
|
1841
|
-
modalBusy = false;
|
|
1842
|
-
/**创建版块表单 */
|
|
1843
|
-
createOrEditForm;
|
|
1844
|
-
/**版块给定的表单值 */
|
|
1845
|
-
selected;
|
|
1846
|
-
_SectionType = SectionType;
|
|
1847
|
-
_sectionTypeOptions = sectionTypeOptions;
|
|
1848
|
-
/**表单控件模板-动态赋值表单控件 */
|
|
1849
|
-
createOrEditModalSubmitBtn;
|
|
1850
|
-
/**创建版块模态框状态改变 */
|
|
1851
1666
|
VisibleChange(event) {
|
|
1852
1667
|
if (!event) {
|
|
1853
1668
|
this.selected = '';
|
|
1854
1669
|
return;
|
|
1855
1670
|
}
|
|
1856
1671
|
}
|
|
1857
|
-
/**创建版块,打开模态框 */
|
|
1858
1672
|
createSectionBtn() {
|
|
1859
1673
|
this.visibleOpen = true;
|
|
1860
1674
|
this.createOrEditForm = this.fb.group(new CreateOrUpdateSectionsInputBase());
|
|
1861
1675
|
this.setAsyncValidatorsFn();
|
|
1862
1676
|
}
|
|
1863
|
-
/**编辑版块,打开模态框 */
|
|
1864
1677
|
editSectionBtn(row) {
|
|
1865
1678
|
this.visibleOpen = true;
|
|
1866
1679
|
this.createOrEditForm = this.fb.group(new CreateOrUpdateSectionsInputBase());
|
|
@@ -1870,7 +1683,6 @@ class SectionsComponent {
|
|
|
1870
1683
|
this.selected = res;
|
|
1871
1684
|
});
|
|
1872
1685
|
}
|
|
1873
|
-
/**删除某个条目类型 */
|
|
1874
1686
|
deleteEntryType(row) {
|
|
1875
1687
|
this.confirmation
|
|
1876
1688
|
.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`))
|
|
@@ -1886,22 +1698,16 @@ class SectionsComponent {
|
|
|
1886
1698
|
}
|
|
1887
1699
|
});
|
|
1888
1700
|
}
|
|
1889
|
-
/**表单保存提交 */
|
|
1890
1701
|
createOrEditSave() {
|
|
1891
1702
|
if (this.selected) {
|
|
1892
1703
|
return this.EditSave();
|
|
1893
1704
|
}
|
|
1894
1705
|
this.createSave();
|
|
1895
1706
|
}
|
|
1896
|
-
/** */
|
|
1897
1707
|
createSave() {
|
|
1898
1708
|
let input = this.createOrEditForm.value;
|
|
1899
|
-
// input.siteId = this.filters.siteId;
|
|
1900
|
-
console.log(this.selected, 'createSave1111111111', this.createOrEditForm.valid, this.createOrEditForm);
|
|
1901
1709
|
if (!this.createOrEditForm.valid)
|
|
1902
1710
|
return;
|
|
1903
|
-
console.log(this.selected, 'createSave');
|
|
1904
|
-
return;
|
|
1905
1711
|
this.modalBusy = true;
|
|
1906
1712
|
this._SectionAdminService
|
|
1907
1713
|
.create(input)
|
|
@@ -1914,7 +1720,6 @@ class SectionsComponent {
|
|
|
1914
1720
|
this.list.get();
|
|
1915
1721
|
});
|
|
1916
1722
|
}
|
|
1917
|
-
/**创建版块保存 */
|
|
1918
1723
|
EditSave() {
|
|
1919
1724
|
setTimeout(() => {
|
|
1920
1725
|
let input = this.createOrEditForm.value;
|
|
@@ -1934,7 +1739,6 @@ class SectionsComponent {
|
|
|
1934
1739
|
});
|
|
1935
1740
|
}, 100);
|
|
1936
1741
|
}
|
|
1937
|
-
/**删除版块 */
|
|
1938
1742
|
deletefield(row) {
|
|
1939
1743
|
this.confirmation
|
|
1940
1744
|
.warn(row.displayName, this._LocalizationService.instant(`AbpUi::ItemWillBeDeletedMessage`))
|
|
@@ -1950,30 +1754,24 @@ class SectionsComponent {
|
|
|
1950
1754
|
}
|
|
1951
1755
|
});
|
|
1952
1756
|
}
|
|
1953
|
-
/**name表单控件 */
|
|
1954
1757
|
get displayNameInput() {
|
|
1955
1758
|
return this.createOrEditForm.get('displayName');
|
|
1956
1759
|
}
|
|
1957
|
-
/**name表单控件 */
|
|
1958
1760
|
get nameInput() {
|
|
1959
1761
|
return this.createOrEditForm.get('name');
|
|
1960
1762
|
}
|
|
1961
|
-
/**route表单控件 */
|
|
1962
1763
|
get routeInput() {
|
|
1963
1764
|
return this.createOrEditForm.get('route');
|
|
1964
1765
|
}
|
|
1965
|
-
/**route表单控件 */
|
|
1966
1766
|
get templateInput() {
|
|
1967
1767
|
return this.createOrEditForm.get('template');
|
|
1968
1768
|
}
|
|
1969
|
-
/**route表单控件 */
|
|
1970
1769
|
get typeInput() {
|
|
1971
1770
|
return this.createOrEditForm.get('type');
|
|
1972
1771
|
}
|
|
1973
1772
|
radiochange() {
|
|
1974
1773
|
this.routeInput.patchValue(this.routeInput.value);
|
|
1975
1774
|
}
|
|
1976
|
-
/**字段标签input失去标点生成字段名字 */
|
|
1977
1775
|
disPlayNameInputBlur(event) {
|
|
1978
1776
|
let value = event.target.value;
|
|
1979
1777
|
let pinyin = this._CmsApiService.chineseToPinyin(value);
|
|
@@ -1990,7 +1788,6 @@ class SectionsComponent {
|
|
|
1990
1788
|
return;
|
|
1991
1789
|
templateInput.patchValue(pinyin + '/index');
|
|
1992
1790
|
}
|
|
1993
|
-
/**设置字段控件异步验证 */
|
|
1994
1791
|
setAsyncValidatorsFn() {
|
|
1995
1792
|
this.createOrEditForm.setControl('name', new FormControl(this.nameInput.value || '', {
|
|
1996
1793
|
validators: Validators.required,
|
|
@@ -2012,7 +1809,6 @@ class SectionsComponent {
|
|
|
2012
1809
|
: null;
|
|
2013
1810
|
};
|
|
2014
1811
|
}
|
|
2015
|
-
/**定义异步验证方法 */
|
|
2016
1812
|
nameRepetitionAsyncValidator() {
|
|
2017
1813
|
return (ctrl) => {
|
|
2018
1814
|
return new Promise(resolve => {
|
|
@@ -2021,11 +1817,7 @@ class SectionsComponent {
|
|
|
2021
1817
|
resolve(null);
|
|
2022
1818
|
return;
|
|
2023
1819
|
}
|
|
2024
|
-
this._SectionAdminService
|
|
2025
|
-
.nameExists({
|
|
2026
|
-
name: subslug.value,
|
|
2027
|
-
})
|
|
2028
|
-
.subscribe(res => {
|
|
1820
|
+
this._SectionAdminService.nameExists({ name: subslug.value }).subscribe(res => {
|
|
2029
1821
|
if (res) {
|
|
2030
1822
|
resolve({
|
|
2031
1823
|
repetition: this._LocalizationService.instant(`Cms::SectionName{0}AlreadyExist`, ctrl.value),
|
|
@@ -2038,7 +1830,6 @@ class SectionsComponent {
|
|
|
2038
1830
|
});
|
|
2039
1831
|
};
|
|
2040
1832
|
}
|
|
2041
|
-
/**定义异步验证方法 */
|
|
2042
1833
|
routeRepetitionAsyncValidator() {
|
|
2043
1834
|
return (ctrl) => {
|
|
2044
1835
|
return new Promise(resolve => {
|
|
@@ -2047,12 +1838,7 @@ class SectionsComponent {
|
|
|
2047
1838
|
resolve(null);
|
|
2048
1839
|
return;
|
|
2049
1840
|
}
|
|
2050
|
-
this._SectionAdminService
|
|
2051
|
-
.routeExists({
|
|
2052
|
-
// siteId: this.filters.siteId,
|
|
2053
|
-
route: subslug,
|
|
2054
|
-
})
|
|
2055
|
-
.subscribe(res => {
|
|
1841
|
+
this._SectionAdminService.routeExists({ route: subslug }).subscribe(res => {
|
|
2056
1842
|
if (res) {
|
|
2057
1843
|
resolve({
|
|
2058
1844
|
repetition: this._LocalizationService.instant(`Cms::SectionRoute{0}AlreadyExist`, ctrl.value),
|
|
@@ -2065,8 +1851,8 @@ class SectionsComponent {
|
|
|
2065
1851
|
});
|
|
2066
1852
|
};
|
|
2067
1853
|
}
|
|
2068
|
-
static
|
|
2069
|
-
static
|
|
1854
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 }); }
|
|
1855
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SectionsComponent, selector: "cms-sections", providers: [
|
|
2070
1856
|
// [Required]
|
|
2071
1857
|
ListService,
|
|
2072
1858
|
// [Optional]
|
|
@@ -2077,7 +1863,7 @@ class SectionsComponent {
|
|
|
2077
1863
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2078
1864
|
useValue: ECmsComponent.Sections,
|
|
2079
1865
|
},
|
|
2080
|
-
], 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\"\n (click.stop)=\"jumpSectionsEdit(row,item)\">{{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 (click.stop)=\"jumpSectionsCreate(row)\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n\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\" [frozenRight]=\"true\" [name]=\"'AbpUi::Actions' | abpLocalization\" cellClass=\"cellClassRight\" [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-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\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: 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: "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.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { 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: ["disabled"] }, { kind: "component", type: i11.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
|
|
1866
|
+
], 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\" [frozenRight]=\"true\" [name]=\"'AbpUi::Actions' | abpLocalization\" cellClass=\"cellClassRight\" [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-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", "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: "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.NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { 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: ["disabled"] }, { 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" }] }); }
|
|
2081
1867
|
}
|
|
2082
1868
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SectionsComponent, decorators: [{
|
|
2083
1869
|
type: Component,
|
|
@@ -2092,20 +1878,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2092
1878
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2093
1879
|
useValue: ECmsComponent.Sections,
|
|
2094
1880
|
},
|
|
2095
|
-
], 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\"\n (click.stop)=\"jumpSectionsEdit(row,item)\">{{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 (click.stop)=\"jumpSectionsCreate(row)\"><i\n class=\"fas fa-plus-circle me-2\"></i>{{'Cms::New' |\n abpLocalization}}</li>\n </div>\n </div>\n\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\" [frozenRight]=\"true\" [name]=\"'AbpUi::Actions' | abpLocalization\" cellClass=\"cellClassRight\" [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-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\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"] }]
|
|
2096
|
-
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1$1.FormBuilder }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }, { type: CmsApiService }
|
|
1881
|
+
], 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\" [frozenRight]=\"true\" [name]=\"'AbpUi::Actions' | abpLocalization\" cellClass=\"cellClassRight\" [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-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"] }]
|
|
1882
|
+
}], ctorParameters: function () { return [{ type: i1.ListService }, { type: SectionAdminService }, { type: i3.ToasterService }, { type: i3.ConfirmationService }, { type: i1$1.FormBuilder }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }, { type: CmsApiService }]; }, propDecorators: { createOrEditModalSubmitBtn: [{
|
|
2097
1883
|
type: ViewChild,
|
|
2098
1884
|
args: ['createOrEditModalSubmitBtn', { static: false }]
|
|
2099
1885
|
}] } });
|
|
2100
1886
|
|
|
2101
1887
|
class CreateOrEditEntryTypeInputBase {
|
|
2102
|
-
/**显示名称 Display name of this field */
|
|
2103
|
-
displayName = ['', [Validators.required]];
|
|
2104
|
-
/**名称 Unique Name*/
|
|
2105
|
-
name = ['', [Validators.required]];
|
|
2106
|
-
/**条目路由 */
|
|
2107
|
-
fieldTabs = new FormArray([]);
|
|
2108
1888
|
constructor(data) {
|
|
1889
|
+
/**显示名称 Display name of this field */
|
|
1890
|
+
this.displayName = ['', [Validators.required]];
|
|
1891
|
+
/**名称 Unique Name*/
|
|
1892
|
+
this.name = ['', [Validators.required]];
|
|
1893
|
+
/**条目路由 */
|
|
1894
|
+
this.fieldTabs = new FormArray([]);
|
|
2109
1895
|
if (data) {
|
|
2110
1896
|
for (const key in data) {
|
|
2111
1897
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2116,10 +1902,10 @@ class CreateOrEditEntryTypeInputBase {
|
|
|
2116
1902
|
}
|
|
2117
1903
|
}
|
|
2118
1904
|
class fieldTabsBase {
|
|
2119
|
-
/**名称 Unique Name*/
|
|
2120
|
-
name = ['', [Validators.required]];
|
|
2121
|
-
fields = [[], []];
|
|
2122
1905
|
constructor(data) {
|
|
1906
|
+
/**名称 Unique Name*/
|
|
1907
|
+
this.name = ['', [Validators.required]];
|
|
1908
|
+
this.fields = [[], []];
|
|
2123
1909
|
if (data) {
|
|
2124
1910
|
for (const key in data) {
|
|
2125
1911
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2130,15 +1916,15 @@ class fieldTabsBase {
|
|
|
2130
1916
|
}
|
|
2131
1917
|
}
|
|
2132
1918
|
class fieldsBase {
|
|
2133
|
-
/**字段id Unique Name*/
|
|
2134
|
-
fieldId = ['', [Validators.required]];
|
|
2135
|
-
/**显示名称 Unique Name*/
|
|
2136
|
-
displayName = ['', [Validators.required]];
|
|
2137
|
-
/**必填 Unique Name*/
|
|
2138
|
-
required = [false, []];
|
|
2139
|
-
/**是否在列表中显示 Unique Name*/
|
|
2140
|
-
showOnList = [false, []];
|
|
2141
1919
|
constructor(data) {
|
|
1920
|
+
/**字段id Unique Name*/
|
|
1921
|
+
this.fieldId = ['', [Validators.required]];
|
|
1922
|
+
/**显示名称 Unique Name*/
|
|
1923
|
+
this.displayName = ['', [Validators.required]];
|
|
1924
|
+
/**必填 Unique Name*/
|
|
1925
|
+
this.required = [false, []];
|
|
1926
|
+
/**是否在列表中显示 Unique Name*/
|
|
1927
|
+
this.showOnList = [false, []];
|
|
2142
1928
|
if (data) {
|
|
2143
1929
|
for (const key in data) {
|
|
2144
1930
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2149,15 +1935,15 @@ class fieldsBase {
|
|
|
2149
1935
|
}
|
|
2150
1936
|
}
|
|
2151
1937
|
class fieldsInputBase {
|
|
2152
|
-
/**字段id */
|
|
2153
|
-
fieldId = ['', [Validators.required]];
|
|
2154
|
-
/**显示名称 Display name of this field */
|
|
2155
|
-
displayName = ['', [Validators.required]];
|
|
2156
|
-
/**是否必填 Unique Name*/
|
|
2157
|
-
required = [false, []];
|
|
2158
|
-
/**在列表中展示 Unique Name*/
|
|
2159
|
-
showOnList = [false, []];
|
|
2160
1938
|
constructor(data) {
|
|
1939
|
+
/**字段id */
|
|
1940
|
+
this.fieldId = ['', [Validators.required]];
|
|
1941
|
+
/**显示名称 Display name of this field */
|
|
1942
|
+
this.displayName = ['', [Validators.required]];
|
|
1943
|
+
/**是否必填 Unique Name*/
|
|
1944
|
+
this.required = [false, []];
|
|
1945
|
+
/**在列表中展示 Unique Name*/
|
|
1946
|
+
this.showOnList = [false, []];
|
|
2161
1947
|
if (data) {
|
|
2162
1948
|
for (const key in data) {
|
|
2163
1949
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2169,18 +1955,7 @@ class fieldsInputBase {
|
|
|
2169
1955
|
}
|
|
2170
1956
|
|
|
2171
1957
|
class CreateOrEditComponent {
|
|
2172
|
-
toaster
|
|
2173
|
-
_location;
|
|
2174
|
-
route;
|
|
2175
|
-
_FieldGroupAdminService;
|
|
2176
|
-
_FieldAdminService;
|
|
2177
|
-
_EntryTypeAdminService;
|
|
2178
|
-
_LocalizationService;
|
|
2179
|
-
_CmsApiService;
|
|
2180
|
-
router;
|
|
2181
|
-
constructor(
|
|
2182
|
-
// private fb: FormBuilder,
|
|
2183
|
-
toaster, _location, route, _FieldGroupAdminService, _FieldAdminService, _EntryTypeAdminService, _LocalizationService, _CmsApiService, router) {
|
|
1958
|
+
constructor(toaster, _location, route, _FieldGroupAdminService, _FieldAdminService, _EntryTypeAdminService, _LocalizationService, _CmsApiService) {
|
|
2184
1959
|
this.toaster = toaster;
|
|
2185
1960
|
this._location = _location;
|
|
2186
1961
|
this.route = route;
|
|
@@ -2189,23 +1964,37 @@ class CreateOrEditComponent {
|
|
|
2189
1964
|
this._EntryTypeAdminService = _EntryTypeAdminService;
|
|
2190
1965
|
this._LocalizationService = _LocalizationService;
|
|
2191
1966
|
this._CmsApiService = _CmsApiService;
|
|
2192
|
-
this.
|
|
1967
|
+
this.fb = inject(FormBuilder);
|
|
1968
|
+
this._UpdateListService = inject(UpdateListService);
|
|
1969
|
+
/**表单实体 */
|
|
1970
|
+
this.newEntity = this.fb.group(new CreateOrEditEntryTypeInputBase());
|
|
1971
|
+
/**版块id */
|
|
1972
|
+
this.sectionId = '';
|
|
1973
|
+
/**条目类型id */
|
|
1974
|
+
this.entryTypesId = '';
|
|
1975
|
+
/**
|
|
1976
|
+
* 拖拽 功能*/
|
|
1977
|
+
/**数据源 */
|
|
1978
|
+
/**数据源-字段分组数据-包含字段数据 fields */
|
|
1979
|
+
this.fieldGroupList = [];
|
|
1980
|
+
/**数据源-所有字段列表 */
|
|
1981
|
+
this.fieldList = [];
|
|
1982
|
+
/**目标源 结果*/
|
|
1983
|
+
this.resultSource = [];
|
|
1984
|
+
/**来自数据源的集合,用于从目标源拖回数据源时的判断,与取值 */
|
|
1985
|
+
this.formRightGroup = [];
|
|
1986
|
+
/**模态框状态 */
|
|
1987
|
+
this.visibleTabsOpen = false;
|
|
1988
|
+
/**是否是忙碌状态 */
|
|
1989
|
+
this.modalBusy = false;
|
|
1990
|
+
/**正在选中的nav */
|
|
1991
|
+
this.navActive = 0;
|
|
1992
|
+
/**编辑字段模态框状态 */
|
|
1993
|
+
this.visibleEditFieldOpen = false;
|
|
2193
1994
|
}
|
|
2194
|
-
fb = inject(FormBuilder);
|
|
2195
|
-
_UpdateListService = inject(UpdateListService);
|
|
2196
|
-
/**表单实体 */
|
|
2197
|
-
newEntity = this.fb.group(new CreateOrEditEntryTypeInputBase());
|
|
2198
|
-
/**版块id */
|
|
2199
|
-
sectionId = '';
|
|
2200
|
-
/**条目类型id */
|
|
2201
|
-
entryTypesId = '';
|
|
2202
|
-
/**条目类型详情 */
|
|
2203
|
-
entryTypesSelect;
|
|
2204
1995
|
get fieldTabs() {
|
|
2205
1996
|
return this.newEntity.get('fieldTabs');
|
|
2206
1997
|
}
|
|
2207
|
-
/**获取提交按钮替身,用于真实触发表单提交 */
|
|
2208
|
-
submitclick;
|
|
2209
1998
|
/**触发提交按钮 */
|
|
2210
1999
|
submitclickBtn() {
|
|
2211
2000
|
this.submitclick.nativeElement.click();
|
|
@@ -2222,7 +2011,9 @@ class CreateOrEditComponent {
|
|
|
2222
2011
|
/**给fieldTabs添加新控件 */
|
|
2223
2012
|
addControlToFieldTabs(nameValue = '') {
|
|
2224
2013
|
const newFormGroup = this.fb.group(new fieldTabsBase({
|
|
2225
|
-
name: this.fieldTabs.length === 0
|
|
2014
|
+
name: this.fieldTabs.length === 0
|
|
2015
|
+
? this._LocalizationService.instant(`Cms::FieldTab`)
|
|
2016
|
+
: nameValue,
|
|
2226
2017
|
}));
|
|
2227
2018
|
this.fieldTabs.push(newFormGroup);
|
|
2228
2019
|
this.resultSource.push(newFormGroup.value);
|
|
@@ -2235,7 +2026,7 @@ class CreateOrEditComponent {
|
|
|
2235
2026
|
let fieldGroupList = res.items;
|
|
2236
2027
|
fieldGroupList.unshift({
|
|
2237
2028
|
id: null,
|
|
2238
|
-
name: 'UngroupedFields'
|
|
2029
|
+
name: 'UngroupedFields',
|
|
2239
2030
|
});
|
|
2240
2031
|
fieldGroupList.forEach((el, index) => {
|
|
2241
2032
|
el.fields = fieldList.filter(els => els.groupId === el.id);
|
|
@@ -2303,9 +2094,11 @@ class CreateOrEditComponent {
|
|
|
2303
2094
|
*/
|
|
2304
2095
|
getFieldList() {
|
|
2305
2096
|
return new Promise((resolve, rejects) => {
|
|
2306
|
-
this._FieldAdminService
|
|
2307
|
-
|
|
2308
|
-
|
|
2097
|
+
this._FieldAdminService
|
|
2098
|
+
.getList({
|
|
2099
|
+
maxResultCount: 1000,
|
|
2100
|
+
})
|
|
2101
|
+
.subscribe((res) => {
|
|
2309
2102
|
res.items.forEach(el => {
|
|
2310
2103
|
el.required = false;
|
|
2311
2104
|
el.showOnList = false;
|
|
@@ -2314,25 +2107,6 @@ class CreateOrEditComponent {
|
|
|
2314
2107
|
});
|
|
2315
2108
|
});
|
|
2316
2109
|
}
|
|
2317
|
-
/**
|
|
2318
|
-
* 拖拽 功能*/
|
|
2319
|
-
/**数据源 */
|
|
2320
|
-
/**数据源-字段分组数据-包含字段数据 fields */
|
|
2321
|
-
fieldGroupList = [];
|
|
2322
|
-
/**数据源-所有字段列表 */
|
|
2323
|
-
fieldList = [];
|
|
2324
|
-
/**数据源拖拽的分组下标 */
|
|
2325
|
-
DataSourceGroupIndex;
|
|
2326
|
-
/**数据源拖拽的字段下标 */
|
|
2327
|
-
DataSourceFieldIndex;
|
|
2328
|
-
/**目标源 结果*/
|
|
2329
|
-
resultSource = [];
|
|
2330
|
-
/**从数据源拖拽的元素 */
|
|
2331
|
-
fromDataSourceDragEl;
|
|
2332
|
-
/**从目标源拖拽的元素 */
|
|
2333
|
-
fromResultSourceDragEl;
|
|
2334
|
-
/**来自数据源的集合,用于从目标源拖回数据源时的判断,与取值 */
|
|
2335
|
-
formRightGroup = [];
|
|
2336
2110
|
/**从数据源开始拖拽 */
|
|
2337
2111
|
fromDataSourceDragStart(element, fieldIndex, groupIndex) {
|
|
2338
2112
|
this.fromDataSourceDragEl = element;
|
|
@@ -2355,7 +2129,8 @@ class CreateOrEditComponent {
|
|
|
2355
2129
|
let _fromResultSourceDragEl = this.fromResultSourceDragEl;
|
|
2356
2130
|
let formRightGroup = this.deepClone(this.formRightGroup);
|
|
2357
2131
|
let fieldList = this.deepClone(this.fieldList);
|
|
2358
|
-
if (_fromResultSourceDragEl) {
|
|
2132
|
+
if (_fromResultSourceDragEl) {
|
|
2133
|
+
//移动
|
|
2359
2134
|
//从目标源拖拽到数据源
|
|
2360
2135
|
// 拖拽目标源的下标
|
|
2361
2136
|
let dragResultSourceIndex = this.resultSource[this.navActive].fields.findIndex(el => el.id == _fromResultSourceDragEl.id);
|
|
@@ -2404,19 +2179,19 @@ class CreateOrEditComponent {
|
|
|
2404
2179
|
let fieldsArray = [];
|
|
2405
2180
|
el.fields.forEach(item => {
|
|
2406
2181
|
fieldsArray.push({
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2182
|
+
fieldId: item.id || item.fieldId,
|
|
2183
|
+
displayName: item.displayName,
|
|
2184
|
+
required: item?.required,
|
|
2185
|
+
showOnList: item?.showOnList,
|
|
2411
2186
|
});
|
|
2412
2187
|
});
|
|
2413
2188
|
setArray.push({
|
|
2414
2189
|
name: el.name,
|
|
2415
|
-
fields: fieldsArray
|
|
2190
|
+
fields: fieldsArray,
|
|
2416
2191
|
});
|
|
2417
2192
|
});
|
|
2418
2193
|
this.newEntity.patchValue({
|
|
2419
|
-
fieldTabs: setArray
|
|
2194
|
+
fieldTabs: setArray,
|
|
2420
2195
|
});
|
|
2421
2196
|
}
|
|
2422
2197
|
/**保存表单 */
|
|
@@ -2425,34 +2200,18 @@ class CreateOrEditComponent {
|
|
|
2425
2200
|
if (this.entryTypesSelect) {
|
|
2426
2201
|
this._EntryTypeAdminService.update(this.entryTypesSelect.id, input).subscribe(res => {
|
|
2427
2202
|
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
2428
|
-
this.
|
|
2429
|
-
|
|
2430
|
-
this._UpdateListService.updateList();
|
|
2431
|
-
});
|
|
2203
|
+
this._location.back();
|
|
2204
|
+
this._UpdateListService.updateList();
|
|
2432
2205
|
});
|
|
2433
2206
|
return;
|
|
2434
2207
|
}
|
|
2435
2208
|
input.sectionId = this.sectionId;
|
|
2436
2209
|
this._EntryTypeAdminService.create(input).subscribe(res => {
|
|
2437
2210
|
this.toaster.success(this._LocalizationService.instant(`CmsKit::SavedSuccessfully`));
|
|
2438
|
-
this.
|
|
2439
|
-
|
|
2440
|
-
this._UpdateListService.updateList();
|
|
2441
|
-
});
|
|
2211
|
+
this._location.back();
|
|
2212
|
+
this._UpdateListService.updateList();
|
|
2442
2213
|
});
|
|
2443
2214
|
}
|
|
2444
|
-
/**编辑Tabs表单 */
|
|
2445
|
-
editFieldTabsFrom;
|
|
2446
|
-
/**模态框状态 */
|
|
2447
|
-
visibleTabsOpen = false;
|
|
2448
|
-
/**是否是忙碌状态 */
|
|
2449
|
-
modalBusy = false;
|
|
2450
|
-
/**正在编辑的tabs */
|
|
2451
|
-
editFieldTabsSelect;
|
|
2452
|
-
/**正在选中的nav */
|
|
2453
|
-
navActive = 0;
|
|
2454
|
-
/**表单控件模板-动态赋值表单控件 */
|
|
2455
|
-
editFieldTabsModalSubmitBtn;
|
|
2456
2215
|
/**模态框状态改变回调 */
|
|
2457
2216
|
VisibleTabsChange(event) {
|
|
2458
2217
|
if (!event) {
|
|
@@ -2465,12 +2224,10 @@ class CreateOrEditComponent {
|
|
|
2465
2224
|
this.editFieldTabsFrom = this.fb.group(new fieldTabsBase());
|
|
2466
2225
|
this.visibleTabsOpen = true;
|
|
2467
2226
|
}
|
|
2468
|
-
/**正在编辑的tab下标 */
|
|
2469
|
-
newEditFieldTabsIndex;
|
|
2470
2227
|
/**编辑FieldTabs */
|
|
2471
2228
|
editFieldTabs(item, i) {
|
|
2472
2229
|
this.editFieldTabsFrom = this.fb.group(new fieldTabsBase({
|
|
2473
|
-
name: item.name
|
|
2230
|
+
name: item.name,
|
|
2474
2231
|
}));
|
|
2475
2232
|
this.editFieldTabsSelect = item;
|
|
2476
2233
|
this.visibleTabsOpen = true;
|
|
@@ -2495,14 +2252,6 @@ class CreateOrEditComponent {
|
|
|
2495
2252
|
this.fieldTabs.removeAt(index);
|
|
2496
2253
|
this.resultSource.splice(index, 1);
|
|
2497
2254
|
}
|
|
2498
|
-
/**编辑字段模态框状态 */
|
|
2499
|
-
visibleEditFieldOpen = false;
|
|
2500
|
-
/**编辑字段模态框表单 */
|
|
2501
|
-
editFieldFrom;
|
|
2502
|
-
/**表单控件模板-动态赋值表单控件-编辑字段 */
|
|
2503
|
-
editFieldModalSubmitBtn;
|
|
2504
|
-
/**正在编辑的字段下标 */
|
|
2505
|
-
EditFieldIndex;
|
|
2506
2255
|
/**编辑字段模态框状态状态改变回调 */
|
|
2507
2256
|
VisibleEditFieldChange(event) {
|
|
2508
2257
|
if (!event) {
|
|
@@ -2538,13 +2287,13 @@ class CreateOrEditComponent {
|
|
|
2538
2287
|
return;
|
|
2539
2288
|
nameInput.patchValue(pinyin);
|
|
2540
2289
|
}
|
|
2541
|
-
static
|
|
2542
|
-
static
|
|
2290
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", 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 }); }
|
|
2291
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CreateOrEditComponent, selector: "cms-create-or-edit", providers: [
|
|
2543
2292
|
{
|
|
2544
2293
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2545
2294
|
useValue: ECmsComponent.SectionsCreateOrEdit,
|
|
2546
2295
|
},
|
|
2547
|
-
], 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)\" [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 <!-- -->\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\n *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\n *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\" style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul>\n \n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\"\n (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\"\n ondragover=\"event.preventDefault();\" (drop)=\"dragToDataSourceDropped()\"\n style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\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}} </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: ["disabled"] }, { kind: "component", type: i11.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
|
|
2296
|
+
], 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: ["disabled"] }, { kind: "component", type: i8$1.PageComponent, selector: "abp-page", inputs: ["title", "toolbar", "breadcrumb"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
2548
2297
|
}
|
|
2549
2298
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CreateOrEditComponent, decorators: [{
|
|
2550
2299
|
type: Component,
|
|
@@ -2553,8 +2302,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2553
2302
|
provide: EXTENSIONS_IDENTIFIER,
|
|
2554
2303
|
useValue: ECmsComponent.SectionsCreateOrEdit,
|
|
2555
2304
|
},
|
|
2556
|
-
], template: "<form class=\"row g-3 needs-validation\" [formGroup]=\"newEntity\" (ngSubmit)=\"save()\">\n <abp-page [title]=\"entryTypesId ? ('AbpUi::Edit' | abpLocalization):('Cms::New' | abpLocalization)\" [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 <!-- -->\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\n *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\n *ngFor=\"let el of item.fields; let iel = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromResultSourceDragStart(el)\"\n (drop)=\"dragToResultSourceItemDropped(iel)\"\n class=\"list-group-item d-flex align-items-center justify-content-between py-1\" style=\"position: unset;\">\n {{ el.displayName }}\n <button class=\"p-0 btn btn-sm btn-light\"\n (click.stop)=\"EditFieldModalOpen(el,iel)\"\n type=\"button\"><i\n class=\"fas fa-wrench p-sm-1\"\n role=\"button\"></i></button>\n </li>\n </ng-container>\n </ul>\n \n </div>\n </ng-template>\n </li>\n </ng-container>\n <li class=\"nav-item\" role=\"presentation\">\n <button type=\"button\" class=\"nav-link\"\n (click.stop)=\"addFieldTabs()\">\n <i class=\"fas fa-plus-circle\"></i>\n {{'Cms::NewTab' | abpLocalization}}\n </button>\n </li>\n </ul>\n <div [ngbNavOutlet]=\"nav\" class=\"mt-2 bordernNavs p-0\"></div>\n </div>\n <div class=\"col-sm-4\">\n <div ngbAccordion #accordion=\"ngbAccordion\"\n ondragover=\"event.preventDefault();\" (drop)=\"dragToDataSourceDropped()\"\n style=\"min-height: 80px;\">\n <ng-container *ngFor=\"let item of fieldGroupList; let i = index\">\n <div [ngbAccordionItem]=\"item.name\" *ngIf=\"item.fields.length > 0\">\n <h2 ngbAccordionHeader>\n <button ngbAccordionButton>{{\n ('Cms::'+item.name) | abpLocalization }}</button>\n </h2>\n <div ngbAccordionCollapse>\n <div ngbAccordionBody>\n <ng-template>\n <ul class=\"list-group\">\n <ng-container\n *ngFor=\"let el of item.fields; let ii = index\">\n <li draggable=\"true\"\n (dragstart)=\"fromDataSourceDragStart(el,ii,i)\"\n class=\"list-group-item\">\n {{ el.displayName }}\n </li>\n </ng-container>\n </ul>\n </ng-template>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\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}} </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"] }]
|
|
2557
|
-
}], ctorParameters: function () { return [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: FieldGroupAdminService }, { type: FieldAdminService }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }, { type: CmsApiService }
|
|
2305
|
+
], 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"] }]
|
|
2306
|
+
}], ctorParameters: function () { return [{ type: i3.ToasterService }, { type: i2.Location }, { type: i3$1.ActivatedRoute }, { type: FieldGroupAdminService }, { type: FieldAdminService }, { type: EntryTypeAdminService }, { type: i1.LocalizationService }, { type: CmsApiService }]; }, propDecorators: { submitclick: [{
|
|
2558
2307
|
type: ViewChild,
|
|
2559
2308
|
args: ['submitclick', { static: true }]
|
|
2560
2309
|
}], editFieldTabsModalSubmitBtn: [{
|
|
@@ -2566,27 +2315,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2566
2315
|
}] } });
|
|
2567
2316
|
|
|
2568
2317
|
class DomainAdminService {
|
|
2569
|
-
restService;
|
|
2570
|
-
apiName = 'CmsAdmin';
|
|
2571
|
-
getBound = (config) => this.restService.request({
|
|
2572
|
-
method: 'GET',
|
|
2573
|
-
url: '/api/cms-admin/domains/bound',
|
|
2574
|
-
}, { apiName: this.apiName, ...config });
|
|
2575
|
-
nameExists = (domainName, config) => this.restService.request({
|
|
2576
|
-
method: 'GET',
|
|
2577
|
-
url: '/api/cms-admin/domains/name-exists',
|
|
2578
|
-
params: { domainName },
|
|
2579
|
-
}, { apiName: this.apiName, ...config });
|
|
2580
|
-
update = (input, config) => this.restService.request({
|
|
2581
|
-
method: 'POST',
|
|
2582
|
-
url: '/api/cms-admin/domains',
|
|
2583
|
-
body: input,
|
|
2584
|
-
}, { apiName: this.apiName, ...config });
|
|
2585
2318
|
constructor(restService) {
|
|
2586
2319
|
this.restService = restService;
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2320
|
+
this.apiName = 'CmsAdmin';
|
|
2321
|
+
this.getBound = (config) => this.restService.request({
|
|
2322
|
+
method: 'GET',
|
|
2323
|
+
url: '/api/cms-admin/domains/bound',
|
|
2324
|
+
}, { apiName: this.apiName, ...config });
|
|
2325
|
+
this.nameExists = (domainName, config) => this.restService.request({
|
|
2326
|
+
method: 'GET',
|
|
2327
|
+
url: '/api/cms-admin/domains/name-exists',
|
|
2328
|
+
params: { domainName },
|
|
2329
|
+
}, { apiName: this.apiName, ...config });
|
|
2330
|
+
this.update = (input, config) => this.restService.request({
|
|
2331
|
+
method: 'POST',
|
|
2332
|
+
url: '/api/cms-admin/domains',
|
|
2333
|
+
body: input,
|
|
2334
|
+
}, { apiName: this.apiName, ...config });
|
|
2335
|
+
}
|
|
2336
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainAdminService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2337
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainAdminService, providedIn: 'root' }); }
|
|
2590
2338
|
}
|
|
2591
2339
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainAdminService, decorators: [{
|
|
2592
2340
|
type: Injectable,
|
|
@@ -2596,13 +2344,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2596
2344
|
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
2597
2345
|
|
|
2598
2346
|
class DomainsComponent {
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2347
|
+
constructor() {
|
|
2348
|
+
this.toaster = inject(ToasterService);
|
|
2349
|
+
this._DomainAdminService = inject(DomainAdminService);
|
|
2350
|
+
this._LocalizationService = inject(LocalizationService);
|
|
2351
|
+
/**domain详情 */
|
|
2352
|
+
this.domainInfo = '';
|
|
2353
|
+
}
|
|
2606
2354
|
get domainNameInput() {
|
|
2607
2355
|
return this.newEntity.get('domainName');
|
|
2608
2356
|
}
|
|
@@ -2666,8 +2414,8 @@ class DomainsComponent {
|
|
|
2666
2414
|
await this.getDomainsBound();
|
|
2667
2415
|
});
|
|
2668
2416
|
}
|
|
2669
|
-
static
|
|
2670
|
-
static
|
|
2417
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2418
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DomainsComponent, selector: "cms-domains", ngImport: i0, template: "<form [formGroup]=\"newEntity\" (ngSubmit)=\"SaveSubmit()\">\n \n <div class=\"d-flex align-items-center justify-content-between\">\n <h2>{{'Cms::Domain'|abpLocalization}}</h2>\n <button class=\"btn btn-primary btn-sm\" type=\"submit\"><i\n class=\"me-1 fas fa-save\"></i>{{'AbpUi::Save'|abpLocalization}}</button>\n </div>\n <hr class=\"my-3\" />\n <div class=\"mb-2\">\n <!-- <label class=\"form-label\" for=\"title\">{{'Cms::Domain' | abpLocalization}}</label> -->\n <input type=\"text\" class=\"form-control\" formControlName=\"domainName\">\n <div class=\"text-danger invalid-feedback\" *ngIf=\"domainNameInput.errors?.repetition\">\n {{domainNameInput.errors?.repetition}}\n </div>\n <div class=\"form-text\">\u6B64\u5904\u662F\u586B\u5199\u57DF\u540D\u7684\u63CF\u8FF0\uFF0C\u9700\u8981\u4E00\u4E2A\u5B57\u6BB5\u7EDF\u4E00\u914D\u7F6E\u57DF\u540D\u591A\u8BED\u8A00\uFF0C</div>\n\n </div>\n <hr class=\"my-3\" />\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.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.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit", "markAsDirtyWhenSubmit"], outputs: ["ngSubmit"] }, { 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" }] }); }
|
|
2671
2419
|
}
|
|
2672
2420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DomainsComponent, decorators: [{
|
|
2673
2421
|
type: Component,
|
|
@@ -2675,13 +2423,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2675
2423
|
}] });
|
|
2676
2424
|
|
|
2677
2425
|
class EntryConfig {
|
|
2678
|
-
/**多选 */
|
|
2679
|
-
'Entry.Multiple' = [false, []];
|
|
2680
|
-
/**占位符 */
|
|
2681
|
-
'Entry.Placeholder' = ['', []];
|
|
2682
|
-
/**版块id */
|
|
2683
|
-
'Entry.SectionId' = ['', []];
|
|
2684
2426
|
constructor(data) {
|
|
2427
|
+
/**多选 */
|
|
2428
|
+
this['Entry.Multiple'] = [false, []];
|
|
2429
|
+
/**占位符 */
|
|
2430
|
+
this['Entry.Placeholder'] = ['', []];
|
|
2431
|
+
/**版块id */
|
|
2432
|
+
this['Entry.SectionId'] = ['', []];
|
|
2685
2433
|
if (data) {
|
|
2686
2434
|
for (const key in data) {
|
|
2687
2435
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2693,47 +2441,36 @@ class EntryConfig {
|
|
|
2693
2441
|
}
|
|
2694
2442
|
|
|
2695
2443
|
class EntryConfigComponent {
|
|
2696
|
-
fb;
|
|
2697
|
-
_SectionAdminService;
|
|
2698
2444
|
constructor(fb,
|
|
2699
2445
|
// private _SiteAdminService: SiteAdminService,
|
|
2700
2446
|
_SectionAdminService) {
|
|
2701
2447
|
this.fb = fb;
|
|
2702
2448
|
this._SectionAdminService = _SectionAdminService;
|
|
2449
|
+
/**站点列表 */
|
|
2450
|
+
this.siteList = [];
|
|
2451
|
+
/**选择的站点id */
|
|
2452
|
+
// siteId: string = ''
|
|
2453
|
+
this.siteId = new FormControl('');
|
|
2454
|
+
/**站点下的版块 */
|
|
2455
|
+
this.SiteOfSectionList = [];
|
|
2703
2456
|
}
|
|
2704
|
-
/**表单控件类型 */
|
|
2705
|
-
_type;
|
|
2706
2457
|
set type(v) {
|
|
2707
2458
|
if (v == this._type)
|
|
2708
2459
|
return;
|
|
2709
2460
|
this._type = v;
|
|
2710
2461
|
}
|
|
2711
|
-
/**表单实体 */
|
|
2712
|
-
_Entity;
|
|
2713
2462
|
set Entity(v) {
|
|
2714
2463
|
this._Entity = v;
|
|
2715
2464
|
}
|
|
2716
|
-
/**选择的表单信息 */
|
|
2717
|
-
_selected;
|
|
2718
2465
|
set selected(v) {
|
|
2719
2466
|
this._selected = v;
|
|
2720
2467
|
}
|
|
2721
|
-
/**语言 */
|
|
2722
|
-
_culture;
|
|
2723
2468
|
set culture(v) {
|
|
2724
2469
|
this._culture = v;
|
|
2725
2470
|
}
|
|
2726
2471
|
get formConfiguration() {
|
|
2727
2472
|
return this._Entity.get('formConfiguration');
|
|
2728
2473
|
}
|
|
2729
|
-
submitclick;
|
|
2730
|
-
/**站点列表 */
|
|
2731
|
-
siteList = [];
|
|
2732
|
-
/**选择的站点id */
|
|
2733
|
-
// siteId: string = ''
|
|
2734
|
-
siteId = new FormControl('');
|
|
2735
|
-
/**站点下的版块 */
|
|
2736
|
-
SiteOfSectionList = [];
|
|
2737
2474
|
ngAfterContentInit() {
|
|
2738
2475
|
//Called after ngOnInit when the component's or directive's content has been initialized.
|
|
2739
2476
|
//Add 'implements AfterContentInit' to the class.
|
|
@@ -2787,12 +2524,12 @@ class EntryConfigComponent {
|
|
|
2787
2524
|
async siteIdChange() {
|
|
2788
2525
|
await this.getSiteOfSectionList();
|
|
2789
2526
|
}
|
|
2790
|
-
static
|
|
2791
|
-
static
|
|
2527
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: SectionAdminService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2528
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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" }] }); }
|
|
2792
2529
|
}
|
|
2793
2530
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryConfigComponent, decorators: [{
|
|
2794
2531
|
type: Component,
|
|
2795
|
-
args: [{ selector: 'cms-entry-config', 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
|
|
2532
|
+
args: [{ selector: 'cms-entry-config', 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"] }]
|
|
2796
2533
|
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: SectionAdminService }]; }, propDecorators: { type: [{
|
|
2797
2534
|
type: Input
|
|
2798
2535
|
}], Entity: [{
|
|
@@ -2809,49 +2546,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2809
2546
|
/* eslint-disable @angular-eslint/component-selector */
|
|
2810
2547
|
class EntryControlComponent {
|
|
2811
2548
|
constructor() {
|
|
2549
|
+
this.fb = inject(FormBuilder);
|
|
2550
|
+
this._EntryAdminService = inject(EntryAdminService);
|
|
2551
|
+
/**字段配置列表 */
|
|
2552
|
+
this._fields = '';
|
|
2553
|
+
/** */
|
|
2554
|
+
this.listOfOption = [];
|
|
2812
2555
|
}
|
|
2813
|
-
fb = inject(FormBuilder);
|
|
2814
|
-
_EntryAdminService = inject(EntryAdminService);
|
|
2815
|
-
/**表单实体 */
|
|
2816
|
-
_entity;
|
|
2817
2556
|
set entity(v) {
|
|
2818
2557
|
this._entity = v;
|
|
2819
2558
|
if (v)
|
|
2820
2559
|
this.dataLoaded();
|
|
2821
2560
|
}
|
|
2822
|
-
/**字段配置列表 */
|
|
2823
|
-
_fields = '';
|
|
2824
2561
|
set fields(v) {
|
|
2825
2562
|
this._fields = v;
|
|
2826
2563
|
if (v)
|
|
2827
2564
|
this.dataLoaded();
|
|
2828
2565
|
}
|
|
2829
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
2830
|
-
_parentFiledName;
|
|
2831
2566
|
set parentFiledName(v) {
|
|
2832
2567
|
this._parentFiledName = v;
|
|
2833
2568
|
if (v)
|
|
2834
2569
|
this.dataLoaded();
|
|
2835
2570
|
}
|
|
2836
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
2837
|
-
_selected;
|
|
2838
2571
|
set selected(v) {
|
|
2839
2572
|
this._selected = v || [];
|
|
2840
2573
|
if (v)
|
|
2841
2574
|
this.dataLoaded();
|
|
2842
2575
|
}
|
|
2843
|
-
/**语言 */
|
|
2844
|
-
_culture;
|
|
2845
2576
|
set culture(v) {
|
|
2846
2577
|
if (v) {
|
|
2847
2578
|
this._culture = v;
|
|
2848
2579
|
this.dataLoaded();
|
|
2849
2580
|
}
|
|
2850
2581
|
}
|
|
2851
|
-
submitclick;
|
|
2852
|
-
extraProperties;
|
|
2853
|
-
/** */
|
|
2854
|
-
listOfOption = [];
|
|
2855
2582
|
async dataLoaded() {
|
|
2856
2583
|
if (this._fields && this._entity && this._parentFiledName && this._culture) {
|
|
2857
2584
|
await this.AfterInit();
|
|
@@ -2891,8 +2618,8 @@ class EntryControlComponent {
|
|
|
2891
2618
|
async SelectChange(event) {
|
|
2892
2619
|
await this.getEntryAssignList(event);
|
|
2893
2620
|
}
|
|
2894
|
-
static
|
|
2895
|
-
static
|
|
2621
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2622
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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"] }] }); }
|
|
2896
2623
|
}
|
|
2897
2624
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EntryControlComponent, decorators: [{
|
|
2898
2625
|
type: Component,
|
|
@@ -2913,9 +2640,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2913
2640
|
}] } });
|
|
2914
2641
|
|
|
2915
2642
|
class MatrixConfig {
|
|
2916
|
-
// 矩阵类型
|
|
2917
|
-
'MatrixBlockTypes' = new FormArray([]);
|
|
2918
2643
|
constructor(data) {
|
|
2644
|
+
// 矩阵类型
|
|
2645
|
+
this['MatrixBlockTypes'] = new FormArray([]);
|
|
2919
2646
|
if (data) {
|
|
2920
2647
|
for (const key in data) {
|
|
2921
2648
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2926,10 +2653,10 @@ class MatrixConfig {
|
|
|
2926
2653
|
}
|
|
2927
2654
|
}
|
|
2928
2655
|
class MatrixItemConfig {
|
|
2929
|
-
displayName = ['', [Validators.required]];
|
|
2930
|
-
/**字段名字 */
|
|
2931
|
-
name = ['', [Validators.required]];
|
|
2932
2656
|
constructor(data) {
|
|
2657
|
+
this.displayName = ['', [Validators.required]];
|
|
2658
|
+
/**字段名字 */
|
|
2659
|
+
this.name = ['', [Validators.required]];
|
|
2933
2660
|
if (data) {
|
|
2934
2661
|
for (const key in data) {
|
|
2935
2662
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2940,17 +2667,17 @@ class MatrixItemConfig {
|
|
|
2940
2667
|
}
|
|
2941
2668
|
}
|
|
2942
2669
|
class matrixFieldInputBase {
|
|
2943
|
-
/**字段名称 Display name of this field */
|
|
2944
|
-
displayName = ['', [Validators.required]];
|
|
2945
|
-
/**字段唯一名称 Unique Name*/
|
|
2946
|
-
name = ['', [Validators.required]];
|
|
2947
|
-
/**描述 说明 */
|
|
2948
|
-
description = ['', []];
|
|
2949
|
-
/**FieldType字段类型 表单控件名称 */
|
|
2950
|
-
formControlName = ['TextEdit', [Validators.required]];
|
|
2951
|
-
/**动态表单配置 */
|
|
2952
|
-
formConfiguration = new FormGroup({});
|
|
2953
2670
|
constructor(data) {
|
|
2671
|
+
/**字段名称 Display name of this field */
|
|
2672
|
+
this.displayName = ['', [Validators.required]];
|
|
2673
|
+
/**字段唯一名称 Unique Name*/
|
|
2674
|
+
this.name = ['', [Validators.required]];
|
|
2675
|
+
/**描述 说明 */
|
|
2676
|
+
this.description = ['', []];
|
|
2677
|
+
/**FieldType字段类型 表单控件名称 */
|
|
2678
|
+
this.formControlName = ['TextEdit', [Validators.required]];
|
|
2679
|
+
/**动态表单配置 */
|
|
2680
|
+
this.formConfiguration = new FormGroup({});
|
|
2954
2681
|
if (data) {
|
|
2955
2682
|
for (const key in data) {
|
|
2956
2683
|
if (data.hasOwnProperty(key)) {
|
|
@@ -2963,37 +2690,35 @@ class matrixFieldInputBase {
|
|
|
2963
2690
|
|
|
2964
2691
|
/* eslint-disable @angular-eslint/component-selector */
|
|
2965
2692
|
class MatrixConfigComponent {
|
|
2966
|
-
fb;
|
|
2967
|
-
_CmsApiService;
|
|
2968
|
-
_FieldAbstractsService;
|
|
2969
2693
|
constructor(fb, _CmsApiService, _FieldAbstractsService) {
|
|
2970
2694
|
this.fb = fb;
|
|
2971
2695
|
this._CmsApiService = _CmsApiService;
|
|
2972
2696
|
this._FieldAbstractsService = _FieldAbstractsService;
|
|
2697
|
+
/**模态框-状态 */
|
|
2698
|
+
this.matrixModalOpen = false;
|
|
2699
|
+
/**模态框-是否正在编辑 */
|
|
2700
|
+
this.isMatrixModalEdit = false;
|
|
2701
|
+
/**模态框-用于确定模态的繁忙状态是否为真 */
|
|
2702
|
+
this.modalBusy = false;
|
|
2703
|
+
/**矩阵块-选择的下标 */
|
|
2704
|
+
this.selectMatrixBlockIndex = 0;
|
|
2705
|
+
/**矩阵块-选择的矩阵下字段的下标 */
|
|
2706
|
+
this.selectMatrixFieldIndex = 0;
|
|
2973
2707
|
}
|
|
2974
|
-
/**表单控件组 */
|
|
2975
|
-
_FieldControlGroup;
|
|
2976
|
-
/**表单控件类型 */
|
|
2977
|
-
_type;
|
|
2978
2708
|
set type(v) {
|
|
2979
2709
|
this._type = v;
|
|
2980
2710
|
this.dataLoaded();
|
|
2981
2711
|
}
|
|
2982
|
-
/**表单实体 */
|
|
2983
|
-
_Entity;
|
|
2984
2712
|
set Entity(v) {
|
|
2985
2713
|
this._Entity = v;
|
|
2986
2714
|
this.dataLoaded();
|
|
2987
2715
|
}
|
|
2988
|
-
/**选择的表单信息 */
|
|
2989
|
-
_selected;
|
|
2990
2716
|
set selected(v) {
|
|
2991
2717
|
if (v) {
|
|
2992
2718
|
this._selected = v;
|
|
2993
2719
|
this.dataLoaded();
|
|
2994
2720
|
}
|
|
2995
2721
|
}
|
|
2996
|
-
submitclick;
|
|
2997
2722
|
async dataLoaded() {
|
|
2998
2723
|
if (this._Entity && this._type) {
|
|
2999
2724
|
await this.AfterInit();
|
|
@@ -3030,20 +2755,6 @@ class MatrixConfigComponent {
|
|
|
3030
2755
|
get MatrixBlockTypes() {
|
|
3031
2756
|
return this.formConfiguration.controls['MatrixBlockTypes'];
|
|
3032
2757
|
}
|
|
3033
|
-
/**模态框-状态 */
|
|
3034
|
-
matrixModalOpen = false;
|
|
3035
|
-
/**模态框-是否正在编辑 */
|
|
3036
|
-
isMatrixModalEdit = false;
|
|
3037
|
-
/**模态框-用于确定模态的繁忙状态是否为真 */
|
|
3038
|
-
modalBusy = false;
|
|
3039
|
-
/**模态框-表单 */
|
|
3040
|
-
matrixModalForm;
|
|
3041
|
-
/**表单控件模板-用于在form外提交submit */
|
|
3042
|
-
matrixModalModalSubmit;
|
|
3043
|
-
/**矩阵块-选择的下标 */
|
|
3044
|
-
selectMatrixBlockIndex = 0;
|
|
3045
|
-
/**矩阵块-选择的矩阵下字段的下标 */
|
|
3046
|
-
selectMatrixFieldIndex = 0;
|
|
3047
2758
|
/**模态框-状态改变 */
|
|
3048
2759
|
matrixModalVisibleChange(event) {
|
|
3049
2760
|
if (!event) {
|
|
@@ -3160,12 +2871,12 @@ class MatrixConfigComponent {
|
|
|
3160
2871
|
return;
|
|
3161
2872
|
FieldnameInput.patchValue(pinyin);
|
|
3162
2873
|
}
|
|
3163
|
-
static
|
|
3164
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 <!-- {{itemf.value.formControlName}}----{{item.value|json}} -->\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 </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: ["disabled"] }, { kind: "component", type: i8$1.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] });
|
|
2874
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MatrixConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: CmsApiService }, { token: FieldAbstractsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2875
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 </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: ["disabled"] }, { kind: "component", type: i8$2.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3165
2876
|
}
|
|
3166
2877
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MatrixConfigComponent, decorators: [{
|
|
3167
2878
|
type: Component,
|
|
3168
|
-
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 <!-- {{itemf.value.formControlName}}----{{item.value|json}} -->\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 </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>" }]
|
|
2879
|
+
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 </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>" }]
|
|
3169
2880
|
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }, { type: CmsApiService }, { type: FieldAbstractsService }]; }, propDecorators: { type: [{
|
|
3170
2881
|
type: Input
|
|
3171
2882
|
}], Entity: [{
|
|
@@ -3182,44 +2893,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3182
2893
|
|
|
3183
2894
|
/* eslint-disable @angular-eslint/component-selector */
|
|
3184
2895
|
class MatrixControlComponent {
|
|
3185
|
-
fb;
|
|
3186
2896
|
constructor(fb) {
|
|
3187
2897
|
this.fb = fb;
|
|
2898
|
+
/**字段配置列表 */
|
|
2899
|
+
this._fields = '';
|
|
2900
|
+
/**矩阵列表 */
|
|
2901
|
+
this.MatrixBlockTypesList = [];
|
|
3188
2902
|
}
|
|
3189
|
-
/**表单实体 */
|
|
3190
|
-
_entity;
|
|
3191
2903
|
set entity(v) {
|
|
3192
2904
|
this._entity = v;
|
|
3193
2905
|
this.dataLoaded();
|
|
3194
2906
|
}
|
|
3195
|
-
/**字段配置列表 */
|
|
3196
|
-
_fields = '';
|
|
3197
2907
|
set fields(v) {
|
|
3198
2908
|
this._fields = v;
|
|
3199
2909
|
this.dataLoaded();
|
|
3200
2910
|
}
|
|
3201
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
3202
|
-
_parentFiledName;
|
|
3203
2911
|
set parentFiledName(v) {
|
|
3204
2912
|
this._parentFiledName = v;
|
|
3205
2913
|
this.dataLoaded();
|
|
3206
2914
|
}
|
|
3207
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
3208
|
-
_selected;
|
|
3209
2915
|
set selected(v) {
|
|
3210
2916
|
this._selected = v;
|
|
3211
2917
|
if (v) {
|
|
3212
2918
|
this.dataLoaded();
|
|
3213
2919
|
}
|
|
3214
2920
|
}
|
|
3215
|
-
/**语言 */
|
|
3216
|
-
_culture;
|
|
3217
2921
|
set culture(v) {
|
|
3218
2922
|
this._culture = v;
|
|
3219
2923
|
}
|
|
3220
|
-
submitclick;
|
|
3221
|
-
/** 获取父级字段代表的表单组*/
|
|
3222
|
-
extraProperties;
|
|
3223
2924
|
/**数据加载完成 */
|
|
3224
2925
|
async dataLoaded() {
|
|
3225
2926
|
if (this._fields && this._entity && this._parentFiledName) {
|
|
@@ -3230,9 +2931,6 @@ class MatrixControlComponent {
|
|
|
3230
2931
|
this.fieldNameControl.patchValue(this._selected);
|
|
3231
2932
|
}
|
|
3232
2933
|
}
|
|
3233
|
-
formConfiguration;
|
|
3234
|
-
/**获取表格字段代表的控件 */
|
|
3235
|
-
fieldNameControl;
|
|
3236
2934
|
AfterInit() {
|
|
3237
2935
|
return new Promise((resolve, rejects) => {
|
|
3238
2936
|
let formConfiguration = this._fields.field.formConfiguration;
|
|
@@ -3249,8 +2947,6 @@ class MatrixControlComponent {
|
|
|
3249
2947
|
resolve(true);
|
|
3250
2948
|
});
|
|
3251
2949
|
}
|
|
3252
|
-
/**矩阵列表 */
|
|
3253
|
-
MatrixBlockTypesList = [];
|
|
3254
2950
|
/**增加指定矩阵控件项 */
|
|
3255
2951
|
addMatrixControl(item) {
|
|
3256
2952
|
this.fieldNameControl.push(this.fb.group({
|
|
@@ -3265,8 +2961,8 @@ class MatrixControlComponent {
|
|
|
3265
2961
|
deleteMatrixControl(index) {
|
|
3266
2962
|
this.fieldNameControl.removeAt(index);
|
|
3267
2963
|
}
|
|
3268
|
-
static
|
|
3269
|
-
static
|
|
2964
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MatrixControlComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2965
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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"] }] }); }
|
|
3270
2966
|
}
|
|
3271
2967
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MatrixControlComponent, decorators: [{
|
|
3272
2968
|
type: Component,
|
|
@@ -3287,9 +2983,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3287
2983
|
}] } });
|
|
3288
2984
|
|
|
3289
2985
|
class TableConfig {
|
|
3290
|
-
// 选项
|
|
3291
|
-
TableColumns = new FormArray([]);
|
|
3292
2986
|
constructor(data) {
|
|
2987
|
+
// 选项
|
|
2988
|
+
this.TableColumns = new FormArray([]);
|
|
3293
2989
|
if (data) {
|
|
3294
2990
|
for (const key in data) {
|
|
3295
2991
|
if (data.hasOwnProperty(key)) {
|
|
@@ -3300,19 +2996,19 @@ class TableConfig {
|
|
|
3300
2996
|
}
|
|
3301
2997
|
}
|
|
3302
2998
|
class TableFormControl {
|
|
3303
|
-
/**列标题 */
|
|
3304
|
-
displayName = ['', [Validators.required]];
|
|
3305
|
-
/**空间配置 */
|
|
3306
|
-
formConfiguration = new FormGroup({});
|
|
3307
|
-
/**列名 */
|
|
3308
|
-
name = ['', [Validators.required]];
|
|
3309
|
-
//控件标识
|
|
3310
|
-
formControlName = ['', [Validators.required]];
|
|
3311
|
-
/**是否必填 */
|
|
3312
|
-
required = [false];
|
|
3313
|
-
/**描述 */
|
|
3314
|
-
description = [''];
|
|
3315
2999
|
constructor(data) {
|
|
3000
|
+
/**列标题 */
|
|
3001
|
+
this.displayName = ['', [Validators.required]];
|
|
3002
|
+
/**空间配置 */
|
|
3003
|
+
this.formConfiguration = new FormGroup({});
|
|
3004
|
+
/**列名 */
|
|
3005
|
+
this.name = ['', [Validators.required]];
|
|
3006
|
+
//控件标识
|
|
3007
|
+
this.formControlName = ['', [Validators.required]];
|
|
3008
|
+
/**是否必填 */
|
|
3009
|
+
this.required = [false];
|
|
3010
|
+
/**描述 */
|
|
3011
|
+
this.description = [''];
|
|
3316
3012
|
if (data) {
|
|
3317
3013
|
for (const key in data) {
|
|
3318
3014
|
if (data.hasOwnProperty(key)) {
|
|
@@ -3325,32 +3021,25 @@ class TableFormControl {
|
|
|
3325
3021
|
|
|
3326
3022
|
/* eslint-disable @angular-eslint/component-selector */
|
|
3327
3023
|
class TableConfigComponent {
|
|
3328
|
-
fb;
|
|
3329
|
-
_CmsApiService;
|
|
3330
|
-
_FieldAbstractsService;
|
|
3331
3024
|
constructor(fb, _CmsApiService, _FieldAbstractsService) {
|
|
3332
3025
|
this.fb = fb;
|
|
3333
3026
|
this._CmsApiService = _CmsApiService;
|
|
3334
3027
|
this._FieldAbstractsService = _FieldAbstractsService;
|
|
3028
|
+
/**创建站点模态框状态 */
|
|
3029
|
+
this.tableSelectOpen = false;
|
|
3030
|
+
/**用于确定模态的繁忙状态是否为真 */
|
|
3031
|
+
this.modalBusy = false;
|
|
3335
3032
|
}
|
|
3336
|
-
/**表单实体 */
|
|
3337
|
-
_Entity;
|
|
3338
3033
|
set Entity(v) {
|
|
3339
3034
|
this._Entity = v;
|
|
3340
3035
|
this.dataLoaded();
|
|
3341
3036
|
}
|
|
3342
|
-
/**选择的表单信息 */
|
|
3343
|
-
_selected;
|
|
3344
3037
|
set selected(v) {
|
|
3345
3038
|
if (v) {
|
|
3346
3039
|
this._selected = v;
|
|
3347
3040
|
this.dataLoaded();
|
|
3348
3041
|
}
|
|
3349
3042
|
}
|
|
3350
|
-
/**表单控件组 */
|
|
3351
|
-
_fieldControlGroup;
|
|
3352
|
-
/**表单控件类型 */
|
|
3353
|
-
_type;
|
|
3354
3043
|
set type(v) {
|
|
3355
3044
|
this._type = v;
|
|
3356
3045
|
this.dataLoaded();
|
|
@@ -3361,7 +3050,6 @@ class TableConfigComponent {
|
|
|
3361
3050
|
get TableColumns() {
|
|
3362
3051
|
return this.formConfiguration.controls['TableColumns'];
|
|
3363
3052
|
}
|
|
3364
|
-
submitclick;
|
|
3365
3053
|
async dataLoaded() {
|
|
3366
3054
|
if (this._Entity && this._type) {
|
|
3367
3055
|
await this.AfterInit();
|
|
@@ -3395,7 +3083,6 @@ class TableConfigComponent {
|
|
|
3395
3083
|
resolve(true);
|
|
3396
3084
|
});
|
|
3397
3085
|
}
|
|
3398
|
-
itemForm;
|
|
3399
3086
|
/**选择表格的表单控件 */
|
|
3400
3087
|
selectTableControl(event, i, item) {
|
|
3401
3088
|
this.CurrentSelectionTableControlName = event.target.value;
|
|
@@ -3404,19 +3091,6 @@ class TableConfigComponent {
|
|
|
3404
3091
|
this.TableColumnsIndex = i;
|
|
3405
3092
|
this.itemForm = item;
|
|
3406
3093
|
}
|
|
3407
|
-
CurrentSelectionTableControlName;
|
|
3408
|
-
/**正在创建或编辑的表格项下标 */
|
|
3409
|
-
TableColumnsIndex;
|
|
3410
|
-
/**创建站点模态框状态 */
|
|
3411
|
-
tableSelectOpen = false;
|
|
3412
|
-
/**用于确定模态的繁忙状态是否为真 */
|
|
3413
|
-
modalBusy = false;
|
|
3414
|
-
/**创建站点表单 */
|
|
3415
|
-
tableSelectForm;
|
|
3416
|
-
/**表格已选择数据 */
|
|
3417
|
-
_tableSelected;
|
|
3418
|
-
/**表单控件模板-动态赋值表单控件 */
|
|
3419
|
-
tableSelectModalSubmit;
|
|
3420
3094
|
/**创建站点模态框状态改变 */
|
|
3421
3095
|
tableSelectVisibleChange(event) {
|
|
3422
3096
|
if (!event) {
|
|
@@ -3466,8 +3140,8 @@ class TableConfigComponent {
|
|
|
3466
3140
|
return;
|
|
3467
3141
|
nameInput.patchValue(pinyin);
|
|
3468
3142
|
}
|
|
3469
|
-
static
|
|
3470
|
-
static
|
|
3143
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableConfigComponent, deps: [{ token: i1$1.FormBuilder }, { token: CmsApiService }, { token: FieldAbstractsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3144
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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 (ngSubmit)=\"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.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: "component", type: i8$2.DynamicComponent, selector: "df-dynamic", inputs: ["selected", "type", "entity", "culture", "parentFiledName", "fields"] }, { kind: "pipe", type: i1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
3471
3145
|
}
|
|
3472
3146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableConfigComponent, decorators: [{
|
|
3473
3147
|
type: Component,
|
|
@@ -3488,42 +3162,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3488
3162
|
|
|
3489
3163
|
class TableControlComponent {
|
|
3490
3164
|
constructor() {
|
|
3165
|
+
this.fb = inject(FormBuilder);
|
|
3166
|
+
/**字段配置列表 */
|
|
3167
|
+
this._fields = '';
|
|
3491
3168
|
}
|
|
3492
|
-
fb = inject(FormBuilder);
|
|
3493
|
-
/**表单实体 */
|
|
3494
|
-
_entity;
|
|
3495
3169
|
set entity(v) {
|
|
3496
3170
|
this._entity = v;
|
|
3497
3171
|
this.dataLoaded();
|
|
3498
3172
|
}
|
|
3499
|
-
/**字段配置列表 */
|
|
3500
|
-
_fields = '';
|
|
3501
3173
|
set fields(v) {
|
|
3502
3174
|
this._fields = v;
|
|
3503
3175
|
this.dataLoaded();
|
|
3504
3176
|
}
|
|
3505
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
3506
|
-
_parentFiledName;
|
|
3507
3177
|
set parentFiledName(v) {
|
|
3508
3178
|
this._parentFiledName = v;
|
|
3509
3179
|
this.dataLoaded();
|
|
3510
3180
|
}
|
|
3511
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
3512
|
-
_selected;
|
|
3513
3181
|
set selected(v) {
|
|
3514
3182
|
this._selected = v;
|
|
3515
3183
|
if (v) {
|
|
3516
3184
|
this.dataLoaded();
|
|
3517
3185
|
}
|
|
3518
3186
|
}
|
|
3519
|
-
/**语言 */
|
|
3520
|
-
_culture;
|
|
3521
3187
|
set culture(v) {
|
|
3522
3188
|
this._culture = v;
|
|
3523
3189
|
}
|
|
3524
|
-
submitclick;
|
|
3525
|
-
/** 获取父级字段代表的表单组*/
|
|
3526
|
-
extraProperties;
|
|
3527
3190
|
/**数据加载完成 */
|
|
3528
3191
|
async dataLoaded() {
|
|
3529
3192
|
if (this._fields && this._entity && this._parentFiledName) {
|
|
@@ -3532,9 +3195,6 @@ class TableControlComponent {
|
|
|
3532
3195
|
this.submitclick.nativeElement.click();
|
|
3533
3196
|
}
|
|
3534
3197
|
}
|
|
3535
|
-
formConfiguration;
|
|
3536
|
-
/**获取表格字段代表的控件 */
|
|
3537
|
-
fieldNameControl;
|
|
3538
3198
|
AfterInit() {
|
|
3539
3199
|
return new Promise((resolve, rejects) => {
|
|
3540
3200
|
let ValidatorsArray = [];
|
|
@@ -3577,8 +3237,8 @@ class TableControlComponent {
|
|
|
3577
3237
|
this.fieldNameControl.insert(lastindex, controlAt);
|
|
3578
3238
|
this._selected = this.fieldNameControl.value;
|
|
3579
3239
|
}
|
|
3580
|
-
static
|
|
3581
|
-
static
|
|
3240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3241
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", 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"] }] }); }
|
|
3582
3242
|
}
|
|
3583
3243
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableControlComponent, decorators: [{
|
|
3584
3244
|
type: Component,
|
|
@@ -3868,6 +3528,7 @@ a {
|
|
|
3868
3528
|
:root select{
|
|
3869
3529
|
cursor: pointer; /* this will show the pointer when hovering */
|
|
3870
3530
|
}
|
|
3531
|
+
.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 }
|
|
3871
3532
|
|
|
3872
3533
|
`;
|
|
3873
3534
|
|
|
@@ -3929,11 +3590,6 @@ const routes = [
|
|
|
3929
3590
|
},
|
|
3930
3591
|
],
|
|
3931
3592
|
},
|
|
3932
|
-
// {
|
|
3933
|
-
// path: 'sites',
|
|
3934
|
-
// component: SitesComponent,
|
|
3935
|
-
// data: { keep: true }
|
|
3936
|
-
// },
|
|
3937
3593
|
{
|
|
3938
3594
|
path: 'sections',
|
|
3939
3595
|
children: [
|
|
@@ -3963,9 +3619,9 @@ const routes = [
|
|
|
3963
3619
|
},
|
|
3964
3620
|
];
|
|
3965
3621
|
class CmsRoutingModule {
|
|
3966
|
-
static
|
|
3967
|
-
static
|
|
3968
|
-
static
|
|
3622
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3623
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CmsRoutingModule, imports: [i3$1.RouterModule], exports: [RouterModule] }); }
|
|
3624
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
3969
3625
|
}
|
|
3970
3626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsRoutingModule, decorators: [{
|
|
3971
3627
|
type: NgModule,
|
|
@@ -3977,6 +3633,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3977
3633
|
|
|
3978
3634
|
class CmsModule {
|
|
3979
3635
|
static forChild(options = {}) {
|
|
3636
|
+
console.log(111111);
|
|
3980
3637
|
return {
|
|
3981
3638
|
ngModule: CmsModule,
|
|
3982
3639
|
providers: [
|
|
@@ -3990,10 +3647,9 @@ class CmsModule {
|
|
|
3990
3647
|
static forLazy(options = {}) {
|
|
3991
3648
|
return new LazyModuleFactory(CmsModule.forChild(options));
|
|
3992
3649
|
}
|
|
3993
|
-
static
|
|
3994
|
-
static
|
|
3650
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3651
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: CmsModule, declarations: [EntriesComponent,
|
|
3995
3652
|
FieldsComponent,
|
|
3996
|
-
// SitesComponent,
|
|
3997
3653
|
SectionsComponent,
|
|
3998
3654
|
FieldGroupComponent,
|
|
3999
3655
|
CreateFieldComponent,
|
|
@@ -4017,14 +3673,14 @@ class CmsModule {
|
|
|
4017
3673
|
NgbAccordionModule,
|
|
4018
3674
|
NgbDropdownModule,
|
|
4019
3675
|
PageModule,
|
|
4020
|
-
NzSelectModule, i8$
|
|
3676
|
+
NzSelectModule, i8$2.DynamicFormModule], exports: [TableConfigComponent,
|
|
4021
3677
|
TableControlComponent,
|
|
4022
3678
|
MatrixConfigComponent,
|
|
4023
3679
|
MatrixControlComponent,
|
|
4024
3680
|
EntryConfigComponent,
|
|
4025
3681
|
EntryControlComponent,
|
|
4026
|
-
DomainsComponent] });
|
|
4027
|
-
static
|
|
3682
|
+
DomainsComponent] }); }
|
|
3683
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsModule, imports: [CoreModule,
|
|
4028
3684
|
ThemeSharedModule,
|
|
4029
3685
|
CmsRoutingModule,
|
|
4030
3686
|
FormsModule,
|
|
@@ -4035,7 +3691,7 @@ class CmsModule {
|
|
|
4035
3691
|
NzSelectModule,
|
|
4036
3692
|
DynamicFormModule.forRoot({
|
|
4037
3693
|
cmsFieldControlGroup: [...FieldControlGroup, ...fielFieldControlGroup, ...ckEditorFieldControlGroup]
|
|
4038
|
-
})] });
|
|
3694
|
+
})] }); }
|
|
4039
3695
|
}
|
|
4040
3696
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CmsModule, decorators: [{
|
|
4041
3697
|
type: NgModule,
|
|
@@ -4043,7 +3699,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
4043
3699
|
declarations: [
|
|
4044
3700
|
EntriesComponent,
|
|
4045
3701
|
FieldsComponent,
|
|
4046
|
-
// SitesComponent,
|
|
4047
3702
|
SectionsComponent,
|
|
4048
3703
|
FieldGroupComponent,
|
|
4049
3704
|
CreateFieldComponent,
|