@valtimo/form 4.22.0 → 5.1.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.
Files changed (39) hide show
  1. package/esm2020/lib/form-routing.module.mjs +35 -0
  2. package/esm2020/lib/form.module.mjs +33 -0
  3. package/esm2020/lib/form.service.mjs +44 -0
  4. package/esm2020/lib/services/form-mapping/form-mapping.service.mjs +48 -0
  5. package/esm2020/lib/services/form-translation/form-translation.service.mjs +61 -0
  6. package/esm2020/public_api.mjs +23 -0
  7. package/esm2020/valtimo-form.mjs +5 -0
  8. package/fesm2015/{valtimo-form.js → valtimo-form.mjs} +57 -46
  9. package/fesm2015/valtimo-form.mjs.map +1 -0
  10. package/fesm2020/valtimo-form.mjs +233 -0
  11. package/fesm2020/valtimo-form.mjs.map +1 -0
  12. package/lib/form-routing.module.d.ts +7 -0
  13. package/lib/form-routing.module.d.ts.map +1 -0
  14. package/lib/form.module.d.ts +8 -0
  15. package/lib/form.module.d.ts.map +1 -0
  16. package/lib/form.service.d.ts +4 -0
  17. package/lib/form.service.d.ts.map +1 -0
  18. package/lib/services/form-mapping/form-mapping.service.d.ts +4 -0
  19. package/lib/services/form-mapping/form-mapping.service.d.ts.map +1 -0
  20. package/lib/services/form-translation/form-translation.service.d.ts +4 -0
  21. package/lib/services/form-translation/form-translation.service.d.ts.map +1 -0
  22. package/package.json +22 -10
  23. package/public_api.d.ts +1 -0
  24. package/public_api.d.ts.map +1 -0
  25. package/valtimo-form.d.ts +2 -1
  26. package/valtimo-form.d.ts.map +1 -0
  27. package/bundles/valtimo-form.umd.js +0 -227
  28. package/bundles/valtimo-form.umd.js.map +0 -1
  29. package/bundles/valtimo-form.umd.min.js +0 -2
  30. package/bundles/valtimo-form.umd.min.js.map +0 -1
  31. package/esm2015/lib/form-routing.module.js +0 -29
  32. package/esm2015/lib/form.module.js +0 -28
  33. package/esm2015/lib/form.service.js +0 -45
  34. package/esm2015/lib/services/form-mapping/form-mapping.service.js +0 -40
  35. package/esm2015/lib/services/form-translation/form-translation.service.js +0 -58
  36. package/esm2015/public_api.js +0 -23
  37. package/esm2015/valtimo-form.js +0 -6
  38. package/fesm2015/valtimo-form.js.map +0 -1
  39. package/valtimo-form.metadata.json +0 -1
@@ -1 +0,0 @@
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;YACx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C,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,2 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("@valtimo/config"),require("@angular/common"),require("@angular/router"),require("@valtimo/components"),require("@ngx-translate/core")):"function"==typeof define&&define.amd?define("@valtimo/form",["exports","@angular/core","@angular/common/http","@valtimo/config","@angular/common","@angular/router","@valtimo/components","@ngx-translate/core"],e):e(((t=t||self).valtimo=t.valtimo||{},t.valtimo.form={}),t.ng.core,t.ng.common.http,t.config,t.ng.common,t.ng.router,t.components,t.i1$1)}(this,(function(t,e,n,o,r,i,a,c){"use strict";var s=function(){function t(t,e){this.configService=t,this.http=e,this.valtimoApiConfig=t.config.valtimoApi}return t.prototype.getFormDefinitionByName=function(t){return this.http.get(this.valtimoApiConfig.endpointUri+"form/"+t)},t.prototype.getFormDefinitionByNamePreFilled=function(t,e){return this.http.get(this.valtimoApiConfig.endpointUri+"form-association/form-definition/"+t+"?documentId="+e)},t}();s.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new s(e.ɵɵinject(o.ConfigService),e.ɵɵinject(n.HttpClient))},token:s,providedIn:"root"}),s.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],s.ctorParameters=function(){return[{type:o.ConfigService},{type:n.HttpClient}]};var l=function(){};l.decorators=[{type:e.NgModule,args:[{declarations:[],imports:[r.CommonModule,i.RouterModule.forChild([])],exports:[i.RouterModule]}]}];var u=function(){};u.decorators=[{type:e.NgModule,args:[{imports:[r.CommonModule,l,a.FormIoModule],exports:[]}]}];var p=function(){function t(){}return t.prototype.mapComponents=function(t,e){var n,o,r=function(t){var n=e(t),o=t.components;return o&&o.length>0?Object.assign(Object.assign({},n),{components:o.map((function(t){return r(t)}))}):n};return Object.assign(Object.assign({},t),(null===(n=null==t?void 0:t.components)||void 0===n?void 0:n.length)>0&&{components:null===(o=null==t?void 0:t.components)||void 0===o?void 0:o.map((function(t){return r(t)}))})},t}();p.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new p},token:p,providedIn:"root"}),p.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}];var m=function(){function t(t,e){this.translateService=t,this.formMappingService=e}return t.prototype.translateForm=function(t){var e=this;return this.formMappingService.mapComponents(t,(function(t){var n=e.getTranslation(""+t.label),o=e.getTranslation(""+t.title),r=e.getTranslation(""+t.content),i=e.getTranslation(""+t.placeholder),a=e.getTranslation(""+t.tooltip);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),n&&{label:""+n}),o&&{title:""+o}),r&&{content:""+r}),i&&{placeholder:""+i}),a&&{tooltip:""+a})}))},t.prototype.getTranslation=function(t){var e=this.translateService.instant(t);return e!==t&&e},t}();m.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new m(e.ɵɵinject(c.TranslateService),e.ɵɵinject(p))},token:m,providedIn:"root"}),m.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],m.ctorParameters=function(){return[{type:c.TranslateService},{type:p}]},t.FormMappingService=p,t.FormModule=u,t.FormService=s,t.FormTranslationService=m,t.ɵa=l,Object.defineProperty(t,"__esModule",{value:!0})}));
2
- //# sourceMappingURL=valtimo-form.umd.min.js.map
@@ -1 +0,0 @@
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,KAAA,CAAC,CACVC,WAAY,oDAHNC,EAAAA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Ae,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"]}
@@ -1,29 +0,0 @@
1
- /*
2
- * Copyright 2015-2020 Ritense BV, the Netherlands.
3
- *
4
- * Licensed under EUPL, Version 1.2 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { NgModule } from '@angular/core';
17
- import { RouterModule } from '@angular/router';
18
- import { CommonModule } from '@angular/common';
19
- const routes = [];
20
- export class FormRoutingModule {
21
- }
22
- FormRoutingModule.decorators = [
23
- { type: NgModule, args: [{
24
- declarations: [],
25
- imports: [CommonModule, RouterModule.forChild(routes)],
26
- exports: [RouterModule],
27
- },] }
28
- ];
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlI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
3
- *
4
- * Licensed under EUPL, Version 1.2 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { NgModule } from '@angular/core';
17
- import { CommonModule } from '@angular/common';
18
- import { FormRoutingModule } from './form-routing.module';
19
- import { FormIoModule } from '@valtimo/components';
20
- export class FormModule {
21
- }
22
- FormModule.decorators = [
23
- { type: NgModule, args: [{
24
- imports: [CommonModule, FormRoutingModule, FormIoModule],
25
- exports: [],
26
- },] }
27
- ];
28
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiL3RtcC9qZW5raW5zLTg3ZTU2NmU4L3dvcmtzcGFjZS9yb250ZW5kX2xpYnJhcmllc18tX3JlbGVhc2VfbWFpbi9wcm9qZWN0cy92YWx0aW1vL2Zvcm0vc3JjLyIsInNvdXJjZXMiOlsibGliL2Zvcm0ubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBRUgsT0FBTyxFQUFDLFFBQVEsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUN2QyxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDN0MsT0FBTyxFQUFDLGlCQUFpQixFQUFDLE1BQU0sdUJBQXVCLENBQUM7QUFDeEQsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBTWpELE1BQU0sT0FBTyxVQUFVOzs7WUFKdEIsUUFBUSxTQUFDO2dCQUNS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fSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuaW1wb3J0IHtGb3JtUm91dGluZ01vZHVsZX0gZnJvbSAnLi9mb3JtLXJvdXRpbmcubW9kdWxlJztcbmltcG9ydCB7Rm9ybUlvTW9kdWxlfSBmcm9tICdAdmFsdGltby9jb21wb25lbnRzJztcblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogW0NvbW1vbk1vZHVsZSwgRm9ybVJvdXRpbmdNb2R1bGUsIEZvcm1Jb01vZHVsZV0sXG4gIGV4cG9ydHM6IFtdLFxufSlcbmV4cG9ydCBjbGFzcyBGb3JtTW9kdWxlIHt9XG4iXX0=
@@ -1,45 +0,0 @@
1
- /*
2
- * Copyright 2015-2020 Ritense BV, the Netherlands.
3
- *
4
- * Licensed under EUPL, Version 1.2 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Injectable } from '@angular/core';
17
- import { HttpClient } from '@angular/common/http';
18
- import { ConfigService } from '@valtimo/config';
19
- import * as i0 from "@angular/core";
20
- import * as i1 from "@valtimo/config";
21
- import * as i2 from "@angular/common/http";
22
- export class FormService {
23
- constructor(configService, http) {
24
- this.configService = configService;
25
- this.http = http;
26
- this.valtimoApiConfig = configService.config.valtimoApi;
27
- }
28
- getFormDefinitionByName(formDefinitionName) {
29
- return this.http.get(`${this.valtimoApiConfig.endpointUri}form/${formDefinitionName}`);
30
- }
31
- getFormDefinitionByNamePreFilled(formDefinitionName, documentId) {
32
- return this.http.get(`${this.valtimoApiConfig.endpointUri}form-association/form-definition/${formDefinitionName}?documentId=${documentId}`);
33
- }
34
- }
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
- FormService.decorators = [
37
- { type: Injectable, args: [{
38
- providedIn: 'root',
39
- },] }
40
- ];
41
- FormService.ctorParameters = () => [
42
- { type: ConfigService },
43
- { type: HttpClient }
44
- ];
45
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Ii90bXAvamVua2lucy04N2U1NjZlOC93b3Jrc3BhY2Uvcm9udGVuZF9saWJyYXJpZXNfLV9yZWxlYXNlX21haW4vcHJvamVjdHMvdmFsdGltby9mb3JtL3NyYy8iLCJzb3VyY2VzIjpbImxpYi9mb3JtLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7O0dBY0c7QUFFSCxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUdoRCxPQUFPLEVBQUMsYUFBYSxFQUFDLE1BQU0saUJBQWlCLENBQUM7Ozs7QUFLOUMsTUFBTSxPQUFPLFdBQVc7SUFHdEIsWUFBb0IsYUFBNEIsRUFBVSxJQUFnQjtRQUF0RCxrQkFBYSxHQUFiLGFBQWEsQ0FBZTtRQUFVLFNBQUksR0FBSixJQUFJLENBQVk7UUFDeEUsSUFBSSxDQUFDLGdCQUFnQixHQUFHLGFBQWEsQ0FBQyxNQUFNLENBQUMsVUFBVSxDQUFDO0lBQzFELENBQUM7SUFFRCx1QkFBdUIsQ0FBQyxrQkFBMEI7UUFDaEQsT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FDbEIsR0FBRyxJQUFJLENBQUMsZ0JBQWdCL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YW1lfWBcbiAgICApO1xuICB9XG5cbiAgZ2V0Rm9ybURlZmluaXRpb25CeU5hbWVQcmVGaWxsZWQoXG4gICAgZm9ybURlZmluaXRpb25OYW1lOiBzdHJpbmcsXG4gICAgZG9jdW1lbnRJZDogc3RyaW5nXG4gICk6IE9ic2VydmFibGU8Rm9ybWlvRm9ybT4ge1xuICAgIHJldHVybiB0aGlzLmh0dHAuZ2V0PEZvcm1pb0Zvcm0+KFxuICAgICAgYCR7dGhpcy52YWx0aW1vQXBpQ29uZmlnLmVuZHBvaW50VXJpfWZvcm0tYXNzb2NpYXRpb24vZm9ybS1kZWZpbml0aW9uLyR7Zm9ybURlZmluaXRpb25OYW1lfT9kb2N1bWVudElkPSR7ZG9jdW1lbnRJZH1gXG4gICAgKTtcbiAgfVxufVxuIl19
@@ -1,40 +0,0 @@
1
- /*
2
- * Copyright 2015-2021 Ritense BV, the Netherlands.
3
- *
4
- * Licensed under EUPL, Version 1.2 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Injectable } from '@angular/core';
17
- import * as i0 from "@angular/core";
18
- export class FormMappingService {
19
- mapComponents(form, mappingFunction) {
20
- var _a, _b;
21
- const recursiveMappingFunction = (component) => {
22
- const mappedComponent = mappingFunction(component);
23
- const innerComponents = component.components;
24
- if (innerComponents && innerComponents.length > 0) {
25
- return Object.assign(Object.assign({}, mappedComponent), { components: innerComponents.map((innerComponent) => recursiveMappingFunction(innerComponent)) });
26
- }
27
- return mappedComponent;
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 && {
30
- components: (_b = form === null || form === void 0 ? void 0 : form.components) === null || _b === void 0 ? void 0 : _b.map(component => recursiveMappingFunction(component)),
31
- }));
32
- }
33
- }
34
- FormMappingService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormMappingService_Factory() { return new FormMappingService(); }, token: FormMappingService, providedIn: "root" });
35
- FormMappingService.decorators = [
36
- { type: Injectable, args: [{
37
- providedIn: 'root',
38
- },] }
39
- ];
40
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1tYXBwaW5nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiL3RtcC9qZW5raW5zLTg3ZTU2NmU4L3dvcmtzcGFjZS9yb250ZW5kX2xpYnJhcmllc18tX3JlbGVhc2VfbWFpbi9wcm9qZWN0cy92YWx0aW1vL2Zvcm0vc3JjLyIsInNvdXJjZXMiOlsibGliL3NlcnZpY2VzL2Zvcm0tbWFwcGluZy9mb3JtLW1hcHBpbmcuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVILE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxlQUFlLENBQUM7O0FBT3pDLE1BQU0sT0FBTyxrQkFBa0I7SUFDN0IsYUFBYSxDQUNYLElBQWdCLEVBQ2hCLGVBQWdGOztRQUVoRixNQUFNLHdCQUF3QixHQUFHLENBQUMsU0FBa0MsRUFBRSxFQUFFO1lBQ3RFLE1BQU0sZUFBZSxHQUFHLGVBQWUsQ0FBQyxTQUFTLENBQUMsQ0FBQztZQUNuRCxNQUFNLGVBQWUsR0FBRyxTQUFTLENBQUMsVUFBVSxDQUFDO1lBRTdDLElBQUksZUFBZSxJQUFJLGVBQWUsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxFQUFFO2dCQUNqRCx1Q0FDSyxlQUFlLEtBQ2xCLFVBQVUsRUFBRSxlQUFlLENBQ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b25lbnRzO1xuXG4gICAgICBpZiAoaW5uZXJDb21wb25lbnRzICYmIGlubmVyQ29tcG9uZW50cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgLi4ubWFwcGVkQ29tcG9uZW50LFxuICAgICAgICAgIGNvbXBvbmVudHM6IGlubmVyQ29tcG9uZW50cy5tYXAoKGlubmVyQ29tcG9uZW50OiBFeHRlbmRlZENvbXBvbmVudFNjaGVtYSkgPT5cbiAgICAgICAgICAgIHJlY3Vyc2l2ZU1hcHBpbmdGdW5jdGlvbihpbm5lckNvbXBvbmVudClcbiAgICAgICAgICApLFxuICAgICAgICB9O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gbWFwcGVkQ29tcG9uZW50O1xuICAgIH07XG5cbiAgICByZXR1cm4ge1xuICAgICAgLi4uZm9ybSxcbiAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgIC4uLihmb3JtPy5jb21wb25lbnRzPy5sZW5ndGggPiAwICYmIHtcbiAgICAgICAgY29tcG9uZW50czogZm9ybT8uY29tcG9uZW50cz8ubWFwKGNvbXBvbmVudCA9PiByZWN1cnNpdmVNYXBwaW5nRnVuY3Rpb24oY29tcG9uZW50KSksXG4gICAgICB9KSxcbiAgICB9O1xuICB9XG59XG4iXX0=
@@ -1,58 +0,0 @@
1
- /*
2
- * Copyright 2015-2021 Ritense BV, the Netherlands.
3
- *
4
- * Licensed under EUPL, Version 1.2 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { Injectable } from '@angular/core';
17
- import { TranslateService } from '@ngx-translate/core';
18
- import { FormMappingService } from '../form-mapping/form-mapping.service';
19
- import * as i0 from "@angular/core";
20
- import * as i1 from "@ngx-translate/core";
21
- import * as i2 from "../form-mapping/form-mapping.service";
22
- export class FormTranslationService {
23
- constructor(translateService, formMappingService) {
24
- this.translateService = translateService;
25
- this.formMappingService = formMappingService;
26
- }
27
- translateForm(form) {
28
- const translateFunction = (component) => {
29
- const labelTranslation = this.getTranslation(`${component.label}`);
30
- const titleTranslation = this.getTranslation(`${component.title}`);
31
- const contentTranslation = this.getTranslation(`${component.content}`);
32
- const placeholderTranslation = this.getTranslation(`${component.placeholder}`);
33
- const tooltipTranslation = this.getTranslation(`${component.tooltip}`);
34
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, component), (labelTranslation && { label: `${labelTranslation}` })), (titleTranslation && { title: `${titleTranslation}` })), (contentTranslation && { content: `${contentTranslation}` })), (placeholderTranslation && { placeholder: `${placeholderTranslation}` })), (tooltipTranslation && { tooltip: `${tooltipTranslation}` }));
35
- };
36
- return this.formMappingService.mapComponents(form, translateFunction);
37
- }
38
- getTranslation(translationKey) {
39
- const translation = this.translateService.instant(translationKey);
40
- if (translation !== translationKey) {
41
- return translation;
42
- }
43
- else {
44
- return false;
45
- }
46
- }
47
- }
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
- FormTranslationService.decorators = [
50
- { type: Injectable, args: [{
51
- providedIn: 'root',
52
- },] }
53
- ];
54
- FormTranslationService.ctorParameters = () => [
55
- { type: TranslateService },
56
- { type: FormMappingService }
57
- ];
58
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS10cmFuc2xhdGlvbi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Ii90bXAvamVua2lucy04N2U1NjZlOC93b3Jrc3BhY2U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cmFuc2xhdGlvbktleSkge1xuICAgICAgcmV0dXJuIHRyYW5zbGF0aW9uO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9XG59XG4iXX0=
@@ -1,23 +0,0 @@
1
- /*
2
- * Copyright 2015-2020 Ritense BV, the Netherlands.
3
- *
4
- * Licensed under EUPL, Version 1.2 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /*
17
- * Public API Surface of form
18
- */
19
- export * from './lib/form.service';
20
- export * from './lib/form.module';
21
- export * from './lib/services/form-mapping/form-mapping.service';
22
- export * from './lib/services/form-translation/form-translation.service';
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIvdG1wL2plbmtpbnMtODdlNTY2ZTgvd29ya3NwYWNlL3JvbnRlbmRfbGlicmFyaWVzXy1fcmVsZWFzZV9tYWluL3Byb2plY3RzL3ZhbHRpbW8vZm9ybS9zcmMvIiwic291cmNlcyI6WyJwdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBRUg7O0dBRUc7QUFFSCxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsY0FBYyxrREFBa0QsQ0FBQztBQUNqRSxjQUFjLDBEQUEwRCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIENvcHlyaWdodCAyMDE1LTIwMjAgUml0ZW5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tICcuL2xpYi9zZXJ2aWNlcy9mb3JtLXRyYW5zbGF0aW9uL2Zvcm0tdHJhbnNsYXRpb24uc2VydmljZSc7XG4iXX0=
@@ -1,6 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public_api';
5
- export { FormRoutingModule as ɵa } from './lib/form-routing.module';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdGltby1mb3JtLmpzIiwic291cmNlUm9vdCI6Ii90bXAvamVua2lucy04N2U1NjZlOC93b3Jrc3BhY2Uvcm9udGVuZF9saWJyYXJpZXNfLV9yZWxlYXNlX21haW4vcHJvamVjdHMvdmFsdGltby9mb3JtL3NyYy8iLCJzb3VyY2VzIjpbInZhbHRpbW8tZm9ybS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxpQkFBaUIsSUFBSSxFQUFFLEVBQUMsTUFBTSwyQkFBMkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWNfYXBpJztcblxuZXhwb3J0IHtGb3JtUm91dGluZ01vZHVsZSBhcyDJtWF9IGZyb20gJy4vbGliL2Zvcm0tcm91dGluZy5tb2R1bGUnOyJdfQ==
@@ -1 +0,0 @@
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;;;;;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AAO,KAAK,CAAC;SACd;KACF;;;;YAtCF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;YAPO,gBAAgB;YAEhB,kBAAkB;;;ACnB1B;;;;;;;;;;;;;;;;ACAA;;;;;;"}
@@ -1 +0,0 @@
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"}