@valtimo/choice-field 4.15.2-next-main.8

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