@formio/angular 9.0.0 → 9.0.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.
- package/fesm2022/formio-angular-auth.mjs +22 -22
- package/fesm2022/formio-angular-auth.mjs.map +1 -1
- package/fesm2022/formio-angular-embed.mjs +14 -14
- package/fesm2022/formio-angular-embed.mjs.map +1 -1
- package/fesm2022/formio-angular-grid.mjs +41 -41
- package/fesm2022/formio-angular-grid.mjs.map +1 -1
- package/fesm2022/formio-angular-manager.mjs +44 -44
- package/fesm2022/formio-angular-manager.mjs.map +1 -1
- package/fesm2022/formio-angular-resource.mjs +31 -31
- package/fesm2022/formio-angular-resource.mjs.map +1 -1
- package/fesm2022/formio-angular.mjs +32 -32
- package/fesm2022/formio-angular.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -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.
|
|
19
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAuthConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAuthConfig });
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.
|
|
217
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
216
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", 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.2.14", ngImport: i0, type: FormioAuthService });
|
|
218
218
|
}
|
|
219
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.
|
|
225
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
225
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.
|
|
241
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
240
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAuthLoginComponent, deps: [{ token: FormioAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
241
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.
|
|
257
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
256
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAuthRegisterComponent, deps: [{ token: FormioAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
257
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.
|
|
270
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
269
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioResetPassComponent, deps: [{ token: FormioAuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
270
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.
|
|
272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", 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.
|
|
313
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
312
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAuth, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
313
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", 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.
|
|
319
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAuth, imports: [CommonModule,
|
|
320
320
|
FormioModule,
|
|
321
321
|
RouterModule] });
|
|
322
322
|
}
|
|
323
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAuth, decorators: [{
|
|
324
324
|
type: NgModule,
|
|
325
325
|
args: [{
|
|
326
326
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formio-angular-auth.mjs","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/auth.component.html","../../../projects/angular-formio/auth/src/login/login.component.ts","../../../projects/angular-formio/auth/src/login/login.component.html","../../../projects/angular-formio/auth/src/register/register.component.ts","../../../projects/angular-formio/auth/src/register/register.component.html","../../../projects/angular-formio/auth/src/resetpass/resetpass.component.ts","../../../projects/angular-formio/auth/src/resetpass/resetpass.component.html","../../../projects/angular-formio/auth/src/auth.routes.ts","../../../projects/angular-formio/auth/src/auth.module.ts","../../../projects/angular-formio/auth/src/formio-angular-auth.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nexport interface FormioAuthFormConfig {\n path?: string;\n form?: string;\n component?: any;\n}\n\nexport interface FormioAuthRouteConfig {\n auth?: any;\n login?: any;\n register?: any;\n resetpass?: any;\n}\n\n@Injectable()\nexport class FormioAuthConfig {\n component?: any;\n delayAuth?: any;\n login?: FormioAuthFormConfig;\n register?: FormioAuthFormConfig;\n resetpass?: FormioAuthFormConfig;\n oauth?: FormioOAuthConfig;\n}\n\n\nexport interface FormioOAuthConfig {\n type: FormioOauthType;\n options: FormioOktaConfig | FormioSamlConfig;\n}\n\nexport enum FormioOauthType {\n okta = 'okta',\n saml = 'saml',\n}\n\nexport interface FormioOktaConfig extends OktaConfig {\n formio?: any;\n}\n\nexport interface FormioSamlConfig {\n relay: string;\n}\n\n// for more details about Okta configuration options see https://github.com/okta/okta-auth-js#configuration-reference\nexport interface OktaConfig {\n url?: string;\n tokenManager?: OktaTokenManagerConfig;\n issuer?: string;\n clientId?: string;\n redirectUri?: string;\n postLogoutRedirectUri?: string;\n pkce?: boolean;\n authorizeUrl?: string;\n userinfoUrl?: string;\n tokenUrl?: string;\n ignoreSignature?: boolean;\n maxClockSkew?: number;\n scopes?: string[];\n httpRequestClient?: Function;\n}\n\nexport interface OktaTokenManagerConfig {\n storage?: string | {\n getItem?: Function;\n setItem?: Function;\n };\n secure?: boolean;\n autoRenew?: boolean;\n expireEarlySeconds?: number;\n storageKey?: string;\n}\n","import { EventEmitter, Injectable, Inject } from '@angular/core';\nimport { FormioAuthConfig } from './auth.config';\nimport { FormioAppConfig } from '@formio/angular';\nimport { get, each } from 'lodash';\nimport { Formio } from '@formio/js';\n\n@Injectable()\nexport class FormioAuthService {\n public user: any;\n public authenticated = false;\n\n public loginForm: string;\n public onLogin: EventEmitter<object>;\n public onLogout: EventEmitter<object>;\n\n public registerForm: string;\n public onRegister: EventEmitter<object>;\n public onUser: EventEmitter<object>;\n public onError: EventEmitter<any>;\n\n public resetPassForm: string;\n public onResetPass: EventEmitter<object>;\n\n public ready: Promise<boolean>;\n public readyResolve: any;\n public readyReject: any;\n\n public projectReady?: Promise<any>;\n public accessReady?: Promise<any>;\n public userReady?: Promise<any>;\n public formAccess: any = {};\n public submissionAccess: any = {};\n public roles: any;\n public is: any = {};\n\n constructor(\n public appConfig: FormioAppConfig,\n public config: FormioAuthConfig\n ) {\n this.user = null;\n\n if (this.appConfig && this.appConfig.appUrl) {\n Formio.setBaseUrl(this.appConfig.apiUrl);\n Formio.setProjectUrl(this.appConfig.appUrl);\n Formio.formOnly = !!this.appConfig.formOnly;\n } else {\n console.error('You must provide an AppConfig within your application!');\n }\n\n this.loginForm =\n this.appConfig.appUrl +\n '/' +\n get(this.config, 'login.form', 'user/login');\n this.registerForm =\n this.appConfig.appUrl +\n '/' +\n get(this.config, 'register.form', 'user/register');\n this.resetPassForm =\n this.appConfig.appUrl +\n '/' +\n get(this.config, 'resetpass.form', 'resetpass');\n this.onLogin = new EventEmitter();\n this.onLogout = new EventEmitter();\n this.onRegister = new EventEmitter();\n this.onUser = new EventEmitter();\n this.onError = new EventEmitter();\n\n this.ready = new Promise((resolve: any, reject: any) => {\n this.readyResolve = resolve;\n this.readyReject = reject;\n });\n\n // Register for the core events.\n Formio.events.on('formio.badToken', () => this.logoutError());\n Formio.events.on('formio.sessionExpired', () => this.logoutError());\n if (!this.config.delayAuth) {\n this.init();\n }\n }\n\n onLoginSubmit(submission: object) {\n this.setUser(submission);\n this.onLogin.emit(submission);\n }\n\n onRegisterSubmit(submission: object) {\n this.setUser(submission);\n this.onRegister.emit(submission);\n }\n\n onResetPassSubmit(submission: object) {\n this.onResetPass.emit(submission);\n }\n\n init() {\n this.projectReady = Formio.makeStaticRequest(this.appConfig.appUrl).then(\n (project: any) => {\n each(project.access, (access: any) => {\n this.formAccess[access.type] = access.roles;\n });\n },\n (): any => {\n this.formAccess = {};\n return null;\n }\n );\n\n // Get the access for this project.\n this.accessReady = Formio.makeStaticRequest(\n this.appConfig.appUrl + '/access'\n )\n .then((access: any) => {\n each(access.forms, (form: any) => {\n this.submissionAccess[form.name] = {};\n form.submissionAccess.forEach((subAccess: any) => {\n this.submissionAccess[form.name][subAccess.type] = subAccess.roles;\n });\n });\n this.roles = access.roles;\n return access;\n })\n .catch((err): any => {\n if (err === 'Token Expired' || err === 'Bad Token') {\n this.setUser(null);\n }\n this.roles = {};\n return null;\n })\n\n let currentUserPromise: Promise<any>;\n if (this.config.oauth) {\n // Make a fix to the hash to remove starting \"/\" that angular might put there.\n if (window.location.hash && window.location.hash.match(/^#\\/access_token/)) {\n history.pushState(null, null, window.location.hash.replace(/^#\\/access_token/, '#access_token'));\n }\n\n // Initiate the SSO if they provide oauth settings.\n currentUserPromise = Formio.ssoInit(this.config.oauth.type, this.config.oauth.options);\n } else {\n currentUserPromise = Formio.currentUser(null, {\n ignoreCache: true\n });\n }\n\n this.userReady = currentUserPromise.then((user: any) => {\n this.setUser(user);\n return user;\n }).catch((err) => {\n this.setUser(null);\n throw err;\n });\n\n // Trigger we are redy when all promises have resolved.\n if (this.accessReady) {\n this.accessReady\n .then(() => this.projectReady)\n .then(() => this.userReady)\n .then(() => this.readyResolve(true))\n .catch((err: any) => this.readyReject(err));\n }\n }\n\n setUser(user: any) {\n const namespace = Formio.namespace || 'formio';\n if (user) {\n this.user = user;\n localStorage.setItem(`${namespace}AppUser`, JSON.stringify(user));\n this.setUserRoles();\n Formio.setUser(user);\n } else {\n this.user = null;\n this.is = {};\n localStorage.removeItem(`${namespace}AppUser`);\n Formio.clearCache();\n Formio.setUser(null);\n }\n\n this.authenticated = !!Formio.getToken();\n this.onUser.emit(this.user);\n }\n\n setUserRoles() {\n if (this.accessReady) {\n this.accessReady.then(() => {\n each(this.roles, (role: any, roleName: string) => {\n if (this.user.roles.indexOf(role._id) !== -1) {\n this.is[roleName] = true;\n }\n });\n });\n }\n }\n\n logoutError() {\n this.setUser(null);\n const namespace = Formio.namespace || 'formio';\n localStorage.removeItem(`${namespace}Token`);\n this.onError.emit();\n }\n\n logout() {\n const namespace = Formio.namespace || 'formio';\n const tokenName = `${namespace}Token`;\n\n localStorage.removeItem(tokenName);\n if ((Formio as any).tokens && (Formio as any).tokens.hasOwnProperty(tokenName)) {\n delete (Formio as any).tokens[tokenName];\n }\n\n Formio.logout()\n .then(() => {\n this.setUser(null);\n if (localStorage.getItem(`${namespace}LogoutAuthUrl`)) {\n window.open(localStorage.getItem(`${namespace}LogoutAuthUrl`), null, 'width=1020,height=618');\n localStorage.removeItem(`${namespace}LogoutAuthUrl`);\n }\n this.onLogout.emit();\n })\n .catch(() => this.logoutError());\n }\n}\n","import { Component } from '@angular/core';\n@Component({\n templateUrl: './auth.component.html',\n standalone: false\n})\nexport class FormioAuthComponent {}\n","<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","import { Component } from '@angular/core';\nimport { FormioAuthService } from '../auth.service';\n@Component({\n templateUrl: './login.component.html',\n standalone: false\n})\nexport class FormioAuthLoginComponent {\n public renderOptions: any = {\n submitOnEnter: true\n };\n constructor(public service: FormioAuthService) {}\n}\n","<formio [src]=\"service.loginForm\" [renderOptions]=\"renderOptions\" (submit)=\"service.onLoginSubmit($event)\"></formio>\n","import { Component } from '@angular/core';\nimport { FormioAuthService } from '../auth.service';\n@Component({\n templateUrl: './register.component.html',\n standalone: false\n})\nexport class FormioAuthRegisterComponent {\n public renderOptions: any = {\n submitOnEnter: true\n };\n constructor(public service: FormioAuthService) {}\n}\n","<formio [src]=\"service.registerForm\" [renderOptions]=\"renderOptions\" (submit)=\"service.onRegisterSubmit($event)\"></formio>\n","import { Component } from '@angular/core';\nimport { FormioAuthService } from '../auth.service';\n@Component({\n templateUrl: './resetpass.component.html',\n standalone: false\n})\nexport class FormioResetPassComponent {\n constructor(public service: FormioAuthService) {}\n}\n","<formio [src]=\"service.resetPassForm\" (submit)=\"service.onResetPassSubmit($event)\"></formio>\n","import { Routes } from '@angular/router';\nimport { FormioAuthRouteConfig } from './auth.config';\nimport { FormioAuthComponent } from './auth.component';\nimport { FormioAuthLoginComponent } from './login/login.component';\nimport { FormioAuthRegisterComponent } from './register/register.component';\nimport { FormioResetPassComponent } from './resetpass/resetpass.component';\n\nexport function FormioAuthRoutes(config?: FormioAuthRouteConfig): Routes {\n return [\n {\n path: '',\n component: config && config.auth ? config.auth : FormioAuthComponent,\n children: [\n {\n path: '',\n redirectTo: 'login',\n pathMatch: 'full'\n },\n {\n path: 'login',\n component: config && config.login ? config.login : FormioAuthLoginComponent\n },\n {\n path: 'register',\n component: config && config.register ? config.register : FormioAuthRegisterComponent\n },\n {\n path: 'resetpass',\n component: config && config.resetpass ? config.resetpass : FormioResetPassComponent\n }\n ]\n }\n ];\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { FormioModule } from '@formio/angular';\nimport { FormioAuthComponent } from './auth.component';\nimport { FormioAuthLoginComponent } from './login/login.component';\nimport { FormioAuthRegisterComponent } from './register/register.component';\nimport { FormioResetPassComponent } from './resetpass/resetpass.component';\nimport { FormioAuthRouteConfig } from './auth.config';\nimport { FormioAuthRoutes } from './auth.routes';\nimport { extendRouter } from '@formio/angular';\n\n@NgModule({\n imports: [\n CommonModule,\n FormioModule,\n RouterModule\n ],\n declarations: [\n FormioAuthComponent,\n FormioAuthLoginComponent,\n FormioAuthRegisterComponent,\n FormioResetPassComponent\n ]\n})\nexport class FormioAuth {\n static forRoot(config?: FormioAuthRouteConfig): any {\n return extendRouter(FormioAuth, config, FormioAuthRoutes);\n }\n static forChild(config?: FormioAuthRouteConfig): any {\n return extendRouter(FormioAuth, config, FormioAuthRoutes);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.FormioAuthConfig","i1.FormioAuthService"],"mappings":";;;;;;;;;;MAgBa,gBAAgB,CAAA;AAC3B,IAAA,SAAS;AACT,IAAA,SAAS;AACT,IAAA,KAAK;AACL,IAAA,QAAQ;AACR,IAAA,SAAS;AACT,IAAA,KAAK;uGANM,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAhB,gBAAgB,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B;;AAgBD,IAAY,eAGX;AAHD,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAHW,eAAe,KAAf,eAAe,GAG1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A,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ;AACD,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACZ,mBAAmB;wBACnB,wBAAwB;wBACxB,2BAA2B;wBAC3B;AACD;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"formio-angular-auth.mjs","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/auth.component.html","../../../projects/angular-formio/auth/src/login/login.component.ts","../../../projects/angular-formio/auth/src/login/login.component.html","../../../projects/angular-formio/auth/src/register/register.component.ts","../../../projects/angular-formio/auth/src/register/register.component.html","../../../projects/angular-formio/auth/src/resetpass/resetpass.component.ts","../../../projects/angular-formio/auth/src/resetpass/resetpass.component.html","../../../projects/angular-formio/auth/src/auth.routes.ts","../../../projects/angular-formio/auth/src/auth.module.ts","../../../projects/angular-formio/auth/src/formio-angular-auth.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nexport interface FormioAuthFormConfig {\n path?: string;\n form?: string;\n component?: any;\n}\n\nexport interface FormioAuthRouteConfig {\n auth?: any;\n login?: any;\n register?: any;\n resetpass?: any;\n}\n\n@Injectable()\nexport class FormioAuthConfig {\n component?: any;\n delayAuth?: any;\n login?: FormioAuthFormConfig;\n register?: FormioAuthFormConfig;\n resetpass?: FormioAuthFormConfig;\n oauth?: FormioOAuthConfig;\n}\n\n\nexport interface FormioOAuthConfig {\n type: FormioOauthType;\n options: FormioOktaConfig | FormioSamlConfig;\n}\n\nexport enum FormioOauthType {\n okta = 'okta',\n saml = 'saml',\n}\n\nexport interface FormioOktaConfig extends OktaConfig {\n formio?: any;\n}\n\nexport interface FormioSamlConfig {\n relay: string;\n}\n\n// for more details about Okta configuration options see https://github.com/okta/okta-auth-js#configuration-reference\nexport interface OktaConfig {\n url?: string;\n tokenManager?: OktaTokenManagerConfig;\n issuer?: string;\n clientId?: string;\n redirectUri?: string;\n postLogoutRedirectUri?: string;\n pkce?: boolean;\n authorizeUrl?: string;\n userinfoUrl?: string;\n tokenUrl?: string;\n ignoreSignature?: boolean;\n maxClockSkew?: number;\n scopes?: string[];\n httpRequestClient?: Function;\n}\n\nexport interface OktaTokenManagerConfig {\n storage?: string | {\n getItem?: Function;\n setItem?: Function;\n };\n secure?: boolean;\n autoRenew?: boolean;\n expireEarlySeconds?: number;\n storageKey?: string;\n}\n","import { EventEmitter, Injectable, Inject } from '@angular/core';\nimport { FormioAuthConfig } from './auth.config';\nimport { FormioAppConfig } from '@formio/angular';\nimport { get, each } from 'lodash';\nimport { Formio } from '@formio/js';\n\n@Injectable()\nexport class FormioAuthService {\n public user: any;\n public authenticated = false;\n\n public loginForm: string;\n public onLogin: EventEmitter<object>;\n public onLogout: EventEmitter<object>;\n\n public registerForm: string;\n public onRegister: EventEmitter<object>;\n public onUser: EventEmitter<object>;\n public onError: EventEmitter<any>;\n\n public resetPassForm: string;\n public onResetPass: EventEmitter<object>;\n\n public ready: Promise<boolean>;\n public readyResolve: any;\n public readyReject: any;\n\n public projectReady?: Promise<any>;\n public accessReady?: Promise<any>;\n public userReady?: Promise<any>;\n public formAccess: any = {};\n public submissionAccess: any = {};\n public roles: any;\n public is: any = {};\n\n constructor(\n public appConfig: FormioAppConfig,\n public config: FormioAuthConfig\n ) {\n this.user = null;\n\n if (this.appConfig && this.appConfig.appUrl) {\n Formio.setBaseUrl(this.appConfig.apiUrl);\n Formio.setProjectUrl(this.appConfig.appUrl);\n Formio.formOnly = !!this.appConfig.formOnly;\n } else {\n console.error('You must provide an AppConfig within your application!');\n }\n\n this.loginForm =\n this.appConfig.appUrl +\n '/' +\n get(this.config, 'login.form', 'user/login');\n this.registerForm =\n this.appConfig.appUrl +\n '/' +\n get(this.config, 'register.form', 'user/register');\n this.resetPassForm =\n this.appConfig.appUrl +\n '/' +\n get(this.config, 'resetpass.form', 'resetpass');\n this.onLogin = new EventEmitter();\n this.onLogout = new EventEmitter();\n this.onRegister = new EventEmitter();\n this.onUser = new EventEmitter();\n this.onError = new EventEmitter();\n\n this.ready = new Promise((resolve: any, reject: any) => {\n this.readyResolve = resolve;\n this.readyReject = reject;\n });\n\n // Register for the core events.\n Formio.events.on('formio.badToken', () => this.logoutError());\n Formio.events.on('formio.sessionExpired', () => this.logoutError());\n if (!this.config.delayAuth) {\n this.init();\n }\n }\n\n onLoginSubmit(submission: object) {\n this.setUser(submission);\n this.onLogin.emit(submission);\n }\n\n onRegisterSubmit(submission: object) {\n this.setUser(submission);\n this.onRegister.emit(submission);\n }\n\n onResetPassSubmit(submission: object) {\n this.onResetPass.emit(submission);\n }\n\n init() {\n this.projectReady = Formio.makeStaticRequest(this.appConfig.appUrl).then(\n (project: any) => {\n each(project.access, (access: any) => {\n this.formAccess[access.type] = access.roles;\n });\n },\n (): any => {\n this.formAccess = {};\n return null;\n }\n );\n\n // Get the access for this project.\n this.accessReady = Formio.makeStaticRequest(\n this.appConfig.appUrl + '/access'\n )\n .then((access: any) => {\n each(access.forms, (form: any) => {\n this.submissionAccess[form.name] = {};\n form.submissionAccess.forEach((subAccess: any) => {\n this.submissionAccess[form.name][subAccess.type] = subAccess.roles;\n });\n });\n this.roles = access.roles;\n return access;\n })\n .catch((err): any => {\n if (err === 'Token Expired' || err === 'Bad Token') {\n this.setUser(null);\n }\n this.roles = {};\n return null;\n })\n\n let currentUserPromise: Promise<any>;\n if (this.config.oauth) {\n // Make a fix to the hash to remove starting \"/\" that angular might put there.\n if (window.location.hash && window.location.hash.match(/^#\\/access_token/)) {\n history.pushState(null, null, window.location.hash.replace(/^#\\/access_token/, '#access_token'));\n }\n\n // Initiate the SSO if they provide oauth settings.\n currentUserPromise = Formio.ssoInit(this.config.oauth.type, this.config.oauth.options);\n } else {\n currentUserPromise = Formio.currentUser(null, {\n ignoreCache: true\n });\n }\n\n this.userReady = currentUserPromise.then((user: any) => {\n this.setUser(user);\n return user;\n }).catch((err) => {\n this.setUser(null);\n throw err;\n });\n\n // Trigger we are redy when all promises have resolved.\n if (this.accessReady) {\n this.accessReady\n .then(() => this.projectReady)\n .then(() => this.userReady)\n .then(() => this.readyResolve(true))\n .catch((err: any) => this.readyReject(err));\n }\n }\n\n setUser(user: any) {\n const namespace = Formio.namespace || 'formio';\n if (user) {\n this.user = user;\n localStorage.setItem(`${namespace}AppUser`, JSON.stringify(user));\n this.setUserRoles();\n Formio.setUser(user);\n } else {\n this.user = null;\n this.is = {};\n localStorage.removeItem(`${namespace}AppUser`);\n Formio.clearCache();\n Formio.setUser(null);\n }\n\n this.authenticated = !!Formio.getToken();\n this.onUser.emit(this.user);\n }\n\n setUserRoles() {\n if (this.accessReady) {\n this.accessReady.then(() => {\n each(this.roles, (role: any, roleName: string) => {\n if (this.user.roles.indexOf(role._id) !== -1) {\n this.is[roleName] = true;\n }\n });\n });\n }\n }\n\n logoutError() {\n this.setUser(null);\n const namespace = Formio.namespace || 'formio';\n localStorage.removeItem(`${namespace}Token`);\n this.onError.emit();\n }\n\n logout() {\n const namespace = Formio.namespace || 'formio';\n const tokenName = `${namespace}Token`;\n\n localStorage.removeItem(tokenName);\n if ((Formio as any).tokens && (Formio as any).tokens.hasOwnProperty(tokenName)) {\n delete (Formio as any).tokens[tokenName];\n }\n\n Formio.logout()\n .then(() => {\n this.setUser(null);\n if (localStorage.getItem(`${namespace}LogoutAuthUrl`)) {\n window.open(localStorage.getItem(`${namespace}LogoutAuthUrl`), null, 'width=1020,height=618');\n localStorage.removeItem(`${namespace}LogoutAuthUrl`);\n }\n this.onLogout.emit();\n })\n .catch(() => this.logoutError());\n }\n}\n","import { Component } from '@angular/core';\n@Component({\n templateUrl: './auth.component.html',\n standalone: false\n})\nexport class FormioAuthComponent {}\n","<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","import { Component } from '@angular/core';\nimport { FormioAuthService } from '../auth.service';\n@Component({\n templateUrl: './login.component.html',\n standalone: false\n})\nexport class FormioAuthLoginComponent {\n public renderOptions: any = {\n submitOnEnter: true\n };\n constructor(public service: FormioAuthService) {}\n}\n","<formio [src]=\"service.loginForm\" [renderOptions]=\"renderOptions\" (submit)=\"service.onLoginSubmit($event)\"></formio>\n","import { Component } from '@angular/core';\nimport { FormioAuthService } from '../auth.service';\n@Component({\n templateUrl: './register.component.html',\n standalone: false\n})\nexport class FormioAuthRegisterComponent {\n public renderOptions: any = {\n submitOnEnter: true\n };\n constructor(public service: FormioAuthService) {}\n}\n","<formio [src]=\"service.registerForm\" [renderOptions]=\"renderOptions\" (submit)=\"service.onRegisterSubmit($event)\"></formio>\n","import { Component } from '@angular/core';\nimport { FormioAuthService } from '../auth.service';\n@Component({\n templateUrl: './resetpass.component.html',\n standalone: false\n})\nexport class FormioResetPassComponent {\n constructor(public service: FormioAuthService) {}\n}\n","<formio [src]=\"service.resetPassForm\" (submit)=\"service.onResetPassSubmit($event)\"></formio>\n","import { Routes } from '@angular/router';\nimport { FormioAuthRouteConfig } from './auth.config';\nimport { FormioAuthComponent } from './auth.component';\nimport { FormioAuthLoginComponent } from './login/login.component';\nimport { FormioAuthRegisterComponent } from './register/register.component';\nimport { FormioResetPassComponent } from './resetpass/resetpass.component';\n\nexport function FormioAuthRoutes(config?: FormioAuthRouteConfig): Routes {\n return [\n {\n path: '',\n component: config && config.auth ? config.auth : FormioAuthComponent,\n children: [\n {\n path: '',\n redirectTo: 'login',\n pathMatch: 'full'\n },\n {\n path: 'login',\n component: config && config.login ? config.login : FormioAuthLoginComponent\n },\n {\n path: 'register',\n component: config && config.register ? config.register : FormioAuthRegisterComponent\n },\n {\n path: 'resetpass',\n component: config && config.resetpass ? config.resetpass : FormioResetPassComponent\n }\n ]\n }\n ];\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { FormioModule } from '@formio/angular';\nimport { FormioAuthComponent } from './auth.component';\nimport { FormioAuthLoginComponent } from './login/login.component';\nimport { FormioAuthRegisterComponent } from './register/register.component';\nimport { FormioResetPassComponent } from './resetpass/resetpass.component';\nimport { FormioAuthRouteConfig } from './auth.config';\nimport { FormioAuthRoutes } from './auth.routes';\nimport { extendRouter } from '@formio/angular';\n\n@NgModule({\n imports: [\n CommonModule,\n FormioModule,\n RouterModule\n ],\n declarations: [\n FormioAuthComponent,\n FormioAuthLoginComponent,\n FormioAuthRegisterComponent,\n FormioResetPassComponent\n ]\n})\nexport class FormioAuth {\n static forRoot(config?: FormioAuthRouteConfig): any {\n return extendRouter(FormioAuth, config, FormioAuthRoutes);\n }\n static forChild(config?: FormioAuthRouteConfig): any {\n return extendRouter(FormioAuth, config, FormioAuthRoutes);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.FormioAuthConfig","i1.FormioAuthService"],"mappings":";;;;;;;;;;MAgBa,gBAAgB,CAAA;AAC3B,IAAA,SAAS;AACT,IAAA,SAAS;AACT,IAAA,KAAK;AACL,IAAA,QAAQ;AACR,IAAA,SAAS;AACT,IAAA,KAAK;wGANM,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;4GAAhB,gBAAgB,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B;;AAgBD,IAAY,eAGX;AAHD,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,M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AY,CAAA,EAAA,CAAA;;4FASH,UAAU,EAAA,UAAA,EAAA,CAAA;kBAbtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ;AACD,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACZ,mBAAmB;wBACnB,wBAAwB;wBACxB,2BAA2B;wBAC3B;AACD;AACF,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormioCore, FormBuilder } from '@formio/js';
|
|
2
2
|
export { FormioCore as Formio } from '@formio/js';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter,
|
|
4
|
+
import { EventEmitter, ViewChild, Output, Input, Component, InjectionToken, Inject, Injectable, NgModule } from '@angular/core';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
|
|
7
7
|
class FormioComponent {
|
|
@@ -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.
|
|
35
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioComponent, decorators: [{
|
|
38
38
|
type: Component,
|
|
39
39
|
args: [{
|
|
40
40
|
selector: 'formio',
|
|
@@ -124,10 +124,10 @@ 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.
|
|
128
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
127
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
128
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", 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
129
|
}
|
|
130
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioBuilder, decorators: [{
|
|
131
131
|
type: Component,
|
|
132
132
|
args: [{
|
|
133
133
|
selector: 'formio-builder',
|
|
@@ -194,10 +194,10 @@ class FormioAppService {
|
|
|
194
194
|
authenticate() {
|
|
195
195
|
return this.formio.currentUser().then((user) => this.setUser(user)).catch(() => this.setUser(null));
|
|
196
196
|
}
|
|
197
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
198
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
197
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAppService, deps: [{ token: FormioAppConfig }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
198
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAppService });
|
|
199
199
|
}
|
|
200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioAppService, decorators: [{
|
|
201
201
|
type: Injectable
|
|
202
202
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
203
203
|
type: Inject,
|
|
@@ -205,15 +205,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
205
205
|
}] }] });
|
|
206
206
|
|
|
207
207
|
class FormioEmbedModule {
|
|
208
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
209
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
208
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioEmbedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
209
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: FormioEmbedModule, declarations: [FormioComponent,
|
|
210
210
|
FormioBuilder], imports: [CommonModule], exports: [FormioComponent,
|
|
211
211
|
FormioBuilder] });
|
|
212
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
212
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioEmbedModule, providers: [
|
|
213
213
|
FormioAppService
|
|
214
214
|
], imports: [CommonModule] });
|
|
215
215
|
}
|
|
216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormioEmbedModule, decorators: [{
|
|
217
217
|
type: NgModule,
|
|
218
218
|
args: [{
|
|
219
219
|
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;AACnC,IAAA,MAAM,GAAG,IAAI,YAAY,EAAU;AACnC,IAAA,KAAK,GAAG,IAAI,YAAY,EAAO;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A,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 } 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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