@valtimo/choice-field 4.23.0 → 5.2.0
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/esm2020/lib/choice-field-create/choice-field-create.component.mjs +59 -0
- package/esm2020/lib/choice-field-detail/choice-field-detail.component.mjs +119 -0
- package/esm2020/lib/choice-field-list/choice-field-list.component.mjs +73 -0
- package/esm2020/lib/choice-field-routing.module.mjs +87 -0
- package/esm2020/lib/choice-field-value-create/choice-field-value-create.component.mjs +77 -0
- package/esm2020/lib/choice-field-value-detail/choice-field-value-detail.component.mjs +83 -0
- package/esm2020/lib/choice-field-value-list/choice-field-value-list.component.mjs +96 -0
- package/esm2020/lib/choice-field.module.mjs +82 -0
- package/esm2020/lib/choice-field.service.mjs +67 -0
- package/esm2020/lib/models/choice-field.model.mjs +17 -0
- package/esm2020/lib/models/choicefield-value.model.mjs +17 -0
- package/esm2020/lib/models/index.mjs +20 -0
- package/esm2020/public_api.mjs +22 -0
- package/esm2020/valtimo-choice-field.mjs +5 -0
- package/fesm2015/valtimo-choice-field.mjs +725 -0
- package/fesm2015/valtimo-choice-field.mjs.map +1 -0
- package/fesm2020/valtimo-choice-field.mjs +757 -0
- package/fesm2020/valtimo-choice-field.mjs.map +1 -0
- package/lib/choice-field-create/choice-field-create.component.d.ts +4 -0
- package/lib/choice-field-create/choice-field-create.component.d.ts.map +1 -0
- package/lib/choice-field-detail/choice-field-detail.component.d.ts +4 -0
- package/lib/choice-field-detail/choice-field-detail.component.d.ts.map +1 -0
- package/lib/choice-field-list/choice-field-list.component.d.ts +4 -0
- package/lib/choice-field-list/choice-field-list.component.d.ts.map +1 -0
- package/lib/choice-field-routing.module.d.ts +7 -0
- package/lib/choice-field-routing.module.d.ts.map +1 -0
- package/lib/choice-field-value-create/choice-field-value-create.component.d.ts +4 -0
- package/lib/choice-field-value-create/choice-field-value-create.component.d.ts.map +1 -0
- package/lib/choice-field-value-detail/choice-field-value-detail.component.d.ts +4 -0
- package/lib/choice-field-value-detail/choice-field-value-detail.component.d.ts.map +1 -0
- package/lib/choice-field-value-list/choice-field-value-list.component.d.ts +4 -0
- package/lib/choice-field-value-list/choice-field-value-list.component.d.ts.map +1 -0
- package/lib/choice-field.module.d.ts +16 -0
- package/lib/choice-field.module.d.ts.map +1 -0
- package/lib/choice-field.service.d.ts +4 -0
- package/lib/choice-field.service.d.ts.map +1 -0
- package/lib/models/choice-field.model.d.ts +1 -0
- package/lib/models/choice-field.model.d.ts.map +1 -0
- package/lib/models/choicefield-value.model.d.ts +1 -0
- package/lib/models/choicefield-value.model.d.ts.map +1 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.d.ts.map +1 -0
- package/package.json +22 -10
- package/public_api.d.ts +1 -0
- package/public_api.d.ts.map +1 -0
- package/valtimo-choice-field.d.ts +2 -7
- package/valtimo-choice-field.d.ts.map +1 -0
- package/bundles/valtimo-choice-field.umd.js +0 -811
- package/bundles/valtimo-choice-field.umd.js.map +0 -1
- package/bundles/valtimo-choice-field.umd.min.js +0 -2
- package/bundles/valtimo-choice-field.umd.min.js.map +0 -1
- package/esm2015/lib/choice-field-create/choice-field-create.component.js +0 -63
- package/esm2015/lib/choice-field-detail/choice-field-detail.component.js +0 -123
- package/esm2015/lib/choice-field-list/choice-field-list.component.js +0 -75
- package/esm2015/lib/choice-field-routing.module.js +0 -83
- package/esm2015/lib/choice-field-value-create/choice-field-value-create.component.js +0 -82
- package/esm2015/lib/choice-field-value-detail/choice-field-value-detail.component.js +0 -88
- package/esm2015/lib/choice-field-value-list/choice-field-value-list.component.js +0 -100
- package/esm2015/lib/choice-field.module.js +0 -54
- package/esm2015/lib/choice-field.service.js +0 -71
- package/esm2015/lib/models/choice-field.model.js +0 -16
- package/esm2015/lib/models/choicefield-value.model.js +0 -16
- package/esm2015/lib/models/index.js +0 -20
- package/esm2015/public_api.js +0 -22
- package/esm2015/valtimo-choice-field.js +0 -12
- package/fesm2015/valtimo-choice-field.js +0 -765
- package/fesm2015/valtimo-choice-field.js.map +0 -1
- package/valtimo-choice-field.metadata.json +0 -1
|
@@ -0,0 +1,725 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common/http';
|
|
4
|
+
import * as i2 from '@valtimo/config';
|
|
5
|
+
import { ROLE_ADMIN } from '@valtimo/config';
|
|
6
|
+
import * as i5 from '@angular/common';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import * as i2$1 from '@angular/forms';
|
|
9
|
+
import { FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
10
|
+
import * as i4 from '@valtimo/components';
|
|
11
|
+
import { ListModule, WidgetModule, FieldAutoFocusModule, AlertModule } from '@valtimo/components';
|
|
12
|
+
import * as i1$1 from '@angular/router';
|
|
13
|
+
import { RouterModule } from '@angular/router';
|
|
14
|
+
import { AuthGuardService } from '@valtimo/security';
|
|
15
|
+
import * as i4$1 from '@ngx-translate/core';
|
|
16
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
17
|
+
import { Subscription } from 'rxjs';
|
|
18
|
+
import { first } from 'rxjs/operators';
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
*
|
|
22
|
+
* * Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
23
|
+
* *
|
|
24
|
+
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
25
|
+
* * you may not use this file except in compliance with the License.
|
|
26
|
+
* * You may obtain a copy of the License at
|
|
27
|
+
* *
|
|
28
|
+
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
29
|
+
* *
|
|
30
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
31
|
+
* * distributed under the License is distributed on an "AS IS" basis,
|
|
32
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
33
|
+
* * See the License for the specific language governing permissions and
|
|
34
|
+
* * limitations under the License.
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
40
|
+
*
|
|
41
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
42
|
+
* you may not use this file except in compliance with the License.
|
|
43
|
+
* You may obtain a copy of the License at
|
|
44
|
+
*
|
|
45
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
46
|
+
*
|
|
47
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
48
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
49
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
50
|
+
* See the License for the specific language governing permissions and
|
|
51
|
+
* limitations under the License.
|
|
52
|
+
*/
|
|
53
|
+
class ChoiceFieldService {
|
|
54
|
+
constructor(http, configService) {
|
|
55
|
+
this.http = http;
|
|
56
|
+
this.configService = configService;
|
|
57
|
+
this.valtimoApiConfig = configService.config.valtimoApi;
|
|
58
|
+
}
|
|
59
|
+
query(params) {
|
|
60
|
+
return this.http.get(`${this.valtimoApiConfig.endpointUri}choice-fields`, {
|
|
61
|
+
observe: 'response',
|
|
62
|
+
params,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
get(id) {
|
|
66
|
+
return this.http.get(`${this.valtimoApiConfig.endpointUri}choice-fields/${id}`);
|
|
67
|
+
}
|
|
68
|
+
create(choiceField) {
|
|
69
|
+
return this.http.post(`${this.valtimoApiConfig.endpointUri}choice-fields`, choiceField);
|
|
70
|
+
}
|
|
71
|
+
delete(id) {
|
|
72
|
+
return this.http.delete(`${this.valtimoApiConfig.endpointUri}choice-fields/${id}`);
|
|
73
|
+
}
|
|
74
|
+
update(choiceField) {
|
|
75
|
+
return this.http.put(`${this.valtimoApiConfig.endpointUri}choice-fields`, choiceField);
|
|
76
|
+
}
|
|
77
|
+
queryValues(keyName, params) {
|
|
78
|
+
return this.http.get(`${this.valtimoApiConfig.endpointUri}choice-field-values/${keyName}/values`, { observe: 'response', params });
|
|
79
|
+
}
|
|
80
|
+
getValue(choiceFieldId) {
|
|
81
|
+
return this.http.get(`${this.valtimoApiConfig.endpointUri}choice-field-values/${choiceFieldId}`);
|
|
82
|
+
}
|
|
83
|
+
updateValue(choiceFieldValue, choiceFieldName) {
|
|
84
|
+
return this.http.put(`${this.valtimoApiConfig.endpointUri}choice-field-values`, choiceFieldValue, {
|
|
85
|
+
params: { choice_field_name: choiceFieldName },
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
createValue(choiceFieldValue, choiceFieldName) {
|
|
89
|
+
return this.http.post(`${this.valtimoApiConfig.endpointUri}choice-field-values`, choiceFieldValue, { params: { choice_field_name: choiceFieldName } });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
ChoiceFieldService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
93
|
+
ChoiceFieldService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldService, providedIn: 'root' });
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldService, decorators: [{
|
|
95
|
+
type: Injectable,
|
|
96
|
+
args: [{
|
|
97
|
+
providedIn: 'root',
|
|
98
|
+
}]
|
|
99
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i2.ConfigService }]; } });
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
103
|
+
*
|
|
104
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
105
|
+
* you may not use this file except in compliance with the License.
|
|
106
|
+
* You may obtain a copy of the License at
|
|
107
|
+
*
|
|
108
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
109
|
+
*
|
|
110
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
111
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
112
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
113
|
+
* See the License for the specific language governing permissions and
|
|
114
|
+
* limitations under the License.
|
|
115
|
+
*/
|
|
116
|
+
class ChoiceFieldListComponent {
|
|
117
|
+
constructor(router, service) {
|
|
118
|
+
this.router = router;
|
|
119
|
+
this.service = service;
|
|
120
|
+
this.choiceFields = [];
|
|
121
|
+
this.pagination = {
|
|
122
|
+
collectionSize: 0,
|
|
123
|
+
page: 1,
|
|
124
|
+
size: 10,
|
|
125
|
+
maxPaginationItemSize: 5,
|
|
126
|
+
};
|
|
127
|
+
this.pageParam = 0;
|
|
128
|
+
this.fields = [
|
|
129
|
+
{
|
|
130
|
+
key: 'id',
|
|
131
|
+
label: 'ID',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
key: 'keyName',
|
|
135
|
+
label: 'Key',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
key: 'title',
|
|
139
|
+
label: 'Title',
|
|
140
|
+
},
|
|
141
|
+
];
|
|
142
|
+
}
|
|
143
|
+
ngOnInit() { }
|
|
144
|
+
paginationSet() {
|
|
145
|
+
this.initData();
|
|
146
|
+
}
|
|
147
|
+
initData() {
|
|
148
|
+
this.service.query({ page: this.pageParam, size: this.pagination.size }).subscribe(results => {
|
|
149
|
+
this.pagination.collectionSize = results.headers.get('x-total-count');
|
|
150
|
+
this.choiceFields = results.body;
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
rowClick(data) {
|
|
154
|
+
this.router.navigate([`/choice-fields/field/${encodeURI(data.id)}`]);
|
|
155
|
+
}
|
|
156
|
+
paginationClicked(page) {
|
|
157
|
+
this.pageParam = page - 1;
|
|
158
|
+
this.initData();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
ChoiceFieldListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldListComponent, deps: [{ token: i1$1.Router }, { token: ChoiceFieldService }], target: i0.ɵɵFactoryTarget.Component });
|
|
162
|
+
ChoiceFieldListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: ChoiceFieldListComponent, selector: "valtimo-choice-field-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button [routerLink]=\"'create'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n <span>{{ 'Create new Choice field' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"choiceFields\"\n [fields]=\"fields\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n paginationIdentifier=\"choiceFieldList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n [header]=\"true\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Choice fields' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Choice fields' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n", styles: [""], components: [{ type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i4.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }], directives: [{ type: i1$1.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }], pipes: { "translate": i4$1.TranslatePipe } });
|
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldListComponent, decorators: [{
|
|
164
|
+
type: Component,
|
|
165
|
+
args: [{ selector: 'valtimo-choice-field-list', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button [routerLink]=\"'create'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n <span>{{ 'Create new Choice field' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"choiceFields\"\n [fields]=\"fields\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n paginationIdentifier=\"choiceFieldList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n [header]=\"true\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Choice fields' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Choice fields' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n", styles: [""] }]
|
|
166
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: ChoiceFieldService }]; } });
|
|
167
|
+
|
|
168
|
+
/*
|
|
169
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
170
|
+
*
|
|
171
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
172
|
+
* you may not use this file except in compliance with the License.
|
|
173
|
+
* You may obtain a copy of the License at
|
|
174
|
+
*
|
|
175
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
176
|
+
*
|
|
177
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
178
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
179
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
180
|
+
* See the License for the specific language governing permissions and
|
|
181
|
+
* limitations under the License.
|
|
182
|
+
*/
|
|
183
|
+
class ChoiceFieldValueListComponent {
|
|
184
|
+
constructor(router, route, formBuilder, service) {
|
|
185
|
+
this.router = router;
|
|
186
|
+
this.route = route;
|
|
187
|
+
this.formBuilder = formBuilder;
|
|
188
|
+
this.service = service;
|
|
189
|
+
this.choiceFieldValues = [];
|
|
190
|
+
this.pagination = {
|
|
191
|
+
collectionSize: 0,
|
|
192
|
+
page: 1,
|
|
193
|
+
size: 10,
|
|
194
|
+
maxPaginationItemSize: 5,
|
|
195
|
+
};
|
|
196
|
+
this.pageParam = 0;
|
|
197
|
+
this.fields = [
|
|
198
|
+
{
|
|
199
|
+
key: 'id',
|
|
200
|
+
label: 'ID',
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
key: 'name',
|
|
204
|
+
label: 'Key',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
key: 'value',
|
|
208
|
+
label: 'Value',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
key: 'deprecatedDisplayString',
|
|
212
|
+
label: 'Deprecated',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
key: 'sortOrder',
|
|
216
|
+
label: 'Sequence',
|
|
217
|
+
},
|
|
218
|
+
];
|
|
219
|
+
const snapshot = this.route.snapshot.paramMap;
|
|
220
|
+
this.id = snapshot.get('id');
|
|
221
|
+
}
|
|
222
|
+
ngOnInit() {
|
|
223
|
+
this.paginationSet();
|
|
224
|
+
}
|
|
225
|
+
paginationSet() {
|
|
226
|
+
this.initData(this.id);
|
|
227
|
+
}
|
|
228
|
+
initData(id) {
|
|
229
|
+
this.service.get(id).subscribe(result => {
|
|
230
|
+
this.choiceField = result;
|
|
231
|
+
this.service
|
|
232
|
+
.queryValues(this.choiceField.keyName, { page: this.pageParam, size: this.pagination.size })
|
|
233
|
+
.subscribe(values => {
|
|
234
|
+
this.pagination.collectionSize = values.headers.get('x-total-count');
|
|
235
|
+
this.choiceFieldValues = values.body;
|
|
236
|
+
this.choiceFieldValues.forEach(choiceFieldValue => {
|
|
237
|
+
choiceFieldValue.deprecatedDisplayString = choiceFieldValue.deprecated ? 'Yes' : 'No';
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
rowClick(data) {
|
|
243
|
+
this.router.navigate([`/choice-fields/field/${data.choiceField.id}/value/${data.id}`]);
|
|
244
|
+
}
|
|
245
|
+
paginationClicked(page) {
|
|
246
|
+
this.pageParam = page - 1;
|
|
247
|
+
this.initData(this.id);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
ChoiceFieldValueListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldValueListComponent, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i2$1.FormBuilder }, { token: ChoiceFieldService }], target: i0.ɵɵFactoryTarget.Component });
|
|
251
|
+
ChoiceFieldValueListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: ChoiceFieldValueListComponent, selector: "valtimo-choice-field-value-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button [routerLink]=\"'create-value'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n <span>{{ 'Create new Choice field value' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"choiceFieldValues\"\n [fields]=\"fields\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n paginationIdentifier=\"choiceFieldValueList\"\n (paginationClicked)=\"paginationClicked($event)\"\n [header]=\"true\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Choice field values' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'Overview of all Choice field values' | translate }}\n </h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n", styles: [""], components: [{ type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i4.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }], directives: [{ type: i1$1.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }], pipes: { "translate": i4$1.TranslatePipe } });
|
|
252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldValueListComponent, decorators: [{
|
|
253
|
+
type: Component,
|
|
254
|
+
args: [{ selector: 'valtimo-choice-field-value-list', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button [routerLink]=\"'create-value'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n <span>{{ 'Create new Choice field value' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"choiceFieldValues\"\n [fields]=\"fields\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n paginationIdentifier=\"choiceFieldValueList\"\n (paginationClicked)=\"paginationClicked($event)\"\n [header]=\"true\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Choice field values' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'Overview of all Choice field values' | translate }}\n </h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n", styles: [""] }]
|
|
255
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i2$1.FormBuilder }, { type: ChoiceFieldService }]; } });
|
|
256
|
+
|
|
257
|
+
/*
|
|
258
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
259
|
+
*
|
|
260
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
261
|
+
* you may not use this file except in compliance with the License.
|
|
262
|
+
* You may obtain a copy of the License at
|
|
263
|
+
*
|
|
264
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
265
|
+
*
|
|
266
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
267
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
268
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
269
|
+
* See the License for the specific language governing permissions and
|
|
270
|
+
* limitations under the License.
|
|
271
|
+
*/
|
|
272
|
+
class ChoiceFieldDetailComponent {
|
|
273
|
+
constructor(router, route, formBuilder, service, alertService) {
|
|
274
|
+
this.router = router;
|
|
275
|
+
this.route = route;
|
|
276
|
+
this.formBuilder = formBuilder;
|
|
277
|
+
this.service = service;
|
|
278
|
+
this.alertService = alertService;
|
|
279
|
+
this.alertSub = Subscription.EMPTY;
|
|
280
|
+
const snapshot = this.route.snapshot.paramMap;
|
|
281
|
+
this.id = snapshot.get('id');
|
|
282
|
+
}
|
|
283
|
+
ngOnInit() {
|
|
284
|
+
this.reset();
|
|
285
|
+
}
|
|
286
|
+
ngOnDestroy() {
|
|
287
|
+
this.alertSub.unsubscribe();
|
|
288
|
+
}
|
|
289
|
+
get formControls() {
|
|
290
|
+
return this.form.controls;
|
|
291
|
+
}
|
|
292
|
+
initData(id) {
|
|
293
|
+
this.service.get(id).subscribe(result => {
|
|
294
|
+
this.choiceField = result;
|
|
295
|
+
this.setValues();
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
setValues() {
|
|
299
|
+
if (this.choiceField) {
|
|
300
|
+
// set form values
|
|
301
|
+
this.form.controls.id.setValue(this.choiceField.id);
|
|
302
|
+
this.form.controls.keyName.setValue(this.choiceField.keyName);
|
|
303
|
+
this.form.controls.title.setValue(this.choiceField.title);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
createFormGroup() {
|
|
307
|
+
return this.formBuilder.group({
|
|
308
|
+
id: new FormControl('', Validators.required),
|
|
309
|
+
keyName: new FormControl('', Validators.required),
|
|
310
|
+
title: new FormControl('', Validators.required),
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
reset() {
|
|
314
|
+
this.form = this.createFormGroup();
|
|
315
|
+
this.initData(this.id);
|
|
316
|
+
}
|
|
317
|
+
delete() {
|
|
318
|
+
if (!this.alertSub.closed) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
// confirm delete
|
|
322
|
+
const mssg = 'Delete choice field?';
|
|
323
|
+
const confirmations = [
|
|
324
|
+
{
|
|
325
|
+
label: 'Cancel',
|
|
326
|
+
class: 'btn btn-default',
|
|
327
|
+
value: false,
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
label: 'Delete',
|
|
331
|
+
class: 'btn btn-primary',
|
|
332
|
+
value: true,
|
|
333
|
+
},
|
|
334
|
+
];
|
|
335
|
+
this.alertService.notification(mssg, confirmations);
|
|
336
|
+
this.alertSub = this.alertService
|
|
337
|
+
.getAlertConfirmChangeEmitter()
|
|
338
|
+
.pipe(first())
|
|
339
|
+
.subscribe(alert => {
|
|
340
|
+
if (alert.confirm === true) {
|
|
341
|
+
this.deleteConfirmed();
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
deleteConfirmed() {
|
|
346
|
+
this.service.delete(this.id).subscribe(() => {
|
|
347
|
+
this.router.navigate([`/choice-fields`]);
|
|
348
|
+
this.alertService.success('Choice field has been deleted');
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
onSubmit() {
|
|
352
|
+
this.service.update(this.form.value).subscribe(() => {
|
|
353
|
+
this.reset();
|
|
354
|
+
this.alertService.success('Choice field details have been updated');
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
ChoiceFieldDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldDetailComponent, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i2$1.FormBuilder }, { token: ChoiceFieldService }, { token: i4.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
359
|
+
ChoiceFieldDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: ChoiceFieldDetailComponent, selector: "valtimo-choice-field-detail", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"p-5 bg-white\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\"\n >Title</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Choice field title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/choice-fields'\" class=\"btn btn-space btn-default\">Back</a>\n <button class=\"btn btn-space btn-danger\" type=\"button\" (click)=\"delete()\">\n Delete\n </button>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<div class=\"page-head\">\n <h2 class=\"page-head-title\">Choice field values</h2>\n</div>\n<valtimo-choice-field-value-list></valtimo-choice-field-value-list>\n", styles: [""], components: [{ type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: ChoiceFieldValueListComponent, selector: "valtimo-choice-field-value-list" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$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]" }, { type: i4.FieldAutoFocusDirective, selector: "[valtimoFieldAutoFocus]" }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }] });
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldDetailComponent, decorators: [{
|
|
361
|
+
type: Component,
|
|
362
|
+
args: [{ selector: 'valtimo-choice-field-detail', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"p-5 bg-white\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\"\n >Title</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Choice field title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/choice-fields'\" class=\"btn btn-space btn-default\">Back</a>\n <button class=\"btn btn-space btn-danger\" type=\"button\" (click)=\"delete()\">\n Delete\n </button>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n\n<div class=\"page-head\">\n <h2 class=\"page-head-title\">Choice field values</h2>\n</div>\n<valtimo-choice-field-value-list></valtimo-choice-field-value-list>\n", styles: [""] }]
|
|
363
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i2$1.FormBuilder }, { type: ChoiceFieldService }, { type: i4.AlertService }]; } });
|
|
364
|
+
|
|
365
|
+
/*
|
|
366
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
367
|
+
*
|
|
368
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
369
|
+
* you may not use this file except in compliance with the License.
|
|
370
|
+
* You may obtain a copy of the License at
|
|
371
|
+
*
|
|
372
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
373
|
+
*
|
|
374
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
375
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
376
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
377
|
+
* See the License for the specific language governing permissions and
|
|
378
|
+
* limitations under the License.
|
|
379
|
+
*/
|
|
380
|
+
class ChoiceFieldCreateComponent {
|
|
381
|
+
constructor(router, formBuilder, service, alertService) {
|
|
382
|
+
this.router = router;
|
|
383
|
+
this.formBuilder = formBuilder;
|
|
384
|
+
this.service = service;
|
|
385
|
+
this.alertService = alertService;
|
|
386
|
+
}
|
|
387
|
+
ngOnInit() {
|
|
388
|
+
this.reset();
|
|
389
|
+
}
|
|
390
|
+
get formControls() {
|
|
391
|
+
return this.form.controls;
|
|
392
|
+
}
|
|
393
|
+
createFormGroup() {
|
|
394
|
+
return this.formBuilder.group({
|
|
395
|
+
keyName: new FormControl('', Validators.required),
|
|
396
|
+
title: new FormControl('', Validators.required),
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
onSubmit() {
|
|
400
|
+
this.service.create(this.form.value).subscribe(result => {
|
|
401
|
+
this.router.navigate([`/choice-fields/field/${result.id}`]);
|
|
402
|
+
this.alertService.success('New choice field has been created');
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
reset() {
|
|
406
|
+
this.form = this.createFormGroup();
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
ChoiceFieldCreateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldCreateComponent, deps: [{ token: i1$1.Router }, { token: i2$1.FormBuilder }, { token: ChoiceFieldService }, { token: i4.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
410
|
+
ChoiceFieldCreateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: ChoiceFieldCreateComponent, selector: "valtimo-choice-field-create", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div>\n <div class=\"p-5 bg-white\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"keyName\"\n >Key</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"keyName\"\n formControlName=\"keyName\"\n class=\"form-control\"\n placeholder=\"Choice field key name\"\n [ngClass]=\"{\n 'is-valid': formControls.keyName.touched && formControls.keyName.valid,\n 'is-invalid': formControls.keyName.touched && formControls.keyName.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.keyName.touched && formControls.keyName.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.keyName.errors.required\">Key name is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\"\n >Title</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Choice field title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/choice-fields'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n", styles: [""], components: [{ type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }], directives: [{ type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$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]" }, { type: i4.FieldAutoFocusDirective, selector: "[valtimoFieldAutoFocus]" }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }] });
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldCreateComponent, decorators: [{
|
|
412
|
+
type: Component,
|
|
413
|
+
args: [{ selector: 'valtimo-choice-field-create', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div>\n <div class=\"p-5 bg-white\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"keyName\"\n >Key</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"keyName\"\n formControlName=\"keyName\"\n class=\"form-control\"\n placeholder=\"Choice field key name\"\n [ngClass]=\"{\n 'is-valid': formControls.keyName.touched && formControls.keyName.valid,\n 'is-invalid': formControls.keyName.touched && formControls.keyName.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.keyName.touched && formControls.keyName.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.keyName.errors.required\">Key name is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\"\n >Title</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Choice field title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/choice-fields'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n", styles: [""] }]
|
|
414
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i2$1.FormBuilder }, { type: ChoiceFieldService }, { type: i4.AlertService }]; } });
|
|
415
|
+
|
|
416
|
+
/*
|
|
417
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
418
|
+
*
|
|
419
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
420
|
+
* you may not use this file except in compliance with the License.
|
|
421
|
+
* You may obtain a copy of the License at
|
|
422
|
+
*
|
|
423
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
424
|
+
*
|
|
425
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
426
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
427
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
428
|
+
* See the License for the specific language governing permissions and
|
|
429
|
+
* limitations under the License.
|
|
430
|
+
*/
|
|
431
|
+
class ChoiceFieldValueCreateComponent {
|
|
432
|
+
constructor(router, route, formBuilder, service, alertService) {
|
|
433
|
+
this.router = router;
|
|
434
|
+
this.route = route;
|
|
435
|
+
this.formBuilder = formBuilder;
|
|
436
|
+
this.service = service;
|
|
437
|
+
this.alertService = alertService;
|
|
438
|
+
const snapshot = this.route.snapshot.paramMap;
|
|
439
|
+
this.choiceFieldId = snapshot.get('id');
|
|
440
|
+
}
|
|
441
|
+
ngOnInit() {
|
|
442
|
+
this.reset();
|
|
443
|
+
}
|
|
444
|
+
get formControls() {
|
|
445
|
+
return this.form.controls;
|
|
446
|
+
}
|
|
447
|
+
createFormGroup() {
|
|
448
|
+
return this.formBuilder.group({
|
|
449
|
+
name: new FormControl('', Validators.required),
|
|
450
|
+
value: new FormControl('', Validators.required),
|
|
451
|
+
sortOrder: new FormControl('', Validators.required),
|
|
452
|
+
deprecated: new FormControl('', Validators.required),
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
initData(id) {
|
|
456
|
+
this.service.get(id).subscribe(result => {
|
|
457
|
+
this.choiceField = result;
|
|
458
|
+
this.setValues();
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
setValues() {
|
|
462
|
+
if (this.choiceField) {
|
|
463
|
+
// set form values default false
|
|
464
|
+
this.form.controls.deprecated.setValue(false);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
onSubmit() {
|
|
468
|
+
this.service.createValue(this.form.value, this.choiceField.keyName).subscribe(result => {
|
|
469
|
+
this.router.navigate([`/choice-fields/field/${encodeURI(this.choiceFieldId)}`]);
|
|
470
|
+
this.alertService.success('New choice field value has been created');
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
reset() {
|
|
474
|
+
this.form = this.createFormGroup();
|
|
475
|
+
this.initData(this.choiceFieldId);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
ChoiceFieldValueCreateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldValueCreateComponent, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i2$1.FormBuilder }, { token: ChoiceFieldService }, { token: i4.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
479
|
+
ChoiceFieldValueCreateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: ChoiceFieldValueCreateComponent, selector: "valtimo-choice-field-value-create", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <strong>Choice field</strong>\n <hr />\n </div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Title</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.title }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"name\">Key</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n class=\"form-control\"\n placeholder=\"Choice field value key\"\n [ngClass]=\"{\n 'is-valid': formControls.name.touched && formControls.name.valid,\n 'is-invalid': formControls.name.touched && formControls.name.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.name.touched && formControls.name.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.name.errors.required\">\n Choice field value key is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"value\"\n >Value</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"value\"\n formControlName=\"value\"\n class=\"form-control\"\n placeholder=\"Choice field value\"\n [ngClass]=\"{\n 'is-valid': formControls.value.touched && formControls.value.valid,\n 'is-invalid': formControls.value.touched && formControls.value.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.value.touched && formControls.value.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.value.errors.required\">\n Choice field value is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"sortOrder\"\n >Sequence</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"number\"\n id=\"sortOrder\"\n formControlName=\"sortOrder\"\n class=\"form-control\"\n placeholder=\"Choice field value sequence\"\n [ngClass]=\"{\n 'is-valid': formControls.sortOrder.touched && formControls.sortOrder.valid,\n 'is-invalid': formControls.sortOrder.touched && formControls.sortOrder.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.sortOrder.touched && formControls.sortOrder.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.sortOrder.errors.required\">\n Choice field value sequence is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"deprecated\"\n >Deprecated</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input type=\"checkbox\" formControlName=\"deprecated\" id=\"deprecated\" /><span>\n <label for=\"deprecated\"></label\n ></span>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'../'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n", styles: [""], components: [{ type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$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]" }, { type: i4.FieldAutoFocusDirective, selector: "[valtimoFieldAutoFocus]" }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }] });
|
|
480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldValueCreateComponent, decorators: [{
|
|
481
|
+
type: Component,
|
|
482
|
+
args: [{ selector: 'valtimo-choice-field-value-create', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <strong>Choice field</strong>\n <hr />\n </div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Title</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.title }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"name\">Key</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n class=\"form-control\"\n placeholder=\"Choice field value key\"\n [ngClass]=\"{\n 'is-valid': formControls.name.touched && formControls.name.valid,\n 'is-invalid': formControls.name.touched && formControls.name.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.name.touched && formControls.name.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.name.errors.required\">\n Choice field value key is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"value\"\n >Value</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"value\"\n formControlName=\"value\"\n class=\"form-control\"\n placeholder=\"Choice field value\"\n [ngClass]=\"{\n 'is-valid': formControls.value.touched && formControls.value.valid,\n 'is-invalid': formControls.value.touched && formControls.value.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.value.touched && formControls.value.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.value.errors.required\">\n Choice field value is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"sortOrder\"\n >Sequence</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"number\"\n id=\"sortOrder\"\n formControlName=\"sortOrder\"\n class=\"form-control\"\n placeholder=\"Choice field value sequence\"\n [ngClass]=\"{\n 'is-valid': formControls.sortOrder.touched && formControls.sortOrder.valid,\n 'is-invalid': formControls.sortOrder.touched && formControls.sortOrder.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.sortOrder.touched && formControls.sortOrder.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.sortOrder.errors.required\">\n Choice field value sequence is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"deprecated\"\n >Deprecated</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input type=\"checkbox\" formControlName=\"deprecated\" id=\"deprecated\" /><span>\n <label for=\"deprecated\"></label\n ></span>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'../'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n", styles: [""] }]
|
|
483
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i2$1.FormBuilder }, { type: ChoiceFieldService }, { type: i4.AlertService }]; } });
|
|
484
|
+
|
|
485
|
+
/*
|
|
486
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
487
|
+
*
|
|
488
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
489
|
+
* you may not use this file except in compliance with the License.
|
|
490
|
+
* You may obtain a copy of the License at
|
|
491
|
+
*
|
|
492
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
493
|
+
*
|
|
494
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
495
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
496
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
497
|
+
* See the License for the specific language governing permissions and
|
|
498
|
+
* limitations under the License.
|
|
499
|
+
*/
|
|
500
|
+
class ChoiceFieldValueDetailComponent {
|
|
501
|
+
constructor(router, route, formBuilder, service, alertService) {
|
|
502
|
+
this.router = router;
|
|
503
|
+
this.route = route;
|
|
504
|
+
this.formBuilder = formBuilder;
|
|
505
|
+
this.service = service;
|
|
506
|
+
this.alertService = alertService;
|
|
507
|
+
const snapshot = this.route.snapshot.paramMap;
|
|
508
|
+
this.choiceFieldValueId = snapshot.get('valueId');
|
|
509
|
+
}
|
|
510
|
+
ngOnInit() {
|
|
511
|
+
this.reset();
|
|
512
|
+
}
|
|
513
|
+
get formControls() {
|
|
514
|
+
return this.form.controls;
|
|
515
|
+
}
|
|
516
|
+
initData(choiceFieldValueId) {
|
|
517
|
+
this.service.getValue(choiceFieldValueId).subscribe(result => {
|
|
518
|
+
this.choiceField = result.choiceField;
|
|
519
|
+
this.choiceFieldValue = result;
|
|
520
|
+
this.setValues();
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
createFormGroup() {
|
|
524
|
+
return this.formBuilder.group({
|
|
525
|
+
id: new FormControl('', Validators.required),
|
|
526
|
+
name: new FormControl('', Validators.required),
|
|
527
|
+
value: new FormControl('', Validators.required),
|
|
528
|
+
sortOrder: new FormControl('', Validators.required),
|
|
529
|
+
deprecated: new FormControl('', Validators.required),
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
setValues() {
|
|
533
|
+
if (this.choiceField) {
|
|
534
|
+
// set form values
|
|
535
|
+
this.form.controls.id.setValue(this.choiceFieldValue.id);
|
|
536
|
+
this.form.controls.name.setValue(this.choiceFieldValue.name);
|
|
537
|
+
this.form.controls.value.setValue(this.choiceFieldValue.value);
|
|
538
|
+
this.form.controls.sortOrder.setValue(this.choiceFieldValue.sortOrder);
|
|
539
|
+
this.form.controls.deprecated.setValue(this.choiceFieldValue.deprecated);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
reset() {
|
|
543
|
+
this.form = this.createFormGroup();
|
|
544
|
+
this.initData(this.choiceFieldValueId);
|
|
545
|
+
}
|
|
546
|
+
onSubmit() {
|
|
547
|
+
this.service.updateValue(this.form.value, this.choiceField.keyName).subscribe(() => {
|
|
548
|
+
this.reset();
|
|
549
|
+
this.alertService.success('Choice field value details have been updated');
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
ChoiceFieldValueDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldValueDetailComponent, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i2$1.FormBuilder }, { token: ChoiceFieldService }, { token: i4.AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
554
|
+
ChoiceFieldValueDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: ChoiceFieldValueDetailComponent, selector: "valtimo-choice-field-value-detail", ngImport: i0, template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <strong>Choice field</strong>\n <hr />\n </div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Title</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.title }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 pt-3\">\n <strong>Choice field value</strong>\n <hr />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceFieldValue.id }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"name\">Key</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n class=\"form-control\"\n placeholder=\"Choice field value key\"\n [ngClass]=\"{\n 'is-valid': formControls.name.touched && formControls.name.valid,\n 'is-invalid': formControls.name.touched && formControls.name.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.name.touched && formControls.name.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.name.errors.required\">\n Choice field value key is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"value\"\n >Value</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"value\"\n formControlName=\"value\"\n class=\"form-control\"\n placeholder=\"Choice field value\"\n [ngClass]=\"{\n 'is-valid': formControls.value.touched && formControls.value.valid,\n 'is-invalid': formControls.value.touched && formControls.value.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.value.touched && formControls.value.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.value.errors.required\">\n Choice field value is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"sortOrder\"\n >Sequence</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"number\"\n id=\"sortOrder\"\n formControlName=\"sortOrder\"\n class=\"form-control\"\n placeholder=\"Choice field value sequence\"\n [ngClass]=\"{\n 'is-valid': formControls.sortOrder.touched && formControls.sortOrder.valid,\n 'is-invalid': formControls.sortOrder.touched && formControls.sortOrder.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.sortOrder.touched && formControls.sortOrder.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.sortOrder.errors.required\">\n Choice field value sequence is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"deprecated\"\n >Deprecated</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input type=\"checkbox\" formControlName=\"deprecated\" id=\"deprecated\" /><span>\n <label for=\"deprecated\"></label\n ></span>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'../../'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n", styles: [""], components: [{ type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2$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]" }, { type: i4.FieldAutoFocusDirective, selector: "[valtimoFieldAutoFocus]" }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i1$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }] });
|
|
555
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldValueDetailComponent, decorators: [{
|
|
556
|
+
type: Component,
|
|
557
|
+
args: [{ selector: 'valtimo-choice-field-value-detail', template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget *ngIf=\"choiceField\">\n <div>\n <div class=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row mb-3\">\n <div class=\"col-12\">\n <strong>Choice field</strong>\n <hr />\n </div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.id }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Key</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.keyName }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>Title</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceField.title }}</div>\n </div>\n <div class=\"row mb-3\">\n <div class=\"col-12 pt-3\">\n <strong>Choice field value</strong>\n <hr />\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ choiceFieldValue.id }}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"name\">Key</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n valtimoFieldAutoFocus\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n class=\"form-control\"\n placeholder=\"Choice field value key\"\n [ngClass]=\"{\n 'is-valid': formControls.name.touched && formControls.name.valid,\n 'is-invalid': formControls.name.touched && formControls.name.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.name.touched && formControls.name.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.name.errors.required\">\n Choice field value key is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"value\"\n >Value</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"value\"\n formControlName=\"value\"\n class=\"form-control\"\n placeholder=\"Choice field value\"\n [ngClass]=\"{\n 'is-valid': formControls.value.touched && formControls.value.valid,\n 'is-invalid': formControls.value.touched && formControls.value.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.value.touched && formControls.value.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.value.errors.required\">\n Choice field value is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"sortOrder\"\n >Sequence</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"number\"\n id=\"sortOrder\"\n formControlName=\"sortOrder\"\n class=\"form-control\"\n placeholder=\"Choice field value sequence\"\n [ngClass]=\"{\n 'is-valid': formControls.sortOrder.touched && formControls.sortOrder.valid,\n 'is-invalid': formControls.sortOrder.touched && formControls.sortOrder.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.sortOrder.touched && formControls.sortOrder.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.sortOrder.errors.required\">\n Choice field value sequence is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"deprecated\"\n >Deprecated</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input type=\"checkbox\" formControlName=\"deprecated\" id=\"deprecated\" /><span>\n <label for=\"deprecated\"></label\n ></span>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'../../'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n", styles: [""] }]
|
|
558
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i2$1.FormBuilder }, { type: ChoiceFieldService }, { type: i4.AlertService }]; } });
|
|
559
|
+
|
|
560
|
+
/*
|
|
561
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
562
|
+
*
|
|
563
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
564
|
+
* you may not use this file except in compliance with the License.
|
|
565
|
+
* You may obtain a copy of the License at
|
|
566
|
+
*
|
|
567
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
568
|
+
*
|
|
569
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
570
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
571
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
572
|
+
* See the License for the specific language governing permissions and
|
|
573
|
+
* limitations under the License.
|
|
574
|
+
*/
|
|
575
|
+
const routes = [
|
|
576
|
+
{
|
|
577
|
+
path: 'choice-fields',
|
|
578
|
+
data: {
|
|
579
|
+
title: 'Choice fields',
|
|
580
|
+
roles: [ROLE_ADMIN],
|
|
581
|
+
},
|
|
582
|
+
component: ChoiceFieldListComponent,
|
|
583
|
+
canActivate: [AuthGuardService],
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
path: 'choice-fields/field/:id',
|
|
587
|
+
data: {
|
|
588
|
+
title: 'Choice field details',
|
|
589
|
+
roles: [ROLE_ADMIN],
|
|
590
|
+
},
|
|
591
|
+
component: ChoiceFieldDetailComponent,
|
|
592
|
+
canActivate: [AuthGuardService],
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
path: 'choice-fields/create',
|
|
596
|
+
data: {
|
|
597
|
+
title: 'Create new Choice field',
|
|
598
|
+
roles: [ROLE_ADMIN],
|
|
599
|
+
},
|
|
600
|
+
component: ChoiceFieldCreateComponent,
|
|
601
|
+
canActivate: [AuthGuardService],
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
path: 'choice-fields/field/:id/create-value',
|
|
605
|
+
data: {
|
|
606
|
+
title: 'Create new Choice field value',
|
|
607
|
+
roles: [ROLE_ADMIN],
|
|
608
|
+
},
|
|
609
|
+
component: ChoiceFieldValueCreateComponent,
|
|
610
|
+
canActivate: [AuthGuardService],
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
path: 'choice-fields/field/:id/value/:valueId',
|
|
614
|
+
data: {
|
|
615
|
+
title: 'Choice field value details',
|
|
616
|
+
roles: [ROLE_ADMIN],
|
|
617
|
+
},
|
|
618
|
+
component: ChoiceFieldValueDetailComponent,
|
|
619
|
+
canActivate: [AuthGuardService],
|
|
620
|
+
},
|
|
621
|
+
];
|
|
622
|
+
class ChoiceFieldRoutingModule {
|
|
623
|
+
}
|
|
624
|
+
ChoiceFieldRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
625
|
+
ChoiceFieldRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldRoutingModule, imports: [CommonModule, i1$1.RouterModule], exports: [RouterModule] });
|
|
626
|
+
ChoiceFieldRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldRoutingModule, imports: [[CommonModule, RouterModule.forChild(routes)], RouterModule] });
|
|
627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldRoutingModule, decorators: [{
|
|
628
|
+
type: NgModule,
|
|
629
|
+
args: [{
|
|
630
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
631
|
+
exports: [RouterModule],
|
|
632
|
+
}]
|
|
633
|
+
}] });
|
|
634
|
+
|
|
635
|
+
/*
|
|
636
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
637
|
+
*
|
|
638
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
639
|
+
* you may not use this file except in compliance with the License.
|
|
640
|
+
* You may obtain a copy of the License at
|
|
641
|
+
*
|
|
642
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
643
|
+
*
|
|
644
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
645
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
646
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
647
|
+
* See the License for the specific language governing permissions and
|
|
648
|
+
* limitations under the License.
|
|
649
|
+
*/
|
|
650
|
+
class ChoiceFieldModule {
|
|
651
|
+
}
|
|
652
|
+
ChoiceFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
653
|
+
ChoiceFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldModule, declarations: [ChoiceFieldListComponent,
|
|
654
|
+
ChoiceFieldDetailComponent,
|
|
655
|
+
ChoiceFieldCreateComponent,
|
|
656
|
+
ChoiceFieldValueListComponent,
|
|
657
|
+
ChoiceFieldValueCreateComponent,
|
|
658
|
+
ChoiceFieldValueDetailComponent], imports: [CommonModule,
|
|
659
|
+
ListModule,
|
|
660
|
+
WidgetModule,
|
|
661
|
+
FieldAutoFocusModule,
|
|
662
|
+
FormsModule,
|
|
663
|
+
ReactiveFormsModule,
|
|
664
|
+
ChoiceFieldRoutingModule,
|
|
665
|
+
AlertModule,
|
|
666
|
+
TranslateModule] });
|
|
667
|
+
ChoiceFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldModule, imports: [[
|
|
668
|
+
CommonModule,
|
|
669
|
+
ListModule,
|
|
670
|
+
WidgetModule,
|
|
671
|
+
FieldAutoFocusModule,
|
|
672
|
+
FormsModule,
|
|
673
|
+
ReactiveFormsModule,
|
|
674
|
+
ChoiceFieldRoutingModule,
|
|
675
|
+
AlertModule,
|
|
676
|
+
TranslateModule,
|
|
677
|
+
]] });
|
|
678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: ChoiceFieldModule, decorators: [{
|
|
679
|
+
type: NgModule,
|
|
680
|
+
args: [{
|
|
681
|
+
declarations: [
|
|
682
|
+
ChoiceFieldListComponent,
|
|
683
|
+
ChoiceFieldDetailComponent,
|
|
684
|
+
ChoiceFieldCreateComponent,
|
|
685
|
+
ChoiceFieldValueListComponent,
|
|
686
|
+
ChoiceFieldValueCreateComponent,
|
|
687
|
+
ChoiceFieldValueDetailComponent,
|
|
688
|
+
],
|
|
689
|
+
imports: [
|
|
690
|
+
CommonModule,
|
|
691
|
+
ListModule,
|
|
692
|
+
WidgetModule,
|
|
693
|
+
FieldAutoFocusModule,
|
|
694
|
+
FormsModule,
|
|
695
|
+
ReactiveFormsModule,
|
|
696
|
+
ChoiceFieldRoutingModule,
|
|
697
|
+
AlertModule,
|
|
698
|
+
TranslateModule,
|
|
699
|
+
],
|
|
700
|
+
exports: [],
|
|
701
|
+
}]
|
|
702
|
+
}] });
|
|
703
|
+
|
|
704
|
+
/*
|
|
705
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
706
|
+
*
|
|
707
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
708
|
+
* you may not use this file except in compliance with the License.
|
|
709
|
+
* You may obtain a copy of the License at
|
|
710
|
+
*
|
|
711
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
712
|
+
*
|
|
713
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
714
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
715
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
716
|
+
* See the License for the specific language governing permissions and
|
|
717
|
+
* limitations under the License.
|
|
718
|
+
*/
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* Generated bundle index. Do not edit.
|
|
722
|
+
*/
|
|
723
|
+
|
|
724
|
+
export { ChoiceFieldModule, ChoiceFieldService };
|
|
725
|
+
//# sourceMappingURL=valtimo-choice-field.mjs.map
|