@formio/angular 9.0.0-rc.4 → 10.0.0-rc.1

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 (177) hide show
  1. package/auth/index.d.ts +147 -9
  2. package/auth/index.d.ts.map +1 -1
  3. package/embed/index.d.ts +74 -7
  4. package/embed/index.d.ts.map +1 -1
  5. package/fesm2022/formio-angular-auth.mjs +22 -22
  6. package/fesm2022/formio-angular-embed.mjs +16 -13
  7. package/fesm2022/formio-angular-embed.mjs.map +1 -1
  8. package/fesm2022/formio-angular-grid.mjs +40 -40
  9. package/fesm2022/formio-angular-manager.mjs +43 -43
  10. package/fesm2022/formio-angular-resource.mjs +31 -31
  11. package/fesm2022/formio-angular.mjs +31 -31
  12. package/fesm2022/formio-angular.mjs.map +1 -1
  13. package/grid/index.d.ts +237 -13
  14. package/grid/index.d.ts.map +1 -1
  15. package/index.d.ts +354 -4
  16. package/index.d.ts.map +1 -1
  17. package/manager/index.d.ts +242 -17
  18. package/manager/index.d.ts.map +1 -1
  19. package/package.json +10 -10
  20. package/resource/index.d.ts +185 -12
  21. package/resource/index.d.ts.map +1 -1
  22. package/FormioBaseComponent.d.ts +0 -94
  23. package/FormioBaseComponent.d.ts.map +0 -1
  24. package/auth/auth.component.d.ts +0 -6
  25. package/auth/auth.component.d.ts.map +0 -1
  26. package/auth/auth.config.d.ts +0 -63
  27. package/auth/auth.config.d.ts.map +0 -1
  28. package/auth/auth.module.d.ts +0 -17
  29. package/auth/auth.module.d.ts.map +0 -1
  30. package/auth/auth.routes.d.ts +0 -4
  31. package/auth/auth.routes.d.ts.map +0 -1
  32. package/auth/auth.service.d.ts +0 -41
  33. package/auth/auth.service.d.ts.map +0 -1
  34. package/auth/formio-angular-auth.d.ts.map +0 -1
  35. package/auth/login/login.component.d.ts +0 -10
  36. package/auth/login/login.component.d.ts.map +0 -1
  37. package/auth/register/register.component.d.ts +0 -10
  38. package/auth/register/register.component.d.ts.map +0 -1
  39. package/auth/resetpass/resetpass.component.d.ts +0 -9
  40. package/auth/resetpass/resetpass.component.d.ts.map +0 -1
  41. package/components/alerts/formio.alerts.component.d.ts +0 -12
  42. package/components/alerts/formio.alerts.component.d.ts.map +0 -1
  43. package/components/alerts/formio.alerts.d.ts +0 -12
  44. package/components/alerts/formio.alerts.d.ts.map +0 -1
  45. package/components/alerts/parse-html-content.pipe.d.ts +0 -8
  46. package/components/alerts/parse-html-content.pipe.d.ts.map +0 -1
  47. package/components/formbuilder/formbuilder.component.d.ts +0 -37
  48. package/components/formbuilder/formbuilder.component.d.ts.map +0 -1
  49. package/components/formio/formio.component.d.ts +0 -15
  50. package/components/formio/formio.component.d.ts.map +0 -1
  51. package/components/formioreport/formioreport.component.d.ts +0 -21
  52. package/components/formioreport/formioreport.component.d.ts.map +0 -1
  53. package/components/loader/formio.loader.component.d.ts +0 -7
  54. package/components/loader/formio.loader.component.d.ts.map +0 -1
  55. package/core.d.ts +0 -17
  56. package/core.d.ts.map +0 -1
  57. package/custom-tags.service.d.ts +0 -8
  58. package/custom-tags.service.d.ts.map +0 -1
  59. package/embed/app.service.d.ts +0 -28
  60. package/embed/app.service.d.ts.map +0 -1
  61. package/embed/builder.component.d.ts +0 -19
  62. package/embed/builder.component.d.ts.map +0 -1
  63. package/embed/embed.module.d.ts +0 -10
  64. package/embed/embed.module.d.ts.map +0 -1
  65. package/embed/formio-angular-embed.d.ts.map +0 -1
  66. package/embed/formio.component.d.ts +0 -21
  67. package/embed/formio.component.d.ts.map +0 -1
  68. package/formio-angular.d.ts.map +0 -1
  69. package/formio-promise.service.d.ts +0 -16
  70. package/formio-promise.service.d.ts.map +0 -1
  71. package/formio.common.d.ts +0 -68
  72. package/formio.common.d.ts.map +0 -1
  73. package/formio.config.d.ts +0 -21
  74. package/formio.config.d.ts.map +0 -1
  75. package/formio.module.d.ts +0 -15
  76. package/formio.module.d.ts.map +0 -1
  77. package/formio.service.d.ts +0 -18
  78. package/formio.service.d.ts.map +0 -1
  79. package/formio.utils.d.ts +0 -2
  80. package/formio.utils.d.ts.map +0 -1
  81. package/grid/GridBodyComponent.d.ts +0 -35
  82. package/grid/GridBodyComponent.d.ts.map +0 -1
  83. package/grid/GridFooterComponent.d.ts +0 -20
  84. package/grid/GridFooterComponent.d.ts.map +0 -1
  85. package/grid/GridHeaderComponent.d.ts +0 -16
  86. package/grid/GridHeaderComponent.d.ts.map +0 -1
  87. package/grid/form/FormGridBody.component.d.ts +0 -19
  88. package/grid/form/FormGridBody.component.d.ts.map +0 -1
  89. package/grid/form/FormGridFooter.component.d.ts +0 -10
  90. package/grid/form/FormGridFooter.component.d.ts.map +0 -1
  91. package/grid/form/FormGridHeader.component.d.ts +0 -11
  92. package/grid/form/FormGridHeader.component.d.ts.map +0 -1
  93. package/grid/form/index.d.ts +0 -10
  94. package/grid/form/index.d.ts.map +0 -1
  95. package/grid/form/time-since.pipe.d.ts +0 -8
  96. package/grid/form/time-since.pipe.d.ts.map +0 -1
  97. package/grid/formio-angular-grid.d.ts.map +0 -1
  98. package/grid/grid.component.d.ts +0 -59
  99. package/grid/grid.component.d.ts.map +0 -1
  100. package/grid/grid.module.d.ts +0 -23
  101. package/grid/grid.module.d.ts.map +0 -1
  102. package/grid/grid.service.d.ts +0 -10
  103. package/grid/grid.service.d.ts.map +0 -1
  104. package/grid/submission/SubmissionGridBody.component.d.ts +0 -19
  105. package/grid/submission/SubmissionGridBody.component.d.ts.map +0 -1
  106. package/grid/submission/SubmissionGridFooter.component.d.ts +0 -10
  107. package/grid/submission/SubmissionGridFooter.component.d.ts.map +0 -1
  108. package/grid/submission/SubmissionGridHeader.component.d.ts +0 -30
  109. package/grid/submission/SubmissionGridHeader.component.d.ts.map +0 -1
  110. package/grid/submission/index.d.ts +0 -10
  111. package/grid/submission/index.d.ts.map +0 -1
  112. package/grid/types/grid-column.d.ts +0 -7
  113. package/grid/types/grid-column.d.ts.map +0 -1
  114. package/grid/types/grid-footer-positions.d.ts +0 -6
  115. package/grid/types/grid-footer-positions.d.ts.map +0 -1
  116. package/grid/types/grid-header.d.ts +0 -13
  117. package/grid/types/grid-header.d.ts.map +0 -1
  118. package/manager/create/create.component.d.ts +0 -9
  119. package/manager/create/create.component.d.ts.map +0 -1
  120. package/manager/delete/delete.component.d.ts +0 -18
  121. package/manager/delete/delete.component.d.ts.map +0 -1
  122. package/manager/edit/edit.component.d.ts +0 -31
  123. package/manager/edit/edit.component.d.ts.map +0 -1
  124. package/manager/form/form.component.d.ts +0 -29
  125. package/manager/form/form.component.d.ts.map +0 -1
  126. package/manager/form-manager.config.d.ts +0 -30
  127. package/manager/form-manager.config.d.ts.map +0 -1
  128. package/manager/form-manager.module.d.ts +0 -28
  129. package/manager/form-manager.module.d.ts.map +0 -1
  130. package/manager/form-manager.routes.d.ts +0 -4
  131. package/manager/form-manager.routes.d.ts.map +0 -1
  132. package/manager/form-manager.service.d.ts +0 -37
  133. package/manager/form-manager.service.d.ts.map +0 -1
  134. package/manager/formio-angular-manager.d.ts.map +0 -1
  135. package/manager/index/index.component.d.ts +0 -28
  136. package/manager/index/index.component.d.ts.map +0 -1
  137. package/manager/submission/delete/delete.component.d.ts +0 -16
  138. package/manager/submission/delete/delete.component.d.ts.map +0 -1
  139. package/manager/submission/edit/edit.component.d.ts +0 -13
  140. package/manager/submission/edit/edit.component.d.ts.map +0 -1
  141. package/manager/submission/index/index.component.d.ts +0 -13
  142. package/manager/submission/index/index.component.d.ts.map +0 -1
  143. package/manager/submission/submission/submission.component.d.ts +0 -15
  144. package/manager/submission/submission/submission.component.d.ts.map +0 -1
  145. package/manager/submission/view/view.component.d.ts +0 -9
  146. package/manager/submission/view/view.component.d.ts.map +0 -1
  147. package/manager/view/view.component.d.ts +0 -24
  148. package/manager/view/view.component.d.ts.map +0 -1
  149. package/resource/create/create.component.d.ts +0 -19
  150. package/resource/create/create.component.d.ts.map +0 -1
  151. package/resource/delete/delete.component.d.ts +0 -14
  152. package/resource/delete/delete.component.d.ts.map +0 -1
  153. package/resource/edit/edit.component.d.ts +0 -22
  154. package/resource/edit/edit.component.d.ts.map +0 -1
  155. package/resource/formio-angular-resource.d.ts.map +0 -1
  156. package/resource/index/index.component.d.ts +0 -23
  157. package/resource/index/index.component.d.ts.map +0 -1
  158. package/resource/resource.component.d.ts +0 -24
  159. package/resource/resource.component.d.ts.map +0 -1
  160. package/resource/resource.config.d.ts +0 -17
  161. package/resource/resource.config.d.ts.map +0 -1
  162. package/resource/resource.module.d.ts +0 -20
  163. package/resource/resource.module.d.ts.map +0 -1
  164. package/resource/resource.routes.d.ts +0 -4
  165. package/resource/resource.routes.d.ts.map +0 -1
  166. package/resource/resource.service.d.ts +0 -52
  167. package/resource/resource.service.d.ts.map +0 -1
  168. package/resource/resources.service.d.ts +0 -16
  169. package/resource/resources.service.d.ts.map +0 -1
  170. package/resource/view/view.component.d.ts +0 -16
  171. package/resource/view/view.component.d.ts.map +0 -1
  172. package/types/alerts-position.d.ts +0 -7
  173. package/types/alerts-position.d.ts.map +0 -1
  174. package/types/formio-metadata.d.ts +0 -11
  175. package/types/formio-metadata.d.ts.map +0 -1
  176. package/types/formio-submission.d.ts +0 -19
  177. package/types/formio-submission.d.ts.map +0 -1
package/auth/index.d.ts CHANGED
@@ -1,9 +1,147 @@
1
- export { FormioAuthConfig } from './auth.config';
2
- export { FormioAuthService } from './auth.service';
3
- export { FormioAuthComponent } from './auth.component';
4
- export { FormioAuthLoginComponent } from './login/login.component';
5
- export { FormioAuthRegisterComponent } from './register/register.component';
6
- export { FormioResetPassComponent } from './resetpass/resetpass.component';
7
- export { FormioAuthRoutes } from './auth.routes';
8
- export { FormioAuth } from './auth.module';
9
- //# sourceMappingURL=index.d.ts.map
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter } from '@angular/core';
3
+ import * as i6 from '@formio/angular';
4
+ import { FormioAppConfig } from '@formio/angular';
5
+ import * as i7 from '@angular/router';
6
+ import { Routes } from '@angular/router';
7
+ import * as i5 from '@angular/common';
8
+
9
+ interface FormioAuthFormConfig {
10
+ path?: string;
11
+ form?: string;
12
+ component?: any;
13
+ }
14
+ interface FormioAuthRouteConfig {
15
+ auth?: any;
16
+ login?: any;
17
+ register?: any;
18
+ resetpass?: any;
19
+ }
20
+ declare class FormioAuthConfig {
21
+ component?: any;
22
+ delayAuth?: any;
23
+ login?: FormioAuthFormConfig;
24
+ register?: FormioAuthFormConfig;
25
+ resetpass?: FormioAuthFormConfig;
26
+ oauth?: FormioOAuthConfig;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioAuthConfig, never>;
28
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormioAuthConfig>;
29
+ }
30
+ interface FormioOAuthConfig {
31
+ type: FormioOauthType;
32
+ options: FormioOktaConfig | FormioSamlConfig;
33
+ }
34
+ declare enum FormioOauthType {
35
+ okta = "okta",
36
+ saml = "saml"
37
+ }
38
+ interface FormioOktaConfig extends OktaConfig {
39
+ formio?: any;
40
+ }
41
+ interface FormioSamlConfig {
42
+ relay: string;
43
+ }
44
+ interface OktaConfig {
45
+ url?: string;
46
+ tokenManager?: OktaTokenManagerConfig;
47
+ issuer?: string;
48
+ clientId?: string;
49
+ redirectUri?: string;
50
+ postLogoutRedirectUri?: string;
51
+ pkce?: boolean;
52
+ authorizeUrl?: string;
53
+ userinfoUrl?: string;
54
+ tokenUrl?: string;
55
+ ignoreSignature?: boolean;
56
+ maxClockSkew?: number;
57
+ scopes?: string[];
58
+ httpRequestClient?: Function;
59
+ }
60
+ interface OktaTokenManagerConfig {
61
+ storage?: string | {
62
+ getItem?: Function;
63
+ setItem?: Function;
64
+ };
65
+ secure?: boolean;
66
+ autoRenew?: boolean;
67
+ expireEarlySeconds?: number;
68
+ storageKey?: string;
69
+ }
70
+
71
+ declare class FormioAuthService {
72
+ appConfig: FormioAppConfig;
73
+ config: FormioAuthConfig;
74
+ user: any;
75
+ authenticated: boolean;
76
+ loginForm: string;
77
+ onLogin: EventEmitter<object>;
78
+ onLogout: EventEmitter<object>;
79
+ registerForm: string;
80
+ onRegister: EventEmitter<object>;
81
+ onUser: EventEmitter<object>;
82
+ onError: EventEmitter<any>;
83
+ resetPassForm: string;
84
+ onResetPass: EventEmitter<object>;
85
+ ready: Promise<boolean>;
86
+ readyResolve: any;
87
+ readyReject: any;
88
+ projectReady?: Promise<any>;
89
+ accessReady?: Promise<any>;
90
+ userReady?: Promise<any>;
91
+ formAccess: any;
92
+ submissionAccess: any;
93
+ roles: any;
94
+ is: any;
95
+ constructor(appConfig: FormioAppConfig, config: FormioAuthConfig);
96
+ onLoginSubmit(submission: object): void;
97
+ onRegisterSubmit(submission: object): void;
98
+ onResetPassSubmit(submission: object): void;
99
+ init(): void;
100
+ setUser(user: any): void;
101
+ setUserRoles(): void;
102
+ logoutError(): void;
103
+ logout(): void;
104
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioAuthService, never>;
105
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormioAuthService>;
106
+ }
107
+
108
+ declare class FormioAuthComponent {
109
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioAuthComponent, never>;
110
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormioAuthComponent, "ng-component", never, {}, {}, never, never, false, never>;
111
+ }
112
+
113
+ declare class FormioAuthLoginComponent {
114
+ service: FormioAuthService;
115
+ renderOptions: any;
116
+ constructor(service: FormioAuthService);
117
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioAuthLoginComponent, never>;
118
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormioAuthLoginComponent, "ng-component", never, {}, {}, never, never, false, never>;
119
+ }
120
+
121
+ declare class FormioAuthRegisterComponent {
122
+ service: FormioAuthService;
123
+ renderOptions: any;
124
+ constructor(service: FormioAuthService);
125
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioAuthRegisterComponent, never>;
126
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormioAuthRegisterComponent, "ng-component", never, {}, {}, never, never, false, never>;
127
+ }
128
+
129
+ declare class FormioResetPassComponent {
130
+ service: FormioAuthService;
131
+ constructor(service: FormioAuthService);
132
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioResetPassComponent, never>;
133
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormioResetPassComponent, "ng-component", never, {}, {}, never, never, false, never>;
134
+ }
135
+
136
+ declare function FormioAuthRoutes(config?: FormioAuthRouteConfig): Routes;
137
+
138
+ declare class FormioAuth {
139
+ static forRoot(config?: FormioAuthRouteConfig): any;
140
+ static forChild(config?: FormioAuthRouteConfig): any;
141
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioAuth, never>;
142
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FormioAuth, [typeof FormioAuthComponent, typeof FormioAuthLoginComponent, typeof FormioAuthRegisterComponent, typeof FormioResetPassComponent], [typeof i5.CommonModule, typeof i6.FormioModule, typeof i7.RouterModule], never>;
143
+ static ɵinj: i0.ɵɵInjectorDeclaration<FormioAuth>;
144
+ }
145
+
146
+ export { FormioAuth, FormioAuthComponent, FormioAuthConfig, FormioAuthLoginComponent, FormioAuthRegisterComponent, FormioAuthRoutes, FormioAuthService, FormioResetPassComponent };
147
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../projects/angular-formio/auth/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAO,kBAAkB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../../projects/angular-formio/auth/src/auth.config.ts","../../../projects/angular-formio/auth/src/auth.service.ts","../../../projects/angular-formio/auth/src/auth.component.ts","../../../projects/angular-formio/auth/src/login/login.component.ts","../../../projects/angular-formio/auth/src/register/register.component.ts","../../../projects/angular-formio/auth/src/resetpass/resetpass.component.ts","../../../projects/angular-formio/auth/src/auth.routes.ts","../../../projects/angular-formio/auth/src/auth.module.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;AAMC;;;;;;AAOA;AAED;;;;;;;;;AAQC;;;AAKC;AACD;AAED;AACE;AACA;AACD;AAEK;;AAEL;;;AAIA;;;;;;;;;;;;;;AAgBC;;AAED;;;;;;;;;;AAWA;;ACjED;AA8BW;AACA;;AA5BF;;AAGA;AACA;;AAGA;AACA;AACA;;AAGA;AAEA;;;AAIA;AACA;AACA;;;;;AAOE;;;;;;;;;;;AAwLV;;AC3ND;;;AAImC;;ACHnC;AAQqB;;AAAA;;;AACpB;;ACTD;AAQqB;;AAAA;;;AACpB;;ACTD;AAKqB;AAAA;;;AACpB;;ACDe;;ACKhB;;;;;;AAoBC;;"}
package/embed/index.d.ts CHANGED
@@ -1,7 +1,74 @@
1
- import { FormioCore as Formio } from '@formio/js';
2
- export { FormioComponent } from './formio.component';
3
- export { FormioBuilder } from './builder.component';
4
- export { FormioEmbedModule } from './embed.module';
5
- export { FormioAppService, FormioAppConfig } from './app.service';
6
- export { Formio };
7
- //# sourceMappingURL=index.d.ts.map
1
+ import { Form as Form$1, Webform, FormBuilder, FormioCore } from '@formio/js';
2
+ export { FormioCore as Formio } from '@formio/js';
3
+ import * as i0 from '@angular/core';
4
+ import { AfterViewInit, EventEmitter, ElementRef, OnDestroy, InjectionToken } from '@angular/core';
5
+ import { Form, Submission } from '@formio/core/types';
6
+ import WebformBuilder from '@formio/js/lib/cjs/WebformBuilder';
7
+ import * as i3 from '@angular/common';
8
+
9
+ declare class FormioComponent implements AfterViewInit {
10
+ src?: string;
11
+ form?: Form | null;
12
+ submission?: Submission | null;
13
+ url?: string;
14
+ options?: Form$1['options'];
15
+ ready: EventEmitter<Webform>;
16
+ submit: EventEmitter<object>;
17
+ error: EventEmitter<any>;
18
+ change: EventEmitter<any>;
19
+ element: ElementRef;
20
+ instance: Webform;
21
+ ngAfterViewInit(): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormioComponent, "formio", never, { "src": { "alias": "src"; "required": false; }; "form": { "alias": "form"; "required": false; }; "submission": { "alias": "submission"; "required": false; }; "url": { "alias": "url"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "ready": "ready"; "submit": "submit"; "error": "error"; "change": "change"; }, never, never, false, never>;
24
+ }
25
+
26
+ declare class FormioBuilder implements AfterViewInit, OnDestroy {
27
+ element: ElementRef;
28
+ form?: Form$1['options'] | null;
29
+ options?: FormBuilder['options'];
30
+ change: EventEmitter<any>;
31
+ ready: EventEmitter<any>;
32
+ error: EventEmitter<any>;
33
+ builder: FormBuilder;
34
+ componentAdding: boolean;
35
+ get instance(): WebformBuilder;
36
+ ngAfterViewInit(): void;
37
+ ngOnDestroy(): void;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioBuilder, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormioBuilder, "formio-builder", never, { "form": { "alias": "form"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "change": "change"; "ready": "ready"; "error": "error"; }, never, never, false, never>;
40
+ }
41
+
42
+ declare class FormioEmbedModule {
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioEmbedModule, never>;
44
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FormioEmbedModule, [typeof FormioComponent, typeof FormioBuilder], [typeof i3.CommonModule], [typeof FormioComponent, typeof FormioBuilder]>;
45
+ static ɵinj: i0.ɵɵInjectorDeclaration<FormioEmbedModule>;
46
+ }
47
+
48
+ declare const FormioAppConfig: InjectionToken<unknown>;
49
+ declare class FormioAppService {
50
+ baseUrl: any;
51
+ apiUrl: any;
52
+ projectUrl: any;
53
+ appUrl: any;
54
+ icons?: string;
55
+ formio: FormioCore;
56
+ user?: any;
57
+ onUser: EventEmitter<object>;
58
+ constructor(config?: {
59
+ apiUrl?: string;
60
+ baseUrl?: string;
61
+ appUrl?: string;
62
+ projectUrl?: string;
63
+ icons?: string;
64
+ config?: any;
65
+ });
66
+ setUser(user: any): void;
67
+ logout(): any;
68
+ authenticate(): any;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormioAppService, never>;
70
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormioAppService>;
71
+ }
72
+
73
+ export { FormioAppConfig, FormioAppService, FormioBuilder, FormioComponent, FormioEmbedModule };
74
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../projects/angular-formio/embed/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sources":["../../../projects/angular-formio/embed/src/formio.component.ts","../../../projects/angular-formio/embed/src/builder.component.ts","../../../projects/angular-formio/embed/src/embed.module.ts","../../../projects/angular-formio/embed/src/app.service.ts"],"sourcesContent":[null,null,null,null],"names":["formType","Form"],"mappings":";;;;;;;;AASa,cAAA,eAAA,YAAA,aAAA;;AAEA,WAAAA,IAAA;AACA,iBAAA,UAAA;;AAEA,cAAAC,MAAA;AACC,WAAA,YAAA,CAAA,OAAA;AACA,YAAA,YAAA;AACA,WAAA,YAAA;AACA,YAAA,YAAA;;;AAGV;;;AAeH;;AChCD,cAAA,aAAA,YAAA,aAAA,EAAA,SAAA;;;AAQa,cAAA,WAAA;AACC,YAAA,YAAA;AACA,WAAA,YAAA;AACA,WAAA,YAAA;;AAEH;;AAIP;AAgDF;;;AAGD;;AClED,cAAA,iBAAA;;;;AAgBiC;;ACrB1B,cAAA,eAAA,EAAA,cAAA;AAEP,cAAA,gBAAA;AAEI;AACA;AACA;AACA;;;;AAIA,YAAA,YAAA;AACqC;;;;;;;AAO/B;;;;;;AAsCT;;;;"}
@@ -15,10 +15,10 @@ class FormioAuthConfig {
15
15
  register;
16
16
  resetpass;
17
17
  oauth;
18
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
19
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthConfig });
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
19
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthConfig });
20
20
  }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthConfig, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthConfig, decorators: [{
22
22
  type: Injectable
23
23
  }] });
24
24
  var FormioOauthType;
@@ -213,18 +213,18 @@ class FormioAuthService {
213
213
  })
214
214
  .catch(() => this.logoutError());
215
215
  }
216
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthService, deps: [{ token: i2.FormioAppConfig }, { token: FormioAuthConfig }], target: i0.ɵɵFactoryTarget.Injectable });
217
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthService });
216
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthService, deps: [{ token: i2.FormioAppConfig }, { token: FormioAuthConfig }], target: i0.ɵɵFactoryTarget.Injectable });
217
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthService });
218
218
  }
219
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthService, decorators: [{
219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthService, decorators: [{
220
220
  type: Injectable
221
221
  }], ctorParameters: () => [{ type: i2.FormioAppConfig }, { type: FormioAuthConfig }] });
222
222
 
223
223
  class FormioAuthComponent {
224
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
225
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FormioAuthComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<div class=\"card card-primary panel panel-default\">\n <div class=\"card-header panel-heading\">\n <ul class=\"nav nav-tabs card-header-tabs\">\n <li class=\"nav-item\" role=\"presentation\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"login\" routerLinkActive=\"active\">Login</a></li>\n <li class=\"nav-item\" role=\"presentation\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"register\" routerLinkActive=\"active\">Register</a></li>\n </ul>\n </div>\n <div class=\"card-body panel-body\">\n <router-outlet></router-outlet>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
224
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
225
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.1", type: FormioAuthComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<div class=\"card card-primary panel panel-default\">\n <div class=\"card-header panel-heading\">\n <ul class=\"nav nav-tabs card-header-tabs\">\n <li class=\"nav-item\" role=\"presentation\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"login\" routerLinkActive=\"active\">Login</a></li>\n <li class=\"nav-item\" role=\"presentation\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"register\" routerLinkActive=\"active\">Register</a></li>\n </ul>\n </div>\n <div class=\"card-body panel-body\">\n <router-outlet></router-outlet>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
226
226
  }
227
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthComponent, decorators: [{
227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthComponent, decorators: [{
228
228
  type: Component,
229
229
  args: [{ standalone: false, template: "<div class=\"card card-primary panel panel-default\">\n <div class=\"card-header panel-heading\">\n <ul class=\"nav nav-tabs card-header-tabs\">\n <li class=\"nav-item\" role=\"presentation\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"login\" routerLinkActive=\"active\">Login</a></li>\n <li class=\"nav-item\" role=\"presentation\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"register\" routerLinkActive=\"active\">Register</a></li>\n </ul>\n </div>\n <div class=\"card-body panel-body\">\n <router-outlet></router-outlet>\n </div>\n</div>\n" }]
230
230
  }] });
@@ -237,10 +237,10 @@ class FormioAuthLoginComponent {
237
237
  constructor(service) {
238
238
  this.service = service;
239
239
  }
240
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthLoginComponent, deps: [{ token: FormioAuthService }], target: i0.ɵɵFactoryTarget.Component });
241
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FormioAuthLoginComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<formio [src]=\"service.loginForm\" [renderOptions]=\"renderOptions\" (submit)=\"service.onLoginSubmit($event)\"></formio>\n", dependencies: [{ kind: "component", type: i2.FormioComponent, selector: "formio" }] });
240
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthLoginComponent, deps: [{ token: FormioAuthService }], target: i0.ɵɵFactoryTarget.Component });
241
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.1", type: FormioAuthLoginComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<formio [src]=\"service.loginForm\" [renderOptions]=\"renderOptions\" (submit)=\"service.onLoginSubmit($event)\"></formio>\n", dependencies: [{ kind: "component", type: i2.FormioComponent, selector: "formio" }] });
242
242
  }
243
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthLoginComponent, decorators: [{
243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthLoginComponent, decorators: [{
244
244
  type: Component,
245
245
  args: [{ standalone: false, template: "<formio [src]=\"service.loginForm\" [renderOptions]=\"renderOptions\" (submit)=\"service.onLoginSubmit($event)\"></formio>\n" }]
246
246
  }], ctorParameters: () => [{ type: FormioAuthService }] });
@@ -253,10 +253,10 @@ class FormioAuthRegisterComponent {
253
253
  constructor(service) {
254
254
  this.service = service;
255
255
  }
256
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthRegisterComponent, deps: [{ token: FormioAuthService }], target: i0.ɵɵFactoryTarget.Component });
257
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FormioAuthRegisterComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<formio [src]=\"service.registerForm\" [renderOptions]=\"renderOptions\" (submit)=\"service.onRegisterSubmit($event)\"></formio>\n", dependencies: [{ kind: "component", type: i2.FormioComponent, selector: "formio" }] });
256
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthRegisterComponent, deps: [{ token: FormioAuthService }], target: i0.ɵɵFactoryTarget.Component });
257
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.1", type: FormioAuthRegisterComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<formio [src]=\"service.registerForm\" [renderOptions]=\"renderOptions\" (submit)=\"service.onRegisterSubmit($event)\"></formio>\n", dependencies: [{ kind: "component", type: i2.FormioComponent, selector: "formio" }] });
258
258
  }
259
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuthRegisterComponent, decorators: [{
259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuthRegisterComponent, decorators: [{
260
260
  type: Component,
261
261
  args: [{ standalone: false, template: "<formio [src]=\"service.registerForm\" [renderOptions]=\"renderOptions\" (submit)=\"service.onRegisterSubmit($event)\"></formio>\n" }]
262
262
  }], ctorParameters: () => [{ type: FormioAuthService }] });
@@ -266,10 +266,10 @@ class FormioResetPassComponent {
266
266
  constructor(service) {
267
267
  this.service = service;
268
268
  }
269
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioResetPassComponent, deps: [{ token: FormioAuthService }], target: i0.ɵɵFactoryTarget.Component });
270
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FormioResetPassComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<formio [src]=\"service.resetPassForm\" (submit)=\"service.onResetPassSubmit($event)\"></formio>\n", dependencies: [{ kind: "component", type: i2.FormioComponent, selector: "formio" }] });
269
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioResetPassComponent, deps: [{ token: FormioAuthService }], target: i0.ɵɵFactoryTarget.Component });
270
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.1", type: FormioResetPassComponent, isStandalone: false, selector: "ng-component", ngImport: i0, template: "<formio [src]=\"service.resetPassForm\" (submit)=\"service.onResetPassSubmit($event)\"></formio>\n", dependencies: [{ kind: "component", type: i2.FormioComponent, selector: "formio" }] });
271
271
  }
272
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioResetPassComponent, decorators: [{
272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioResetPassComponent, decorators: [{
273
273
  type: Component,
274
274
  args: [{ standalone: false, template: "<formio [src]=\"service.resetPassForm\" (submit)=\"service.onResetPassSubmit($event)\"></formio>\n" }]
275
275
  }], ctorParameters: () => [{ type: FormioAuthService }] });
@@ -309,18 +309,18 @@ class FormioAuth {
309
309
  static forChild(config) {
310
310
  return extendRouter(FormioAuth, config, FormioAuthRoutes);
311
311
  }
312
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuth, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
313
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: FormioAuth, declarations: [FormioAuthComponent,
312
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuth, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
313
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.1", ngImport: i0, type: FormioAuth, declarations: [FormioAuthComponent,
314
314
  FormioAuthLoginComponent,
315
315
  FormioAuthRegisterComponent,
316
316
  FormioResetPassComponent], imports: [CommonModule,
317
317
  FormioModule,
318
318
  RouterModule] });
319
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuth, imports: [CommonModule,
319
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuth, imports: [CommonModule,
320
320
  FormioModule,
321
321
  RouterModule] });
322
322
  }
323
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAuth, decorators: [{
323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAuth, decorators: [{
324
324
  type: NgModule,
325
325
  args: [{
326
326
  imports: [
@@ -31,10 +31,10 @@ class FormioComponent {
31
31
  form.on('change', (event) => this.change.emit(event));
32
32
  }).catch((err) => this.error.emit(err));
33
33
  }
34
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
35
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FormioComponent, isStandalone: false, selector: "formio", inputs: { src: "src", form: "form", submission: "submission", url: "url", options: "options" }, outputs: { ready: "ready", submit: "submit", error: "error", change: "change" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["formio"], descendants: true }], ngImport: i0, template: '<div #formio></div>', isInline: true });
34
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
35
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.1", type: FormioComponent, isStandalone: false, selector: "formio", inputs: { src: "src", form: "form", submission: "submission", url: "url", options: "options" }, outputs: { ready: "ready", submit: "submit", error: "error", change: "change" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["formio"], descendants: true }], ngImport: i0, template: '<div #formio></div>', isInline: true });
36
36
  }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioComponent, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioComponent, decorators: [{
38
38
  type: Component,
39
39
  args: [{
40
40
  selector: 'formio',
@@ -124,10 +124,13 @@ class FormioBuilder {
124
124
  this.ready.emit(this.instance);
125
125
  }).catch((err) => this.error.emit(err));
126
126
  }
127
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
128
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: FormioBuilder, isStandalone: false, selector: "formio-builder", inputs: { form: "form", options: "options" }, outputs: { change: "change", ready: "ready", error: "error" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["formio"], descendants: true }], ngImport: i0, template: '<div #formio></div>', isInline: true });
127
+ ngOnDestroy() {
128
+ this.instance.destroy(true);
129
+ }
130
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
131
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.1", type: FormioBuilder, isStandalone: false, selector: "formio-builder", inputs: { form: "form", options: "options" }, outputs: { change: "change", ready: "ready", error: "error" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["formio"], descendants: true }], ngImport: i0, template: '<div #formio></div>', isInline: true });
129
132
  }
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioBuilder, decorators: [{
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioBuilder, decorators: [{
131
134
  type: Component,
132
135
  args: [{
133
136
  selector: 'formio-builder',
@@ -194,10 +197,10 @@ class FormioAppService {
194
197
  authenticate() {
195
198
  return this.formio.currentUser().then((user) => this.setUser(user)).catch(() => this.setUser(null));
196
199
  }
197
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAppService, deps: [{ token: FormioAppConfig }], target: i0.ɵɵFactoryTarget.Injectable });
198
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAppService });
200
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAppService, deps: [{ token: FormioAppConfig }], target: i0.ɵɵFactoryTarget.Injectable });
201
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAppService });
199
202
  }
200
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioAppService, decorators: [{
203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioAppService, decorators: [{
201
204
  type: Injectable
202
205
  }], ctorParameters: () => [{ type: undefined, decorators: [{
203
206
  type: Inject,
@@ -205,15 +208,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
205
208
  }] }] });
206
209
 
207
210
  class FormioEmbedModule {
208
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioEmbedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
209
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: FormioEmbedModule, declarations: [FormioComponent,
211
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioEmbedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
212
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.1", ngImport: i0, type: FormioEmbedModule, declarations: [FormioComponent,
210
213
  FormioBuilder], imports: [CommonModule], exports: [FormioComponent,
211
214
  FormioBuilder] });
212
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioEmbedModule, providers: [
215
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioEmbedModule, providers: [
213
216
  FormioAppService
214
217
  ], imports: [CommonModule] });
215
218
  }
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: FormioEmbedModule, decorators: [{
219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: FormioEmbedModule, decorators: [{
217
220
  type: NgModule,
218
221
  args: [{
219
222
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"formio-angular-embed.mjs","sources":["../../../projects/angular-formio/embed/src/formio.component.ts","../../../projects/angular-formio/embed/src/builder.component.ts","../../../projects/angular-formio/embed/src/app.service.ts","../../../projects/angular-formio/embed/src/embed.module.ts","../../../projects/angular-formio/embed/src/formio-angular-embed.ts"],"sourcesContent":["import { Component, ViewChild, ElementRef, Input, Output, EventEmitter, OnChanges, AfterViewInit } from '@angular/core';\nimport { FormioCore as Formio, Webform, Form } from '@formio/js';\nimport { Form as formType, Submission } from '@formio/core/types';\n\n@Component({\n selector: 'formio',\n template: '<div #formio></div>',\n standalone: false\n})\nexport class FormioComponent implements AfterViewInit {\n @Input() src?: string;\n @Input() form?: formType | null;\n @Input() submission?: Submission | null;\n @Input() url?: string;\n @Input() options?: Form['options'] = {};\n @Output() ready = new EventEmitter<Webform>();\n @Output() submit = new EventEmitter<object>();\n @Output() error = new EventEmitter<any>();\n @Output() change = new EventEmitter<any>();\n @ViewChild('formio') element: ElementRef;\n public instance: Webform;\n ngAfterViewInit(): void {\n Formio.createForm(this.element.nativeElement, this.src || this.form, this.options).then((form: Webform) => {\n this.instance = form;\n if (this.url) {\n form.url = this.url;\n }\n if (this.submission) {\n form.submission = this.submission;\n }\n this.ready.emit(form);\n form.on('submit', (submission) => this.submit.emit(submission));\n form.on('error', (err) => this.error.emit(err));\n form.on('change', (event) => this.change.emit(event));\n }).catch((err) => this.error.emit(err));\n }\n}\n","import { Component, ElementRef, Input, ViewChild, Output, EventEmitter, AfterViewInit } from '@angular/core';\nimport {Form, FormBuilder, Webform} from '@formio/js';\nimport WebformBuilder from '@formio/js/lib/cjs/WebformBuilder';\n\n@Component({\n selector: 'formio-builder',\n template: '<div #formio></div>',\n standalone: false\n})\nexport class FormioBuilder implements AfterViewInit {\n @ViewChild('formio') element: ElementRef;\n @Input() form?: Form['options'] | null;\n @Input() options?: FormBuilder['options'] = {};\n @Output() change = new EventEmitter<any>();\n @Output() ready = new EventEmitter<any>();\n @Output() error = new EventEmitter<any>();\n public builder: FormBuilder;\n public componentAdding = false;\n get instance(): WebformBuilder {\n return this.builder.instance;\n }\n ngAfterViewInit(): void {\n this.builder = new FormBuilder(this.element.nativeElement, this.form, this.options);\n this.builder.ready.then(() => {\n this.instance.on('addComponent', (component, parent, path, index, isNew) => {\n if (isNew) {\n this.componentAdding = true;\n } else {\n this.change.emit({\n type: 'addComponent',\n builder: this.instance,\n form: this.instance.schema,\n component: component,\n parent: parent,\n path: path,\n index: index\n });\n this.componentAdding = false;\n }\n });\n this.instance.on('saveComponent', (component, original, parent, path, index, isNew) => {\n this.change.emit({\n type: this.componentAdding ? 'addComponent' : 'saveComponent',\n builder: this.instance,\n form: this.instance.schema,\n component: component,\n originalComponent: original,\n parent: parent,\n path: path,\n index: index,\n isNew: isNew || false\n });\n this.componentAdding = false;\n });\n this.instance.on('removeComponent', (component, parent, path, index) => {\n this.change.emit({\n type: 'deleteComponent',\n builder: this.instance,\n form: this.instance.schema,\n component: component,\n parent: parent,\n path: path,\n index: index\n });\n });\n this.ready.emit(this.instance);\n }).catch((err) => this.error.emit(err));\n }\n}\n","import { Inject, Injectable, InjectionToken, EventEmitter } from '@angular/core';\nexport const FormioAppConfig = new InjectionToken('formio-config');\nimport { FormioCore as Formio } from '@formio/js';\n@Injectable()\nexport class FormioAppService {\n baseUrl;\n apiUrl;\n projectUrl;\n appUrl;\n icons?: string;\n formio: Formio;\n user?: any;\n onUser: EventEmitter<object> = new EventEmitter<object>();\n constructor(@Inject(FormioAppConfig) config: {\n apiUrl?: string,\n baseUrl?: string,\n appUrl?: string,\n projectUrl?: string,\n icons?: string,\n config?: any\n } = {}) {\n this.baseUrl = this.apiUrl = config.apiUrl || config.baseUrl;\n this.projectUrl = this.appUrl = config.appUrl || config.projectUrl;\n if (this.baseUrl) {\n Formio.setBaseUrl(this.baseUrl);\n Formio.setProjectUrl(this.projectUrl);\n if (config.icons) {\n Formio.icons = config.icons;\n }\n if (config.config) {\n for (let key in config.config) {\n Formio.config[key] = config.config[key];\n }\n }\n Formio.events.on('formio.user', (user) => this.setUser(user));\n this.formio = new Formio(this.projectUrl);\n this.authenticate();\n }\n }\n\n setUser(user) {\n this.user = user;\n this.onUser.emit(user);\n }\n\n logout() {\n return Formio.logout().then(() => {\n this.setUser(null);\n Formio.clearCache();\n }).catch(() => {\n this.setUser(null);\n Formio.clearCache();\n });\n }\n\n authenticate() {\n return this.formio.currentUser().then((user) => this.setUser(user)).catch(() => this.setUser(null));\n }\n}","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FormioComponent } from \"./formio.component\";\nimport { FormioBuilder } from \"./builder.component\";\nimport { FormioAppService } from \"./app.service\";\n\n@NgModule({\n imports: [\n CommonModule\n ],\n declarations: [\n FormioComponent,\n FormioBuilder\n ],\n exports: [\n FormioComponent,\n FormioBuilder\n ],\n providers: [\n FormioAppService\n ]\n})\nexport class FormioEmbedModule {}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Formio"],"mappings":";;;;;;MASa,eAAe,CAAA;AACf,IAAA,GAAG;AACH,IAAA,IAAI;AACJ,IAAA,UAAU;AACV,IAAA,GAAG;IACH,OAAO,GAAqB,EAAE;AAC7B,IAAA,KAAK,GAAG,IAAI,YAAY,EAAW;AAC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A,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,iBAXtB,eAAe;YACf,aAAa,CAAA,EAAA,OAAA,EAAA,CAJb,YAAY,CAAA,EAAA,OAAA,EAAA,CAOZ,eAAe;YACf,aAAa,CAAA,EAAA,CAAA;AAMR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAJf,SAAA,EAAA;YACP;AACH,SAAA,EAAA,OAAA,EAAA,CAZG,YAAY,CAAA,EAAA,CAAA;;2FAcP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL;AACH,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,eAAe;wBACf;AACH,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,eAAe;wBACf;AACH,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACP;AACH;AACJ,iBAAA;;;ACrBD;;AAEG;;;;"}
1
+ {"version":3,"file":"formio-angular-embed.mjs","sources":["../../../projects/angular-formio/embed/src/formio.component.ts","../../../projects/angular-formio/embed/src/builder.component.ts","../../../projects/angular-formio/embed/src/app.service.ts","../../../projects/angular-formio/embed/src/embed.module.ts","../../../projects/angular-formio/embed/src/formio-angular-embed.ts"],"sourcesContent":["import { Component, ViewChild, ElementRef, Input, Output, EventEmitter, OnChanges, AfterViewInit } from '@angular/core';\nimport { FormioCore as Formio, Webform, Form } from '@formio/js';\nimport { Form as formType, Submission } from '@formio/core/types';\n\n@Component({\n selector: 'formio',\n template: '<div #formio></div>',\n standalone: false\n})\nexport class FormioComponent implements AfterViewInit {\n @Input() src?: string;\n @Input() form?: formType | null;\n @Input() submission?: Submission | null;\n @Input() url?: string;\n @Input() options?: Form['options'] = {};\n @Output() ready = new EventEmitter<Webform>();\n @Output() submit = new EventEmitter<object>();\n @Output() error = new EventEmitter<any>();\n @Output() change = new EventEmitter<any>();\n @ViewChild('formio') element: ElementRef;\n public instance: Webform;\n ngAfterViewInit(): void {\n Formio.createForm(this.element.nativeElement, this.src || this.form, this.options).then((form: Webform) => {\n this.instance = form;\n if (this.url) {\n form.url = this.url;\n }\n if (this.submission) {\n form.submission = this.submission;\n }\n this.ready.emit(form);\n form.on('submit', (submission) => this.submit.emit(submission));\n form.on('error', (err) => this.error.emit(err));\n form.on('change', (event) => this.change.emit(event));\n }).catch((err) => this.error.emit(err));\n }\n}\n","import {Component, ElementRef, Input, ViewChild, Output, EventEmitter, AfterViewInit, OnDestroy} from '@angular/core';\nimport {Form, FormBuilder, Webform} from '@formio/js';\nimport WebformBuilder from '@formio/js/lib/cjs/WebformBuilder';\n\n@Component({\n selector: 'formio-builder',\n template: '<div #formio></div>',\n standalone: false\n})\nexport class FormioBuilder implements AfterViewInit, OnDestroy {\n @ViewChild('formio') element: ElementRef;\n @Input() form?: Form['options'] | null;\n @Input() options?: FormBuilder['options'] = {};\n @Output() change = new EventEmitter<any>();\n @Output() ready = new EventEmitter<any>();\n @Output() error = new EventEmitter<any>();\n public builder: FormBuilder;\n public componentAdding = false;\n get instance(): WebformBuilder {\n return this.builder.instance;\n }\n ngAfterViewInit(): void {\n this.builder = new FormBuilder(this.element.nativeElement, this.form, this.options);\n this.builder.ready.then(() => {\n this.instance.on('addComponent', (component, parent, path, index, isNew) => {\n if (isNew) {\n this.componentAdding = true;\n } else {\n this.change.emit({\n type: 'addComponent',\n builder: this.instance,\n form: this.instance.schema,\n component: component,\n parent: parent,\n path: path,\n index: index\n });\n this.componentAdding = false;\n }\n });\n this.instance.on('saveComponent', (component, original, parent, path, index, isNew) => {\n this.change.emit({\n type: this.componentAdding ? 'addComponent' : 'saveComponent',\n builder: this.instance,\n form: this.instance.schema,\n component: component,\n originalComponent: original,\n parent: parent,\n path: path,\n index: index,\n isNew: isNew || false\n });\n this.componentAdding = false;\n });\n this.instance.on('removeComponent', (component, parent, path, index) => {\n this.change.emit({\n type: 'deleteComponent',\n builder: this.instance,\n form: this.instance.schema,\n component: component,\n parent: parent,\n path: path,\n index: index\n });\n });\n this.ready.emit(this.instance);\n }).catch((err) => this.error.emit(err));\n }\n\n ngOnDestroy(): void {\n this.instance.destroy(true);\n }\n}\n","import { Inject, Injectable, InjectionToken, EventEmitter } from '@angular/core';\nexport const FormioAppConfig = new InjectionToken('formio-config');\nimport { FormioCore as Formio } from '@formio/js';\n@Injectable()\nexport class FormioAppService {\n baseUrl;\n apiUrl;\n projectUrl;\n appUrl;\n icons?: string;\n formio: Formio;\n user?: any;\n onUser: EventEmitter<object> = new EventEmitter<object>();\n constructor(@Inject(FormioAppConfig) config: {\n apiUrl?: string,\n baseUrl?: string,\n appUrl?: string,\n projectUrl?: string,\n icons?: string,\n config?: any\n } = {}) {\n this.baseUrl = this.apiUrl = config.apiUrl || config.baseUrl;\n this.projectUrl = this.appUrl = config.appUrl || config.projectUrl;\n if (this.baseUrl) {\n Formio.setBaseUrl(this.baseUrl);\n Formio.setProjectUrl(this.projectUrl);\n if (config.icons) {\n Formio.icons = config.icons;\n }\n if (config.config) {\n for (let key in config.config) {\n Formio.config[key] = config.config[key];\n }\n }\n Formio.events.on('formio.user', (user) => this.setUser(user));\n this.formio = new Formio(this.projectUrl);\n this.authenticate();\n }\n }\n\n setUser(user) {\n this.user = user;\n this.onUser.emit(user);\n }\n\n logout() {\n return Formio.logout().then(() => {\n this.setUser(null);\n Formio.clearCache();\n }).catch(() => {\n this.setUser(null);\n Formio.clearCache();\n });\n }\n\n authenticate() {\n return this.formio.currentUser().then((user) => this.setUser(user)).catch(() => this.setUser(null));\n }\n}","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FormioComponent } from \"./formio.component\";\nimport { FormioBuilder } from \"./builder.component\";\nimport { FormioAppService } from \"./app.service\";\n\n@NgModule({\n imports: [\n CommonModule\n ],\n declarations: [\n FormioComponent,\n FormioBuilder\n ],\n exports: [\n FormioComponent,\n FormioBuilder\n ],\n providers: [\n FormioAppService\n ]\n})\nexport class FormioEmbedModule {}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Formio"],"mappings":";;;;;;MASa,eAAe,CAAA;AACf,IAAA,GAAG;AACH,IAAA,IAAI;AACJ,IAAA,UAAU;AACV,IAAA,GAAG;IACH,OAAO,GAAqB,EAAE;AAC7B,IAAA,KAAK,GAAG,IAAI,YAAY,EAAW;AACnC,IAAA,MAAM,GAAG,IAAI,YAAY,EAAU;AACnC,IAAA,KAAK,GAAG,IAAI,YAAY,EAAO;AAC/B,IAAA,MAAM,GAAG,IAAI,YAAY,EAAO;AACrB,IAAA,OAAO;AACrB,IAAA,QAAQ;IACf,eAAe,GAAA;QACXA,UAAM,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAa,KAAI;AACtG,YAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;AACpB,YAAA,IAAI,IAAI,CAAC,GAAG,EAAE;AACV,gBAAA,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG;;AAEvB,YAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACjB,gBAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU;;AAErC,YAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AACrB,YAAA,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,UAAU,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC/D,YAAA,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AA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