@valtimo/components 4.15.3-next-main.15 → 4.15.3-next-main.16
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/bundles/valtimo-components.umd.js +212 -276
- package/bundles/valtimo-components.umd.js.map +1 -1
- package/bundles/valtimo-components.umd.min.js +2 -2
- package/bundles/valtimo-components.umd.min.js.map +1 -1
- package/esm2015/lib/alert/alert.component.js +4 -6
- package/esm2015/lib/alert/alert.module.js +2 -2
- package/esm2015/lib/alert/alert.service.js +1 -1
- package/esm2015/lib/bpmn-js-diagram/bpmn-js-diagram.component.js +13 -13
- package/esm2015/lib/bpmn-js-diagram/bpmn-js-diagram.module.js +3 -5
- package/esm2015/lib/breadcrumb-navigation/breadcrumb-navigation.component.js +7 -7
- package/esm2015/lib/breadcrumb-navigation/breadcrumb-navigation.module.js +3 -7
- package/esm2015/lib/camunda/form/camunda-form.components.js +2 -2
- package/esm2015/lib/camunda/form/camunda-form.module.js +4 -12
- package/esm2015/lib/camunda/form/custom/camunda-custom-form.component.js +3 -3
- package/esm2015/lib/camunda/form/custom/camunda-custom-form.module.js +4 -10
- package/esm2015/lib/camunda/form/generated/camunda-generated-form.component.js +3 -3
- package/esm2015/lib/camunda/form/generated/camunda-generated-form.module.js +6 -11
- package/esm2015/lib/camunda/form/generated/formfield/boolean/camunda-boolean-formfield.component.js +3 -4
- package/esm2015/lib/camunda/form/generated/formfield/camunda-formfield-generator.directive.js +4 -4
- package/esm2015/lib/camunda/form/generated/formfield/camunda-formfield.service.js +3 -4
- package/esm2015/lib/camunda/form/generated/formfield/choicefield/camunda-choicefield-formfield.component.js +5 -3
- package/esm2015/lib/camunda/form/generated/formfield/date/camunda-date-formfield.component.js +5 -5
- package/esm2015/lib/camunda/form/generated/formfield/enum/camunda-enum-formfield.component.js +3 -4
- package/esm2015/lib/camunda/form/generated/formfield/formfield.model.js +1 -1
- package/esm2015/lib/camunda/form/generated/formfield/long/camunda-long-formfield.component.js +3 -4
- package/esm2015/lib/camunda/form/generated/formfield/string/camunda-string-formfield.component.js +3 -4
- package/esm2015/lib/camunda/form/generated/formfield/textarea/camunda-textarea-formfield.component.js +3 -4
- package/esm2015/lib/camunda/form/generated/formfield/validation/camunda-formfield-validation.component.js +3 -4
- package/esm2015/lib/camunda/form/generated/formfield/validation/date.validators.js +5 -5
- package/esm2015/lib/card/card.component.js +3 -4
- package/esm2015/lib/card/card.module.js +3 -5
- package/esm2015/lib/components.module.js +1 -1
- package/esm2015/lib/data-list/data-list.component.js +2 -3
- package/esm2015/lib/data-list/data-list.module.js +3 -5
- package/esm2015/lib/dropzone/dropzone.component.js +6 -6
- package/esm2015/lib/dropzone/dropzone.module.js +2 -2
- package/esm2015/lib/field-auto-focus/field-auto-focus.directive.js +2 -2
- package/esm2015/lib/field-auto-focus/field-auto-focus.module.js +3 -7
- package/esm2015/lib/file-size/file-size.module.js +3 -5
- package/esm2015/lib/file-size/file-size.pipe.js +3 -10
- package/esm2015/lib/filter-sidebar/filter-sidebar.component.js +1 -1
- package/esm2015/lib/filter-sidebar/filter-sidebar.module.js +3 -5
- package/esm2015/lib/form-io/form-io-builder.component.js +3 -4
- package/esm2015/lib/form-io/form-io-uploader/form-io-uploader-edit-form.js +3 -3
- package/esm2015/lib/form-io/form-io-uploader/form-io-uploader.component.js +7 -5
- package/esm2015/lib/form-io/form-io-uploader/form-io-uploader.formio.js +2 -2
- package/esm2015/lib/form-io/form-io.component.js +21 -16
- package/esm2015/lib/form-io/form-io.module.js +3 -3
- package/esm2015/lib/form-io/formio-config.js +2 -2
- package/esm2015/lib/form-io/services/form-io-dom.service.js +2 -2
- package/esm2015/lib/form-io/services/form-io-state.service.js +1 -1
- package/esm2015/lib/left-sidebar/left-sidebar.component.js +3 -3
- package/esm2015/lib/left-sidebar/left-sidebar.module.js +3 -7
- package/esm2015/lib/list/ListFilterPipe.directive.js +3 -7
- package/esm2015/lib/list/list.component.js +8 -6
- package/esm2015/lib/list/list.module.js +2 -2
- package/esm2015/lib/menu/menu-item-text.component.js +8 -6
- package/esm2015/lib/menu/menu-routing.module.js +3 -5
- package/esm2015/lib/menu/menu.component.js +2 -2
- package/esm2015/lib/menu/menu.init.js +1 -1
- package/esm2015/lib/menu/menu.module.js +3 -8
- package/esm2015/lib/menu/menu.service.js +5 -6
- package/esm2015/lib/menu/submenu-item-text.component.js +2 -2
- package/esm2015/lib/modal/modal.component.js +1 -1
- package/esm2015/lib/modal/modal.module.js +2 -2
- package/esm2015/lib/page-header/page-header.component.js +1 -1
- package/esm2015/lib/page-header/page-header.module.js +3 -7
- package/esm2015/lib/page-title/page-title.component.js +2 -2
- package/esm2015/lib/page-title/page-title.module.js +3 -6
- package/esm2015/lib/progress-bar/progress-bar.component.js +2 -2
- package/esm2015/lib/progress-bar/progress-bar.module.js +3 -5
- package/esm2015/lib/right-sidebar/right-sidebar.component.js +8 -6
- package/esm2015/lib/right-sidebar/right-sidebar.module.js +5 -5
- package/esm2015/lib/searchable-dropdown/searchable-dropdown.component.js +13 -11
- package/esm2015/lib/searchable-dropdown/searchable-dropdown.module.js +2 -2
- package/esm2015/lib/searchable-dropdown-select/searchable-dropdown-select.component.js +3 -3
- package/esm2015/lib/searchable-dropdown-select/searchable-dropdown-select.module.js +2 -2
- package/esm2015/lib/spinner/spinner.component.js +2 -2
- package/esm2015/lib/spinner/spinner.module.js +3 -9
- package/esm2015/lib/timeline/timeline.component.js +2 -2
- package/esm2015/lib/timeline/timeline.module.js +3 -6
- package/esm2015/lib/topbar/topbar.component.js +2 -3
- package/esm2015/lib/topbar/topbar.module.js +3 -6
- package/esm2015/lib/uploader/uploader-drag-drop.directive.js +2 -2
- package/esm2015/lib/uploader/uploader.component.js +3 -4
- package/esm2015/lib/uploader/uploader.module.js +3 -6
- package/esm2015/lib/version/version.service.js +2 -2
- package/esm2015/lib/view-content/type-converters/booleanTypeConverter.js +2 -2
- package/esm2015/lib/view-content/type-converters/dateTypeConverter.js +1 -1
- package/esm2015/lib/view-content/type-converters/enumTypeConverter.js +1 -1
- package/esm2015/lib/view-content/type-converters/relatedFilesTypeConverter.js +1 -1
- package/esm2015/lib/view-content/type-converters/stringReplaceUnderscoreTypeConverter.js +1 -1
- package/esm2015/lib/view-content/type-converters/stringTypeConverter.js +1 -1
- package/esm2015/lib/view-content/type-converters/type-converters.model.js +2 -2
- package/esm2015/lib/view-content/view-content.service.js +3 -3
- package/esm2015/lib/webcam/webcam.component.js +5 -6
- package/esm2015/lib/webcam/webcam.module.js +3 -6
- package/esm2015/lib/widget/widget.component.js +2 -2
- package/esm2015/lib/widget/widget.module.js +3 -5
- package/esm2015/public_api.js +1 -1
- package/esm2015/valtimo-components.js +1 -1
- package/fesm2015/valtimo-components.js +211 -299
- package/fesm2015/valtimo-components.js.map +1 -1
- package/lib/form-io/form-io.component.d.ts +7 -4
- package/package.json +1 -1
- package/valtimo-components.metadata.json +1 -1
|
@@ -50,7 +50,7 @@ class CamundaFormComponent {
|
|
|
50
50
|
CamundaFormComponent.decorators = [
|
|
51
51
|
{ type: Component, args: [{
|
|
52
52
|
selector: 'valtimo-camunda-form',
|
|
53
|
-
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<ng-container *ngIf=\"!componentName && submitted\">\n <valtimo-camunda-generated-form
|
|
53
|
+
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<ng-container *ngIf=\"!componentName && submitted\">\n <valtimo-camunda-generated-form\n *ngIf=\"formFields\"\n [formFields]=\"formFields\"\n (submitted)=\"onSubmitted($event)\"\n >\n </valtimo-camunda-generated-form>\n</ng-container>\n<ng-container *ngIf=\"componentName\">\n <valtimo-custom-form [componentName]=\"componentName\"></valtimo-custom-form>\n</ng-container>\n"
|
|
54
54
|
},] }
|
|
55
55
|
];
|
|
56
56
|
CamundaFormComponent.ctorParameters = () => [];
|
|
@@ -89,7 +89,7 @@ class CamundaCustomFormComponent {
|
|
|
89
89
|
CamundaCustomFormComponent.decorators = [
|
|
90
90
|
{ type: Component, args: [{
|
|
91
91
|
selector: 'valtimo-custom-form',
|
|
92
|
-
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<ng-template #customFormContainer></ng-template>\n
|
|
92
|
+
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<ng-template #customFormContainer></ng-template>\n",
|
|
93
93
|
styles: [""]
|
|
94
94
|
},] }
|
|
95
95
|
];
|
|
@@ -120,15 +120,9 @@ class CamundaCustomFormModule {
|
|
|
120
120
|
}
|
|
121
121
|
CamundaCustomFormModule.decorators = [
|
|
122
122
|
{ type: NgModule, args: [{
|
|
123
|
-
declarations: [
|
|
124
|
-
|
|
125
|
-
],
|
|
126
|
-
imports: [
|
|
127
|
-
CommonModule
|
|
128
|
-
],
|
|
129
|
-
exports: [
|
|
130
|
-
CamundaCustomFormComponent
|
|
131
|
-
]
|
|
123
|
+
declarations: [CamundaCustomFormComponent],
|
|
124
|
+
imports: [CommonModule],
|
|
125
|
+
exports: [CamundaCustomFormComponent],
|
|
132
126
|
},] }
|
|
133
127
|
];
|
|
134
128
|
|
|
@@ -161,8 +155,8 @@ function minDate(minDateIn) {
|
|
|
161
155
|
return {
|
|
162
156
|
minDate: {
|
|
163
157
|
minDate: momentMinDate.format(DATE_FORMAT),
|
|
164
|
-
actual: controlDate.format(DATE_FORMAT)
|
|
165
|
-
}
|
|
158
|
+
actual: controlDate.format(DATE_FORMAT),
|
|
159
|
+
},
|
|
166
160
|
};
|
|
167
161
|
}
|
|
168
162
|
else {
|
|
@@ -181,8 +175,8 @@ function maxDate(maxDateIn) {
|
|
|
181
175
|
return {
|
|
182
176
|
maxDate: {
|
|
183
177
|
maxDate: momentMaxDate.format(DATE_FORMAT),
|
|
184
|
-
actual: controlDate.format(DATE_FORMAT)
|
|
185
|
-
}
|
|
178
|
+
actual: controlDate.format(DATE_FORMAT),
|
|
179
|
+
},
|
|
186
180
|
};
|
|
187
181
|
}
|
|
188
182
|
else {
|
|
@@ -207,8 +201,7 @@ function maxDate(maxDateIn) {
|
|
|
207
201
|
* limitations under the License.
|
|
208
202
|
*/
|
|
209
203
|
class CamundaFormfieldService {
|
|
210
|
-
constructor() {
|
|
211
|
-
}
|
|
204
|
+
constructor() { }
|
|
212
205
|
isFormFieldDisabled(formField) {
|
|
213
206
|
return formField.validationConstraints.filter(vc => vc.name === 'readonly').length > 0;
|
|
214
207
|
}
|
|
@@ -249,7 +242,7 @@ class CamundaFormfieldService {
|
|
|
249
242
|
CamundaFormfieldService.ɵprov = ɵɵdefineInjectable({ factory: function CamundaFormfieldService_Factory() { return new CamundaFormfieldService(); }, token: CamundaFormfieldService, providedIn: "root" });
|
|
250
243
|
CamundaFormfieldService.decorators = [
|
|
251
244
|
{ type: Injectable, args: [{
|
|
252
|
-
providedIn: 'root'
|
|
245
|
+
providedIn: 'root',
|
|
253
246
|
},] }
|
|
254
247
|
];
|
|
255
248
|
CamundaFormfieldService.ctorParameters = () => [];
|
|
@@ -285,7 +278,7 @@ class CamundaGeneratedFormComponent {
|
|
|
285
278
|
this.formFields.forEach(formField => {
|
|
286
279
|
const control = new FormControl({
|
|
287
280
|
value: formField.defaultValue,
|
|
288
|
-
disabled: this.camundaFormFieldService.isFormFieldDisabled(formField)
|
|
281
|
+
disabled: this.camundaFormFieldService.isFormFieldDisabled(formField),
|
|
289
282
|
}, this.camundaFormFieldService.getValidatorTypes(formField));
|
|
290
283
|
group.addControl(formField.id, control);
|
|
291
284
|
});
|
|
@@ -306,7 +299,7 @@ class CamundaGeneratedFormComponent {
|
|
|
306
299
|
CamundaGeneratedFormComponent.decorators = [
|
|
307
300
|
{ type: Component, args: [{
|
|
308
301
|
selector: 'valtimo-camunda-generated-form',
|
|
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<form [formGroup]=\"formGroup\" (ngSubmit)=\"handleSubmit($event)\">\n <ng-container\n
|
|
302
|
+
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<form [formGroup]=\"formGroup\" (ngSubmit)=\"handleSubmit($event)\">\n <ng-container\n *ngFor=\"let formField of formFields\"\n valtimoCamundaFormfieldGenerator\n [formGroup]=\"formGroup\"\n [formField]=\"formField\"\n >\n <ng-content></ng-content>\n </ng-container>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-sm-12\">\n <div class=\"text-right\">\n <button\n class=\"btn btn-space btn-default float-left\"\n type=\"button\"\n (click)=\"back()\"\n id=\"back-button\"\n >\n Back\n </button>\n <button\n class=\"btn btn-space btn-secondary\"\n type=\"button\"\n (click)=\"reset()\"\n id=\"reset-button\"\n >\n Reset\n </button>\n <button\n class=\"btn btn-space btn-primary\"\n [disabled]=\"!formGroup.disabled && !formGroup.valid\"\n type=\"submit\"\n id=\"submit-button\"\n >\n Submit\n </button>\n </div>\n </div>\n </div>\n</form>\n"
|
|
310
303
|
},] }
|
|
311
304
|
];
|
|
312
305
|
CamundaGeneratedFormComponent.ctorParameters = () => [
|
|
@@ -335,13 +328,12 @@ CamundaGeneratedFormComponent.propDecorators = {
|
|
|
335
328
|
* limitations under the License.
|
|
336
329
|
*/
|
|
337
330
|
class CamundaStringFormfieldComponent {
|
|
338
|
-
constructor() {
|
|
339
|
-
}
|
|
331
|
+
constructor() { }
|
|
340
332
|
}
|
|
341
333
|
CamundaStringFormfieldComponent.decorators = [
|
|
342
334
|
{ type: Component, args: [{
|
|
343
335
|
selector: 'valtimo-camunda-string-formfield',
|
|
344
|
-
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=\"form-group row\" *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input
|
|
336
|
+
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=\"form-group row\" *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n id=\"{{ formField.id }}\"\n class=\"form-control\"\n type=\"text\"\n [attr.placeholder]=\"formField.defaultValue\"\n [formControlName]=\"formField.id\"\n />\n <valtimo-camunda-formfield-validation [formGroup]=\"formGroup\" [formField]=\"formField\">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n"
|
|
345
337
|
},] }
|
|
346
338
|
];
|
|
347
339
|
CamundaStringFormfieldComponent.ctorParameters = () => [];
|
|
@@ -362,13 +354,12 @@ CamundaStringFormfieldComponent.ctorParameters = () => [];
|
|
|
362
354
|
* limitations under the License.
|
|
363
355
|
*/
|
|
364
356
|
class CamundaBooleanFormfieldComponent {
|
|
365
|
-
constructor() {
|
|
366
|
-
}
|
|
357
|
+
constructor() { }
|
|
367
358
|
}
|
|
368
359
|
CamundaBooleanFormfieldComponent.decorators = [
|
|
369
360
|
{ type: Component, args: [{
|
|
370
361
|
selector: 'valtimo-camunda-boolean-formfield',
|
|
371
|
-
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=\"form-group row\" *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6 form-check mt-1\">\n <label for=\"yes_{{ formField.id }}\" class=\"custom-control custom-radio custom-control-inline\">\n <input\n class=\"custom-control-input\"\n id=\"yes_{{ formField.id }}\"\n type=\"radio\"\n [value]=\"true\"\n [formControlName]=\"formField.id\"/>\n <span class=\"custom-control-label custom-control-color\">Yes</span>\n </label>\n <label for=\"no_{{ formField.id }}\" class=\"custom-control custom-radio custom-control-inline\">\n <input\n class=\"custom-control-input\"\n id=\"no_{{ formField.id }}\"\n type=\"radio\"\n [value]=\"false\"\n [formControlName]=\"formField.id\"/>\n <span class=\"custom-control-label custom-control-color\">No</span>\n </label>\n <valtimo-camunda-formfield-validation
|
|
362
|
+
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=\"form-group row\" *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6 form-check mt-1\">\n <label for=\"yes_{{ formField.id }}\" class=\"custom-control custom-radio custom-control-inline\">\n <input\n class=\"custom-control-input\"\n id=\"yes_{{ formField.id }}\"\n type=\"radio\"\n [value]=\"true\"\n [formControlName]=\"formField.id\"\n />\n <span class=\"custom-control-label custom-control-color\">Yes</span>\n </label>\n <label for=\"no_{{ formField.id }}\" class=\"custom-control custom-radio custom-control-inline\">\n <input\n class=\"custom-control-input\"\n id=\"no_{{ formField.id }}\"\n type=\"radio\"\n [value]=\"false\"\n [formControlName]=\"formField.id\"\n />\n <span class=\"custom-control-label custom-control-color\">No</span>\n </label>\n <valtimo-camunda-formfield-validation [formGroup]=\"formGroup\" [formField]=\"formField\">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n"
|
|
372
363
|
},] }
|
|
373
364
|
];
|
|
374
365
|
CamundaBooleanFormfieldComponent.ctorParameters = () => [];
|
|
@@ -402,9 +393,9 @@ class CamundaDateFormfieldComponent {
|
|
|
402
393
|
componentIcon: '.mdi.mdi-calendar',
|
|
403
394
|
navIcons: {
|
|
404
395
|
rightIcon: 'mdi mdi-chevron-right',
|
|
405
|
-
leftIcon: 'mdi mdi-chevron-left'
|
|
396
|
+
leftIcon: 'mdi mdi-chevron-left',
|
|
406
397
|
},
|
|
407
|
-
format: 'dd-mm-yyyy'
|
|
398
|
+
format: 'dd-mm-yyyy',
|
|
408
399
|
};
|
|
409
400
|
}
|
|
410
401
|
ngAfterViewInit() {
|
|
@@ -421,7 +412,7 @@ class CamundaDateFormfieldComponent {
|
|
|
421
412
|
$(this.INPUT_SELECTOR).datetimepicker(this.datePickerOptions);
|
|
422
413
|
$(this.INPUT_SELECTOR).on('changeDate', function (e) {
|
|
423
414
|
formGroup.patchValue({
|
|
424
|
-
[formField.id]: moment$1(e.date.valueOf()).format('DD/MM/YYYY')
|
|
415
|
+
[formField.id]: moment$1(e.date.valueOf()).format('DD/MM/YYYY'),
|
|
425
416
|
});
|
|
426
417
|
});
|
|
427
418
|
}
|
|
@@ -429,7 +420,7 @@ class CamundaDateFormfieldComponent {
|
|
|
429
420
|
CamundaDateFormfieldComponent.decorators = [
|
|
430
421
|
{ type: Component, args: [{
|
|
431
422
|
selector: 'valtimo-camunda-date-formfield',
|
|
432
|
-
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=\"form-group row\" *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6 pt1\">\n <input\n type=\"input\"\n class=\"form-control\"\n data-min-view=\"2\"\n id=\"{{ formField.id }}\"\n autocomplete=\"off\"\n [formControlName]=\"formField.id\"/>\n <valtimo-camunda-formfield-validation
|
|
423
|
+
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=\"form-group row\" *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6 pt1\">\n <input\n type=\"input\"\n class=\"form-control\"\n data-min-view=\"2\"\n id=\"{{ formField.id }}\"\n autocomplete=\"off\"\n [formControlName]=\"formField.id\"\n />\n <valtimo-camunda-formfield-validation [formGroup]=\"formGroup\" [formField]=\"formField\">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n"
|
|
433
424
|
},] }
|
|
434
425
|
];
|
|
435
426
|
CamundaDateFormfieldComponent.ctorParameters = () => [
|
|
@@ -452,13 +443,12 @@ CamundaDateFormfieldComponent.ctorParameters = () => [
|
|
|
452
443
|
* limitations under the License.
|
|
453
444
|
*/
|
|
454
445
|
class CamundaLongFormfieldComponent {
|
|
455
|
-
constructor() {
|
|
456
|
-
}
|
|
446
|
+
constructor() { }
|
|
457
447
|
}
|
|
458
448
|
CamundaLongFormfieldComponent.decorators = [
|
|
459
449
|
{ type: Component, args: [{
|
|
460
450
|
selector: 'valtimo-camunda-long-formfield',
|
|
461
|
-
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=\"form-group row\" *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input
|
|
451
|
+
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=\"form-group row\" *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n id=\"{{ formField.id }}\"\n class=\"form-control\"\n type=\"number\"\n [attr.placeholder]=\"formField.defaultValue\"\n [formControlName]=\"formField.id\"\n />\n <valtimo-camunda-formfield-validation [formGroup]=\"formGroup\" [formField]=\"formField\">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n"
|
|
462
452
|
},] }
|
|
463
453
|
];
|
|
464
454
|
CamundaLongFormfieldComponent.ctorParameters = () => [];
|
|
@@ -479,8 +469,7 @@ CamundaLongFormfieldComponent.ctorParameters = () => [];
|
|
|
479
469
|
* limitations under the License.
|
|
480
470
|
*/
|
|
481
471
|
class CamundaEnumFormfieldComponent {
|
|
482
|
-
constructor() {
|
|
483
|
-
}
|
|
472
|
+
constructor() { }
|
|
484
473
|
ngOnInit() {
|
|
485
474
|
this.valueKeys = Object.keys(this.formField.type.values);
|
|
486
475
|
}
|
|
@@ -488,7 +477,7 @@ class CamundaEnumFormfieldComponent {
|
|
|
488
477
|
CamundaEnumFormfieldComponent.decorators = [
|
|
489
478
|
{ type: Component, args: [{
|
|
490
479
|
selector: 'valtimo-camunda-enum-formfield',
|
|
491
|
-
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=\"form-group row\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select
|
|
480
|
+
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=\"form-group row\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select class=\"form-control\" id=\"{{ formField.id }}\" [formControlName]=\"formField.id\">\n <option selected=\"selected\" value=\"\"></option>\n <option *ngFor=\"let key of valueKeys\" [value]=\"key\" id=\"option_{{ key }}\">\n {{ formField.type.values[key] }}\n </option>\n </select>\n <valtimo-camunda-formfield-validation [formGroup]=\"formGroup\" [formField]=\"formField\">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n"
|
|
492
481
|
},] }
|
|
493
482
|
];
|
|
494
483
|
CamundaEnumFormfieldComponent.ctorParameters = () => [];
|
|
@@ -509,13 +498,12 @@ CamundaEnumFormfieldComponent.ctorParameters = () => [];
|
|
|
509
498
|
* limitations under the License.
|
|
510
499
|
*/
|
|
511
500
|
class CamundaTextareaFormfieldComponent {
|
|
512
|
-
constructor() {
|
|
513
|
-
}
|
|
501
|
+
constructor() { }
|
|
514
502
|
}
|
|
515
503
|
CamundaTextareaFormfieldComponent.decorators = [
|
|
516
504
|
{ type: Component, args: [{
|
|
517
505
|
selector: 'valtimo-camunda-textarea-formfield',
|
|
518
|
-
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=\"form-group row\" *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <textarea
|
|
506
|
+
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=\"form-group row\" *ngIf=\"formGroup\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <textarea\n id=\"{{ formField.id }}\"\n class=\"form-control\"\n [attr.placeholder]=\"formField.defaultValue\"\n [formControlName]=\"formField.id\"\n ></textarea>\n <valtimo-camunda-formfield-validation [formGroup]=\"formGroup\" [formField]=\"formField\">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n"
|
|
519
507
|
},] }
|
|
520
508
|
];
|
|
521
509
|
CamundaTextareaFormfieldComponent.ctorParameters = () => [];
|
|
@@ -541,7 +529,9 @@ class CamundaChoicefieldFormfieldComponent {
|
|
|
541
529
|
this.choicefieldValues = [];
|
|
542
530
|
}
|
|
543
531
|
ngOnInit() {
|
|
544
|
-
this.choicefieldService
|
|
532
|
+
this.choicefieldService
|
|
533
|
+
.getChoiceFieldValuesByName(this.formField.properties['choicefield'])
|
|
534
|
+
.subscribe(data => {
|
|
545
535
|
this.choicefieldValues = data;
|
|
546
536
|
});
|
|
547
537
|
}
|
|
@@ -549,7 +539,7 @@ class CamundaChoicefieldFormfieldComponent {
|
|
|
549
539
|
CamundaChoicefieldFormfieldComponent.decorators = [
|
|
550
540
|
{ type: Component, args: [{
|
|
551
541
|
selector: 'valtimo-camunda-choicefield-formfield',
|
|
552
|
-
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=\"form-group row\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select
|
|
542
|
+
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=\"form-group row\" [formGroup]=\"formGroup\">\n <label for=\"{{ formField.id }}\" class=\"col-12 col-sm-3 col-form-label text-sm-right\">\n {{ formField.label }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select class=\"form-control\" id=\"{{ formField.id }}\" [formControlName]=\"formField.id\">\n <option selected=\"selected\" value=\"\"></option>\n <ng-container *ngFor=\"let choicefieldValue of choicefieldValues\">\n <option\n *ngIf=\"!choicefieldValue.deprecated\"\n [value]=\"choicefieldValue.value\"\n id=\"option_{{ choicefieldValue.value }}\"\n >\n {{ choicefieldValue.name }}\n </option>\n </ng-container>\n </select>\n <valtimo-camunda-formfield-validation [formGroup]=\"formGroup\" [formField]=\"formField\">\n </valtimo-camunda-formfield-validation>\n </div>\n</div>\n"
|
|
553
543
|
},] }
|
|
554
544
|
];
|
|
555
545
|
CamundaChoicefieldFormfieldComponent.ctorParameters = () => [
|
|
@@ -582,7 +572,7 @@ class CamundaFormfieldGeneratorDirective {
|
|
|
582
572
|
long: CamundaLongFormfieldComponent,
|
|
583
573
|
enum: CamundaEnumFormfieldComponent,
|
|
584
574
|
textarea: CamundaTextareaFormfieldComponent,
|
|
585
|
-
choicefield: CamundaChoicefieldFormfieldComponent
|
|
575
|
+
choicefield: CamundaChoicefieldFormfieldComponent,
|
|
586
576
|
};
|
|
587
577
|
}
|
|
588
578
|
ngOnInit() {
|
|
@@ -599,7 +589,7 @@ class CamundaFormfieldGeneratorDirective {
|
|
|
599
589
|
}
|
|
600
590
|
CamundaFormfieldGeneratorDirective.decorators = [
|
|
601
591
|
{ type: Directive, args: [{
|
|
602
|
-
selector: '[valtimoCamundaFormfieldGenerator]'
|
|
592
|
+
selector: '[valtimoCamundaFormfieldGenerator]',
|
|
603
593
|
},] }
|
|
604
594
|
];
|
|
605
595
|
CamundaFormfieldGeneratorDirective.ctorParameters = () => [
|
|
@@ -627,8 +617,7 @@ CamundaFormfieldGeneratorDirective.propDecorators = {
|
|
|
627
617
|
* limitations under the License.
|
|
628
618
|
*/
|
|
629
619
|
class CamundaFormfieldValidationComponent {
|
|
630
|
-
constructor() {
|
|
631
|
-
}
|
|
620
|
+
constructor() { }
|
|
632
621
|
ngOnInit() {
|
|
633
622
|
this.formControl = this.formGroup.get(this.formField.id);
|
|
634
623
|
}
|
|
@@ -636,7 +625,7 @@ class CamundaFormfieldValidationComponent {
|
|
|
636
625
|
CamundaFormfieldValidationComponent.decorators = [
|
|
637
626
|
{ type: Component, args: [{
|
|
638
627
|
selector: 'valtimo-camunda-formfield-validation',
|
|
639
|
-
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<ul
|
|
628
|
+
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<ul\n class=\"parsley-errors-list filled\"\n *ngIf=\"formControl.invalid && (formControl.dirty || formControl.touched)\"\n>\n <li *ngIf=\"formControl.errors.required\">This field is required.</li>\n <li *ngIf=\"formControl.errors.minlength\">\n This field should be more than {{ formControl.errors.minlength.requiredLength }} characters.\n </li>\n <li *ngIf=\"formControl.errors.maxlength\">\n This field cannot be more than {{ formControl.errors.maxlength.requiredLength }} characters.\n </li>\n <li *ngIf=\"formControl.errors.min\">\n This field should be more than {{ formControl.errors.min.min }}.\n </li>\n <li *ngIf=\"formControl.errors.max\">\n This field should be less or equal to {{ formControl.errors.max.max }}.\n </li>\n <li *ngIf=\"formControl.errors.minDate\">\n This field should be more than {{ formControl.errors.minDate.minDate }}.\n </li>\n <li *ngIf=\"formControl.errors.maxDate\">\n This field should be less or equal to {{ formControl.errors.maxDate.maxDate }}.\n </li>\n</ul>\n"
|
|
640
629
|
},] }
|
|
641
630
|
];
|
|
642
631
|
CamundaFormfieldValidationComponent.ctorParameters = () => [];
|
|
@@ -674,15 +663,10 @@ CamundaGeneratedFormModule.decorators = [
|
|
|
674
663
|
CamundaTextareaFormfieldComponent,
|
|
675
664
|
CamundaChoicefieldFormfieldComponent,
|
|
676
665
|
CamundaFormfieldValidationComponent,
|
|
677
|
-
CamundaGeneratedFormComponent
|
|
678
|
-
],
|
|
679
|
-
imports: [
|
|
680
|
-
CommonModule,
|
|
681
|
-
ReactiveFormsModule
|
|
682
|
-
],
|
|
683
|
-
exports: [
|
|
684
|
-
CamundaGeneratedFormComponent
|
|
666
|
+
CamundaGeneratedFormComponent,
|
|
685
667
|
],
|
|
668
|
+
imports: [CommonModule, ReactiveFormsModule],
|
|
669
|
+
exports: [CamundaGeneratedFormComponent],
|
|
686
670
|
entryComponents: [
|
|
687
671
|
CamundaStringFormfieldComponent,
|
|
688
672
|
CamundaBooleanFormfieldComponent,
|
|
@@ -690,8 +674,8 @@ CamundaGeneratedFormModule.decorators = [
|
|
|
690
674
|
CamundaLongFormfieldComponent,
|
|
691
675
|
CamundaEnumFormfieldComponent,
|
|
692
676
|
CamundaTextareaFormfieldComponent,
|
|
693
|
-
CamundaChoicefieldFormfieldComponent
|
|
694
|
-
]
|
|
677
|
+
CamundaChoicefieldFormfieldComponent,
|
|
678
|
+
],
|
|
695
679
|
},] }
|
|
696
680
|
];
|
|
697
681
|
|
|
@@ -714,17 +698,9 @@ class CamundaFormModule {
|
|
|
714
698
|
}
|
|
715
699
|
CamundaFormModule.decorators = [
|
|
716
700
|
{ type: NgModule, args: [{
|
|
717
|
-
declarations: [
|
|
718
|
-
|
|
719
|
-
],
|
|
720
|
-
imports: [
|
|
721
|
-
CommonModule,
|
|
722
|
-
CamundaGeneratedFormModule,
|
|
723
|
-
CamundaCustomFormModule
|
|
724
|
-
],
|
|
725
|
-
exports: [
|
|
726
|
-
CamundaFormComponent
|
|
727
|
-
]
|
|
701
|
+
declarations: [CamundaFormComponent],
|
|
702
|
+
imports: [CommonModule, CamundaGeneratedFormModule, CamundaCustomFormModule],
|
|
703
|
+
exports: [CamundaFormComponent],
|
|
728
704
|
},] }
|
|
729
705
|
];
|
|
730
706
|
|
|
@@ -744,8 +720,7 @@ CamundaFormModule.decorators = [
|
|
|
744
720
|
* limitations under the License.
|
|
745
721
|
*/
|
|
746
722
|
class TopbarComponent {
|
|
747
|
-
constructor() {
|
|
748
|
-
}
|
|
723
|
+
constructor() { }
|
|
749
724
|
}
|
|
750
725
|
TopbarComponent.decorators = [
|
|
751
726
|
{ type: Component, args: [{
|
|
@@ -776,11 +751,8 @@ class TopbarModule {
|
|
|
776
751
|
TopbarModule.decorators = [
|
|
777
752
|
{ type: NgModule, args: [{
|
|
778
753
|
declarations: [TopbarComponent],
|
|
779
|
-
imports: [
|
|
780
|
-
|
|
781
|
-
RouterModule
|
|
782
|
-
],
|
|
783
|
-
exports: [TopbarComponent]
|
|
754
|
+
imports: [CommonModule, RouterModule],
|
|
755
|
+
exports: [TopbarComponent],
|
|
784
756
|
},] }
|
|
785
757
|
];
|
|
786
758
|
|
|
@@ -825,7 +797,7 @@ class MenuService {
|
|
|
825
797
|
menuItems.push(menuItem);
|
|
826
798
|
});
|
|
827
799
|
menuItems = this.sortMenuItems(menuItems);
|
|
828
|
-
this.appendDossierSubMenuItems(menuItems).subscribe(value => menuItems = this.applyMenuRoleSecurity(value));
|
|
800
|
+
this.appendDossierSubMenuItems(menuItems).subscribe(value => (menuItems = this.applyMenuRoleSecurity(value)));
|
|
829
801
|
return menuItems;
|
|
830
802
|
}
|
|
831
803
|
sortMenuItems(menuItems) {
|
|
@@ -837,13 +809,12 @@ class MenuService {
|
|
|
837
809
|
return new Observable(subscriber => {
|
|
838
810
|
this.logger.debug('appendDossierSubMenuItems');
|
|
839
811
|
this.documentService.getAllDefinitions().subscribe(definitions => {
|
|
840
|
-
const dossierMenuItems = definitions.content
|
|
841
|
-
.map((definition, index) => ({
|
|
812
|
+
const dossierMenuItems = definitions.content.map((definition, index) => ({
|
|
842
813
|
link: ['/dossiers/' + definition.id.name],
|
|
843
814
|
title: definition.schema.title,
|
|
844
815
|
iconClass: 'icon mdi mdi-dot-circle',
|
|
845
816
|
sequence: index,
|
|
846
|
-
show: true
|
|
817
|
+
show: true,
|
|
847
818
|
}));
|
|
848
819
|
this.logger.debug('found dossierMenuItems', dossierMenuItems);
|
|
849
820
|
const menuItemIndex = menuItems.findIndex(({ title }) => title === 'Dossiers');
|
|
@@ -890,7 +861,7 @@ class MenuService {
|
|
|
890
861
|
MenuService.ɵprov = ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(ɵɵinject(ConfigService), ɵɵinject(DocumentService), ɵɵinject(UserProviderService), ɵɵinject(NGXLogger)); }, token: MenuService, providedIn: "root" });
|
|
891
862
|
MenuService.decorators = [
|
|
892
863
|
{ type: Injectable, args: [{
|
|
893
|
-
providedIn: 'root'
|
|
864
|
+
providedIn: 'root',
|
|
894
865
|
},] }
|
|
895
866
|
];
|
|
896
867
|
MenuService.ctorParameters = () => [
|
|
@@ -920,10 +891,8 @@ class MenuRoutingModule {
|
|
|
920
891
|
}
|
|
921
892
|
MenuRoutingModule.decorators = [
|
|
922
893
|
{ type: NgModule, args: [{
|
|
923
|
-
imports: [
|
|
924
|
-
|
|
925
|
-
],
|
|
926
|
-
exports: [RouterModule]
|
|
894
|
+
imports: [RouterModule.forChild(routes)],
|
|
895
|
+
exports: [RouterModule],
|
|
927
896
|
},] }
|
|
928
897
|
];
|
|
929
898
|
|
|
@@ -951,7 +920,7 @@ class MenuComponent {
|
|
|
951
920
|
}
|
|
952
921
|
ngOnInit() {
|
|
953
922
|
this.openRouterSubscription();
|
|
954
|
-
this.menuItemSubscription = this.menuService.menuItems$.subscribe(value => this.menuItems = value);
|
|
923
|
+
this.menuItemSubscription = this.menuService.menuItems$.subscribe(value => (this.menuItems = value));
|
|
955
924
|
}
|
|
956
925
|
ngOnDestroy() {
|
|
957
926
|
this.routerSubscription.unsubscribe();
|
|
@@ -1010,11 +979,13 @@ MenuItemTextComponent.decorators = [
|
|
|
1010
979
|
{ type: Component, args: [{
|
|
1011
980
|
selector: 'valtimo-menu-item-text',
|
|
1012
981
|
template: `
|
|
1013
|
-
<i
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
982
|
+
<i
|
|
983
|
+
class="{{ menuItem.iconClass }}"
|
|
984
|
+
container="body"
|
|
985
|
+
placement="right"
|
|
986
|
+
ngbTooltip="{{ menuItem.title | translate }}"
|
|
987
|
+
autoClose="true"
|
|
988
|
+
>
|
|
1018
989
|
</i>
|
|
1019
990
|
<span>{{ menuItem.title | translate }}</span>
|
|
1020
991
|
`
|
|
@@ -1046,7 +1017,7 @@ SubmenuItemTextComponent.decorators = [
|
|
|
1046
1017
|
selector: 'valtimo-submenu-item-text',
|
|
1047
1018
|
template: `
|
|
1048
1019
|
<span [ngClass]="submenuItem.textClass">
|
|
1049
|
-
|
|
1020
|
+
{{ submenuItem.title | translate }}
|
|
1050
1021
|
<ng-container *ngIf="!submenuItem.link">></ng-container>
|
|
1051
1022
|
</span>
|
|
1052
1023
|
`
|
|
@@ -1076,14 +1047,9 @@ class MenuModule {
|
|
|
1076
1047
|
MenuModule.decorators = [
|
|
1077
1048
|
{ type: NgModule, args: [{
|
|
1078
1049
|
declarations: [MenuComponent, MenuItemTextComponent, SubmenuItemTextComponent],
|
|
1079
|
-
imports: [
|
|
1080
|
-
CommonModule,
|
|
1081
|
-
RouterModule,
|
|
1082
|
-
NgbTooltipModule,
|
|
1083
|
-
TranslateModule
|
|
1084
|
-
],
|
|
1050
|
+
imports: [CommonModule, RouterModule, NgbTooltipModule, TranslateModule],
|
|
1085
1051
|
exports: [MenuComponent],
|
|
1086
|
-
providers: []
|
|
1052
|
+
providers: [],
|
|
1087
1053
|
},] }
|
|
1088
1054
|
];
|
|
1089
1055
|
|
|
@@ -1147,7 +1113,7 @@ class VersionService {
|
|
|
1147
1113
|
VersionService.ɵprov = ɵɵdefineInjectable({ factory: function VersionService_Factory() { return new VersionService(ɵɵinject(HttpClient)); }, token: VersionService, providedIn: "root" });
|
|
1148
1114
|
VersionService.decorators = [
|
|
1149
1115
|
{ type: Injectable, args: [{
|
|
1150
|
-
providedIn: 'root'
|
|
1116
|
+
providedIn: 'root',
|
|
1151
1117
|
},] }
|
|
1152
1118
|
];
|
|
1153
1119
|
VersionService.ctorParameters = () => [
|
|
@@ -1187,7 +1153,7 @@ class RightSidebarComponent {
|
|
|
1187
1153
|
'emailNotificationOnThursday',
|
|
1188
1154
|
'emailNotificationOnFriday',
|
|
1189
1155
|
'emailNotificationOnSaturday',
|
|
1190
|
-
'emailNotificationOnSunday'
|
|
1156
|
+
'emailNotificationOnSunday',
|
|
1191
1157
|
];
|
|
1192
1158
|
this.settingsForm = this.formBuilder.group({
|
|
1193
1159
|
taskNotifications: new FormControl(false),
|
|
@@ -1198,13 +1164,15 @@ class RightSidebarComponent {
|
|
|
1198
1164
|
emailNotificationOnThursday: new FormControl(false),
|
|
1199
1165
|
emailNotificationOnFriday: new FormControl(false),
|
|
1200
1166
|
emailNotificationOnSaturday: new FormControl(false),
|
|
1201
|
-
emailNotificationOnSunday: new FormControl(false)
|
|
1167
|
+
emailNotificationOnSunday: new FormControl(false),
|
|
1202
1168
|
});
|
|
1203
1169
|
this.getUserSettings();
|
|
1204
1170
|
}
|
|
1205
1171
|
loadContextSwitch() {
|
|
1206
|
-
combineLatest([
|
|
1207
|
-
.
|
|
1172
|
+
combineLatest([
|
|
1173
|
+
this.contextService.getUserContexts(),
|
|
1174
|
+
this.contextService.getUserContextActive(),
|
|
1175
|
+
]).subscribe(([userContexts, userContextActive]) => {
|
|
1208
1176
|
this.userContextActive = userContextActive;
|
|
1209
1177
|
this.userContexts = userContexts;
|
|
1210
1178
|
});
|
|
@@ -1262,7 +1230,7 @@ class RightSidebarComponent {
|
|
|
1262
1230
|
RightSidebarComponent.decorators = [
|
|
1263
1231
|
{ type: Component, args: [{
|
|
1264
1232
|
selector: 'valtimo-right-sidebar',
|
|
1265
|
-
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<nav class=\"be-right-sidebar\">\n <div class=\"sb-content\">\n <div class=\"tab-navigation\">\n <ul class=\"nav nav-tabs nav-justified\" role=\"tablist\">\n <li class=\"nav-item\" role=\"presentation\">\n <a
|
|
1233
|
+
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<nav class=\"be-right-sidebar\">\n <div class=\"sb-content\">\n <div class=\"tab-navigation\">\n <ul class=\"nav nav-tabs nav-justified\" role=\"tablist\">\n <li class=\"nav-item\" role=\"presentation\">\n <a\n class=\"nav-link active\"\n href=\"#account\"\n aria-controls=\"account\"\n role=\"tab\"\n data-toggle=\"tab\"\n translate=\"account.title\"\n ></a>\n </li>\n <li class=\"nav-item\" role=\"presentation\">\n <a\n class=\"nav-link\"\n (click)=\"loadUserSettingsTab()\"\n href=\"#settings\"\n aria-controls=\"settings\"\n role=\"tab\"\n data-toggle=\"tab\"\n translate=\"settings.title\"\n ></a>\n </li>\n </ul>\n </div>\n <div class=\"tab-panel\">\n <div class=\"tab-content\">\n <!-- account -->\n <div class=\"tab-pane tab-account active\" id=\"account\" role=\"tabpanel\">\n <div class=\"p-3 be-scroller-settings\" *ngIf=\"userIdentity\">\n <div class=\"content\">\n <div class=\"category-title border-0 m-0\">\n <div class=\"p-0 text-muted\">\n <dl class=\"row mb-0\">\n <dt class=\"col-sm-3\">Email</dt>\n <dd class=\"col-sm-9 mb-0 text-bold\">{{ userIdentity.email }}</dd>\n <ng-container *ngIf=\"userIdentity.username\">\n <dt class=\"col-sm-3\">Username</dt>\n <dd class=\"col-sm-9 mb-0 text-bold\">{{ userIdentity.username }}</dd>\n </ng-container>\n <dt class=\"col-sm-3\">Name</dt>\n <dd class=\"col-sm-9 mb-0 text-bold\">\n {{ userIdentity.firstName + ' ' + userIdentity.lastName }}\n </dd>\n </dl>\n </div>\n </div>\n <!-- context switch -->\n <ul class=\"settings-list\" *ngIf=\"userContexts?.length > 1\">\n <li ngbTooltip=\"{{ 'settings.context.title' | translate }}\">\n <select\n class=\"form-control\"\n #contextSelect\n (change)=\"setUserContext(+contextSelect.value)\"\n >\n <option\n *ngFor=\"let context of userContexts\"\n [value]=\"context.id\"\n [selected]=\"context.id === userContextActive.id\"\n >\n {{ context.name }}\n </option>\n </select>\n </li>\n </ul>\n <ul class=\"list-group list-group-flush m-0\">\n <li class=\"bg-transparent list-group-item px-0\">\n <a\n href=\"https://docs.valtimo.nl\"\n target=\"_blank\"\n class=\"d-block\"\n translate=\"account.links.help\"\n ></a>\n </li>\n <li class=\"bg-transparent list-group-item px-0\">\n <a\n href=\"https://www.valtimo.nl/feedback/\"\n target=\"_blank\"\n class=\"d-block\"\n translate=\"account.links.feedback\"\n ></a>\n </li>\n <li class=\"bg-transparent list-group-item px-0\">\n <a\n href=\"https://forum.valtimo.nl\"\n target=\"_blank\"\n class=\"d-block\"\n translate=\"account.links.forum\"\n ></a>\n </li>\n <li class=\"bg-transparent list-group-item px-0\">\n <a\n href=\"javascript:void(0)\"\n class=\"d-block\"\n (click)=\"logout()\"\n translate=\"account.links.signOut\"\n ></a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n\n <!-- settings -->\n <div class=\"tab-pane tab-settings\" id=\"settings\" role=\"tabpanel\">\n <div class=\"p-3 be-scroller-settings\">\n <div class=\"content\">\n <span class=\"category-title\" translate=\"settings.language.title\"></span>\n <ul class=\"settings-list\">\n <li>\n <select\n class=\"form-control\"\n #langSelect\n (change)=\"updateUserLanguage(langSelect.value)\"\n >\n <option\n *ngFor=\"let lang of translate.getLangs()\"\n [value]=\"lang\"\n [selected]=\"lang === translate.currentLang\"\n >\n {{ 'settings.language.options.' + lang | translate }}\n </option>\n </select>\n </li>\n </ul>\n\n <form [formGroup]=\"settingsForm\">\n <span class=\"category-title\" translate=\"settings.notification.title\"></span>\n <ul class=\"settings-list m-0\">\n <li>\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input\n type=\"checkbox\"\n formControlName=\"taskNotifications\"\n id=\"taskNotifications\"\n (ngModelChange)=\"onSettingsSubmit()\"\n /><span> <label for=\"taskNotifications\"></label></span>\n </div>\n <span class=\"name\" translate=\"settings.notification.taskNotifications\"></span>\n <div\n class=\"text-muted info-text\"\n translate=\"settings.notification.taskNotificationsIntro\"\n ></div>\n </li>\n\n <li>\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input\n type=\"checkbox\"\n formControlName=\"emailNotifications\"\n id=\"emailNotifications\"\n (ngModelChange)=\"onSettingsSubmit()\"\n /><span> <label for=\"emailNotifications\"></label></span>\n </div>\n <span class=\"name\" translate=\"settings.notification.emailNotifications\"></span>\n <div\n class=\"text-muted info-text\"\n translate=\"settings.notification.emailNotificationsIntro\"\n ></div>\n </li>\n </ul>\n\n <div *ngIf=\"settingsForm.value.emailNotifications\">\n <ul class=\"settings-list\">\n <li *ngFor=\"let frequency of frequencies\">\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input\n type=\"checkbox\"\n formControlName=\"{{ frequency }}\"\n id=\"{{ frequency }}\"\n (ngModelChange)=\"onSettingsSubmit()\"\n /><span> <label for=\"{{ frequency }}\"></label></span>\n </div>\n <span class=\"name\">{{\n 'settings.notification.' + frequency | translate\n }}</span>\n </li>\n </ul>\n </div>\n </form>\n\n <div class=\"version-holder\">\n <span class=\"category-title\" translate=\"settings.version.title\"></span>\n <ul class=\"settings-list\">\n <li *ngIf=\"build\">\n <div class=\"name\">{{ build.title }}</div>\n <div class=\"text-muted\">{{ build.version }}</div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</nav>\n",
|
|
1266
1234
|
styles: [".be-scroller-settings{padding-bottom:150px!important}.version-holder{background-color:#f8f9fa;bottom:0;position:fixed;width:259px}.info-text{line-height:1em!important;margin-bottom:15px;padding-right:70px}"]
|
|
1267
1235
|
},] }
|
|
1268
1236
|
];
|
|
@@ -1306,12 +1274,12 @@ RightSidebarModule.decorators = [
|
|
|
1306
1274
|
loader: {
|
|
1307
1275
|
provide: TranslateLoader,
|
|
1308
1276
|
useFactory: ɵ0,
|
|
1309
|
-
deps: [HttpClient]
|
|
1310
|
-
}
|
|
1277
|
+
deps: [HttpClient],
|
|
1278
|
+
},
|
|
1311
1279
|
}),
|
|
1312
|
-
NgbTooltipModule
|
|
1280
|
+
NgbTooltipModule,
|
|
1313
1281
|
],
|
|
1314
|
-
exports: [RightSidebarComponent]
|
|
1282
|
+
exports: [RightSidebarComponent],
|
|
1315
1283
|
},] }
|
|
1316
1284
|
];
|
|
1317
1285
|
|
|
@@ -1411,7 +1379,7 @@ class LeftSidebarComponent {
|
|
|
1411
1379
|
LeftSidebarComponent.decorators = [
|
|
1412
1380
|
{ type: Component, args: [{
|
|
1413
1381
|
selector: 'valtimo-left-sidebar',
|
|
1414
|
-
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<ng-container *ngIf=\"{isResizing: isResizing$ | async} as obs\">\n <div\n class=\"be-left-sidebar\"\n [style.width.px]=\"menuIsOpen ? (menuWidth$ | async) : null\"\n [ngClass]=\"{'no-transition': obs.isResizing}\"\n >\n <div class=\"left-sidebar-wrapper\">\n <a class=\"left-sidebar-toggle\" href=\"javascript:void(0);\"><valtimo-page-title></valtimo-page-title></a>\n <div class=\"progress-widget\" style=\"padding: 20px 0\">\n <ul class=\"sidebar-elements\">\n <li>\n <a\n #toggleButton\n class=\"be-toggle-left-sidebar\"\n href=\"javascript:void(0);\"\n [title]=\"menuTooltipText$ | async\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n width=\"1em\"\n height=\"1em\"\n style=\"-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg)\"\n viewBox=\"0 0 24 24\"\n transform=\"rotate(360)\"\n >\n <path [ngClass]=\"menuIsOpen ? 'd-1' : 'd-1-flipped'\" />\n <path [ngClass]=\"menuIsOpen ? 'd-2' : 'd-2-flipped'\" />\n <path [ngClass]=\"menuIsOpen ? 'd-3' : 'd-3-flipped'\" />\n <path [ngClass]=\"menuIsOpen ? 'd-4' : 'd-4-flipped'\" />\n </svg>\n <span>{{ toggleMenuText$ | async }}</span>\n </a>\n </li>\n </ul>\n </div>\n <div class=\"left-sidebar-spacer\">\n <div class=\"left-sidebar-scroll\">\n <div class=\"left-sidebar-content\">\n <valtimo-menu></valtimo-menu>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"resize-border\"\n (mouseenter)=\"enterBorder()\"\n (mouseleave)=\"leaveBorder()\"\n (mousedown)=\"resizeBorderClick($event)\"\n [ngClass]=\"{'resize-hover': (mouseIsOnResizeBorder$ | async) || obs.isResizing}\"\n ></div>\n </div>\n</ng-container>\n",
|
|
1382
|
+
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<ng-container *ngIf=\"{isResizing: isResizing$ | async} as obs\">\n <div\n class=\"be-left-sidebar\"\n [style.width.px]=\"menuIsOpen ? (menuWidth$ | async) : null\"\n [ngClass]=\"{'no-transition': obs.isResizing}\"\n >\n <div class=\"left-sidebar-wrapper\">\n <a class=\"left-sidebar-toggle\" href=\"javascript:void(0);\"\n ><valtimo-page-title></valtimo-page-title\n ></a>\n <div class=\"progress-widget\" style=\"padding: 20px 0\">\n <ul class=\"sidebar-elements\">\n <li>\n <a\n #toggleButton\n class=\"be-toggle-left-sidebar\"\n href=\"javascript:void(0);\"\n [title]=\"menuTooltipText$ | async\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n width=\"1em\"\n height=\"1em\"\n style=\"-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg)\"\n viewBox=\"0 0 24 24\"\n transform=\"rotate(360)\"\n >\n <path [ngClass]=\"menuIsOpen ? 'd-1' : 'd-1-flipped'\" />\n <path [ngClass]=\"menuIsOpen ? 'd-2' : 'd-2-flipped'\" />\n <path [ngClass]=\"menuIsOpen ? 'd-3' : 'd-3-flipped'\" />\n <path [ngClass]=\"menuIsOpen ? 'd-4' : 'd-4-flipped'\" />\n </svg>\n <span>{{ toggleMenuText$ | async }}</span>\n </a>\n </li>\n </ul>\n </div>\n <div class=\"left-sidebar-spacer\">\n <div class=\"left-sidebar-scroll\">\n <div class=\"left-sidebar-content\">\n <valtimo-menu></valtimo-menu>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"resize-border\"\n (mouseenter)=\"enterBorder()\"\n (mouseleave)=\"leaveBorder()\"\n (mousedown)=\"resizeBorderClick($event)\"\n [ngClass]=\"{'resize-hover': (mouseIsOnResizeBorder$ | async) || obs.isResizing}\"\n ></div>\n </div>\n</ng-container>\n",
|
|
1415
1383
|
styles: ["@media screen and (max-width:767px){.be-left-sidebar{width:100%!important}}.be-left-sidebar .left-sidebar-toggle{padding:20px}.be-left-sidebar .left-sidebar-toggle:before{font-size:1.615rem}.be-left-sidebar .sidebar-elements>li>a.be-toggle-left-sidebar{align-items:center;display:flex;height:32px}.be-left-sidebar .left-sidebar-content{padding-top:20px}.be-toggle-left-sidebar svg{height:auto;margin-right:7px;min-width:21px;overflow:visible}.be-toggle-left-sidebar svg path{fill:#696969;transition:.27s ease}.resize-border{background-color:#ff5800;cursor:col-resize;height:100%;margin-right:-3px;opacity:0;position:absolute;right:0;top:0;transition:opacity .2s ease;width:3px}.resize-hover{opacity:.7}.no-transition{transition:none}.d-1{d:path(\"M3 18v-2h13v2z\")}.d-1-flipped{d:path(\"M3 18v-2h11v2z\")}.d-2{d:path(\"M3 13v-2h10v2H3\")}.d-2-flipped{d:path(\"M3 13v-2h12v2H3\")}.d-3{d:path(\"M3 6h13v2H3V6\")}.d-3-flipped{d:path(\"M3 6h11v2H3V6\")}.d-4{d:path(\"M21 15.61L19.59 17l-5.01-5 5.01-5L21 8.39 17.44 12 21 15.61\")}.d-4-flipped{d:path(\"M15.58 15.61L16.99 17 22 12l-5.01-5-1.41 1.39L19.14 12l-3.56 3.61\")}"]
|
|
1416
1384
|
},] }
|
|
1417
1385
|
];
|
|
@@ -1471,7 +1439,7 @@ class PageTitleComponent {
|
|
|
1471
1439
|
this.setTitle();
|
|
1472
1440
|
this.routerSub = this.router.events
|
|
1473
1441
|
.pipe(filter(event => event instanceof NavigationEnd))
|
|
1474
|
-
.subscribe(
|
|
1442
|
+
.subscribe(event => {
|
|
1475
1443
|
this.setTitle();
|
|
1476
1444
|
});
|
|
1477
1445
|
}
|
|
@@ -1514,11 +1482,8 @@ class PageTitleModule {
|
|
|
1514
1482
|
PageTitleModule.decorators = [
|
|
1515
1483
|
{ type: NgModule, args: [{
|
|
1516
1484
|
declarations: [PageTitleComponent],
|
|
1517
|
-
imports: [
|
|
1518
|
-
|
|
1519
|
-
TranslateModule
|
|
1520
|
-
],
|
|
1521
|
-
exports: [PageTitleComponent]
|
|
1485
|
+
imports: [CommonModule, TranslateModule],
|
|
1486
|
+
exports: [PageTitleComponent],
|
|
1522
1487
|
},] }
|
|
1523
1488
|
];
|
|
1524
1489
|
|
|
@@ -1542,12 +1507,8 @@ class LeftSidebarModule {
|
|
|
1542
1507
|
LeftSidebarModule.decorators = [
|
|
1543
1508
|
{ type: NgModule, args: [{
|
|
1544
1509
|
declarations: [LeftSidebarComponent],
|
|
1545
|
-
imports: [
|
|
1546
|
-
|
|
1547
|
-
MenuModule,
|
|
1548
|
-
PageTitleModule
|
|
1549
|
-
],
|
|
1550
|
-
exports: [LeftSidebarComponent]
|
|
1510
|
+
imports: [CommonModule, MenuModule, PageTitleModule],
|
|
1511
|
+
exports: [LeftSidebarComponent],
|
|
1551
1512
|
},] }
|
|
1552
1513
|
];
|
|
1553
1514
|
|
|
@@ -1599,7 +1560,7 @@ class BooleanTypeConverter {
|
|
|
1599
1560
|
return value ? 'Yes' : 'No';
|
|
1600
1561
|
}
|
|
1601
1562
|
else {
|
|
1602
|
-
return value ?
|
|
1563
|
+
return value ? definition.enum[0] || 'Yes' : definition.enum[1] || 'No';
|
|
1603
1564
|
}
|
|
1604
1565
|
}
|
|
1605
1566
|
}
|
|
@@ -1736,7 +1697,7 @@ const TYPE_CONVERTERS = [
|
|
|
1736
1697
|
dateTypeConverter,
|
|
1737
1698
|
enumTypeConverter,
|
|
1738
1699
|
stringReplaceUnderscoreTypeConverter,
|
|
1739
|
-
relatedFilesTypeConverter
|
|
1700
|
+
relatedFilesTypeConverter,
|
|
1740
1701
|
];
|
|
1741
1702
|
|
|
1742
1703
|
/*
|
|
@@ -1762,7 +1723,7 @@ class ViewContentService {
|
|
|
1762
1723
|
}
|
|
1763
1724
|
get(value, definition) {
|
|
1764
1725
|
if (!definition.viewType) {
|
|
1765
|
-
definition.viewType = typeof
|
|
1726
|
+
definition.viewType = typeof value;
|
|
1766
1727
|
}
|
|
1767
1728
|
if (typeof this.converters[definition.viewType] !== 'undefined') {
|
|
1768
1729
|
return this.converters[definition.viewType].convert(value, definition);
|
|
@@ -1781,7 +1742,7 @@ class ViewContentService {
|
|
|
1781
1742
|
ViewContentService.ɵprov = ɵɵdefineInjectable({ factory: function ViewContentService_Factory() { return new ViewContentService(); }, token: ViewContentService, providedIn: "root" });
|
|
1782
1743
|
ViewContentService.decorators = [
|
|
1783
1744
|
{ type: Injectable, args: [{
|
|
1784
|
-
providedIn: 'root'
|
|
1745
|
+
providedIn: 'root',
|
|
1785
1746
|
},] }
|
|
1786
1747
|
];
|
|
1787
1748
|
ViewContentService.ctorParameters = () => [];
|
|
@@ -1815,7 +1776,7 @@ class ListComponent {
|
|
|
1815
1776
|
this.regExpStringRemoveUnderscore = /_/g;
|
|
1816
1777
|
this.sort$ = new BehaviorSubject({
|
|
1817
1778
|
state: { name: '', direction: 'DESC' },
|
|
1818
|
-
isSorting: false
|
|
1779
|
+
isSorting: false,
|
|
1819
1780
|
});
|
|
1820
1781
|
this.viewListAs = localStorage.getItem('viewListAs') || 'table';
|
|
1821
1782
|
}
|
|
@@ -1872,7 +1833,7 @@ class ListComponent {
|
|
|
1872
1833
|
item.listItemFields = this.fields.map(field => ({
|
|
1873
1834
|
key: field.key,
|
|
1874
1835
|
label: field.label,
|
|
1875
|
-
value: this.resolveObject(field, item)
|
|
1836
|
+
value: this.resolveObject(field, item),
|
|
1876
1837
|
}));
|
|
1877
1838
|
});
|
|
1878
1839
|
}
|
|
@@ -1883,7 +1844,9 @@ class ListComponent {
|
|
|
1883
1844
|
resolveObject(definition, obj) {
|
|
1884
1845
|
const definitionKey = definition.key;
|
|
1885
1846
|
const customPropString = '$.';
|
|
1886
|
-
const key = definitionKey.includes(customPropString)
|
|
1847
|
+
const key = definitionKey.includes(customPropString)
|
|
1848
|
+
? definitionKey.split(customPropString)[1]
|
|
1849
|
+
: definitionKey;
|
|
1887
1850
|
const resolvedObjValue = key.split('.').reduce(function (prev, curr) {
|
|
1888
1851
|
return prev ? prev[curr] : null;
|
|
1889
1852
|
}, obj || self);
|
|
@@ -1932,7 +1895,7 @@ ListComponent.PAGINATION_SIZE = 'PaginationSize';
|
|
|
1932
1895
|
ListComponent.decorators = [
|
|
1933
1896
|
{ type: Component, args: [{
|
|
1934
1897
|
selector: 'valtimo-list',
|
|
1935
|
-
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>\n <div *ngIf=\"(items?.length > 0 && fields?.length > 0) || header\">\n <div\n class=\"d-flex align-items-center search-holder bg-light\"\n [ngClass]=\"{'pb-4 pt-4': !header}\"\n *ngIf=\"isSearchable || viewMode || header\"\n >\n <div class=\"align-self-start\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div class=\"ml-auto row\">\n <input
|
|
1898
|
+
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>\n <div *ngIf=\"(items?.length > 0 && fields?.length > 0) || header\">\n <div\n class=\"d-flex align-items-center search-holder bg-light\"\n [ngClass]=\"{'pb-4 pt-4': !header}\"\n *ngIf=\"isSearchable || viewMode || header\"\n >\n <div class=\"align-self-start\">\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div class=\"ml-auto row\">\n <input\n *ngIf=\"isSearchable\"\n class=\"form-control col-sm-8\"\n type=\"text\"\n placeholder=\"Search...\"\n #searchBox\n />\n\n <div\n class=\"switch-view-holder btn-group col-sm-4 mt-1 mt-sm-0\"\n role=\"group\"\n *ngIf=\"viewMode\"\n >\n <button\n class=\"btn\"\n [ngClass]=\"viewListAs === 'table' ? 'btn-primary' : 'btn-default'\"\n (click)=\"switchView('table')\"\n >\n <i class=\"mdi mdi-view-headline\"></i>\n </button>\n <button\n class=\"btn\"\n [ngClass]=\"viewListAs === 'tile' ? 'btn-primary' : 'btn-default'\"\n (click)=\"switchView('tile')\"\n >\n <i class=\"mdi mdi-view-module\"></i>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <ng-content select=\"[tabs]\"></ng-content>\n\n <div *ngIf=\"items?.length > 0 && fields?.length > 0\">\n <div class=\"table-responsive noSwipe\" *ngIf=\"!viewMode || viewListAs === 'table'\">\n <table class=\"table table-striped table-hover m-0\" *ngIf=\"sort$ | async as sort\">\n <thead>\n <tr>\n <th\n *ngFor=\"let field of fields\"\n (click)=\"handleFieldClick(field.key, field.sortable)\"\n [ngClass]=\"{\n sortable: field.sortable,\n 'is-being-sorted': field.key === sort.state.name && sort.isSorting,\n ascending: sort.state.direction === 'ASC'\n }\"\n >\n {{ field.label }}\n </th>\n <th *ngFor=\"let action of actions\">\n {{ action.columnName }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n [ngClass]=\"{'click-able': this.rowClicked.observers.length > 0}\"\n *ngFor=\"let item of items | listFilter: searchModel\"\n (click)=\"onClickRow(item)\"\n >\n <td class=\"align-top\" *ngFor=\"let listItemField of item.listItemFields\">\n {{ listItemField.value || '-' }}\n </td>\n <td class=\"align-top\" *ngFor=\"let action of actions\">\n <i\n style=\"cursor: pointer\"\n [ngClass]=\"action.iconClass\"\n (click)=\"action.callback(item)\"\n ></i>\n </td>\n </tr>\n <tr>\n <td *ngIf=\"(items | listFilter: searchModel).length === 0\" [colSpan]=\"fields.length\">\n {{ 'list.noMatchingItems' | translate }}<i>\"{{ searchModel }}\"</i>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"container-fluid\" *ngIf=\"viewMode && viewListAs === 'tile'\">\n <div class=\"row p-2\">\n <div\n class=\"col-12 col-sm-6 col-xl-4 p-2\"\n *ngFor=\"let item of items | listFilter: searchModel\"\n (click)=\"onClickRow(item)\"\n >\n <div class=\"click-able tile-holder p-4\">\n <dl class=\"row mb-0\" *ngFor=\"let listItemField of item.listItemFields\">\n <dt class=\"col-12 col-md-5 text-xl-right\">{{ listItemField.label }}</dt>\n <dd class=\"col-12 col-md-7\">{{ listItemField.value || '-' }}</dd>\n </dl>\n </div>\n </div>\n <div class=\"col-12\" *ngIf=\"(items | listFilter: searchModel).length === 0\">\n {{ 'list.noMatchingItems' | translate }}<i>\"{{ searchModel }}\"</i>\n </div>\n </div>\n </div>\n </div>\n\n <div\n class=\"pagination-holder bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0\"\n *ngIf=\"pagination && items?.length > 0 && fields?.length > 0\"\n >\n <div class=\"float-left page-count col-4\">\n <strong>{{\n 'list.currentPage' | translate: {current: pagination.page, total: getTotalPageCount()}\n }}</strong>\n <br />\n {{\n pagination.collectionSize === 1\n ? ('list.showingResult' | translate: {number: (items | listFilter: searchModel).length})\n : ('list.showingResults'\n | translate\n : {\n number: (items | listFilter: searchModel).length,\n total: pagination.collectionSize\n })\n }}\n </div>\n <div class=\"col-4 text-center\">\n {{ 'list.show' | translate }}\n <select [(ngModel)]=\"pagination.size\" (ngModelChange)=\"setPaginationSize($event)\">\n <option [ngValue]=\"10\">10</option>\n <option [ngValue]=\"25\">25</option>\n <option [ngValue]=\"50\">50</option>\n <option [ngValue]=\"100\">100</option>\n </select>\n {{ 'list.entries' | translate }}\n </div>\n <div class=\"col-4\">\n <ngb-pagination\n *ngIf=\"pagination.collectionSize > pagination.size\"\n class=\"float-right\"\n [collectionSize]=\"pagination.collectionSize\"\n [(page)]=\"pagination.page\"\n [pageSize]=\"pagination.size\"\n [maxSize]=\"pagination.maxPaginationItemSize\"\n [rotate]=\"true\"\n (pageChange)=\"onClickPagination(pagination.page)\"\n ></ngb-pagination>\n </div>\n </div>\n\n <div id=\"no-results\" class=\"p-5\" *ngIf=\"items?.length === 0\">\n {{ 'list.noResults' | translate }}\n </div>\n\n <div id=\"no-field-definitions\" class=\"p-5\" *ngIf=\"items?.length > 0 && fields?.length === 0\">\n {{ 'list.noFieldDefinitions' | translate }}\n </div>\n</div>\n",
|
|
1936
1899
|
styles: ["@charset \"UTF-8\";\n/*!\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 */.table{table-layout:fixed}.click-able{cursor:pointer}.pagination-holder{border-top:1px solid #dee2e6}.search-holder{border-bottom:1px solid #dee2e6;height:80px;padding-left:18px;padding-right:18px}.switch-view-holder i{font-size:1.8rem;line-height:1.2rem;margin-top:9px}.tile-holder{background-color:#f5f5f5;border:1px solid transparent}.tile-holder:hover{background-color:#eee;border:1px solid #dee2e6}.page-count{margin-bottom:1rem}td:first-child,th:first-child{padding-left:25px}th.sortable{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:pointer;user-select:none}th.sortable:after{content:\" \uF0DD\";font-family:Font Awesome\\ 5 Free;margin:auto 0 auto 5px;opacity:0;position:absolute;transition:all .15s ease}th.sortable.is-being-sorted.ascending:after{transform:rotate(-180deg)}th.sortable:hover:after{opacity:.5}th.sortable.is-being-sorted:after{opacity:1}"]
|
|
1937
1900
|
},] }
|
|
1938
1901
|
];
|
|
@@ -1979,16 +1942,12 @@ class ListFilterPipe {
|
|
|
1979
1942
|
if (!filterText) {
|
|
1980
1943
|
return list;
|
|
1981
1944
|
}
|
|
1982
|
-
return list.filter(item => Object.keys(item).some(k => item[k] != null &&
|
|
1983
|
-
item[k]
|
|
1984
|
-
.toString()
|
|
1985
|
-
.toLowerCase()
|
|
1986
|
-
.includes(filterText.toLowerCase())));
|
|
1945
|
+
return list.filter(item => Object.keys(item).some(k => item[k] != null && item[k].toString().toLowerCase().includes(filterText.toLowerCase())));
|
|
1987
1946
|
}
|
|
1988
1947
|
}
|
|
1989
1948
|
ListFilterPipe.decorators = [
|
|
1990
1949
|
{ type: Pipe, args: [{
|
|
1991
|
-
name: 'listFilter'
|
|
1950
|
+
name: 'listFilter',
|
|
1992
1951
|
},] }
|
|
1993
1952
|
];
|
|
1994
1953
|
|
|
@@ -2012,13 +1971,12 @@ ListFilterPipe.decorators = [
|
|
|
2012
1971
|
*/
|
|
2013
1972
|
class CardComponent {
|
|
2014
1973
|
constructor() { }
|
|
2015
|
-
ngOnInit() {
|
|
2016
|
-
}
|
|
1974
|
+
ngOnInit() { }
|
|
2017
1975
|
}
|
|
2018
1976
|
CardComponent.decorators = [
|
|
2019
1977
|
{ type: Component, args: [{
|
|
2020
1978
|
selector: 'valtimo-card',
|
|
2021
|
-
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=\"card card-border-color card-border-color-primary\">\n <div *ngIf=\"title || subtitle\"class=\"card-header card-header-divider\">\n <span *ngIf=\"title\">{{title}}</span>\n <span *ngIf=\"subtitle\" class=\"card-subtitle\">{{subtitle}}</span>\n </div>\n <div class=\"card-body\">\n <ng-content></ng-content>\n </div>\n</div>\n",
|
|
1979
|
+
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=\"card card-border-color card-border-color-primary\">\n <div *ngIf=\"title || subtitle\" class=\"card-header card-header-divider\">\n <span *ngIf=\"title\">{{ title }}</span>\n <span *ngIf=\"subtitle\" class=\"card-subtitle\">{{ subtitle }}</span>\n </div>\n <div class=\"card-body\">\n <ng-content></ng-content>\n </div>\n</div>\n",
|
|
2022
1980
|
styles: [""]
|
|
2023
1981
|
},] }
|
|
2024
1982
|
];
|
|
@@ -2048,10 +2006,8 @@ class CardModule {
|
|
|
2048
2006
|
CardModule.decorators = [
|
|
2049
2007
|
{ type: NgModule, args: [{
|
|
2050
2008
|
declarations: [CardComponent],
|
|
2051
|
-
imports: [
|
|
2052
|
-
|
|
2053
|
-
],
|
|
2054
|
-
exports: [CardComponent]
|
|
2009
|
+
imports: [CommonModule],
|
|
2010
|
+
exports: [CardComponent],
|
|
2055
2011
|
},] }
|
|
2056
2012
|
];
|
|
2057
2013
|
|
|
@@ -2076,7 +2032,7 @@ ListModule.decorators = [
|
|
|
2076
2032
|
{ type: NgModule, args: [{
|
|
2077
2033
|
declarations: [ListComponent, ListFilterPipe],
|
|
2078
2034
|
imports: [CommonModule, CardModule, NgbPaginationModule, FormsModule, TranslateModule],
|
|
2079
|
-
exports: [ListComponent, ListFilterPipe]
|
|
2035
|
+
exports: [ListComponent, ListFilterPipe],
|
|
2080
2036
|
},] }
|
|
2081
2037
|
];
|
|
2082
2038
|
|
|
@@ -2136,7 +2092,7 @@ class BreadcrumbNavigationComponent {
|
|
|
2136
2092
|
this.routerSub = this.router.events
|
|
2137
2093
|
.pipe(filter(event => event instanceof NavigationEnd))
|
|
2138
2094
|
.pipe(map(() => this.route))
|
|
2139
|
-
.pipe(map(
|
|
2095
|
+
.pipe(map(route => {
|
|
2140
2096
|
while (route.firstChild) {
|
|
2141
2097
|
route = route.firstChild;
|
|
2142
2098
|
}
|
|
@@ -2157,7 +2113,7 @@ class BreadcrumbNavigationComponent {
|
|
|
2157
2113
|
url: snapshot.url.join('/'),
|
|
2158
2114
|
path: snapshot.routeConfig.path,
|
|
2159
2115
|
label: snapshot.data['title'],
|
|
2160
|
-
params: snapshot.params
|
|
2116
|
+
params: snapshot.params,
|
|
2161
2117
|
};
|
|
2162
2118
|
this.generateBreadcrumbs(activeRoute);
|
|
2163
2119
|
}
|
|
@@ -2165,14 +2121,14 @@ class BreadcrumbNavigationComponent {
|
|
|
2165
2121
|
generateBreadcrumbs(activeBreadcrumb) {
|
|
2166
2122
|
this.breadcrumbs = [];
|
|
2167
2123
|
this.router.config.map(routerConfig => {
|
|
2168
|
-
if (activeBreadcrumb.path.indexOf(routerConfig.path + '/') === 0
|
|
2169
|
-
|
|
2170
|
-
|
|
2124
|
+
if (activeBreadcrumb.path.indexOf(routerConfig.path + '/') === 0 &&
|
|
2125
|
+
activeBreadcrumb.path !== routerConfig.path &&
|
|
2126
|
+
routerConfig.path !== '') {
|
|
2171
2127
|
const parentRoute = {
|
|
2172
2128
|
url: routerConfig.path.replace(/:(.+?)\b/g, (_, p1) => activeBreadcrumb.params[p1]),
|
|
2173
2129
|
path: routerConfig.path,
|
|
2174
2130
|
label: routerConfig.data['title'],
|
|
2175
|
-
params: activeBreadcrumb.params
|
|
2131
|
+
params: activeBreadcrumb.params,
|
|
2176
2132
|
};
|
|
2177
2133
|
const exist = this.breadcrumbs.findIndex(item => item.url === parentRoute.url);
|
|
2178
2134
|
if (exist === -1) {
|
|
@@ -2217,12 +2173,8 @@ class BreadcrumbNavigationModule {
|
|
|
2217
2173
|
BreadcrumbNavigationModule.decorators = [
|
|
2218
2174
|
{ type: NgModule, args: [{
|
|
2219
2175
|
declarations: [BreadcrumbNavigationComponent],
|
|
2220
|
-
imports: [
|
|
2221
|
-
|
|
2222
|
-
RouterModule,
|
|
2223
|
-
TranslateModule
|
|
2224
|
-
],
|
|
2225
|
-
exports: [BreadcrumbNavigationComponent]
|
|
2176
|
+
imports: [CommonModule, RouterModule, TranslateModule],
|
|
2177
|
+
exports: [BreadcrumbNavigationComponent],
|
|
2226
2178
|
},] }
|
|
2227
2179
|
];
|
|
2228
2180
|
|
|
@@ -2246,12 +2198,8 @@ class PageHeaderModule {
|
|
|
2246
2198
|
PageHeaderModule.decorators = [
|
|
2247
2199
|
{ type: NgModule, args: [{
|
|
2248
2200
|
declarations: [PageHeaderComponent],
|
|
2249
|
-
imports: [
|
|
2250
|
-
|
|
2251
|
-
PageTitleModule,
|
|
2252
|
-
BreadcrumbNavigationModule
|
|
2253
|
-
],
|
|
2254
|
-
exports: [PageHeaderComponent]
|
|
2201
|
+
imports: [CommonModule, PageTitleModule, BreadcrumbNavigationModule],
|
|
2202
|
+
exports: [PageHeaderComponent],
|
|
2255
2203
|
},] }
|
|
2256
2204
|
];
|
|
2257
2205
|
|
|
@@ -2317,7 +2265,7 @@ class WidgetComponent {
|
|
|
2317
2265
|
WidgetComponent.decorators = [
|
|
2318
2266
|
{ type: Component, args: [{
|
|
2319
2267
|
selector: 'valtimo-widget',
|
|
2320
|
-
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=\"card card-border card-contrast {{ cardClassName }}\">\n <div class=\"card-header {{ contrastClass }} {{ dividerClass }}\"
|
|
2268
|
+
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=\"card card-border card-contrast {{ cardClassName }}\">\n <div class=\"card-header {{ contrastClass }} {{ dividerClass }}\" *ngIf=\"title || subtitle\">\n <div class=\"row\">\n <div class=\"col-7\" [ngClass]=\"{clickable: collapseAble}\" (click)=\"toggleContent()\">\n <!-- Title -->\n <div *ngIf=\"title\" class=\"text-truncate\">{{ title }}</div>\n <!-- Sub title -->\n <div *ngIf=\"subtitle\" class=\"card-subtitle text-truncate\">{{ subtitle }}</div>\n </div>\n\n <!-- Tools-->\n <div class=\"tools col-5 text-right\">\n <!-- Collapse content -->\n <a\n class=\"icon mdi\"\n *ngIf=\"collapseAble\"\n [ngClass]=\"{'mdi-chevron-up': isCollapsed, 'mdi-chevron-down': !isCollapsed}\"\n (click)=\"toggleContent()\"\n ></a>\n </div>\n </div>\n </div>\n <!-- content -->\n <div [hidden]=\"!isCollapsed\">\n <ng-content></ng-content>\n </div>\n</div>\n",
|
|
2321
2269
|
styles: [".card-contrast .card-header{padding:20px!important}.card-subtitle{margin-bottom:0}.card-full,.card-full .card-subtitle,.card-full .tools .icon{color:#6b6b6b!important}.card-full-warning,.card-full-warning .card-subtitle,.card-full-warning .tools .icon{color:#343a40!important}.card-full-danger,.card-full-danger .card-subtitle,.card-full-danger .tools .icon,.card-full-dark,.card-full-dark .card-subtitle,.card-full-dark .tools .icon,.card-full-info,.card-full-info .card-subtitle,.card-full-info .tools .icon,.card-full-primary,.card-full-primary .card-subtitle,.card-full-primary .tools .icon,.card-full-success,.card-full-success .card-subtitle,.card-full-success .tools .icon{color:#fff!important}.card-contrast .card-body{padding-top:15px}.card-body{padding:15px 20px}.pie-label{font-size:16px!important}.widget.widget-tile svg.ngx-charts{margin-left:-1.5rem!important}svg.ngx-charts{margin:0;padding:0}"]
|
|
2322
2270
|
},] }
|
|
2323
2271
|
];
|
|
@@ -2354,10 +2302,8 @@ class WidgetModule {
|
|
|
2354
2302
|
WidgetModule.decorators = [
|
|
2355
2303
|
{ type: NgModule, args: [{
|
|
2356
2304
|
declarations: [WidgetComponent],
|
|
2357
|
-
imports: [
|
|
2358
|
-
|
|
2359
|
-
],
|
|
2360
|
-
exports: [WidgetComponent]
|
|
2305
|
+
imports: [CommonModule],
|
|
2306
|
+
exports: [WidgetComponent],
|
|
2361
2307
|
},] }
|
|
2362
2308
|
];
|
|
2363
2309
|
|
|
@@ -2388,7 +2334,7 @@ class FieldAutoFocusDirective {
|
|
|
2388
2334
|
}
|
|
2389
2335
|
FieldAutoFocusDirective.decorators = [
|
|
2390
2336
|
{ type: Directive, args: [{
|
|
2391
|
-
selector: '[valtimoFieldAutoFocus]'
|
|
2337
|
+
selector: '[valtimoFieldAutoFocus]',
|
|
2392
2338
|
},] }
|
|
2393
2339
|
];
|
|
2394
2340
|
FieldAutoFocusDirective.ctorParameters = () => [
|
|
@@ -2415,12 +2361,8 @@ class FieldAutoFocusModule {
|
|
|
2415
2361
|
FieldAutoFocusModule.decorators = [
|
|
2416
2362
|
{ type: NgModule, args: [{
|
|
2417
2363
|
declarations: [FieldAutoFocusDirective],
|
|
2418
|
-
exports: [
|
|
2419
|
-
|
|
2420
|
-
],
|
|
2421
|
-
imports: [
|
|
2422
|
-
CommonModule
|
|
2423
|
-
]
|
|
2364
|
+
exports: [FieldAutoFocusDirective],
|
|
2365
|
+
imports: [CommonModule],
|
|
2424
2366
|
},] }
|
|
2425
2367
|
];
|
|
2426
2368
|
|
|
@@ -2493,15 +2435,15 @@ class BpmnJsDiagramComponent {
|
|
|
2493
2435
|
}
|
|
2494
2436
|
if (inputData) {
|
|
2495
2437
|
Object.keys(inputData).forEach(key => {
|
|
2496
|
-
const diagramContainer = this.el.nativeElement.querySelector('svg')
|
|
2497
|
-
.
|
|
2438
|
+
const diagramContainer = this.el.nativeElement.querySelector('svg').getBoundingClientRect(), diagramElm = this.el.nativeElement
|
|
2439
|
+
.querySelector(`g[data-element-id=${key}]`)
|
|
2498
2440
|
.getBoundingClientRect();
|
|
2499
2441
|
this.setMax(key);
|
|
2500
2442
|
this.heatPoints.data.push({
|
|
2501
2443
|
x: Math.round(diagramElm.x - diagramContainer.x + diagramElm.width / 2),
|
|
2502
2444
|
y: Math.round(diagramElm.y - diagramContainer.y + diagramElm.height / 2),
|
|
2503
2445
|
value: inputData[key][valueKey],
|
|
2504
|
-
radius: diagramElm.width / 2
|
|
2446
|
+
radius: diagramElm.width / 2,
|
|
2505
2447
|
});
|
|
2506
2448
|
if (inputData[key].count > 0) {
|
|
2507
2449
|
this.addCounterActiveOverlays(key, inputData);
|
|
@@ -2525,27 +2467,27 @@ class BpmnJsDiagramComponent {
|
|
|
2525
2467
|
overlays.add(key, {
|
|
2526
2468
|
position: {
|
|
2527
2469
|
bottom: -10,
|
|
2528
|
-
left: 0
|
|
2470
|
+
left: 0,
|
|
2529
2471
|
},
|
|
2530
2472
|
show: {
|
|
2531
2473
|
minZoom: 0,
|
|
2532
|
-
maxZoom: 5.0
|
|
2474
|
+
maxZoom: 5.0,
|
|
2533
2475
|
},
|
|
2534
|
-
html: `<span class="badge badge-pill badge-primary">${inputData[key].count}</span
|
|
2476
|
+
html: `<span class="badge badge-pill badge-primary">${inputData[key].count}</span>`,
|
|
2535
2477
|
});
|
|
2536
2478
|
}
|
|
2537
2479
|
showHeatmap() {
|
|
2538
2480
|
this.heatMapInstance = create({
|
|
2539
2481
|
radius: 54,
|
|
2540
|
-
blur: .
|
|
2541
|
-
maxOpacity: .4,
|
|
2482
|
+
blur: 0.7,
|
|
2483
|
+
maxOpacity: 0.4,
|
|
2542
2484
|
minOpacity: 0,
|
|
2543
|
-
container: this.el.nativeElement
|
|
2485
|
+
container: this.el.nativeElement,
|
|
2544
2486
|
});
|
|
2545
2487
|
this.heatMapInstance.setData({
|
|
2546
2488
|
min: this.min,
|
|
2547
2489
|
max: this.max,
|
|
2548
|
-
data: this.heatPoints.data
|
|
2490
|
+
data: this.heatPoints.data,
|
|
2549
2491
|
});
|
|
2550
2492
|
}
|
|
2551
2493
|
clearHeatmap() {
|
|
@@ -2567,7 +2509,7 @@ class BpmnJsDiagramComponent {
|
|
|
2567
2509
|
BpmnJsDiagramComponent.decorators = [
|
|
2568
2510
|
{ type: Component, args: [{
|
|
2569
2511
|
selector: 'valtimo-bpmn-js-diagram',
|
|
2570
|
-
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=\"p-4\" *ngIf=\"heatmapDuration || heatmapCount\">\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input
|
|
2512
|
+
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=\"p-4\" *ngIf=\"heatmapDuration || heatmapCount\">\n <div class=\"switch-button switch-button-sm switch-button-success\">\n <input\n type=\"checkbox\"\n id=\"toggleHeatmap\"\n [checked]=\"heatmapMode\"\n (click)=\"toggleHeatmap()\"\n /><span> <label for=\"toggleHeatmap\"></label></span>\n </div>\n</div>\n\n<div #ref class=\"diagram-container\"></div>\n\n<div *ngIf=\"historicActivityInstances\" class=\"p-4 text-center legenda-holder\">\n <span\n ><div class=\"legenda highlight-overlay-past\"></div>\n Executed tasks</span\n >\n <span class=\"ml-3\"\n ><div class=\"legenda highlight-overlay-current\"></div>\n Current tasks</span\n >\n</div>\n\n<div *ngIf=\"heatmapDuration || heatmapCount\" class=\"p-4 text-center legenda-holder\">\n <span\n ><span class=\"badge badge-pill badge-primary\">N</span> Amount of currently active\n instances of this task.</span\n >\n <span\n > | Red/yellow/green orbs: The amount of times the task is executed in\n comparison to the other tasks.</span\n >\n</div>\n",
|
|
2571
2513
|
styles: [""]
|
|
2572
2514
|
},] }
|
|
2573
2515
|
];
|
|
@@ -2601,10 +2543,8 @@ class BpmnJsDiagramModule {
|
|
|
2601
2543
|
BpmnJsDiagramModule.decorators = [
|
|
2602
2544
|
{ type: NgModule, args: [{
|
|
2603
2545
|
declarations: [BpmnJsDiagramComponent],
|
|
2604
|
-
imports: [
|
|
2605
|
-
|
|
2606
|
-
],
|
|
2607
|
-
exports: [BpmnJsDiagramComponent]
|
|
2546
|
+
imports: [CommonModule],
|
|
2547
|
+
exports: [BpmnJsDiagramComponent],
|
|
2608
2548
|
},] }
|
|
2609
2549
|
];
|
|
2610
2550
|
|
|
@@ -2628,7 +2568,7 @@ class TimelineComponent {
|
|
|
2628
2568
|
TimelineComponent.decorators = [
|
|
2629
2569
|
{ type: Component, args: [{
|
|
2630
2570
|
selector: 'valtimo-timeline',
|
|
2631
|
-
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>\n <div id=\"no-results\" class=\"p-5\" *ngIf=\"items?.length === 0\"
|
|
2571
|
+
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>\n <div id=\"no-results\" class=\"p-5\" *ngIf=\"items?.length === 0\">No result found</div>\n <div class=\"pb-5\" *ngIf=\"items?.length > 0\">\n <ul class=\"timeline mb-0 py-5\">\n <li class=\"timeline-item status-done\" *ngFor=\"let item of items\">\n <div class=\"timeline-date\">\n <span>{{ item.date }}</span>\n </div>\n <div class=\"timeline-content mt-1\">\n <div class=\"timeline-header p-0\">\n <span class=\"timeline-time\">{{ item.time }}</span>\n <span class=\"timeline-author\">{{ item.user }}</span>\n <br />\n <p class=\"timeline-activity\">{{ item.activity }}</p>\n <div class=\"timeline-summary\">\n <p\n [innerHTML]=\"item.summaryTranslationKey | translate: item.summaryTranslationParams\"\n ></p>\n </div>\n </div>\n </div>\n </li>\n </ul>\n </div>\n</div>\n",
|
|
2632
2572
|
styles: [""]
|
|
2633
2573
|
},] }
|
|
2634
2574
|
];
|
|
@@ -2656,11 +2596,8 @@ class TimelineModule {
|
|
|
2656
2596
|
TimelineModule.decorators = [
|
|
2657
2597
|
{ type: NgModule, args: [{
|
|
2658
2598
|
declarations: [TimelineComponent],
|
|
2659
|
-
imports: [
|
|
2660
|
-
|
|
2661
|
-
TranslateModule,
|
|
2662
|
-
],
|
|
2663
|
-
exports: [TimelineComponent]
|
|
2599
|
+
imports: [CommonModule, TranslateModule],
|
|
2600
|
+
exports: [TimelineComponent],
|
|
2664
2601
|
},] }
|
|
2665
2602
|
];
|
|
2666
2603
|
|
|
@@ -2750,10 +2687,8 @@ class FilterSidebarModule {
|
|
|
2750
2687
|
FilterSidebarModule.decorators = [
|
|
2751
2688
|
{ type: NgModule, args: [{
|
|
2752
2689
|
declarations: [FilterSidebarComponent],
|
|
2753
|
-
imports: [
|
|
2754
|
-
|
|
2755
|
-
],
|
|
2756
|
-
exports: [FilterSidebarComponent]
|
|
2690
|
+
imports: [CommonModule],
|
|
2691
|
+
exports: [FilterSidebarComponent],
|
|
2757
2692
|
},] }
|
|
2758
2693
|
];
|
|
2759
2694
|
|
|
@@ -2780,8 +2715,7 @@ class UploaderComponent {
|
|
|
2780
2715
|
this.resourceRegistered = new EventEmitter();
|
|
2781
2716
|
this.showFileList = true;
|
|
2782
2717
|
}
|
|
2783
|
-
ngOnInit() {
|
|
2784
|
-
}
|
|
2718
|
+
ngOnInit() { }
|
|
2785
2719
|
onFileFieldChange(files) {
|
|
2786
2720
|
for (const file of files) {
|
|
2787
2721
|
this.uploadFile(file);
|
|
@@ -2811,7 +2745,7 @@ class UploaderComponent {
|
|
|
2811
2745
|
UploaderComponent.decorators = [
|
|
2812
2746
|
{ type: Component, args: [{
|
|
2813
2747
|
selector: 'valtimo-uploader',
|
|
2814
|
-
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
|
|
2748
|
+
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\n class=\"upload-file-container p-5\"\n (click)=\"fileInput.click()\"\n valtimoUploaderDragDrop\n (fileDropped)=\"onFileFieldChange($event)\"\n>\n <span class=\"align-middle\"><i class=\"fa fa-cloud-upload fa-4x\"></i></span>\n <input hidden type=\"file\" #fileInput (change)=\"onFileFieldChange($event.target.files)\" multiple />\n</div>\n<div *ngIf=\"showFileList\">\n <div class=\"files-list px-3 py-2\" *ngFor=\"let resource of resources\">\n <p class=\"m-0\">\n <strong>{{ resource.name }}</strong\n ><br />\n {{ resource.sizeInBytes | filesize }}\n </p>\n <button class=\"delete-file\" (click)=\"deleteResource(resource)\">\n <i class=\"fa fa-trash text-danger\"></i>\n </button>\n </div>\n</div>\n",
|
|
2815
2749
|
styles: [".upload-file-container{background-color:#fff;background-position:50%;background-repeat:no-repeat;background-size:100px;border:2px dashed #d5d8de;color:#d5d8de;margin:0 0 1rem;text-align:center}.upload-file-container i.mdi-cloud-upload{font-size:5em}.upload-file-container:hover{cursor:pointer;opacity:.8}.files-list{background:#fff;border:1px solid #bdc0c7;display:flex;font-size:1em;justify-content:space-between;margin:1rem auto;padding:5px}.files-list .delete-file{background:transparent;border:none;cursor:pointer}.files-list .delete-file i{font-size:1.5em}"]
|
|
2816
2750
|
},] }
|
|
2817
2751
|
];
|
|
@@ -2862,7 +2796,7 @@ class UploaderDragDropDirective {
|
|
|
2862
2796
|
}
|
|
2863
2797
|
UploaderDragDropDirective.decorators = [
|
|
2864
2798
|
{ type: Directive, args: [{
|
|
2865
|
-
selector: '[valtimoUploaderDragDrop]'
|
|
2799
|
+
selector: '[valtimoUploaderDragDrop]',
|
|
2866
2800
|
},] }
|
|
2867
2801
|
];
|
|
2868
2802
|
UploaderDragDropDirective.propDecorators = {
|
|
@@ -2889,14 +2823,7 @@ UploaderDragDropDirective.propDecorators = {
|
|
|
2889
2823
|
*/
|
|
2890
2824
|
class FileSizePipe {
|
|
2891
2825
|
constructor() {
|
|
2892
|
-
this.units = [
|
|
2893
|
-
'bytes',
|
|
2894
|
-
'KB',
|
|
2895
|
-
'MB',
|
|
2896
|
-
'GB',
|
|
2897
|
-
'TB',
|
|
2898
|
-
'PB'
|
|
2899
|
-
];
|
|
2826
|
+
this.units = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];
|
|
2900
2827
|
}
|
|
2901
2828
|
transform(bytes = 0, precision = 2) {
|
|
2902
2829
|
if (isNaN(parseFloat(String(bytes))) || !isFinite(bytes)) {
|
|
@@ -2912,7 +2839,7 @@ class FileSizePipe {
|
|
|
2912
2839
|
}
|
|
2913
2840
|
FileSizePipe.decorators = [
|
|
2914
2841
|
{ type: Pipe, args: [{
|
|
2915
|
-
name: 'filesize'
|
|
2842
|
+
name: 'filesize',
|
|
2916
2843
|
},] }
|
|
2917
2844
|
];
|
|
2918
2845
|
|
|
@@ -2936,10 +2863,8 @@ class FileSizeModule {
|
|
|
2936
2863
|
FileSizeModule.decorators = [
|
|
2937
2864
|
{ type: NgModule, args: [{
|
|
2938
2865
|
declarations: [FileSizePipe],
|
|
2939
|
-
imports: [
|
|
2940
|
-
|
|
2941
|
-
],
|
|
2942
|
-
exports: [FileSizePipe]
|
|
2866
|
+
imports: [CommonModule],
|
|
2867
|
+
exports: [FileSizePipe],
|
|
2943
2868
|
},] }
|
|
2944
2869
|
];
|
|
2945
2870
|
|
|
@@ -2963,11 +2888,8 @@ class UploaderModule {
|
|
|
2963
2888
|
UploaderModule.decorators = [
|
|
2964
2889
|
{ type: NgModule, args: [{
|
|
2965
2890
|
declarations: [UploaderComponent, UploaderDragDropDirective],
|
|
2966
|
-
imports: [
|
|
2967
|
-
|
|
2968
|
-
FileSizeModule
|
|
2969
|
-
],
|
|
2970
|
-
exports: [UploaderComponent, UploaderDragDropDirective]
|
|
2891
|
+
imports: [CommonModule, FileSizeModule],
|
|
2892
|
+
exports: [UploaderComponent, UploaderDragDropDirective],
|
|
2971
2893
|
},] }
|
|
2972
2894
|
];
|
|
2973
2895
|
|
|
@@ -3067,11 +2989,9 @@ class AlertComponent {
|
|
|
3067
2989
|
this.alerts = [];
|
|
3068
2990
|
this.autoCloseInMS = 5000;
|
|
3069
2991
|
}
|
|
3070
|
-
ngOnInit() {
|
|
3071
|
-
}
|
|
2992
|
+
ngOnInit() { }
|
|
3072
2993
|
ngAfterContentInit() {
|
|
3073
|
-
this.subscription = this.alertService.onAlert()
|
|
3074
|
-
.subscribe(alert => {
|
|
2994
|
+
this.subscription = this.alertService.onAlert().subscribe(alert => {
|
|
3075
2995
|
if (!alert.message) {
|
|
3076
2996
|
// clear alerts when an empty alert is received
|
|
3077
2997
|
this.alerts = [];
|
|
@@ -3177,7 +3097,7 @@ class AlertComponent {
|
|
|
3177
3097
|
AlertComponent.decorators = [
|
|
3178
3098
|
{ type: Component, args: [{
|
|
3179
3099
|
selector: 'valtimo-alert',
|
|
3180
|
-
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 *ngFor=\"let alert of alerts\" class=\"{{cssClass(alert)}} rounded-0 m-0 alert-dismissable\">\n
|
|
3100
|
+
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 *ngFor=\"let alert of alerts\" class=\"{{ cssClass(alert) }} rounded-0 m-0 alert-dismissable\">\n <div *ngIf=\"inModal(alert)\">\n <!-- Modal -->\n <div class=\"modal fade\" id=\"modalNotification\" tabindex=\"-1\" role=\"dialog\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-body p-0\">\n <button class=\"close\" type=\"button\" (click)=\"removeAlert(alert)\">\n <span class=\"mdi mdi-close\" aria-hidden=\"true\"></span>\n </button>\n <div class=\"icon\">\n <span class=\"{{ alert.iconClass || cssIconClass(alert) }}\"></span>\n </div>\n <div class=\"message\">\n <div [innerHTML]=\"alert.message\"></div>\n </div>\n </div>\n <div class=\"modal-footer pt-0\" *ngIf=\"alert.confirmations?.length\">\n <button\n class=\"{{ confirmation.class }} mr-2\"\n *ngFor=\"let confirmation of alert.confirmations\"\n (click)=\"alertConfirm(alert, confirmation.value)\"\n >\n {{ confirmation.label }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!inModal(alert)\" class=\"alert-block\">\n <div class=\"icon\"><span class=\"{{ alert.iconClass || cssIconClass(alert) }}\"></span></div>\n <div class=\"message\">\n <div [innerHTML]=\"alert.message\"></div>\n <div class=\"mt-3\" *ngIf=\"alert.confirmations?.length\">\n <button\n class=\"{{ confirmation.class }} mr-2\"\n *ngFor=\"let confirmation of alert.confirmations\"\n (click)=\"alertConfirm(alert, confirmation.value)\"\n >\n {{ confirmation.label }}\n </button>\n </div>\n </div>\n <button class=\"close\" type=\"button\" (click)=\"removeAlert(alert)\">\n <span class=\"mdi mdi-close\" aria-hidden=\"true\"></span>\n </button>\n </div>\n</div>\n",
|
|
3181
3101
|
styles: [".alert-block{display:flex;flex-direction:row;justify-content:space-between}.alert-block .message{width:100%}.alert-block .icon{align-items:center;display:flex}.alert .message{font-size:1.1rem!important;line-height:1.5rem!important;padding:2rem 5rem 2rem 2rem!important}.alert .close{color:#fff!important;opacity:1!important;padding:2rem 2rem 0 0!important;right:0!important}.alert .icon{padding-left:2rem!important}.alert-warning{color:#404040!important}.alert-light .close,.alert-warning .close{color:#404040!important;opacity:1!important}"]
|
|
3182
3102
|
},] }
|
|
3183
3103
|
];
|
|
@@ -3206,7 +3126,7 @@ AlertModule.decorators = [
|
|
|
3206
3126
|
{ type: NgModule, args: [{
|
|
3207
3127
|
imports: [CommonModule],
|
|
3208
3128
|
declarations: [AlertComponent],
|
|
3209
|
-
exports: [AlertComponent]
|
|
3129
|
+
exports: [AlertComponent],
|
|
3210
3130
|
},] }
|
|
3211
3131
|
];
|
|
3212
3132
|
|
|
@@ -3227,8 +3147,7 @@ AlertModule.decorators = [
|
|
|
3227
3147
|
*/
|
|
3228
3148
|
class DataListComponent {
|
|
3229
3149
|
constructor() { }
|
|
3230
|
-
ngOnInit() {
|
|
3231
|
-
}
|
|
3150
|
+
ngOnInit() { }
|
|
3232
3151
|
}
|
|
3233
3152
|
DataListComponent.decorators = [
|
|
3234
3153
|
{ type: Component, args: [{
|
|
@@ -3263,10 +3182,8 @@ class DataListModule {
|
|
|
3263
3182
|
DataListModule.decorators = [
|
|
3264
3183
|
{ type: NgModule, args: [{
|
|
3265
3184
|
declarations: [DataListComponent],
|
|
3266
|
-
imports: [
|
|
3267
|
-
|
|
3268
|
-
],
|
|
3269
|
-
exports: [DataListComponent]
|
|
3185
|
+
imports: [CommonModule],
|
|
3186
|
+
exports: [DataListComponent],
|
|
3270
3187
|
},] }
|
|
3271
3188
|
];
|
|
3272
3189
|
|
|
@@ -3308,21 +3225,22 @@ FormIoStateService.decorators = [
|
|
|
3308
3225
|
* limitations under the License.
|
|
3309
3226
|
*/
|
|
3310
3227
|
class FormioComponent {
|
|
3311
|
-
constructor(userProviderService, logger, stateService, route) {
|
|
3228
|
+
constructor(userProviderService, logger, stateService, route, translateService) {
|
|
3312
3229
|
this.userProviderService = userProviderService;
|
|
3313
3230
|
this.logger = logger;
|
|
3314
3231
|
this.stateService = stateService;
|
|
3315
3232
|
this.route = route;
|
|
3233
|
+
this.translateService = translateService;
|
|
3316
3234
|
this.submission = {};
|
|
3317
3235
|
this.submit = new EventEmitter();
|
|
3318
3236
|
this.change = new EventEmitter();
|
|
3319
3237
|
this.refreshForm = new EventEmitter();
|
|
3320
3238
|
this.errors = [];
|
|
3239
|
+
this.currentLanguage$ = new BehaviorSubject(this.translateService.currentLang);
|
|
3321
3240
|
}
|
|
3322
3241
|
ngOnInit() {
|
|
3323
3242
|
const documentDefinitionName = this.route.snapshot.paramMap.get('documentDefinitionName');
|
|
3324
3243
|
const formDefinition = this.form;
|
|
3325
|
-
this.loadUserLanguageSetting();
|
|
3326
3244
|
this.formDefinition = formDefinition;
|
|
3327
3245
|
this.errors = [];
|
|
3328
3246
|
if (this.formHasLegacyUpload(formDefinition)) {
|
|
@@ -3332,11 +3250,11 @@ class FormioComponent {
|
|
|
3332
3250
|
this.stateService.setDocumentDefinitionName(documentDefinitionName);
|
|
3333
3251
|
}
|
|
3334
3252
|
this.subscribeFormRefresh();
|
|
3253
|
+
this.openLanguageSubscription();
|
|
3335
3254
|
}
|
|
3336
3255
|
ngOnChanges(changes) {
|
|
3337
3256
|
const currentForm = changes.form.currentValue;
|
|
3338
3257
|
this.formDefinition = currentForm;
|
|
3339
|
-
this.loadUserLanguageSetting();
|
|
3340
3258
|
this.reloadForm();
|
|
3341
3259
|
if (this.formHasLegacyUpload(currentForm)) {
|
|
3342
3260
|
this.setInitialToken();
|
|
@@ -3347,17 +3265,14 @@ class FormioComponent {
|
|
|
3347
3265
|
}
|
|
3348
3266
|
}
|
|
3349
3267
|
ngOnDestroy() {
|
|
3268
|
+
var _a, _b;
|
|
3350
3269
|
this.unsubscribeFormRefresh();
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
}
|
|
3354
|
-
}
|
|
3355
|
-
loadUserLanguageSetting() {
|
|
3356
|
-
this.language = localStorage.getItem('langKey') || '';
|
|
3270
|
+
(_a = this.tokenRefreshTimerSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
3271
|
+
(_b = this.languageSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
3357
3272
|
}
|
|
3358
3273
|
reloadForm() {
|
|
3359
3274
|
this.refreshForm.emit({
|
|
3360
|
-
form: this.formDefinition
|
|
3275
|
+
form: this.formDefinition,
|
|
3361
3276
|
});
|
|
3362
3277
|
}
|
|
3363
3278
|
showErrors(errors) {
|
|
@@ -3406,7 +3321,7 @@ class FormioComponent {
|
|
|
3406
3321
|
}
|
|
3407
3322
|
subscribeFormRefresh() {
|
|
3408
3323
|
if (this.formRefresh$) {
|
|
3409
|
-
this.formRefreshSubscription = this.formRefresh$.subscribe(
|
|
3324
|
+
this.formRefreshSubscription = this.formRefresh$.subscribe(refreshValue => {
|
|
3410
3325
|
if (refreshValue) {
|
|
3411
3326
|
this.refreshForm.emit(refreshValue);
|
|
3412
3327
|
}
|
|
@@ -3418,11 +3333,16 @@ class FormioComponent {
|
|
|
3418
3333
|
this.formRefreshSubscription.unsubscribe();
|
|
3419
3334
|
}
|
|
3420
3335
|
}
|
|
3336
|
+
openLanguageSubscription() {
|
|
3337
|
+
this.languageSubscription = this.translateService.stream('key').subscribe(() => {
|
|
3338
|
+
this.currentLanguage$.next(this.translateService.currentLang);
|
|
3339
|
+
});
|
|
3340
|
+
}
|
|
3421
3341
|
}
|
|
3422
3342
|
FormioComponent.decorators = [
|
|
3423
3343
|
{ type: Component, args: [{
|
|
3424
3344
|
selector: 'valtimo-form-io',
|
|
3425
|
-
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>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{error}}\n </li>\n </ol>\n </div>\n <formio
|
|
3345
|
+
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>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n <formio\n [submission]=\"submission\"\n [form]=\"formDefinition\"\n [refresh]=\"refreshForm\"\n [options]=\"options\"\n [language]=\"currentLanguage$ | async\"\n (submit)=\"onSubmit($event)\"\n (ready)=\"formReady($event)\"\n (change)=\"onChange($event)\"\n ></formio>\n</div>\n",
|
|
3426
3346
|
styles: [""]
|
|
3427
3347
|
},] }
|
|
3428
3348
|
];
|
|
@@ -3430,7 +3350,8 @@ FormioComponent.ctorParameters = () => [
|
|
|
3430
3350
|
{ type: UserProviderService },
|
|
3431
3351
|
{ type: NGXLogger },
|
|
3432
3352
|
{ type: FormIoStateService },
|
|
3433
|
-
{ type: ActivatedRoute }
|
|
3353
|
+
{ type: ActivatedRoute },
|
|
3354
|
+
{ type: TranslateService }
|
|
3434
3355
|
];
|
|
3435
3356
|
FormioComponent.propDecorators = {
|
|
3436
3357
|
form: [{ type: Input }],
|
|
@@ -3460,8 +3381,7 @@ class FormioBuilderComponent {
|
|
|
3460
3381
|
constructor() {
|
|
3461
3382
|
this.change = new EventEmitter();
|
|
3462
3383
|
}
|
|
3463
|
-
ngOnInit() {
|
|
3464
|
-
}
|
|
3384
|
+
ngOnInit() { }
|
|
3465
3385
|
onChange(event) {
|
|
3466
3386
|
this.change.emit(event);
|
|
3467
3387
|
}
|
|
@@ -3469,7 +3389,7 @@ class FormioBuilderComponent {
|
|
|
3469
3389
|
FormioBuilderComponent.decorators = [
|
|
3470
3390
|
{ type: Component, args: [{
|
|
3471
3391
|
selector: 'valtimo-form-io-builder',
|
|
3472
|
-
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>\n <form-builder [form]=\"form\" (change)=\"onChange($event)\"
|
|
3392
|
+
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>\n <form-builder [form]=\"form\" (change)=\"onChange($event)\"></form-builder>\n</div>\n",
|
|
3473
3393
|
styles: [""]
|
|
3474
3394
|
},] }
|
|
3475
3395
|
];
|
|
@@ -3498,7 +3418,7 @@ const AppConfig = {
|
|
|
3498
3418
|
appUrl: 'http://localhost:4200',
|
|
3499
3419
|
apiUrl: 'http://localhost:4200',
|
|
3500
3420
|
icons: 'fontawesome',
|
|
3501
|
-
formOnly: false
|
|
3421
|
+
formOnly: false,
|
|
3502
3422
|
};
|
|
3503
3423
|
|
|
3504
3424
|
class FormIoDomService {
|
|
@@ -3506,7 +3426,7 @@ class FormIoDomService {
|
|
|
3506
3426
|
this.stateService = stateService;
|
|
3507
3427
|
}
|
|
3508
3428
|
toggleSubmitButton(disabled) {
|
|
3509
|
-
this.stateService.currentForm$.pipe(take(1)).subscribe(
|
|
3429
|
+
this.stateService.currentForm$.pipe(take(1)).subscribe(form => {
|
|
3510
3430
|
const button = form.formioElement.nativeElement
|
|
3511
3431
|
.getElementsByClassName('formio-component-submit')[0]
|
|
3512
3432
|
.getElementsByClassName('btn-primary')[0];
|
|
@@ -3540,15 +3460,17 @@ class FormIoUploaderComponent {
|
|
|
3540
3460
|
}
|
|
3541
3461
|
}
|
|
3542
3462
|
downloadFile(resourceFile) {
|
|
3543
|
-
this.uploadProviderService
|
|
3463
|
+
this.uploadProviderService
|
|
3464
|
+
.getResource(resourceFile.data.resourceId)
|
|
3465
|
+
.subscribe((resource) => {
|
|
3544
3466
|
this.downloadService.downloadFile(resource.url, resource.resource.name);
|
|
3545
3467
|
});
|
|
3546
3468
|
}
|
|
3547
3469
|
fileSelected(file) {
|
|
3548
3470
|
this.domService.toggleSubmitButton(true);
|
|
3549
3471
|
this.uploading$.next(true);
|
|
3550
|
-
this.stateService.documentDefinitionName$.pipe(take(1)).subscribe(
|
|
3551
|
-
this.uploadProviderService.uploadFile(file, name).subscribe(
|
|
3472
|
+
this.stateService.documentDefinitionName$.pipe(take(1)).subscribe(name => {
|
|
3473
|
+
this.uploadProviderService.uploadFile(file, name).subscribe(result => {
|
|
3552
3474
|
this.domService.toggleSubmitButton(false);
|
|
3553
3475
|
this.uploading$.next(false);
|
|
3554
3476
|
this._value.push(result);
|
|
@@ -3565,7 +3487,7 @@ class FormIoUploaderComponent {
|
|
|
3565
3487
|
FormIoUploaderComponent.decorators = [
|
|
3566
3488
|
{ type: Component, args: [{
|
|
3567
3489
|
selector: 'valtimo-formio-uploader',
|
|
3568
|
-
template: "<valtimo-dropzone\n
|
|
3490
|
+
template: "<valtimo-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"null\"\n [disabled]=\"disabled\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"hideTitle\"\n [maxFileSize]=\"maxFileSize\"\n [showMaxFileSize]=\"!hideMaxFileSize\"\n [subtitle]=\"subtitle\"\n [title]=\"title\"\n [camera]=\"camera\"\n [uploading]=\"uploading$ | async\"\n></valtimo-dropzone>\n\n<div class=\"file-preview\" *ngFor=\"let resource of _value\">\n <div class=\"file-preview-name\">\n <a href=\"#\" (click)=\"downloadFile(resource)\">\n {{ resource.originalName }}\n </a>\n </div>\n <div class=\"file-preview-size\">\n <span>\n {{ resource.size | filesize }}\n </span>\n </div>\n <div class=\"file-preview-delete\" *ngIf=\"!disabled\">\n <a (click)=\"deleteFile(resource.data.resourceId)\">\n <i class=\"icon fa fa-trash\"></i>\n </a>\n </div>\n</div>\n",
|
|
3569
3491
|
styles: [".progress-bar-container{padding:15px 20px}::ng-deep .formio-component-valtimo-file .btn-secondary,::ng-deep .formio-component-valtimo-file .formio-button-add-another{display:none}::ng-deep .formio-component-valtimo-file td{border:none;padding:0!important}::ng-deep .formio-component-valtimo-file .table{border:none;border-collapse:collapse;margin:10px 0}.dropzone-container{margin-bottom:12px}.file-preview{border:1px solid #dee2e6;display:flex;margin-top:-1px}.file-preview div{padding:12px 10px}.file-preview .file-preview-name{width:65%}.file-preview .file-preview-size{width:35%}.file-preview .icon{color:#a1a1a1;cursor:pointer;font-size:1.3846rem;line-height:18px}.file-preview .icon:hover{color:grey}"]
|
|
3570
3492
|
},] }
|
|
3571
3493
|
];
|
|
@@ -3617,13 +3539,13 @@ class DropzoneComponent {
|
|
|
3617
3539
|
this.error$ = new BehaviorSubject('');
|
|
3618
3540
|
this.errorMessagesStrings = {
|
|
3619
3541
|
tooBig: 'too big',
|
|
3620
|
-
wrongType: 'this type'
|
|
3542
|
+
wrongType: 'this type',
|
|
3621
3543
|
};
|
|
3622
3544
|
this.errorMessage$ = combineLatest([
|
|
3623
3545
|
this.error$,
|
|
3624
3546
|
this.translateService.stream('dropzone.error.generic'),
|
|
3625
3547
|
this.translateService.stream('dropzone.error.tooBig'),
|
|
3626
|
-
this.translateService.stream('dropzone.error.wrongType')
|
|
3548
|
+
this.translateService.stream('dropzone.error.wrongType'),
|
|
3627
3549
|
]).pipe(map(([dropzoneError, generic, tooBig, wrongType]) => {
|
|
3628
3550
|
const strings = this.errorMessagesStrings;
|
|
3629
3551
|
if (dropzoneError) {
|
|
@@ -3675,7 +3597,7 @@ class DropzoneComponent {
|
|
|
3675
3597
|
accept: file => {
|
|
3676
3598
|
this.dropzone.removeAllFiles();
|
|
3677
3599
|
this.setFile(file);
|
|
3678
|
-
}
|
|
3600
|
+
},
|
|
3679
3601
|
});
|
|
3680
3602
|
this.setDropzoneEvents();
|
|
3681
3603
|
}
|
|
@@ -3701,7 +3623,7 @@ class DropzoneComponent {
|
|
|
3701
3623
|
DropzoneComponent.decorators = [
|
|
3702
3624
|
{ type: Component, args: [{
|
|
3703
3625
|
selector: 'valtimo-dropzone',
|
|
3704
|
-
template: "<form #dropzone [ngClass]=\"{
|
|
3626
|
+
template: "<form #dropzone [ngClass]=\"{disabled: disabled || uploading}\" class=\"dropzone dz-clickable\">\n <div class=\"dz-message\">\n <div class=\"icon\"><span class=\"mdi mdi-cloud-upload\"></span></div>\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n <ng-container *ngIf=\"uploading\">\n <ng-container *ngTemplateOutlet=\"progressBar\"></ng-container>\n </ng-container>\n <div class=\"dropzone-mobile-trigger needsclick\"></div>\n </div>\n <button\n (click)=\"showCamera()\"\n *ngIf=\"camera\"\n type=\"button\"\n class=\"btn btn-primary px-3 webcam-button\"\n >\n <i class=\"fa fa-camera\" aria-hidden=\"true\"></i>\n </button>\n <ng-container *ngIf=\"showingCamera$ | async\">\n <ng-container *ngTemplateOutlet=\"webcam\"></ng-container>\n </ng-container>\n</form>\n\n<ng-template #body>\n <h2 *ngIf=\"!hideTitle\" class=\"mb-4 mt-2\">{{ title || ('dropzone.drop' | translate) }}</h2>\n <span *ngIf=\"subtitle\" class=\"note mb-3\">{{ subtitle }}</span>\n <span *ngIf=\"showMaxFileSize\" class=\"note mb-3 small-font\"\n >{{ 'dropzone.maxFileSize' | translate }}<b>{{ maxFileSize }}mb</b></span\n >\n <ng-container *ngTemplateOutlet=\"preview\"></ng-container>\n</ng-template>\n\n<ng-template #preview>\n <ng-container\n *ngIf=\"{\n errorMessage: errorMessage$ | async,\n externalError: externalError$ | async,\n file: file$ | async\n } as obs\"\n >\n <ng-container *ngIf=\"obs.externalError || obs.errorMessage\">\n <div class=\"alert alert-danger mt-2 mb-0\">\n <div class=\"message\">\n {{ obs.externalError || obs.errorMessage }}\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!hideFilePreview && obs.file && !obs.externalError && !obs.errorMessage\">\n <div class=\"file\">\n <i class=\"icon mdi mdi-file-text mr-2\"></i>\n <span class=\"note\">{{ obs.file.name }}</span>\n <span class=\"note file-size\">- {{ obs.file.size | filesize: 2 }}</span>\n </div>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #progressBar>\n <div class=\"progress-bar-container\">\n <valtimo-progress-bar></valtimo-progress-bar>\n </div>\n</ng-template>\n\n<ng-template #webcam>\n <valtimo-webcam (imageSaved)=\"webcamImageSaved($event)\"></valtimo-webcam>\n</ng-template>\n",
|
|
3705
3627
|
styles: ["form.dropzone{padding:30px 20px}form.dropzone h2{font-size:2rem;text-align:center}form.dropzone.disabled{cursor:default;opacity:.7;pointer-events:none}form.dropzone.preview{border:none;padding:15px 20px}.dz-message{align-items:center;display:flex;flex-direction:column}.dropzone-mobile-trigger{cursor:pointer}.alert-light{align-items:center;display:flex}form.dropzone .mdi{background-color:transparent;border-radius:0;display:inline-block;height:auto;margin-bottom:0;padding:0;width:auto}form.dropzone .message{padding:1.385rem 2.1542rem}.file{align-items:center;display:flex;flex-direction:row;font-size:1.5rem}.small-font{color:#959595;font-size:1rem}.file-size{margin-left:5px}.progress-bar-container{bottom:0;height:auto;position:absolute;width:100%}.webcam-button{position:absolute;right:10px;top:10px}"]
|
|
3706
3628
|
},] }
|
|
3707
3629
|
];
|
|
@@ -3745,7 +3667,7 @@ class ProgressBarComponent {
|
|
|
3745
3667
|
ProgressBarComponent.decorators = [
|
|
3746
3668
|
{ type: Component, args: [{
|
|
3747
3669
|
selector: 'valtimo-progress-bar',
|
|
3748
|
-
template: "<div class=\"progress\" style=\"position: relative
|
|
3670
|
+
template: "<div class=\"progress\" style=\"position: relative\">\n <div class=\"progress-bar progress-bar-striped indeterminate\"></div>\n</div>\n",
|
|
3749
3671
|
styles: [".progress-bar.indeterminate{-webkit-animation:progress-indeterminate 3s linear infinite;animation:progress-indeterminate 3s linear infinite;position:relative}@-webkit-keyframes progress-indeterminate{0%{left:-25%;width:25%}to{left:100%;width:25%}}@keyframes progress-indeterminate{0%{left:-25%;width:25%}to{left:100%;width:25%}}"]
|
|
3750
3672
|
},] }
|
|
3751
3673
|
];
|
|
@@ -3770,10 +3692,8 @@ class ProgressBarModule {
|
|
|
3770
3692
|
ProgressBarModule.decorators = [
|
|
3771
3693
|
{ type: NgModule, args: [{
|
|
3772
3694
|
declarations: [ProgressBarComponent],
|
|
3773
|
-
imports: [
|
|
3774
|
-
|
|
3775
|
-
],
|
|
3776
|
-
exports: [ProgressBarComponent]
|
|
3695
|
+
imports: [CommonModule],
|
|
3696
|
+
exports: [ProgressBarComponent],
|
|
3777
3697
|
},] }
|
|
3778
3698
|
];
|
|
3779
3699
|
|
|
@@ -3805,8 +3725,7 @@ class WebcamComponent {
|
|
|
3805
3725
|
this.toggleFade();
|
|
3806
3726
|
});
|
|
3807
3727
|
if (navigator.mediaDevices.getUserMedia) {
|
|
3808
|
-
navigator.mediaDevices.getUserMedia({ video: true })
|
|
3809
|
-
.then((stream) => {
|
|
3728
|
+
navigator.mediaDevices.getUserMedia({ video: true }).then(stream => {
|
|
3810
3729
|
video.srcObject = stream;
|
|
3811
3730
|
this.stream$.next(stream);
|
|
3812
3731
|
});
|
|
@@ -3836,9 +3755,9 @@ class WebcamComponent {
|
|
|
3836
3755
|
return false;
|
|
3837
3756
|
}
|
|
3838
3757
|
stopStream() {
|
|
3839
|
-
this.stream$.pipe(take(1)).subscribe(
|
|
3758
|
+
this.stream$.pipe(take(1)).subscribe(mediaStream => {
|
|
3840
3759
|
if (mediaStream) {
|
|
3841
|
-
mediaStream.getTracks().forEach(
|
|
3760
|
+
mediaStream.getTracks().forEach(stream => stream.stop());
|
|
3842
3761
|
}
|
|
3843
3762
|
});
|
|
3844
3763
|
}
|
|
@@ -3869,7 +3788,7 @@ class WebcamComponent {
|
|
|
3869
3788
|
WebcamComponent.decorators = [
|
|
3870
3789
|
{ type: Component, args: [{
|
|
3871
3790
|
selector: 'valtimo-webcam',
|
|
3872
|
-
template: "<div
|
|
3791
|
+
template: "<div\n (click)=\"close(false)\"\n *ngIf=\"{picture: picture$ | async, stream: stream$ | async} as obs\"\n [ngClass]=\"{showing: showing$ | async}\"\n class=\"webcam-overlay\"\n>\n <div (click)=\"(false); $event.stopPropagation()\" class=\"inner-container\">\n <div class=\"webcam-container modal-content\">\n <div class=\"video-container\">\n <video autoplay=\"true\" id=\"videoElement\"></video>\n <canvas id=\"canvas\"></canvas>\n <img *ngIf=\"obs.picture?.uri\" [src]=\"obs.picture?.uri\" />\n </div>\n <div class=\"button-container\">\n <div class=\"picture-btn\">\n <button\n (click)=\"captureImage()\"\n [disabled]=\"obs.picture?.file || !obs.stream\"\n class=\"btn btn-primary btn-lg\"\n >\n <i class=\"fa fa-camera\"></i>{{ 'webcam.takePicture' | translate }}\n </button>\n </div>\n <div class=\"new-btn\">\n <button (click)=\"clearImage()\" [disabled]=\"!obs.picture?.file\" class=\"btn btn-primary\">\n <i class=\"fa fa-undo\"></i>{{ 'webcam.redo' | translate }}\n </button>\n </div>\n <div class=\"save-btn\">\n <button (click)=\"close()\" [disabled]=\"!obs.picture?.file\" class=\"btn btn-primary\">\n <i class=\"fa fa-save\"></i>{{ 'webcam.save' | translate }}\n </button>\n </div>\n </div>\n </div>\n <div class=\"modal-header\">\n <button (click)=\"close(false)\" aria-label=\"Close\" class=\"close\"><span>\u00D7</span></button>\n </div>\n </div>\n</div>\n",
|
|
3873
3792
|
styles: [".webcam-overlay{align-items:center;background-color:rgba(0,0,0,.65);display:flex;height:100%;justify-content:center;left:0;opacity:0;position:fixed;top:0;transition:opacity .15s linear;width:100%;z-index:9999}.showing{opacity:1}.webcam-container{padding:20px}.button-container{align-items:center;display:flex;height:30px;justify-content:space-evenly;margin-bottom:10px;margin-top:20px}.button-container i{margin-right:5px}.new-btn,.picture-btn,.save-btn{display:flex;justify-content:center;position:absolute}.new-btn,.save-btn{width:calc(50% - 65px)}.picture-btn{left:0;width:100%}.new-btn{left:0}.save-btn{right:0}.modal-header{color:grey;margin-top:35px;padding:0;position:absolute;right:-18px;top:0}.close{color:grey}.inner-container{position:relative}.video-container{height:495px;overflow:hidden}.video-container img,.video-container video{height:495px;position:absolute;width:660px}.video-container img{-o-object-fit:cover;object-fit:cover}#canvas{display:none}"]
|
|
3874
3793
|
},] }
|
|
3875
3794
|
];
|
|
@@ -3897,11 +3816,8 @@ class WebcamModule {
|
|
|
3897
3816
|
WebcamModule.decorators = [
|
|
3898
3817
|
{ type: NgModule, args: [{
|
|
3899
3818
|
declarations: [WebcamComponent],
|
|
3900
|
-
imports: [
|
|
3901
|
-
|
|
3902
|
-
TranslateModule
|
|
3903
|
-
],
|
|
3904
|
-
exports: [WebcamComponent]
|
|
3819
|
+
imports: [CommonModule, TranslateModule],
|
|
3820
|
+
exports: [WebcamComponent],
|
|
3905
3821
|
},] }
|
|
3906
3822
|
];
|
|
3907
3823
|
|
|
@@ -3926,7 +3842,7 @@ DropzoneModule.decorators = [
|
|
|
3926
3842
|
{ type: NgModule, args: [{
|
|
3927
3843
|
declarations: [DropzoneComponent],
|
|
3928
3844
|
imports: [CommonModule, TranslateModule, FileSizeModule, ProgressBarModule, WebcamModule],
|
|
3929
|
-
exports: [DropzoneComponent]
|
|
3845
|
+
exports: [DropzoneComponent],
|
|
3930
3846
|
},] }
|
|
3931
3847
|
];
|
|
3932
3848
|
|
|
@@ -3958,14 +3874,14 @@ FormIoModule.decorators = [
|
|
|
3958
3874
|
DocumentModule,
|
|
3959
3875
|
FileSizeModule,
|
|
3960
3876
|
ResourceModule,
|
|
3961
|
-
RouterModule
|
|
3877
|
+
RouterModule,
|
|
3962
3878
|
],
|
|
3963
3879
|
declarations: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent],
|
|
3964
3880
|
exports: [FormioComponent, FormioBuilderComponent, FormIoUploaderComponent],
|
|
3965
3881
|
providers: [
|
|
3966
3882
|
FormIoStateService,
|
|
3967
3883
|
FormIoDomService,
|
|
3968
|
-
{ provide: FormioAppConfig, useValue: ɵ0$1 }
|
|
3884
|
+
{ provide: FormioAppConfig, useValue: ɵ0$1 },
|
|
3969
3885
|
],
|
|
3970
3886
|
},] }
|
|
3971
3887
|
];
|
|
@@ -4038,7 +3954,7 @@ ModalModule.decorators = [
|
|
|
4038
3954
|
{ type: NgModule, args: [{
|
|
4039
3955
|
declarations: [ModalComponent],
|
|
4040
3956
|
imports: [CommonModule],
|
|
4041
|
-
exports: [ModalComponent]
|
|
3957
|
+
exports: [ModalComponent],
|
|
4042
3958
|
},] }
|
|
4043
3959
|
];
|
|
4044
3960
|
|
|
@@ -4071,7 +3987,7 @@ class SpinnerComponent {
|
|
|
4071
3987
|
SpinnerComponent.decorators = [
|
|
4072
3988
|
{ type: Component, args: [{
|
|
4073
3989
|
selector: 'valtimo-spinner',
|
|
4074
|
-
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<ng-container *ngIf=\"useBootstrapSpinner; else ngxSpinner\">\n <div class=\"spinner-container\" [ngClass]=\"{'no-margin-top': noMarginTop}\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"sr-only\">{{
|
|
3990
|
+
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<ng-container *ngIf=\"useBootstrapSpinner; else ngxSpinner\">\n <div class=\"spinner-container\" [ngClass]=\"{'no-margin-top': noMarginTop}\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"sr-only\">{{ 'interface.loading' | translate }}</span>\n </div>\n </div>\n</ng-container>\n\n<ng-template #ngxSpinner>\n <ngx-spinner\n [bdColor]=\"bdColor\"\n [fullScreen]=\"fullScreen\"\n [name]=\"name\"\n [color]=\"color\"\n [size]=\"size\"\n [type]=\"type\"\n >\n </ngx-spinner>\n</ng-template>\n",
|
|
4075
3991
|
styles: ["/*!\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 */.spinner-container{display:flex;justify-content:center;margin-top:30px;width:100%}.spinner-container.no-margin-top{margin-top:0}"]
|
|
4076
3992
|
},] }
|
|
4077
3993
|
];
|
|
@@ -4106,14 +4022,8 @@ class SpinnerModule {
|
|
|
4106
4022
|
SpinnerModule.decorators = [
|
|
4107
4023
|
{ type: NgModule, args: [{
|
|
4108
4024
|
declarations: [SpinnerComponent],
|
|
4109
|
-
exports: [
|
|
4110
|
-
|
|
4111
|
-
],
|
|
4112
|
-
imports: [
|
|
4113
|
-
CommonModule,
|
|
4114
|
-
NgxSpinnerModule,
|
|
4115
|
-
TranslateModule
|
|
4116
|
-
]
|
|
4025
|
+
exports: [SpinnerComponent],
|
|
4026
|
+
imports: [CommonModule, NgxSpinnerModule, TranslateModule],
|
|
4117
4027
|
},] }
|
|
4118
4028
|
];
|
|
4119
4029
|
|
|
@@ -4199,7 +4109,7 @@ class SearchableDropdownComponent {
|
|
|
4199
4109
|
.pipe(take(1))
|
|
4200
4110
|
.subscribe(([mouseOnList, items, focusedId]) => {
|
|
4201
4111
|
const length = items.length;
|
|
4202
|
-
const focusedIndex = items.findIndex(
|
|
4112
|
+
const focusedIndex = items.findIndex(item => item.id === focusedId);
|
|
4203
4113
|
const code = event.code;
|
|
4204
4114
|
const shiftKey = event.shiftKey;
|
|
4205
4115
|
const down = 'ArrowDown';
|
|
@@ -4231,7 +4141,8 @@ class SearchableDropdownComponent {
|
|
|
4231
4141
|
}
|
|
4232
4142
|
// handle moving up in the list with up arrow up or shift+tab
|
|
4233
4143
|
}
|
|
4234
|
-
else if ((code === up || (code === tab && shiftKey)) &&
|
|
4144
|
+
else if ((code === up || (code === tab && shiftKey)) &&
|
|
4145
|
+
focusedId !== this.searchId) {
|
|
4235
4146
|
// move to previous item if focus is not on the first item in the list
|
|
4236
4147
|
if (focusedIndex > 0) {
|
|
4237
4148
|
this.focusedItemId$.next(items[focusedIndex - 1].id);
|
|
@@ -4247,16 +4158,17 @@ class SearchableDropdownComponent {
|
|
|
4247
4158
|
});
|
|
4248
4159
|
}
|
|
4249
4160
|
openSearchSubscription() {
|
|
4250
|
-
this.searchSubscription = this.searchTerm.valueChanges.subscribe(
|
|
4251
|
-
this.focusedItemId$.pipe(take(1)).subscribe(
|
|
4161
|
+
this.searchSubscription = this.searchTerm.valueChanges.subscribe(searchTerm => {
|
|
4162
|
+
this.focusedItemId$.pipe(take(1)).subscribe(focusedItemId => {
|
|
4252
4163
|
if (!searchTerm) {
|
|
4253
4164
|
this.filteredItems$.next(this.items);
|
|
4254
4165
|
}
|
|
4255
4166
|
else {
|
|
4256
|
-
const filteredItems = this.items.filter(
|
|
4167
|
+
const filteredItems = this.items.filter(item => item.text.toUpperCase().includes(searchTerm.toUpperCase()));
|
|
4257
4168
|
this.filteredItems$.next(filteredItems);
|
|
4258
4169
|
// move focus to search box if filtered list length is 0 or previously focused item is not in filtered list anymore
|
|
4259
|
-
if (filteredItems.length === 0 ||
|
|
4170
|
+
if (filteredItems.length === 0 ||
|
|
4171
|
+
!filteredItems.some(item => item.id === focusedItemId)) {
|
|
4260
4172
|
this.resetFocus();
|
|
4261
4173
|
}
|
|
4262
4174
|
}
|
|
@@ -4268,8 +4180,8 @@ class SearchableDropdownComponent {
|
|
|
4268
4180
|
});
|
|
4269
4181
|
}
|
|
4270
4182
|
scrollButtonIntoView(id) {
|
|
4271
|
-
this.filteredItems$.pipe(take(1)).subscribe(
|
|
4272
|
-
const focusItemIndex = items.findIndex(
|
|
4183
|
+
this.filteredItems$.pipe(take(1)).subscribe(items => {
|
|
4184
|
+
const focusItemIndex = items.findIndex(item => item.id === id);
|
|
4273
4185
|
const focusedButton = this.buttons.toArray()[focusItemIndex];
|
|
4274
4186
|
if (focusedButton) {
|
|
4275
4187
|
focusedButton.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
@@ -4280,7 +4192,7 @@ class SearchableDropdownComponent {
|
|
|
4280
4192
|
SearchableDropdownComponent.decorators = [
|
|
4281
4193
|
{ type: Component, args: [{
|
|
4282
4194
|
selector: 'valtimo-searchable-dropdown',
|
|
4283
|
-
template: "<ng-container *ngIf=\"buttonText && items\">\n <ng-container [ngTemplateOutlet]=\"(open$ | async) ? opened : closed\"> </ng-container>\n</ng-container>\n\n<ng-template #closed>\n <ng-container *ngIf=\"style === 'button' || !style\">\n <button
|
|
4195
|
+
template: "<ng-container *ngIf=\"buttonText && items\">\n <ng-container [ngTemplateOutlet]=\"(open$ | async) ? opened : closed\"> </ng-container>\n</ng-container>\n\n<ng-template #closed>\n <ng-container *ngIf=\"style === 'button' || !style\">\n <button\n class=\"btn btn-primary btn-sm dropdown-size\"\n (click)=\"openDropdown()\"\n [style.width.px]=\"width\"\n >\n {{ buttonText }}\n </button>\n </ng-container>\n <ng-container *ngIf=\"style === 'underlinedText'\">\n <h5 class=\"underline-button\" (click)=\"openDropdown()\" [style.width.px]=\"width\">\n <b>\n {{ buttonText }}\n </b>\n </h5>\n </ng-container>\n</ng-template>\n\n<ng-template #opened>\n <div class=\"dropdown-container\" [style.width.px]=\"width\">\n <div class=\"dropdown-size search\" [style.width.px]=\"width\">\n <input\n #search\n [ngClass]=\"{disabled: disabled}\"\n [placeholder]=\"searchText\"\n [formControl]=\"searchTerm\"\n />\n {{ search.focus() }}\n </div>\n <div class=\"dropdown-list\" (mouseenter)=\"mouseEnterList()\" (mouseleave)=\"mouseLeaveList()\">\n <ng-container *ngIf=\"filteredItems$ | async as filteredItems\">\n <ng-container\n *ngIf=\"\n filteredItems.length > 0 && focusedItemId$ | async as focusedItemId;\n else noResults\n \"\n >\n <button\n #button\n *ngFor=\"let item of filteredItems\"\n [ngClass]=\"{focus: focusedItemId === item.id, disabled: disabled}\"\n class=\"dropdown-button dropdown-size\"\n (click)=\"submit(item.id)\"\n (mouseenter)=\"hoverOverButton(item.id)\"\n (mouseleave)=\"resetFocus()\"\n [style.width.px]=\"width\"\n >\n <span class=\"dropdown-button-text\">\n {{ item.text }}\n </span>\n </button>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <ng-container [ngTemplateOutlet]=\"space\"> </ng-container>\n</ng-template>\n\n<ng-template #noResults>\n <div class=\"dropdown-button dropdown-size disabled\" [style.width.px]=\"width\">\n <span class=\"dropdown-button-text\">{{ noResultsText }}</span>\n </div>\n</ng-template>\n\n<ng-template #space>\n <div *ngIf=\"style === 'button' || !style\" class=\"dropdown-size\" [style.width.px]=\"width\"></div>\n <h5 *ngIf=\"style === 'underlinedText'\" class=\"underline-button\"><b>-</b></h5>\n</ng-template>\n",
|
|
4284
4196
|
styles: [".dropdown-size{height:34px;width:250px}.underline-button{cursor:pointer;text-decoration:underline;width:250px}.dropdown-container{background-color:#fff;border:1px solid #e3e3e3;border-radius:3px;box-shadow:0 0 6px 0 rgba(0,0,0,.12);display:flex;flex-direction:column;max-height:300px;overflow:hidden;padding:7px 0;position:fixed;width:250px;z-index:999}.dropdown-list{list-style:none;margin:0;overflow:auto;overflow-x:hidden;padding:0;z-index:9999}.search{align-items:center;border-bottom:1px solid #dee2e6;display:flex;flex-shrink:0;height:44px;padding:8px 24px}.search input{padding:0;width:100%}.dropdown-button,.search input,.search input:focus{border:none;outline:none}.dropdown-button{align-items:center;background-color:#fff;color:#504e4e;cursor:pointer;display:flex;font-size:1rem;font-weight:400;padding:8px 24px}.dropdown-button.focus{background-color:#f5f5f5}.dropdown-button-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.disabled{color:#959595;cursor:default;pointer-events:none}"]
|
|
4285
4197
|
},] }
|
|
4286
4198
|
];
|
|
@@ -4319,7 +4231,7 @@ SearchableDropdownModule.decorators = [
|
|
|
4319
4231
|
{ type: NgModule, args: [{
|
|
4320
4232
|
declarations: [SearchableDropdownComponent],
|
|
4321
4233
|
imports: [CommonModule, ReactiveFormsModule],
|
|
4322
|
-
exports: [SearchableDropdownComponent]
|
|
4234
|
+
exports: [SearchableDropdownComponent],
|
|
4323
4235
|
},] }
|
|
4324
4236
|
];
|
|
4325
4237
|
|
|
@@ -4345,7 +4257,7 @@ const formIoUploaderEditForm = () => ({
|
|
|
4345
4257
|
tooltip: 'The name of this field in the API endpoint.',
|
|
4346
4258
|
validate: {
|
|
4347
4259
|
required: true,
|
|
4348
|
-
}
|
|
4260
|
+
},
|
|
4349
4261
|
},
|
|
4350
4262
|
{
|
|
4351
4263
|
type: 'textfield',
|
|
@@ -4409,7 +4321,7 @@ const formIoUploaderEditForm = () => ({
|
|
|
4409
4321
|
validate: {
|
|
4410
4322
|
required: false,
|
|
4411
4323
|
},
|
|
4412
|
-
}
|
|
4324
|
+
},
|
|
4413
4325
|
],
|
|
4414
4326
|
});
|
|
4415
4327
|
|
|
@@ -4467,7 +4379,7 @@ class SearchableDropdownSelectComponent {
|
|
|
4467
4379
|
SearchableDropdownSelectComponent.decorators = [
|
|
4468
4380
|
{ type: Component, args: [{
|
|
4469
4381
|
selector: 'valtimo-searchable-dropdown-select',
|
|
4470
|
-
template: "<valtimo-searchable-dropdown\n *ngIf=\"!hasSelection; else selection\"\n [style]=\"style\"\n [items]=\"items\"\n [buttonText]=\"buttonText\"\n [searchText]=\"searchText\"\n [noResultsText]=\"noResultsText\"\n [disabled]=\"disabled\"\n [width]=\"width\"\n (itemSelected)=\"onSelect($event)\"\n>\n</valtimo-searchable-dropdown>\n\n<ng-template #selection>\n <div
|
|
4382
|
+
template: "<valtimo-searchable-dropdown\n *ngIf=\"!hasSelection; else selection\"\n [style]=\"style\"\n [items]=\"items\"\n [buttonText]=\"buttonText\"\n [searchText]=\"searchText\"\n [noResultsText]=\"noResultsText\"\n [disabled]=\"disabled\"\n [width]=\"width\"\n (itemSelected)=\"onSelect($event)\"\n>\n</valtimo-searchable-dropdown>\n\n<ng-template #selection>\n <div\n class=\"d-flex flex-row align-items-center\"\n [style.height.px]=\"style === 'button' ? 34 : null\"\n >\n <h5 class=\"selected-text\">\n {{ selectedText }} <b>{{ selectedTextValue }}</b>\n </h5>\n <button\n type=\"button\"\n class=\"close p-0 m-0 ml-2 d-flex text-danger\"\n aria-label=\"Close\"\n (click)=\"onClearSelection()\"\n [title]=\"clearSelectionButtonTitle\"\n >\n <i class=\"clear-icon fa fa-times text-danger\"></i>\n </button>\n </div>\n</ng-template>\n",
|
|
4471
4383
|
styles: [".selected-text{margin:0}.clear-icon{font-size:13px}"]
|
|
4472
4384
|
},] }
|
|
4473
4385
|
];
|
|
@@ -4508,7 +4420,7 @@ SearchableDropdownSelectModule.decorators = [
|
|
|
4508
4420
|
{ type: NgModule, args: [{
|
|
4509
4421
|
declarations: [SearchableDropdownSelectComponent],
|
|
4510
4422
|
imports: [CommonModule, ReactiveFormsModule, SearchableDropdownModule],
|
|
4511
|
-
exports: [SearchableDropdownSelectComponent]
|
|
4423
|
+
exports: [SearchableDropdownSelectComponent],
|
|
4512
4424
|
},] }
|
|
4513
4425
|
];
|
|
4514
4426
|
|