@valtimo/form 10.4.0 → 10.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/form-routing.module.mjs +2 -2
- package/esm2020/lib/form.module.mjs +2 -2
- package/esm2020/lib/form.service.mjs +2 -2
- package/esm2020/lib/services/form-mapping/form-mapping.service.mjs +2 -2
- package/esm2020/lib/services/form-translation/form-translation.service.mjs +2 -2
- package/esm2020/public_api.mjs +2 -2
- package/fesm2015/valtimo-form.mjs +6 -6
- package/fesm2015/valtimo-form.mjs.map +1 -1
- package/fesm2020/valtimo-form.mjs +6 -6
- package/fesm2020/valtimo-form.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2015-
|
|
2
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -32,4 +32,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
32
32
|
exports: [RouterModule],
|
|
33
33
|
}]
|
|
34
34
|
}] });
|
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1yb3V0aW5nLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vZm9ybS9zcmMvbGliL2Zvcm0tcm91dGluZy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7O0dBY0c7QUFFSCxPQUFPLEVBQUMsUUFBUSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ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IHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlXG4gKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiBcIkFTIElTXCIgYmFzaXMsXG4gKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC5cbiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmRcbiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLlxuICovXG5cbmltcG9ydCB7TmdNb2R1bGV9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHtSb3V0ZXJNb2R1bGUsIFJvdXRlc30gZnJvbSAnQGFuZ3VsYXIvcm91dGVyJztcbmltcG9ydCB7Q29tbW9uTW9kdWxlfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuXG5jb25zdCByb3V0ZXM6IFJvdXRlcyA9IFtdO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtdLFxuICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlLCBSb3V0ZXJNb2R1bGUuZm9yQ2hpbGQocm91dGVzKV0sXG4gIGV4cG9ydHM6IFtSb3V0ZXJNb2R1bGVdLFxufSlcbmV4cG9ydCBjbGFzcyBGb3JtUm91dGluZ01vZHVsZSB7fVxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2015-
|
|
2
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -30,4 +30,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
30
30
|
exports: [],
|
|
31
31
|
}]
|
|
32
32
|
}] });
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy92YWx0aW1vL2Zvcm0vc3JjL2xpYi9mb3JtLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVILE9BQU8sRUFBQyxRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDdkMsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzdDLE9BQU8sRUFBQyxpQkFBaUIsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQ3hELE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQzs7QUFNakQsTUFBTSxPQUFPLFVBQVU7O3dHQUFWLFVBQVU7eUdBQVYsVUFBVSxZQUhYLFlBQVksRUFBRSxpQkFBaUIsRUFBRSxZQUFZO3lHQUc1QyxVQUFVLFlBSFgsWUFBWSxFQUFFLGlCQUFpQixFQUFFLFlBQVk7NEZBRzVDLFVBQVU7a0JBSnRCLFFBQVE7bUJBQUM7b0JBQ1IsT0FBTyxFQUFFLENBQUMsWUFBWSxFQUFFLGlCQUFpQixFQUFFLFlBQVksQ0FBQztvQkFDeEQsT0FBTyxFQUFFLEVBQUU7aUJBQ1oiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogQ29weXJpZ2h0IDIwMTUtMjAyMyBSaXRlbnNlIEJWLCB0aGUgTmV0aGVybGFuZHMuXG4gKlxuICogTGljZW5zZWQgdW5kZXIgRVVQTCwgVmVyc2lvbiA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IEZvcm1Jb01vZHVsZV0sXG4gIGV4cG9ydHM6IFtdLFxufSlcbmV4cG9ydCBjbGFzcyBGb3JtTW9kdWxlIHt9XG4iXX0=
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2015-
|
|
2
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -41,4 +41,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
41
41
|
providedIn: 'root',
|
|
42
42
|
}]
|
|
43
43
|
}], ctorParameters: function () { return [{ type: i1.ConfigService }, { type: i2.HttpClient }]; } });
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdmFsdGltby9mb3JtL3NyYy9saWIvZm9ybS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBRUgsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUt6QyxPQUFPLEVBQUMscUJBQXFCLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQzs7OztBQUt4RCxNQUFNLE9BQU8sV0FBVztJQUd0QixZQUFvQixhQUE0QixFQUFVLElBQWdCO1FBQXRELGtCQUFhLEdBQWIsYUFBYSxDQUFlO1FBQVUsU0FBSSxHQUFKLElBQUksQ0FBWTtRQUN4RSxJQUFJLENBQUMsZ0JBQWdCLEdBQUcsYUFBYSxDQUFDLE1BQU0sQ0FBQyxVQUFVLENB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maWdTZXJ2aWNlLmNvbmZpZy52YWx0aW1vQXBpO1xuICB9XG5cbiAgZ2V0Rm9ybURlZmluaXRpb25CeU5hbWUoZm9ybURlZmluaXRpb25OYW1lOiBzdHJpbmcpOiBPYnNlcnZhYmxlPEZvcm1pb0Zvcm0+IHtcbiAgICByZXR1cm4gdGhpcy5odHRwLmdldDxGb3JtaW9Gb3JtPihcbiAgICAgIGAke3RoaXMudmFsdGltb0FwaUNvbmZpZy5lbmRwb2ludFVyaX12MS9mb3JtLyR7Zm9ybURlZmluaXRpb25OYW1lfWBcbiAgICApO1xuICB9XG5cbiAgZ2V0Rm9ybURlZmluaXRpb25CeU5hbWVQcmVGaWxsZWQoXG4gICAgZm9ybURlZmluaXRpb25OYW1lOiBzdHJpbmcsXG4gICAgZG9jdW1lbnRJZDogc3RyaW5nXG4gICk6IE9ic2VydmFibGU8Rm9ybWlvRm9ybT4ge1xuICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0PEZvcm1pb0Zvcm0+KFxuICAgICAgYCR7dGhpcy52YWx0aW1vQXBpQ29uZmlnLmVuZHBvaW50VXJpfXYxL2Zvcm0tYXNzb2NpYXRpb24vZm9ybS1kZWZpbml0aW9uLyR7Zm9ybURlZmluaXRpb25OYW1lfT9kb2N1bWVudElkPSR7ZG9jdW1lbnRJZH1gLFxuICAgICAge1xuICAgICAgICBoZWFkZXJzOiBJbnRlcmNlcHRvclNraXBIZWFkZXIsXG4gICAgICB9XG4gICAgKTtcbiAgfVxufVxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2015-
|
|
2
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -45,4 +45,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
45
45
|
providedIn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vbXBvbmVudHMubWFwKChpbm5lckNvbXBvbmVudDogRXh0ZW5kZWRDb21wb25lbnRTY2hlbWEpID0+XG4gICAgICAgICAgICByZWN1cnNpdmVNYXBwaW5nRnVuY3Rpb24oaW5uZXJDb21wb25lbnQpXG4gICAgICAgICAgKSxcbiAgICAgICAgfTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG1hcHBlZENvbXBvbmVudDtcbiAgICB9O1xuXG4gICAgcmV0dXJuIHtcbiAgICAgIC4uLmZvcm0sXG4gICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAuLi4oZm9ybT8uY29tcG9uZW50cz8ubGVuZ3RoID4gMCAmJiB7XG4gICAgICAgIGNvbXBvbmVudHM6IGZvcm0/LmNvbXBvbmVudHM/Lm1hcChjb21wb25lbnQgPT4gcmVjdXJzaXZlTWFwcGluZ0Z1bmN0aW9uKGNvbXBvbmVudCkpLFxuICAgICAgfSksXG4gICAgfTtcbiAgfVxufVxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2015-
|
|
2
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -58,4 +58,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
58
58
|
providedIn: 'root',
|
|
59
59
|
}]
|
|
60
60
|
}], ctorParameters: function () { return [{ type: i1.TranslateService }, { type: i2.FormMappingService }]; } });
|
|
61
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
61
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS10cmFuc2xhdGlvbi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjd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ED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2015-
|
|
2
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -20,4 +20,4 @@ export * from './lib/form.service';
|
|
|
20
20
|
export * from './lib/form.module';
|
|
21
21
|
export * from './lib/services/form-mapping/form-mapping.service';
|
|
22
22
|
export * from './lib/services/form-translation/form-translation.service';
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vZm9ybS9zcmMvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVIOztHQUVHO0FBRUgsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsa0RBQWtELENBQUM7QUFDakUsY0FBYywwREFBMEQsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBDb3B5cmlnaHQgMjAxNS0yMDIzIFJpdGVuc2UgQlYsIHRoZSBOZXRoZXJsYW5kcy5cbiAqXG4gKiBMaWNlbnNlZCB1bmRlciBFVVBMLCBWZXJzaW9uIDEuMiAodGhlIFwiTGljZW5zZVwiKTtcbiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS5cbiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdFxuICpcbiAqIGh0dHBzOi8vam9pbnVwLmVjLmV1cm9wYS5ldS9jb2xsZWN0aW9uL2V1cGwvZXVwbC10ZXh0LWV1cGwtMTJcbiAqXG4gKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlXG4gKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiBcIkFTIElTXCIgYmFzaXMsXG4gKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC5cbiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmRcbiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLlxuICovXG5cbi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgZm9ybVxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2Zvcm0uc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9mb3JtLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zZXJ2aWNlcy9mb3JtLW1hcHBpbmcvZm9ybS1tYXBwaW5nLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvc2VydmljZXMvZm9ybS10cmFuc2xhdGlvbi9mb3JtLXRyYW5zbGF0aW9uLnNlcnZpY2UnO1xuIl19
|
|
@@ -10,7 +10,7 @@ import { FormIoModule } from '@valtimo/components';
|
|
|
10
10
|
import * as i1$2 from '@ngx-translate/core';
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
|
-
* Copyright 2015-
|
|
13
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
14
14
|
*
|
|
15
15
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
16
16
|
* you may not use this file except in compliance with the License.
|
|
@@ -49,7 +49,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
49
49
|
}], ctorParameters: function () { return [{ type: i1.ConfigService }, { type: i2.HttpClient }]; } });
|
|
50
50
|
|
|
51
51
|
/*
|
|
52
|
-
* Copyright 2015-
|
|
52
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
53
53
|
*
|
|
54
54
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
55
55
|
* you may not use this file except in compliance with the License.
|
|
@@ -79,7 +79,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
79
79
|
}] });
|
|
80
80
|
|
|
81
81
|
/*
|
|
82
|
-
* Copyright 2015-
|
|
82
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
83
83
|
*
|
|
84
84
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
85
85
|
* you may not use this file except in compliance with the License.
|
|
@@ -107,7 +107,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
107
107
|
}] });
|
|
108
108
|
|
|
109
109
|
/*
|
|
110
|
-
* Copyright 2015-
|
|
110
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
111
111
|
*
|
|
112
112
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
113
113
|
* you may not use this file except in compliance with the License.
|
|
@@ -147,7 +147,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
147
147
|
}] });
|
|
148
148
|
|
|
149
149
|
/*
|
|
150
|
-
* Copyright 2015-
|
|
150
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
151
151
|
*
|
|
152
152
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
153
153
|
* you may not use this file except in compliance with the License.
|
|
@@ -197,7 +197,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
197
197
|
}], ctorParameters: function () { return [{ type: i1$2.TranslateService }, { type: FormMappingService }]; } });
|
|
198
198
|
|
|
199
199
|
/*
|
|
200
|
-
* Copyright 2015-
|
|
200
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
201
201
|
*
|
|
202
202
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
203
203
|
* you may not use this file except in compliance with the License.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-form.mjs","sources":["../../../../projects/valtimo/form/src/lib/form.service.ts","../../../../projects/valtimo/form/src/lib/form-routing.module.ts","../../../../projects/valtimo/form/src/lib/form.module.ts","../../../../projects/valtimo/form/src/lib/services/form-mapping/form-mapping.service.ts","../../../../projects/valtimo/form/src/lib/services/form-translation/form-translation.service.ts","../../../../projects/valtimo/form/src/public_api.ts","../../../../projects/valtimo/form/src/valtimo-form.ts"],"sourcesContent":["/*\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\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {FormioForm} from '@formio/angular';\nimport {ConfigService} from '@valtimo/config';\nimport {InterceptorSkipHeader} from '@valtimo/security';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormService {\n private valtimoApiConfig: any;\n\n constructor(private configService: ConfigService, private http: HttpClient) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getFormDefinitionByName(formDefinitionName: string): Observable<FormioForm> {\n return this.http.get<FormioForm>(\n `${this.valtimoApiConfig.endpointUri}v1/form/${formDefinitionName}`\n );\n }\n\n getFormDefinitionByNamePreFilled(\n formDefinitionName: string,\n documentId: string\n ): Observable<FormioForm> {\n return this.http.get<FormioForm>(\n `${this.valtimoApiConfig.endpointUri}v1/form-association/form-definition/${formDefinitionName}?documentId=${documentId}`,\n {\n headers: InterceptorSkipHeader,\n }\n );\n }\n}\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 */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\n\nconst routes: Routes = [];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class FormRoutingModule {}\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 */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormRoutingModule} from './form-routing.module';\nimport {FormIoModule} from '@valtimo/components';\n\n@NgModule({\n imports: [CommonModule, FormRoutingModule, FormIoModule],\n exports: [],\n})\nexport class FormModule {}\n","/*\n * Copyright 2015-2021 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\nimport {Injectable} from '@angular/core';\nimport {FormioForm} from '@formio/angular';\nimport {ExtendedComponentSchema} from 'formiojs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormMappingService {\n mapComponents(\n form: FormioForm,\n mappingFunction: (component: ExtendedComponentSchema) => ExtendedComponentSchema\n ): FormioForm {\n const recursiveMappingFunction = (component: ExtendedComponentSchema) => {\n const mappedComponent = mappingFunction(component);\n const innerComponents = component.components;\n\n if (innerComponents && innerComponents.length > 0) {\n return {\n ...mappedComponent,\n components: innerComponents.map((innerComponent: ExtendedComponentSchema) =>\n recursiveMappingFunction(innerComponent)\n ),\n };\n }\n\n return mappedComponent;\n };\n\n return {\n ...form,\n // @ts-ignore\n ...(form?.components?.length > 0 && {\n components: form?.components?.map(component => recursiveMappingFunction(component)),\n }),\n };\n }\n}\n","/*\n * Copyright 2015-2021 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\nimport {Injectable} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {FormioForm} from '@formio/angular';\nimport {FormMappingService} from '../form-mapping/form-mapping.service';\nimport {ExtendedComponentSchema} from 'formiojs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormTranslationService {\n constructor(\n private readonly translateService: TranslateService,\n private readonly formMappingService: FormMappingService\n ) {}\n\n translateForm(form: FormioForm): FormioForm {\n const translateFunction = (component: ExtendedComponentSchema): ExtendedComponentSchema => {\n const labelTranslation = this.getTranslation(`${component.label}`);\n const titleTranslation = this.getTranslation(`${component.title}`);\n const contentTranslation = this.getTranslation(`${component.content}`);\n const placeholderTranslation = this.getTranslation(`${component.placeholder}`);\n const tooltipTranslation = this.getTranslation(`${component.tooltip}`);\n\n return {\n ...component,\n ...(labelTranslation && {label: `${labelTranslation}`}),\n ...(titleTranslation && {title: `${titleTranslation}`}),\n ...(contentTranslation && {content: `${contentTranslation}`}),\n ...(placeholderTranslation && {placeholder: `${placeholderTranslation}`}),\n ...(tooltipTranslation && {tooltip: `${tooltipTranslation}`}),\n };\n };\n\n return this.formMappingService.mapComponents(form, translateFunction);\n }\n\n private getTranslation(translationKey: string): string | boolean {\n const translation = this.translateService.instant(translationKey);\n\n if (translation !== translationKey) {\n return translation;\n } else {\n return false;\n }\n }\n}\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 */\n\n/*\n * Public API Surface of form\n */\n\nexport * from './lib/form.service';\nexport * from './lib/form.module';\nexport * from './lib/services/form-mapping/form-mapping.service';\nexport * from './lib/services/form-translation/form-translation.service';\n","/**\n * Generated bundle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AAW,KAAK,cAAc,EAAE;AAClC,YAAA,OAAO,WAAW,CAAC;AACpB,SAAA;AAAM,aAAA;AACL,YAAA,OAAO,KAAK,CAAC;AACd,SAAA;KACF;;oHAnCU,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,kBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA,CAAA;4FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACxBD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-form.mjs","sources":["../../../../projects/valtimo/form/src/lib/form.service.ts","../../../../projects/valtimo/form/src/lib/form-routing.module.ts","../../../../projects/valtimo/form/src/lib/form.module.ts","../../../../projects/valtimo/form/src/lib/services/form-mapping/form-mapping.service.ts","../../../../projects/valtimo/form/src/lib/services/form-translation/form-translation.service.ts","../../../../projects/valtimo/form/src/public_api.ts","../../../../projects/valtimo/form/src/valtimo-form.ts"],"sourcesContent":["/*\n * Copyright 2015-2023 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\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {FormioForm} from '@formio/angular';\nimport {ConfigService} from '@valtimo/config';\nimport {InterceptorSkipHeader} from '@valtimo/security';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormService {\n private valtimoApiConfig: any;\n\n constructor(private configService: ConfigService, private http: HttpClient) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getFormDefinitionByName(formDefinitionName: string): Observable<FormioForm> {\n return this.http.get<FormioForm>(\n `${this.valtimoApiConfig.endpointUri}v1/form/${formDefinitionName}`\n );\n }\n\n getFormDefinitionByNamePreFilled(\n formDefinitionName: string,\n documentId: string\n ): Observable<FormioForm> {\n return this.http.get<FormioForm>(\n `${this.valtimoApiConfig.endpointUri}v1/form-association/form-definition/${formDefinitionName}?documentId=${documentId}`,\n {\n headers: InterceptorSkipHeader,\n }\n );\n }\n}\n","/*\n * Copyright 2015-2023 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\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\n\nconst routes: Routes = [];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class FormRoutingModule {}\n","/*\n * Copyright 2015-2023 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\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormRoutingModule} from './form-routing.module';\nimport {FormIoModule} from '@valtimo/components';\n\n@NgModule({\n imports: [CommonModule, FormRoutingModule, FormIoModule],\n exports: [],\n})\nexport class FormModule {}\n","/*\n * Copyright 2015-2023 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\nimport {Injectable} from '@angular/core';\nimport {FormioForm} from '@formio/angular';\nimport {ExtendedComponentSchema} from 'formiojs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormMappingService {\n mapComponents(\n form: FormioForm,\n mappingFunction: (component: ExtendedComponentSchema) => ExtendedComponentSchema\n ): FormioForm {\n const recursiveMappingFunction = (component: ExtendedComponentSchema) => {\n const mappedComponent = mappingFunction(component);\n const innerComponents = component.components;\n\n if (innerComponents && innerComponents.length > 0) {\n return {\n ...mappedComponent,\n components: innerComponents.map((innerComponent: ExtendedComponentSchema) =>\n recursiveMappingFunction(innerComponent)\n ),\n };\n }\n\n return mappedComponent;\n };\n\n return {\n ...form,\n // @ts-ignore\n ...(form?.components?.length > 0 && {\n components: form?.components?.map(component => recursiveMappingFunction(component)),\n }),\n };\n }\n}\n","/*\n * Copyright 2015-2023 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\nimport {Injectable} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {FormioForm} from '@formio/angular';\nimport {FormMappingService} from '../form-mapping/form-mapping.service';\nimport {ExtendedComponentSchema} from 'formiojs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormTranslationService {\n constructor(\n private readonly translateService: TranslateService,\n private readonly formMappingService: FormMappingService\n ) {}\n\n translateForm(form: FormioForm): FormioForm {\n const translateFunction = (component: ExtendedComponentSchema): ExtendedComponentSchema => {\n const labelTranslation = this.getTranslation(`${component.label}`);\n const titleTranslation = this.getTranslation(`${component.title}`);\n const contentTranslation = this.getTranslation(`${component.content}`);\n const placeholderTranslation = this.getTranslation(`${component.placeholder}`);\n const tooltipTranslation = this.getTranslation(`${component.tooltip}`);\n\n return {\n ...component,\n ...(labelTranslation && {label: `${labelTranslation}`}),\n ...(titleTranslation && {title: `${titleTranslation}`}),\n ...(contentTranslation && {content: `${contentTranslation}`}),\n ...(placeholderTranslation && {placeholder: `${placeholderTranslation}`}),\n ...(tooltipTranslation && {tooltip: `${tooltipTranslation}`}),\n };\n };\n\n return this.formMappingService.mapComponents(form, translateFunction);\n }\n\n private getTranslation(translationKey: string): string | boolean {\n const translation = this.translateService.instant(translationKey);\n\n if (translation !== translationKey) {\n return translation;\n } else {\n return false;\n }\n }\n}\n","/*\n * Copyright 2015-2023 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/*\n * Public API Surface of form\n */\n\nexport * from './lib/form.service';\nexport * from './lib/form.module';\nexport * from './lib/services/form-mapping/form-mapping.service';\nexport * from './lib/services/form-translation/form-translation.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2.FormMappingService"],"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;MAYU,WAAW,CAAA;IAGtB,WAAoB,CAAA,aAA4B,EAAU,IAAgB,EAAA;AAAtD,QAAA,IAAa,CAAA,aAAA,GAAb,aAAa,CAAe;AAAU,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QACxE,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;KACzD;AAED,IAAA,uBAAuB,CAAC,kBAA0B,EAAA;AAChD,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,CAAG,EAAA,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAA,QAAA,EAAW,kBAAkB,CAAA,CAAE,CACpE,CAAC;KACH;IAED,gCAAgC,CAC9B,kBAA0B,EAC1B,UAAkB,EAAA;AAElB,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,CAAG,EAAA,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAA,oCAAA,EAAuC,kBAAkB,CAAe,YAAA,EAAA,UAAU,EAAE,EACxH;AACE,YAAA,OAAO,EAAE,qBAAqB;AAC/B,SAAA,CACF,CAAC;KACH;;yGAvBU,WAAW,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,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AC,OAAO,EAAE,CAAG,EAAA,kBAAkB,CAAE,CAAA,EAAC,EAC5D,CAAA;AACJ,SAAC,CAAC;QAEF,OAAO,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;KACvE;AAEO,IAAA,cAAc,CAAC,cAAsB,EAAA;QAC3C,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAElE,IAAI,WAAW,KAAK,cAAc,EAAE;AAClC,YAAA,OAAO,WAAW,CAAC;AACpB,SAAA;AAAM,aAAA;AACL,YAAA,OAAO,KAAK,CAAC;AACd,SAAA;KACF;;oHAnCU,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,kBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA,CAAA;4FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACxBD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
|
|
@@ -10,7 +10,7 @@ import { FormIoModule } from '@valtimo/components';
|
|
|
10
10
|
import * as i1$2 from '@ngx-translate/core';
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
|
-
* Copyright 2015-
|
|
13
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
14
14
|
*
|
|
15
15
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
16
16
|
* you may not use this file except in compliance with the License.
|
|
@@ -49,7 +49,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
49
49
|
}], ctorParameters: function () { return [{ type: i1.ConfigService }, { type: i2.HttpClient }]; } });
|
|
50
50
|
|
|
51
51
|
/*
|
|
52
|
-
* Copyright 2015-
|
|
52
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
53
53
|
*
|
|
54
54
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
55
55
|
* you may not use this file except in compliance with the License.
|
|
@@ -79,7 +79,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
79
79
|
}] });
|
|
80
80
|
|
|
81
81
|
/*
|
|
82
|
-
* Copyright 2015-
|
|
82
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
83
83
|
*
|
|
84
84
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
85
85
|
* you may not use this file except in compliance with the License.
|
|
@@ -107,7 +107,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
107
107
|
}] });
|
|
108
108
|
|
|
109
109
|
/*
|
|
110
|
-
* Copyright 2015-
|
|
110
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
111
111
|
*
|
|
112
112
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
113
113
|
* you may not use this file except in compliance with the License.
|
|
@@ -153,7 +153,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
153
153
|
}] });
|
|
154
154
|
|
|
155
155
|
/*
|
|
156
|
-
* Copyright 2015-
|
|
156
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
157
157
|
*
|
|
158
158
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
159
159
|
* you may not use this file except in compliance with the License.
|
|
@@ -210,7 +210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
210
210
|
}], ctorParameters: function () { return [{ type: i1$2.TranslateService }, { type: FormMappingService }]; } });
|
|
211
211
|
|
|
212
212
|
/*
|
|
213
|
-
* Copyright 2015-
|
|
213
|
+
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
214
214
|
*
|
|
215
215
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
216
216
|
* you may not use this file except in compliance with the License.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-form.mjs","sources":["../../../../projects/valtimo/form/src/lib/form.service.ts","../../../../projects/valtimo/form/src/lib/form-routing.module.ts","../../../../projects/valtimo/form/src/lib/form.module.ts","../../../../projects/valtimo/form/src/lib/services/form-mapping/form-mapping.service.ts","../../../../projects/valtimo/form/src/lib/services/form-translation/form-translation.service.ts","../../../../projects/valtimo/form/src/public_api.ts","../../../../projects/valtimo/form/src/valtimo-form.ts"],"sourcesContent":["/*\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\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {FormioForm} from '@formio/angular';\nimport {ConfigService} from '@valtimo/config';\nimport {InterceptorSkipHeader} from '@valtimo/security';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormService {\n private valtimoApiConfig: any;\n\n constructor(private configService: ConfigService, private http: HttpClient) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getFormDefinitionByName(formDefinitionName: string): Observable<FormioForm> {\n return this.http.get<FormioForm>(\n `${this.valtimoApiConfig.endpointUri}v1/form/${formDefinitionName}`\n );\n }\n\n getFormDefinitionByNamePreFilled(\n formDefinitionName: string,\n documentId: string\n ): Observable<FormioForm> {\n return this.http.get<FormioForm>(\n `${this.valtimoApiConfig.endpointUri}v1/form-association/form-definition/${formDefinitionName}?documentId=${documentId}`,\n {\n headers: InterceptorSkipHeader,\n }\n );\n }\n}\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 */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\n\nconst routes: Routes = [];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class FormRoutingModule {}\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 */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormRoutingModule} from './form-routing.module';\nimport {FormIoModule} from '@valtimo/components';\n\n@NgModule({\n imports: [CommonModule, FormRoutingModule, FormIoModule],\n exports: [],\n})\nexport class FormModule {}\n","/*\n * Copyright 2015-2021 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\nimport {Injectable} from '@angular/core';\nimport {FormioForm} from '@formio/angular';\nimport {ExtendedComponentSchema} from 'formiojs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormMappingService {\n mapComponents(\n form: FormioForm,\n mappingFunction: (component: ExtendedComponentSchema) => ExtendedComponentSchema\n ): FormioForm {\n const recursiveMappingFunction = (component: ExtendedComponentSchema) => {\n const mappedComponent = mappingFunction(component);\n const innerComponents = component.components;\n\n if (innerComponents && innerComponents.length > 0) {\n return {\n ...mappedComponent,\n components: innerComponents.map((innerComponent: ExtendedComponentSchema) =>\n recursiveMappingFunction(innerComponent)\n ),\n };\n }\n\n return mappedComponent;\n };\n\n return {\n ...form,\n // @ts-ignore\n ...(form?.components?.length > 0 && {\n components: form?.components?.map(component => recursiveMappingFunction(component)),\n }),\n };\n }\n}\n","/*\n * Copyright 2015-2021 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\nimport {Injectable} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {FormioForm} from '@formio/angular';\nimport {FormMappingService} from '../form-mapping/form-mapping.service';\nimport {ExtendedComponentSchema} from 'formiojs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormTranslationService {\n constructor(\n private readonly translateService: TranslateService,\n private readonly formMappingService: FormMappingService\n ) {}\n\n translateForm(form: FormioForm): FormioForm {\n const translateFunction = (component: ExtendedComponentSchema): ExtendedComponentSchema => {\n const labelTranslation = this.getTranslation(`${component.label}`);\n const titleTranslation = this.getTranslation(`${component.title}`);\n const contentTranslation = this.getTranslation(`${component.content}`);\n const placeholderTranslation = this.getTranslation(`${component.placeholder}`);\n const tooltipTranslation = this.getTranslation(`${component.tooltip}`);\n\n return {\n ...component,\n ...(labelTranslation && {label: `${labelTranslation}`}),\n ...(titleTranslation && {title: `${titleTranslation}`}),\n ...(contentTranslation && {content: `${contentTranslation}`}),\n ...(placeholderTranslation && {placeholder: `${placeholderTranslation}`}),\n ...(tooltipTranslation && {tooltip: `${tooltipTranslation}`}),\n };\n };\n\n return this.formMappingService.mapComponents(form, translateFunction);\n }\n\n private getTranslation(translationKey: string): string | boolean {\n const translation = this.translateService.instant(translationKey);\n\n if (translation !== translationKey) {\n return translation;\n } else {\n return false;\n }\n }\n}\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 */\n\n/*\n * Public API Surface of form\n */\n\nexport * from './lib/form.service';\nexport * from './lib/form.module';\nexport * from './lib/services/form-mapping/form-mapping.service';\nexport * from './lib/services/form-translation/form-translation.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"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;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACxBD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-form.mjs","sources":["../../../../projects/valtimo/form/src/lib/form.service.ts","../../../../projects/valtimo/form/src/lib/form-routing.module.ts","../../../../projects/valtimo/form/src/lib/form.module.ts","../../../../projects/valtimo/form/src/lib/services/form-mapping/form-mapping.service.ts","../../../../projects/valtimo/form/src/lib/services/form-translation/form-translation.service.ts","../../../../projects/valtimo/form/src/public_api.ts","../../../../projects/valtimo/form/src/valtimo-form.ts"],"sourcesContent":["/*\n * Copyright 2015-2023 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\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {FormioForm} from '@formio/angular';\nimport {ConfigService} from '@valtimo/config';\nimport {InterceptorSkipHeader} from '@valtimo/security';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormService {\n private valtimoApiConfig: any;\n\n constructor(private configService: ConfigService, private http: HttpClient) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getFormDefinitionByName(formDefinitionName: string): Observable<FormioForm> {\n return this.http.get<FormioForm>(\n `${this.valtimoApiConfig.endpointUri}v1/form/${formDefinitionName}`\n );\n }\n\n getFormDefinitionByNamePreFilled(\n formDefinitionName: string,\n documentId: string\n ): Observable<FormioForm> {\n return this.http.get<FormioForm>(\n `${this.valtimoApiConfig.endpointUri}v1/form-association/form-definition/${formDefinitionName}?documentId=${documentId}`,\n {\n headers: InterceptorSkipHeader,\n }\n );\n }\n}\n","/*\n * Copyright 2015-2023 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\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\n\nconst routes: Routes = [];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class FormRoutingModule {}\n","/*\n * Copyright 2015-2023 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\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormRoutingModule} from './form-routing.module';\nimport {FormIoModule} from '@valtimo/components';\n\n@NgModule({\n imports: [CommonModule, FormRoutingModule, FormIoModule],\n exports: [],\n})\nexport class FormModule {}\n","/*\n * Copyright 2015-2023 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\nimport {Injectable} from '@angular/core';\nimport {FormioForm} from '@formio/angular';\nimport {ExtendedComponentSchema} from 'formiojs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormMappingService {\n mapComponents(\n form: FormioForm,\n mappingFunction: (component: ExtendedComponentSchema) => ExtendedComponentSchema\n ): FormioForm {\n const recursiveMappingFunction = (component: ExtendedComponentSchema) => {\n const mappedComponent = mappingFunction(component);\n const innerComponents = component.components;\n\n if (innerComponents && innerComponents.length > 0) {\n return {\n ...mappedComponent,\n components: innerComponents.map((innerComponent: ExtendedComponentSchema) =>\n recursiveMappingFunction(innerComponent)\n ),\n };\n }\n\n return mappedComponent;\n };\n\n return {\n ...form,\n // @ts-ignore\n ...(form?.components?.length > 0 && {\n components: form?.components?.map(component => recursiveMappingFunction(component)),\n }),\n };\n }\n}\n","/*\n * Copyright 2015-2023 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\nimport {Injectable} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {FormioForm} from '@formio/angular';\nimport {FormMappingService} from '../form-mapping/form-mapping.service';\nimport {ExtendedComponentSchema} from 'formiojs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormTranslationService {\n constructor(\n private readonly translateService: TranslateService,\n private readonly formMappingService: FormMappingService\n ) {}\n\n translateForm(form: FormioForm): FormioForm {\n const translateFunction = (component: ExtendedComponentSchema): ExtendedComponentSchema => {\n const labelTranslation = this.getTranslation(`${component.label}`);\n const titleTranslation = this.getTranslation(`${component.title}`);\n const contentTranslation = this.getTranslation(`${component.content}`);\n const placeholderTranslation = this.getTranslation(`${component.placeholder}`);\n const tooltipTranslation = this.getTranslation(`${component.tooltip}`);\n\n return {\n ...component,\n ...(labelTranslation && {label: `${labelTranslation}`}),\n ...(titleTranslation && {title: `${titleTranslation}`}),\n ...(contentTranslation && {content: `${contentTranslation}`}),\n ...(placeholderTranslation && {placeholder: `${placeholderTranslation}`}),\n ...(tooltipTranslation && {tooltip: `${tooltipTranslation}`}),\n };\n };\n\n return this.formMappingService.mapComponents(form, translateFunction);\n }\n\n private getTranslation(translationKey: string): string | boolean {\n const translation = this.translateService.instant(translationKey);\n\n if (translation !== translationKey) {\n return translation;\n } else {\n return false;\n }\n }\n}\n","/*\n * Copyright 2015-2023 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/*\n * Public API Surface of form\n */\n\nexport * from './lib/form.service';\nexport * from './lib/form.module';\nexport * from './lib/services/form-mapping/form-mapping.service';\nexport * from './lib/services/form-translation/form-translation.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2.FormMappingService"],"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;MAYU,WAAW,CAAA;IAGtB,WAAoB,CAAA,aAA4B,EAAU,IAAgB,EAAA;QAAtD,IAAa,CAAA,aAAA,GAAb,aAAa,CAAe;QAAU,IAAI,CAAA,IAAA,GAAJ,IAAI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