@valtimo/form 4.15.2 → 4.16.0-next-main.19
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-form.umd.js +9 -10
- package/bundles/valtimo-form.umd.js.map +1 -1
- package/bundles/valtimo-form.umd.min.js.map +1 -1
- package/esm2015/lib/form-routing.module.js +3 -6
- package/esm2015/lib/form.module.js +2 -2
- package/esm2015/lib/form.service.js +2 -2
- package/esm2015/lib/services/form-mapping/form-mapping.service.js +5 -3
- package/esm2015/lib/services/form-translation/form-translation.service.js +2 -2
- package/esm2015/public_api.js +1 -1
- package/esm2015/valtimo-form.js +1 -1
- package/fesm2015/valtimo-form.js +9 -10
- package/fesm2015/valtimo-form.js.map +1 -1
- package/package.json +1 -1
- package/valtimo-form.metadata.json +1 -1
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
FormService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormService_Factory() { return new FormService(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i2.HttpClient)); }, token: FormService, providedIn: "root" });
|
|
37
37
|
FormService.decorators = [
|
|
38
38
|
{ type: i0.Injectable, args: [{
|
|
39
|
-
providedIn: 'root'
|
|
39
|
+
providedIn: 'root',
|
|
40
40
|
},] }
|
|
41
41
|
];
|
|
42
42
|
FormService.ctorParameters = function () { return [
|
|
@@ -68,11 +68,8 @@
|
|
|
68
68
|
FormRoutingModule.decorators = [
|
|
69
69
|
{ type: i0.NgModule, args: [{
|
|
70
70
|
declarations: [],
|
|
71
|
-
imports: [
|
|
72
|
-
|
|
73
|
-
router.RouterModule.forChild(routes),
|
|
74
|
-
],
|
|
75
|
-
exports: [router.RouterModule]
|
|
71
|
+
imports: [common.CommonModule, router.RouterModule.forChild(routes)],
|
|
72
|
+
exports: [router.RouterModule],
|
|
76
73
|
},] }
|
|
77
74
|
];
|
|
78
75
|
|
|
@@ -99,7 +96,7 @@
|
|
|
99
96
|
FormModule.decorators = [
|
|
100
97
|
{ type: i0.NgModule, args: [{
|
|
101
98
|
imports: [common.CommonModule, FormRoutingModule, components.FormIoModule],
|
|
102
|
-
exports: []
|
|
99
|
+
exports: [],
|
|
103
100
|
},] }
|
|
104
101
|
];
|
|
105
102
|
|
|
@@ -131,14 +128,16 @@
|
|
|
131
128
|
}
|
|
132
129
|
return mappedComponent;
|
|
133
130
|
};
|
|
134
|
-
return Object.assign(Object.assign({}, form), (((_a = form === null || form === void 0 ? void 0 : form.components) === null || _a === void 0 ? void 0 : _a.length) > 0 && {
|
|
131
|
+
return Object.assign(Object.assign({}, form), (((_a = form === null || form === void 0 ? void 0 : form.components) === null || _a === void 0 ? void 0 : _a.length) > 0 && {
|
|
132
|
+
components: (_b = form === null || form === void 0 ? void 0 : form.components) === null || _b === void 0 ? void 0 : _b.map(function (component) { return recursiveMappingFunction(component); }),
|
|
133
|
+
}));
|
|
135
134
|
};
|
|
136
135
|
return FormMappingService;
|
|
137
136
|
}());
|
|
138
137
|
FormMappingService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormMappingService_Factory() { return new FormMappingService(); }, token: FormMappingService, providedIn: "root" });
|
|
139
138
|
FormMappingService.decorators = [
|
|
140
139
|
{ type: i0.Injectable, args: [{
|
|
141
|
-
providedIn: 'root'
|
|
140
|
+
providedIn: 'root',
|
|
142
141
|
},] }
|
|
143
142
|
];
|
|
144
143
|
|
|
@@ -188,7 +187,7 @@
|
|
|
188
187
|
FormTranslationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormTranslationService_Factory() { return new FormTranslationService(i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(FormMappingService)); }, token: FormTranslationService, providedIn: "root" });
|
|
189
188
|
FormTranslationService.decorators = [
|
|
190
189
|
{ type: i0.Injectable, args: [{
|
|
191
|
-
providedIn: 'root'
|
|
190
|
+
providedIn: 'root',
|
|
192
191
|
},] }
|
|
193
192
|
];
|
|
194
193
|
FormTranslationService.ctorParameters = function () { return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-form.umd.js","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 'angular-formio';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FormService {\n private valtimoApiConfig: any;\n\n constructor(\n private configService: ConfigService,\n private http: HttpClient\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getFormDefinitionByName(formDefinitionName: string): Observable<FormioForm> {\n return this.http.get<FormioForm>(`${this.valtimoApiConfig.endpointUri}form/${formDefinitionName}`);\n }\n\n getFormDefinitionByNamePreFilled(formDefinitionName: string, documentId: string): Observable<FormioForm> {\n return this.http.get<FormioForm>(`${this.valtimoApiConfig.endpointUri}form-association/form-definition/${formDefinitionName}?documentId=${documentId}`);\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\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class FormRoutingModule {\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 {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}\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 'angular-formio';\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) => recursiveMappingFunction(innerComponent))\n };\n }\n\n return mappedComponent;\n };\n\n return {\n ...form,\n // @ts-ignore\n ...(form?.components?.length > 0 && {components: form?.components?.map((component) =>\n recursiveMappingFunction(component))} )\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 'angular-formio';\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\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\nexport {FormRoutingModule as ɵa} from './lib/form-routing.module';"],"names":["Injectable","ConfigService","HttpClient","NgModule","CommonModule","RouterModule","FormIoModule","TranslateService"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QA4BE,qBACU,aAA4B,EAC5B,IAAgB;YADhB,kBAAa,GAAb,aAAa,CAAe;YAC5B,SAAI,GAAJ,IAAI,CAAY;YAExB,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;SACzD;QAED,6CAAuB,GAAvB,UAAwB,kBAA0B;YAChD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAgB,IA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EAAC,KACpE,kBAAkB,IAAI,EAAC,OAAO,EAAE,KAAG,kBAAoB,EAAC,GAC5D;aACH,CAAC;YAEF,OAAO,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;SACvE;QAEO,+CAAc,GAAd,UAAe,cAAsB;YAC3C,IAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;YAElE,IAAI,WAAW,KAAK,cAAc,EAAE;gBAClC,OAAO,WAAW,CAAC;aACpB;iBAAM;gBACL,OAAO,KAAK,CAAC;aACd;SACF;;;;;gBAvCFA,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;gBAPOO,qBAAgB;gBAEhB,kBAAkB;;;ICnB1B;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-form.umd.js","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 'angular-formio';\nimport {ConfigService} from '@valtimo/config';\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}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}form-association/form-definition/${formDefinitionName}?documentId=${documentId}`\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 'angular-formio';\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 'angular-formio';\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\nexport {FormRoutingModule as ɵa} from './lib/form-routing.module';"],"names":["Injectable","ConfigService","HttpClient","NgModule","CommonModule","RouterModule","FormIoModule","TranslateService"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QA4BE,qBAAoB,aAA4B,EAAU,IAAgB;YAAtD,kBAAa,GAAb,aAAa,CAAe;YAAU,SAAI,GAAJ,IAAI,CAAY;YACxE,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;SACzD;QAED,6CAAuB,GAAvB,UAAwB,kBAA0B;YAChD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CACf,IAAI,CAAC,gBAAgB,CAAC,WAAW,aAAQ,kBAAoB,CACjE,CAAC;SACH;QAED,sDAAgC,GAAhC,UACE,kBAA0B,EAC1B,UAAkB;YAElB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CACf,IAAI,CAAC,gBAAgB,CAAC,WAAW,yCAAoC,kBAAkB,oBAAe,UAAY,CACtH,CAAC;SACH;;;;;gBAvBFA,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;gBAJOC,gBAAa;gBAHbC,aAAU;;;ICjBlB;;;;;;;;;;;;;;;IAoBA,IAAM,MAAM,GAAW,EAAE,CAAC;;QAO1B;;;;;gBALCC,WAAQ,SAAC;oBACR,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAACC,mBAAY,EAAEC,mBAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBACtD,OAAO,EAAE,CAACA,mBAAY,CAAC;iBACxB;;;IC1BD;;;;;;;;;;;;;;;;QAyBA;;;;;gBAJCF,WAAQ,SAAC;oBACR,OAAO,EAAE,CAACC,mBAAY,EAAE,iBAAiB,EAAEE,uBAAY,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,CAAC;gBACnE,IAAM,kBAAkB,GAAG,KAAI,CAAC,cAAc,CAAC,KAAG,SAAS,CAAC,OAAS,CAAC,CAAC;gBACvE,IAAM,sBAAsB,GAAG,KAAI,CAAC,cAAc,CAAC,KAAG,SAAS,CAAC,WAAa,CAAC,CAAC;gBAC/E,IAAM,kBAAkB,GAAG,KAAI,CAAC,cAAc,CAAC,KAAG,SAAS,CAAC,OAAS,CAAC,CAAC;gBAEvE,+FACK,SAAS,IACR,gBAAgB,IAAI,EAAC,KAAK,EAAE,KAAG,gBAAkB,EAAC,KAClD,gBAAgB,IAAI,EAAC,KAAK,EAAE,KAAG,gBAAkB,EAAC,KAClD,kBAAkB,IAAI,EAAC,OAAO,EAAE,KAAG,kBAAoB,EAAC,KACxD,sBAAsB,IAAI,EAAC,WAAW,EAAE,KAAG,sBAAwB,EAAC,KACpE,kBAAkB,IAAI,EAAC,OAAO,EAAE,KAAG,kBAAoB,EAAC,GAC5D;aACH,CAAC;YAEF,OAAO,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;SACvE;QAEO,+CAAc,GAAd,UAAe,cAAsB;YAC3C,IAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;YAElE,IAAI,WAAW,KAAK,cAAc,EAAE;gBAClC,OAAO,WAAW,CAAC;aACpB;iBAAM;gBACL,OAAO,KAAK,CAAC;aACd;SACF;;;;;gBAtCFA,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;gBAPOO,qBAAgB;gBAEhB,kBAAkB;;;ICnB1B;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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"],"names":["FormService","configService","http","this","valtimoApiConfig","config","valtimoApi","prototype","getFormDefinitionByName","formDefinitionName","get","endpointUri","getFormDefinitionByNamePreFilled","documentId","Injectable","args","providedIn","ConfigService","HttpClient","NgModule","declarations","imports","CommonModule","RouterModule","forChild","exports","FormRoutingModule","FormIoModule","FormMappingService","mapComponents","form","mappingFunction","recursiveMappingFunction","component","mappedComponent","innerComponents","components","length","Object","assign","map","innerComponent","_a","_b","FormTranslationService","translateService","formMappingService","translateForm","_this","labelTranslation","getTranslation","label","titleTranslation","title","contentTranslation","content","placeholderTranslation","placeholder","tooltipTranslation","tooltip","translationKey","translation","instant","TranslateService"],"mappings":"orBA4BE,SAAAA,EACUC,EACAC,GADAC,KAAAF,cAAAA,EACAE,KAAAD,KAAAA,EAERC,KAAKC,iBAAmBH,EAAcI,OAAOC,kBAG/CN,EAAAO,UAAAC,wBAAA,SAAwBC,GACtB,OAAON,KAAKD,KAAKQ,IAAmBP,KAAKC,iBAAiBO,YAAW,QAAQF,IAG/ET,EAAAO,UAAAK,iCAAA,SAAiCH,EAA4BI,GAC3D,OAAOV,KAAKD,KAAKQ,IAAmBP,KAAKC,iBAAiBO,YAAW,oCAAoCF,EAAkB,eAAeI,8KAlB7IC,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,oDAHNC,EAAAA,qBAHAC,EAAAA,cCGR,MAWA,iCARCC,EAAAA,SAAQJ,KAAA,CAAC,CACRK,aAAc,GACdC,QAAS,CACPC,EAAAA,aACAC,EAAAA,aAAaC,SAPM,KASrBC,QAAS,CAACF,EAAAA,wBCJZ,iCAJCJ,EAAAA,SAAQJ,KAAA,CAAC,CACRM,QAAS,CAACC,EAAAA,aAAcI,EAAmBC,EAAAA,cAC3CF,QAAS,wBCAX,SAAAG,YACEA,EAAArB,UAAAsB,cAAA,SACEC,EACAC,WAEMC,EAA2B,SAACC,GAChC,I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,EAAArC,UAAA2C,eAAA,SAAeU,GACrB,IAAMC,EAAc1D,KAAK0C,iBAAiBiB,QAAQF,GAElD,OAAIC,IAAgBD,GACXC,qKAnCZ/C,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,oDANN+C,EAAAA,wBAEAnC","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 'angular-formio';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FormService {\n private valtimoApiConfig: any;\n\n constructor(\n private configService: ConfigService,\n private http: HttpClient\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getFormDefinitionByName(formDefinitionName: string): Observable<FormioForm> {\n return this.http.get<FormioForm>(`${this.valtimoApiConfig.endpointUri}form/${formDefinitionName}`);\n }\n\n getFormDefinitionByNamePreFilled(formDefinitionName: string, documentId: string): Observable<FormioForm> {\n return this.http.get<FormioForm>(`${this.valtimoApiConfig.endpointUri}form-association/form-definition/${formDefinitionName}?documentId=${documentId}`);\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\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class FormRoutingModule {\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 {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}\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 'angular-formio';\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) => recursiveMappingFunction(innerComponent))\n };\n }\n\n return mappedComponent;\n };\n\n return {\n ...form,\n // @ts-ignore\n ...(form?.components?.length > 0 && {components: form?.components?.map((component) =>\n recursiveMappingFunction(component))} )\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 'angular-formio';\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\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"]}
|
|
1
|
+
{"version":3,"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"],"names":["FormService","configService","http","this","valtimoApiConfig","config","valtimoApi","prototype","getFormDefinitionByName","formDefinitionName","get","endpointUri","getFormDefinitionByNamePreFilled","documentId","Injectable","args","providedIn","ConfigService","HttpClient","NgModule","declarations","imports","CommonModule","RouterModule","forChild","exports","FormRoutingModule","FormIoModule","FormMappingService","mapComponents","form","mappingFunction","recursiveMappingFunction","component","mappedComponent","innerComponents","components","length","Object","assign","map","innerComponent","_a","_b","FormTranslationService","translateService","formMappingService","translateForm","_this","labelTranslation","getTranslation","label","titleTranslation","title","contentTranslation","content","placeholderTranslation","placeholder","tooltipTranslation","tooltip","translationKey","translation","instant","TranslateService"],"mappings":"orBA4BE,SAAAA,EAAoBC,EAAsCC,GAAtCC,KAAAF,cAAAA,EAAsCE,KAAAD,KAAAA,EACxDC,KAAKC,iBAAmBH,EAAcI,OAAOC,kBAG/CN,EAAAO,UAAAC,wBAAA,SAAwBC,GACtB,OAAON,KAAKD,KAAKQ,IACZP,KAAKC,iBAAiBO,YAAW,QAAQF,IAIhDT,EAAAO,UAAAK,iCAAA,SACEH,EACAI,GAEA,OAAOV,KAAKD,KAAKQ,IACZP,KAAKC,iBAAiBO,YAAW,oCAAoCF,EAAkB,eAAeI,8KArB9GC,EAAAA,WAAUC,KA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B,EAAUsB,SACtDC,EAAyBR,EAAKE,eAAe,GAAGjB,EAAUwB,aAC1DC,EAAqBV,EAAKE,eAAe,GAAGjB,EAAU0B,SAE5D,OAAArB,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAAD,OAAAC,OAAA,GACKN,GACCgB,GAAoB,CAACE,MAAO,GAAGF,IAC/BG,GAAoB,CAACC,MAAO,GAAGD,IAC/BE,GAAsB,CAACC,QAAS,GAAGD,IACnCE,GAA0B,CAACC,YAAa,GAAGD,IAC3CE,GAAsB,CAACC,QAAS,GAAGD,QAOrCd,EAAArC,UAAA2C,eAAA,SAAeU,GACrB,IAAMC,EAAc1D,KAAK0C,iBAAiBiB,QAAQF,GAElD,OAAIC,IAAgBD,GACXC,qKAlCZ/C,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,oDANN+C,EAAAA,wBAEAnC","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 'angular-formio';\nimport {ConfigService} from '@valtimo/config';\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}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}form-association/form-definition/${formDefinitionName}?documentId=${documentId}`\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 'angular-formio';\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 'angular-formio';\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"]}
|
|
@@ -22,11 +22,8 @@ export class FormRoutingModule {
|
|
|
22
22
|
FormRoutingModule.decorators = [
|
|
23
23
|
{ type: NgModule, args: [{
|
|
24
24
|
declarations: [],
|
|
25
|
-
imports: [
|
|
26
|
-
|
|
27
|
-
RouterModule.forChild(routes),
|
|
28
|
-
],
|
|
29
|
-
exports: [RouterModule]
|
|
25
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
26
|
+
exports: [RouterModule],
|
|
30
27
|
},] }
|
|
31
28
|
];
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1yb3V0aW5nLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIvdG1wL2plbmtpbnMtYTczNGFhZGMvd29ya3NwYWNlL1ZhbHRpbW9fLV9Bbmd1bGFyX0xpYnJhcmllc19tYWluL3Byb2plY3RzL3ZhbHR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IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlXG4gKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiBcIkFTIElTXCIgYmFzaXMsXG4gKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC5cbiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmRcbiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLlxuICovXG5cbmltcG9ydCB7TmdNb2R1bGV9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHtSb3V0ZXJNb2R1bGUsIFJvdXRlc30gZnJvbSAnQGFuZ3VsYXIvcm91dGVyJztcbmltcG9ydCB7Q29tbW9uTW9kdWxlfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuXG5jb25zdCByb3V0ZXM6IFJvdXRlcyA9IFtdO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtdLFxuICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlLCBSb3V0ZXJNb2R1bGUuZm9yQ2hpbGQocm91dGVzKV0sXG4gIGV4cG9ydHM6IFtSb3V0ZXJNb2R1bGVdLFxufSlcbmV4cG9ydCBjbGFzcyBGb3JtUm91dGluZ01vZHVsZSB7fVxuIl19
|
|
@@ -22,7 +22,7 @@ export class FormModule {
|
|
|
22
22
|
FormModule.decorators = [
|
|
23
23
|
{ type: NgModule, args: [{
|
|
24
24
|
imports: [CommonModule, FormRoutingModule, FormIoModule],
|
|
25
|
-
exports: []
|
|
25
|
+
exports: [],
|
|
26
26
|
},] }
|
|
27
27
|
];
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
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qXG4gKiBodHRwczovL2pvaW51cC5lYy5ldXJvcGEuZXUvY29sbGVjdGlvbi9ldXBsL2V1cGwtdGV4dC1ldXBsLTEyXG4gKlxuICogVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzb2Z0d2FyZVxuICogZGlzdHJpYnV0ZWQgdW5kZXIgdGhlIExpY2Vuc2UgaXMgZGlzdHJpYnV0ZWQgb24gYW4gXCJBUyBJU1wiIGJhc2lzLFxuICogV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuXG4gKiBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kXG4gKiBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS5cbiAqL1xuXG5pbXBvcnQge05nTW9kdWxlfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7Q29tbW9uTW9kdWxlfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuaW1wb3J0IHtGb3JtUm91dGluZ01vZHVsZX0gZnJvbSAnLi9mb3JtLXJvdXRpbmcubW9kdWxlJztcbmltcG9ydCB7Rm9ybUlvTW9kdWxlfSBmcm9tICdAdmFsdGltby9jb21wb25lbnRzJztcblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW0NvbW1vbk1vZHVsZSwgRm9ybVJvdXRpbmdNb2R1bGUsIEZvcm1Jb01vZHVsZV0sXG4gIGV4cG9ydHM6IFtdLFxufSlcbmV4cG9ydCBjbGFzcyBGb3JtTW9kdWxlIHt9XG4iXX0=
|
|
@@ -35,11 +35,11 @@ export class FormService {
|
|
|
35
35
|
FormService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormService_Factory() { return new FormService(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i2.HttpClient)); }, token: FormService, providedIn: "root" });
|
|
36
36
|
FormService.decorators = [
|
|
37
37
|
{ type: Injectable, args: [{
|
|
38
|
-
providedIn: 'root'
|
|
38
|
+
providedIn: 'root',
|
|
39
39
|
},] }
|
|
40
40
|
];
|
|
41
41
|
FormService.ctorParameters = () => [
|
|
42
42
|
{ type: ConfigService },
|
|
43
43
|
{ type: HttpClient }
|
|
44
44
|
];
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Ii90bXAvamVua2lucy1hNzM0YWFkYy93b3Jrc3BhY2UvVmFsdGltb18tX0FuZ3VsYXJfTGlicmFyaWVzX21haW4vcHJvamVjdHMvdmFsdGltby9mb3JtL3NyYy8iLCJzb3VyY2VzIjpbImxpYi9mb3JtLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7O0dBY0c7QUFFSCxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUdoRCxPQUFPLEVBQUMsYUFBYSxFQUFDLE1BQU0saUJBQWlCLENBQUM7Ozs7QUFLOUMsTUFBTSxPQUFPLFdBQVc7SUFHdEIsWUFBb0IsYUFBNEIsRUFBVSxJQUFnQjtRQUF0RCxrQkFBYSxHQUFiLGFBQWEsQ0FBZTtRQUFVLFNBQUksR0FBSixJQUFJLENBQVk7UUFDeEUsSUFBSSxDQUFDLGdCQUFnQixHQUFHLGFBQWEsQ0FBQyxNQUFNLENBQUMsVUFBVSxDQUFDO0lBQzFELENBQUM7SUFFRCx1QkFBdUIsQ0FBQyxrQkFBMEI7UUF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cbiAgICAgIGAke3RoaXMudmFsdGltb0FwaUNvbmZpZy5lbmRwb2ludFVyaX1mb3JtLyR7Zm9ybURlZmluaXRpb25OYW1lfWBcbiAgICApO1xuICB9XG5cbiAgZ2V0Rm9ybURlZmluaXRpb25CeU5hbWVQcmVGaWxsZWQoXG4gICAgZm9ybURlZmluaXRpb25OYW1lOiBzdHJpbmcsXG4gICAgZG9jdW1lbnRJZDogc3RyaW5nXG4gICk6IE9ic2VydmFibGU8Rm9ybWlvRm9ybT4ge1xuICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0PEZvcm1pb0Zvcm0+KFxuICAgICAgYCR7dGhpcy52YWx0aW1vQXBpQ29uZmlnLmVuZHBvaW50VXJpfWZvcm0tYXNzb2NpYXRpb24vZm9ybS1kZWZpbml0aW9uLyR7Zm9ybURlZmluaXRpb25OYW1lfT9kb2N1bWVudElkPSR7ZG9jdW1lbnRJZH1gXG4gICAgKTtcbiAgfVxufVxuIl19
|
|
@@ -26,13 +26,15 @@ export class FormMappingService {
|
|
|
26
26
|
}
|
|
27
27
|
return mappedComponent;
|
|
28
28
|
};
|
|
29
|
-
return Object.assign(Object.assign({}, form), (((_a = form === null || form === void 0 ? void 0 : form.components) === null || _a === void 0 ? void 0 : _a.length) > 0 && {
|
|
29
|
+
return Object.assign(Object.assign({}, form), (((_a = form === null || form === void 0 ? void 0 : form.components) === null || _a === void 0 ? void 0 : _a.length) > 0 && {
|
|
30
|
+
components: (_b = form === null || form === void 0 ? void 0 : form.components) === null || _b === void 0 ? void 0 : _b.map(component => recursiveMappingFunction(component)),
|
|
31
|
+
}));
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
FormMappingService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormMappingService_Factory() { return new FormMappingService(); }, token: FormMappingService, providedIn: "root" });
|
|
33
35
|
FormMappingService.decorators = [
|
|
34
36
|
{ type: Injectable, args: [{
|
|
35
|
-
providedIn: 'root'
|
|
37
|
+
providedIn: 'root',
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GlubmVyQ29tcG9uZW50cy5tYXAoKGlubmVyQ29tcG9uZW50OiBFeHRlbmRlZENvbXBvbmVudFNjaGVtYSkgPT5cbiAgICAgICAgICAgIHJlY3Vyc2l2ZU1hcHBpbmdGdW5jdGlvbihpbm5lckNvbXBvbmVudClcbiAgICAgICAgICApLFxuICAgICAgICB9O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbWFwcGVkQ29tcG9uZW50O1xuICAgIH07XG5cbiAgICByZXR1cm4ge1xuICAgICAgLi4uZm9ybSxcbiAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgIC4uLihmb3JtPy5jb21wb25lbnRzPy5sZW5ndGggPiAwICYmIHtcbiAgICAgICAgY29tcG9uZW50czogZm9ybT8uY29tcG9uZW50cz8ubWFwKGNvbXBvbmVudCA9PiByZWN1cnNpdmVNYXBwaW5nRnVuY3Rpb24oY29tcG9uZW50KSksXG4gICAgICB9KSxcbiAgICB9O1xuICB9XG59XG4iXX0=
|
|
@@ -48,11 +48,11 @@ export class FormTranslationService {
|
|
|
48
48
|
FormTranslationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormTranslationService_Factory() { return new FormTranslationService(i0.ɵɵinject(i1.TranslateService), i0.ɵɵinject(i2.FormMappingService)); }, token: FormTranslationService, providedIn: "root" });
|
|
49
49
|
FormTranslationService.decorators = [
|
|
50
50
|
{ type: Injectable, args: [{
|
|
51
|
-
providedIn: 'root'
|
|
51
|
+
providedIn: 'root',
|
|
52
52
|
},] }
|
|
53
53
|
];
|
|
54
54
|
FormTranslationService.ctorParameters = () => [
|
|
55
55
|
{ type: TranslateService },
|
|
56
56
|
{ type: FormMappingService }
|
|
57
57
|
];
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
58
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS10cmFuc2xhdGlvbi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Ii90bXAvamVua2l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aWYgKHRyYW5zbGF0aW9uICE9PSB0cmFuc2xhdGlvbktleSkge1xuICAgICAgcmV0dXJuIHRyYW5zbGF0aW9uO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9XG59XG4iXX0=
|
package/esm2015/public_api.js
CHANGED
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIvdG1wL2plbmtpbnMtYTczNGFhZGMvd29ya3NwYWNlL1ZhbHRpbW9fLV9Bbmd1bGFyX0xpYnJhcmllc19tYWluL3Byb2plY3RzL3ZhbHRpbW8vZm9ybS9zcmMvIiwic291cmNlcyI6WyJwdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBRUg7O0dBRUc7QUFFSCxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxrREFBa0QsQ0FBQztBQUNqRSxjQUFjLDBEQUEwRCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIENvcHlyaWdodCAyMDE1LTIwMjAgUml0ZW5zZSBCViwgdGhlIE5ldGhlcmxhbmRzLlxuICpcbiAqIExpY2Vuc2VkIHVuZGVyIEVVUEwsIFZlcnNpb24gMS4yICh0aGUgXCJMaWNlbnNlXCIpO1xuICogeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLlxuICogW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routing.module';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdGltby1mb3JtLmpzIiwic291cmNlUm9vdCI6Ii90bXAvamVua2lucy1hNzM0YWFkYy93b3Jrc3BhY2UvVmFsdGltb18tX0FuZ3VsYXJfTGlicmFyaWVzX21haW4vcHJvamVjdHMvdmFsdGltby9mb3JtL3NyYy8iLCJzb3VyY2VzIjpbInZhbHRpbW8tZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxpQkFBaUIsSUFBSSxFQUFFLEVBQUMsTUFBTSwyQkFBMkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcblxuZXhwb3J0IHtGb3JtUm91dGluZ01vZHVsZSBhcyDJtWF9IGZyb20gJy4vbGliL2Zvcm0tcm91dGluZy5tb2R1bGUnOyJdfQ==
|
package/fesm2015/valtimo-form.js
CHANGED
|
@@ -37,7 +37,7 @@ class FormService {
|
|
|
37
37
|
FormService.ɵprov = ɵɵdefineInjectable({ factory: function FormService_Factory() { return new FormService(ɵɵinject(ConfigService), ɵɵinject(HttpClient)); }, token: FormService, providedIn: "root" });
|
|
38
38
|
FormService.decorators = [
|
|
39
39
|
{ type: Injectable, args: [{
|
|
40
|
-
providedIn: 'root'
|
|
40
|
+
providedIn: 'root',
|
|
41
41
|
},] }
|
|
42
42
|
];
|
|
43
43
|
FormService.ctorParameters = () => [
|
|
@@ -66,11 +66,8 @@ class FormRoutingModule {
|
|
|
66
66
|
FormRoutingModule.decorators = [
|
|
67
67
|
{ type: NgModule, args: [{
|
|
68
68
|
declarations: [],
|
|
69
|
-
imports: [
|
|
70
|
-
|
|
71
|
-
RouterModule.forChild(routes),
|
|
72
|
-
],
|
|
73
|
-
exports: [RouterModule]
|
|
69
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
70
|
+
exports: [RouterModule],
|
|
74
71
|
},] }
|
|
75
72
|
];
|
|
76
73
|
|
|
@@ -94,7 +91,7 @@ class FormModule {
|
|
|
94
91
|
FormModule.decorators = [
|
|
95
92
|
{ type: NgModule, args: [{
|
|
96
93
|
imports: [CommonModule, FormRoutingModule, FormIoModule],
|
|
97
|
-
exports: []
|
|
94
|
+
exports: [],
|
|
98
95
|
},] }
|
|
99
96
|
];
|
|
100
97
|
|
|
@@ -124,13 +121,15 @@ class FormMappingService {
|
|
|
124
121
|
}
|
|
125
122
|
return mappedComponent;
|
|
126
123
|
};
|
|
127
|
-
return Object.assign(Object.assign({}, form), (((_a = form === null || form === void 0 ? void 0 : form.components) === null || _a === void 0 ? void 0 : _a.length) > 0 && {
|
|
124
|
+
return Object.assign(Object.assign({}, form), (((_a = form === null || form === void 0 ? void 0 : form.components) === null || _a === void 0 ? void 0 : _a.length) > 0 && {
|
|
125
|
+
components: (_b = form === null || form === void 0 ? void 0 : form.components) === null || _b === void 0 ? void 0 : _b.map(component => recursiveMappingFunction(component)),
|
|
126
|
+
}));
|
|
128
127
|
}
|
|
129
128
|
}
|
|
130
129
|
FormMappingService.ɵprov = ɵɵdefineInjectable({ factory: function FormMappingService_Factory() { return new FormMappingService(); }, token: FormMappingService, providedIn: "root" });
|
|
131
130
|
FormMappingService.decorators = [
|
|
132
131
|
{ type: Injectable, args: [{
|
|
133
|
-
providedIn: 'root'
|
|
132
|
+
providedIn: 'root',
|
|
134
133
|
},] }
|
|
135
134
|
];
|
|
136
135
|
|
|
@@ -178,7 +177,7 @@ class FormTranslationService {
|
|
|
178
177
|
FormTranslationService.ɵprov = ɵɵdefineInjectable({ factory: function FormTranslationService_Factory() { return new FormTranslationService(ɵɵinject(TranslateService), ɵɵinject(FormMappingService)); }, token: FormTranslationService, providedIn: "root" });
|
|
179
178
|
FormTranslationService.decorators = [
|
|
180
179
|
{ type: Injectable, args: [{
|
|
181
|
-
providedIn: 'root'
|
|
180
|
+
providedIn: 'root',
|
|
182
181
|
},] }
|
|
183
182
|
];
|
|
184
183
|
FormTranslationService.ctorParameters = () => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-form.js","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 'angular-formio';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FormService {\n private valtimoApiConfig: any;\n\n constructor(\n private configService: ConfigService,\n private http: HttpClient\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getFormDefinitionByName(formDefinitionName: string): Observable<FormioForm> {\n return this.http.get<FormioForm>(`${this.valtimoApiConfig.endpointUri}form/${formDefinitionName}`);\n }\n\n getFormDefinitionByNamePreFilled(formDefinitionName: string, documentId: string): Observable<FormioForm> {\n return this.http.get<FormioForm>(`${this.valtimoApiConfig.endpointUri}form-association/form-definition/${formDefinitionName}?documentId=${documentId}`);\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\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class FormRoutingModule {\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 {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}\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 'angular-formio';\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) => recursiveMappingFunction(innerComponent))\n };\n }\n\n return mappedComponent;\n };\n\n return {\n ...form,\n // @ts-ignore\n ...(form?.components?.length > 0 && {components: form?.components?.map((component) =>\n recursiveMappingFunction(component))} )\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 'angular-formio';\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\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\nexport {FormRoutingModule as ɵa} from './lib/form-routing.module';"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;MAyBa,WAAW;IAGtB,YACU,aAA4B,EAC5B,IAAgB;QADhB,kBAAa,GAAb,aAAa,CAAe;QAC5B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AgB,IAAI,EAAC,KAAK,EAAE,GAAG,gBAAgB,EAAE,EAAC,KAClD,kBAAkB,IAAI,EAAC,OAAO,EAAE,GAAG,kBAAkB,EAAE,EAAC,KACxD,sBAAsB,IAAI,EAAC,WAAW,EAAE,GAAG,sBAAsB,EAAE,EAAC,KACpE,kBAAkB,IAAI,EAAC,OAAO,EAAE,GAAG,kBAAkB,EAAE,EAAC,GAC5D;SACH,CAAC;QAEF,OAAO,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;KACvE;IAEO,cAAc,CAAC,cAAsB;QAC3C,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAElE,IAAI,WAAW,KAAK,cAAc,EAAE;YAClC,OAAO,WAAW,CAAC;SACpB;aAAM;YACL,OAAO,KAAK,CAAC;SACd;KACF;;;;YAvCF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;YAPO,gBAAgB;YAEhB,kBAAkB;;;ACnB1B;;;;;;;;;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-form.js","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 'angular-formio';\nimport {ConfigService} from '@valtimo/config';\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}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}form-association/form-definition/${formDefinitionName}?documentId=${documentId}`\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 'angular-formio';\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 'angular-formio';\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\nexport {FormRoutingModule as ɵa} from './lib/form-routing.module';"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;;MAyBa,WAAW;IAGtB,YAAoB,aAA4B,EAAU,IAAgB;QAAtD,kBAAa,GAAb,aAAa,CAAe;QAAU,SAAI,GAAJ,IAAI,CAAY;QACxE,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;KACzD;IAED,uBAAuB,CAAC,kBAA0B;QAChD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,QAAQ,kBAAkB,EAAE,CACjE,CAAC;KACH;IAED,gCAAgC,CAC9B,kBAA0B,EAC1B,UAAkB;QAElB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,oCAAoC,kBAAkB,eAAe,UAAU,EAAE,CACtH,CAAC;KACH;;;;YAvBF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;YAJO,aAAa;YAHb,UAAU;;;ACjBlB;;;;;;;;;;;;;;;AAoBA,MAAM,MAAM,GAAW,EAAE,CAAC;MAOb,iBAAiB;;;YAL7B,QAAQ,SAAC;gBACR,YAAY,EAAE,EAAE;gBAChB,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACtD,OAAO,EAAE,CAAC,YAAY,CAAC;aACxB;;;AC1BD;;;;;;;;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":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"FormService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":28,"character":37},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":28,"character":66}]}],"getFormDefinitionByName":[{"__symbolic":"method"}],"getFormDefinitionByNamePreFilled":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"FormModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":21,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":22,"character":12},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@valtimo/components","name":"FormIoModule","line":22,"character":45}],"exports":[]}]}],"members":{}},"FormMappingService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"mapComponents":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"FormTranslationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateService","line":27,"character":39},{"__symbolic":"reference","name":"FormMappingService"}]}],"translateForm":[{"__symbolic":"method"}],"getTranslation":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":22,"character":1},"arguments":[{"declarations":[],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":24,"character":12},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":24,"character":26},"member":"forChild"},"arguments":[[]]}],"exports":[{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":25,"character":12}]}]}],"members":{}}},"origins":{"FormService":"./lib/form.service","FormModule":"./lib/form.module","FormMappingService":"./lib/services/form-mapping/form-mapping.service","FormTranslationService":"./lib/services/form-translation/form-translation.service","ɵa":"./lib/form-routing.module"},"importAs":"@valtimo/form"}
|