@formio/angular 7.0.0 → 7.5.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.
- package/FormioBaseComponent.d.ts.map +1 -1
- package/components/formbuilder/formbuilder.component.d.ts +1 -1
- package/components/formbuilder/formbuilder.component.d.ts.map +1 -1
- package/core.d.ts +1 -1
- package/core.d.ts.map +1 -1
- package/embed/app.service.d.ts +28 -0
- package/embed/app.service.d.ts.map +1 -0
- package/embed/builder.component.d.ts +14 -0
- package/embed/builder.component.d.ts.map +1 -0
- package/embed/embed.module.d.ts +10 -0
- package/embed/embed.module.d.ts.map +1 -0
- package/embed/formio-angular-embed.d.ts.map +1 -0
- package/embed/formio.component.d.ts +17 -0
- package/embed/formio.component.d.ts.map +1 -0
- package/embed/index.d.ts +7 -0
- package/embed/index.d.ts.map +1 -0
- package/esm2022/FormioBaseComponent.mjs +3 -6
- package/esm2022/auth/auth.service.mjs +2 -2
- package/esm2022/components/formbuilder/formbuilder.component.mjs +4 -4
- package/esm2022/components/formio/formio.component.mjs +4 -4
- package/esm2022/components/formioreport/formioreport.component.mjs +4 -4
- package/esm2022/core.mjs +2 -2
- package/esm2022/embed/app.service.mjs +58 -0
- package/esm2022/embed/builder.component.mjs +36 -0
- package/esm2022/embed/embed.module.mjs +35 -0
- package/esm2022/embed/formio-angular-embed.mjs +5 -0
- package/esm2022/embed/formio.component.mjs +50 -0
- package/esm2022/embed/index.mjs +7 -0
- package/esm2022/formio.common.mjs +1 -1
- package/esm2022/formio.config.mjs +2 -2
- package/esm2022/formio.service.mjs +2 -2
- package/esm2022/grid/grid.component.mjs +2 -2
- package/esm2022/grid/submission/SubmissionGridHeader.component.mjs +2 -2
- package/esm2022/manager/form-manager.service.mjs +2 -2
- package/esm2022/manager/view/view.component.mjs +2 -2
- package/esm2022/resource/edit/edit.component.mjs +2 -2
- package/esm2022/resource/resource.service.mjs +2 -2
- package/esm2022/resource/view/view.component.mjs +2 -2
- package/fesm2022/formio-angular-auth.mjs +1 -1
- package/fesm2022/formio-angular-auth.mjs.map +1 -1
- package/fesm2022/formio-angular-embed.mjs +176 -0
- package/fesm2022/formio-angular-embed.mjs.map +1 -0
- package/fesm2022/formio-angular-grid.mjs +2 -1
- package/fesm2022/formio-angular-grid.mjs.map +1 -1
- package/fesm2022/formio-angular-manager.mjs +1 -1
- package/fesm2022/formio-angular-manager.mjs.map +1 -1
- package/fesm2022/formio-angular-resource.mjs +1 -1
- package/fesm2022/formio-angular-resource.mjs.map +1 -1
- package/fesm2022/formio-angular.mjs +11 -13
- package/fesm2022/formio-angular.mjs.map +1 -1
- package/formio.common.d.ts +2 -2
- package/formio.common.d.ts.map +1 -1
- package/formio.config.d.ts +1 -1
- package/formio.config.d.ts.map +1 -1
- package/grid/submission/SubmissionGridHeader.component.d.ts +1 -1
- package/grid/submission/SubmissionGridHeader.component.d.ts.map +1 -1
- package/manager/form-manager.service.d.ts +1 -1
- package/manager/form-manager.service.d.ts.map +1 -1
- package/package.json +8 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
|
-
import { Formio } from '
|
|
2
|
+
import { Formio } from '@formio/js';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "../resource.service";
|
|
5
5
|
import * as i2 from "../resource.config";
|
|
@@ -22,4 +22,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
|
|
|
22
22
|
type: Component,
|
|
23
23
|
args: [{ template: "<formio\n [form]=\"service.form\"\n [submission]=\"service.resource\"\n [hideComponents]=\"config.parents\"\n [readOnly]=\"true\"\n></formio>\n" }]
|
|
24
24
|
}], ctorParameters: () => [{ type: i1.FormioResourceService }, { type: i2.FormioResourceConfig }] });
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlldy5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CB7Rm9ybWlvfSBmcm9tICdAZm9ybWlvL2pzJztcblxuQENvbXBvbmVudCh7XG4gIHRlbXBsYXRlVXJsOiAnLi92aWV3LmNvbXBvbmVudC5odG1sJ1xufSlcbmV4cG9ydCBjbGFzcyBGb3JtaW9SZXNvdXJjZVZpZXdDb21wb25lbnQgaW1wbGVtZW50cyBPbkRlc3Ryb3l7XG4gIGNvbnN0cnVjdG9yKFxuICAgIHB1YmxpYyBzZXJ2aWNlOiBGb3JtaW9SZXNvdXJjZVNlcnZpY2UsXG4gICAgcHVibGljIGNvbmZpZzogRm9ybWlvUmVzb3VyY2VDb25maWdcbiAgKSB7fVxuICBwdWJsaWMgc3VibWlzc2lvbiA9IHtkYXRhOiB7fX07XG5cbiAgbmdPbkRlc3Ryb3koKSB7XG4gICAgRm9ybWlvLmNsZWFyQ2FjaGUoKTtcbiAgfVxufVxuIiwiPGZvcm1pb1xuICBbZm9ybV09XCJzZXJ2aWNlLmZvcm1cIlxuICBbc3VibWlzc2lvbl09XCJzZXJ2aWNlLnJlc291cmNlXCJcbiAgW2hpZGVDb21wb25lbnRzXT1cImNvbmZpZy5wYXJlbnRzXCJcbiAgW3JlYWRPbmx5XT1cInRydWVcIlxuPjwvZm9ybWlvPlxuIl19
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, EventEmitter, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { get, each } from 'lodash';
|
|
4
|
-
import { Formio } from '
|
|
4
|
+
import { Formio } from '@formio/js';
|
|
5
5
|
import * as i2 from '@formio/angular';
|
|
6
6
|
import { extendRouter, FormioModule } from '@formio/angular';
|
|
7
7
|
import * as i1 from '@angular/router';
|
|
@@ -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 'formiojs';\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, 'register.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})\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})\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})\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})\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,CAAO;AAChB,IAAA,SAAS,CAAO;AAChB,IAAA,KAAK,CAAwB;AAC7B,IAAA,QAAQ,CAAwB;AAChC,IAAA,SAAS,CAAwB;AACjC,IAAA,KAAK,CAAqB;uGANf,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;2GAAhB,gBAAgB,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;;AAgBX,IAAY,eAGX,CAAA;AAHD,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACf,CAAC,EAHW,eAAe,KAAf,eAAe,GAG1B,EAAA,CAAA,CAAA;;MC3BY,iBAAiB,CAAA;AA6BnB,IAAA,SAAA,CAAA;AACA,IAAA,MAAA,CAAA;AA7BF,IAAA,IAAI,CAAM;IACV,aAAa,GAAG,KAAK,CAAC;AAEtB,IAAA,SAAS,CAAS;AAClB,IAAA,OAAO,CAAuB;AAC9B,IAA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O,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;KAC3D;uGANU,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,iBANnB,mBAAmB;YACnB,wBAAwB;YACxB,2BAA2B;AAC3B,YAAA,wBAAwB,aARxB,YAAY;YACZ,YAAY;YACZ,YAAY,CAAA,EAAA,CAAA,CAAA;AASH,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YAXnB,YAAY;YACZ,YAAY;YACZ,YAAY,CAAA,EAAA,CAAA,CAAA;;2FASH,UAAU,EAAA,UAAA,EAAA,CAAA;kBAbtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,YAAY;AACb,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACZ,mBAAmB;wBACnB,wBAAwB;wBACxB,2BAA2B;wBAC3B,wBAAwB;AACzB,qBAAA;AACF,iBAAA,CAAA;;;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, 'register.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})\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})\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})\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})\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,CAAO;AAChB,IAAA,SAAS,CAAO;AAChB,IAAA,KAAK,CAAwB;AAC7B,IAAA,QAAQ,CAAwB;AAChC,IAAA,SAAS,CAAwB;AACjC,IAAA,KAAK,CAAqB;uGANf,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;2GAAhB,gBAAgB,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;;AAgBX,IAAY,eAGX,CAAA;AAHD,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACf,CAAC,EAHW,eAAe,KAAf,eAAe,GAG1B,EAAA,CAAA,CAAA;;MC3BY,iBAAiB,CAAA;AA6BnB,IAAA,SAAA,CAAA;AACA,IAAA,MAAA,CAAA;AA7BF,IAAA,IAAI,CAAM;IACV,aAAa,GAAG,KAAK,CAAC;AAEtB,IAAA,SAAS,CAAS;AAClB,IAAA,OAAO,CAAuB;AAC9B,IAAA,QAAQ,CAAuB;AAE/B,IAAA,YAAY,CAAS;AACrB,IAAA,UAAU,CAAuB;AACjC,IAAA,MAAM,CAAuB;AAC7B,IAAA,OAAO,CAAoB;AAE3B,IAA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A,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,iBANnB,mBAAmB;YACnB,wBAAwB;YACxB,2BAA2B;AAC3B,YAAA,wBAAwB,aARxB,YAAY;YACZ,YAAY;YACZ,YAAY,CAAA,EAAA,CAAA,CAAA;AASH,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YAXnB,YAAY;YACZ,YAAY;YACZ,YAAY,CAAA,EAAA,CAAA,CAAA;;2FASH,UAAU,EAAA,UAAA,EAAA,CAAA;kBAbtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,YAAY;AACb,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACZ,mBAAmB;wBACnB,wBAAwB;wBACxB,2BAA2B;wBAC3B,wBAAwB;AACzB,qBAAA;AACF,iBAAA,CAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { Formio } from '@formio/js/sdk';
|
|
2
|
+
export { Formio } from '@formio/js/sdk';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { EventEmitter, Component, Input, Output, ViewChild, InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
|
|
7
|
+
class FormioComponent {
|
|
8
|
+
src;
|
|
9
|
+
form;
|
|
10
|
+
submission;
|
|
11
|
+
options = {};
|
|
12
|
+
ready = new EventEmitter();
|
|
13
|
+
submit = new EventEmitter();
|
|
14
|
+
error = new EventEmitter();
|
|
15
|
+
element;
|
|
16
|
+
ngAfterViewInit() {
|
|
17
|
+
Formio.createForm(this.element.nativeElement, this.src || this.form, this.options).then((form) => {
|
|
18
|
+
if (this.submission) {
|
|
19
|
+
form.submission = this.submission;
|
|
20
|
+
}
|
|
21
|
+
this.ready.emit(form);
|
|
22
|
+
form.on('submit', (submission) => this.submit.emit(submission));
|
|
23
|
+
form.on('error', (err) => this.error.emit(err));
|
|
24
|
+
}).catch((err) => this.error.emit(err));
|
|
25
|
+
}
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FormioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: FormioComponent, selector: "formio", inputs: { src: "src", form: "form", submission: "submission", options: "options" }, outputs: { ready: "ready", submit: "submit", error: "error" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["formio"], descendants: true }], ngImport: i0, template: '<div #formio></div>', isInline: true });
|
|
28
|
+
}
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FormioComponent, decorators: [{
|
|
30
|
+
type: Component,
|
|
31
|
+
args: [{
|
|
32
|
+
selector: 'formio',
|
|
33
|
+
template: '<div #formio></div>'
|
|
34
|
+
}]
|
|
35
|
+
}], propDecorators: { src: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}], form: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], submission: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], options: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], ready: [{
|
|
44
|
+
type: Output
|
|
45
|
+
}], submit: [{
|
|
46
|
+
type: Output
|
|
47
|
+
}], error: [{
|
|
48
|
+
type: Output
|
|
49
|
+
}], element: [{
|
|
50
|
+
type: ViewChild,
|
|
51
|
+
args: ['formio']
|
|
52
|
+
}] } });
|
|
53
|
+
|
|
54
|
+
class FormioBuilder {
|
|
55
|
+
element;
|
|
56
|
+
form;
|
|
57
|
+
options = {};
|
|
58
|
+
ready = new EventEmitter();
|
|
59
|
+
error = new EventEmitter();
|
|
60
|
+
ngAfterViewInit() {
|
|
61
|
+
Formio.builder(this.element.nativeElement, this.form, this.options).then((builder) => {
|
|
62
|
+
this.ready.emit(builder);
|
|
63
|
+
}).catch((err) => this.error.emit(err));
|
|
64
|
+
}
|
|
65
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FormioBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: FormioBuilder, selector: "formio-builder", inputs: { form: "form", options: "options" }, outputs: { ready: "ready", error: "error" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["formio"], descendants: true }], ngImport: i0, template: '<div #formio></div>', isInline: true });
|
|
67
|
+
}
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FormioBuilder, decorators: [{
|
|
69
|
+
type: Component,
|
|
70
|
+
args: [{
|
|
71
|
+
selector: 'formio-builder',
|
|
72
|
+
template: '<div #formio></div>'
|
|
73
|
+
}]
|
|
74
|
+
}], propDecorators: { element: [{
|
|
75
|
+
type: ViewChild,
|
|
76
|
+
args: ['formio']
|
|
77
|
+
}], form: [{
|
|
78
|
+
type: Input
|
|
79
|
+
}], options: [{
|
|
80
|
+
type: Input
|
|
81
|
+
}], ready: [{
|
|
82
|
+
type: Output
|
|
83
|
+
}], error: [{
|
|
84
|
+
type: Output
|
|
85
|
+
}] } });
|
|
86
|
+
|
|
87
|
+
const FormioAppConfig = new InjectionToken('formio-config');
|
|
88
|
+
class FormioAppService {
|
|
89
|
+
baseUrl;
|
|
90
|
+
apiUrl;
|
|
91
|
+
projectUrl;
|
|
92
|
+
appUrl;
|
|
93
|
+
icons;
|
|
94
|
+
formio;
|
|
95
|
+
user;
|
|
96
|
+
onUser = new EventEmitter();
|
|
97
|
+
constructor(config = {}) {
|
|
98
|
+
this.baseUrl = this.apiUrl = config.apiUrl || config.baseUrl;
|
|
99
|
+
this.projectUrl = this.appUrl = config.appUrl || config.projectUrl;
|
|
100
|
+
if (this.baseUrl) {
|
|
101
|
+
Formio.setBaseUrl(this.baseUrl);
|
|
102
|
+
Formio.setProjectUrl(this.projectUrl);
|
|
103
|
+
if (config.icons) {
|
|
104
|
+
Formio.icons = config.icons;
|
|
105
|
+
}
|
|
106
|
+
if (config.config) {
|
|
107
|
+
for (let key in config.config) {
|
|
108
|
+
Formio.config[key] = config.config[key];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
Formio.events.on('formio.user', (user) => this.setUser(user));
|
|
112
|
+
this.formio = new Formio(this.projectUrl);
|
|
113
|
+
this.authenticate();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
setUser(user) {
|
|
117
|
+
this.user = user;
|
|
118
|
+
this.onUser.emit(user);
|
|
119
|
+
}
|
|
120
|
+
logout() {
|
|
121
|
+
return Formio.logout().then(() => {
|
|
122
|
+
this.setUser(null);
|
|
123
|
+
Formio.clearCache();
|
|
124
|
+
}).catch(() => {
|
|
125
|
+
this.setUser(null);
|
|
126
|
+
Formio.clearCache();
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
authenticate() {
|
|
130
|
+
return this.formio.currentUser().then((user) => this.setUser(user)).catch(() => this.setUser(null));
|
|
131
|
+
}
|
|
132
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FormioAppService, deps: [{ token: FormioAppConfig }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
133
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FormioAppService });
|
|
134
|
+
}
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FormioAppService, decorators: [{
|
|
136
|
+
type: Injectable
|
|
137
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
138
|
+
type: Inject,
|
|
139
|
+
args: [FormioAppConfig]
|
|
140
|
+
}] }] });
|
|
141
|
+
|
|
142
|
+
class FormioEmbedModule {
|
|
143
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FormioEmbedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
144
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: FormioEmbedModule, declarations: [FormioComponent,
|
|
145
|
+
FormioBuilder], imports: [CommonModule], exports: [FormioComponent,
|
|
146
|
+
FormioBuilder] });
|
|
147
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FormioEmbedModule, providers: [
|
|
148
|
+
FormioAppService
|
|
149
|
+
], imports: [CommonModule] });
|
|
150
|
+
}
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: FormioEmbedModule, decorators: [{
|
|
152
|
+
type: NgModule,
|
|
153
|
+
args: [{
|
|
154
|
+
imports: [
|
|
155
|
+
CommonModule
|
|
156
|
+
],
|
|
157
|
+
declarations: [
|
|
158
|
+
FormioComponent,
|
|
159
|
+
FormioBuilder
|
|
160
|
+
],
|
|
161
|
+
exports: [
|
|
162
|
+
FormioComponent,
|
|
163
|
+
FormioBuilder
|
|
164
|
+
],
|
|
165
|
+
providers: [
|
|
166
|
+
FormioAppService
|
|
167
|
+
]
|
|
168
|
+
}]
|
|
169
|
+
}] });
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Generated bundle index. Do not edit.
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
export { FormioAppConfig, FormioAppService, FormioBuilder, FormioComponent, FormioEmbedModule };
|
|
176
|
+
//# sourceMappingURL=formio-angular-embed.mjs.map
|
|
@@ -0,0 +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 { Formio } from '@formio/js/sdk';\n\n@Component({\n selector: 'formio',\n template: '<div #formio></div>'\n})\nexport class FormioComponent implements AfterViewInit {\n @Input() src?: string;\n @Input() form?: Object | null;\n @Input() submission?: Object | null;\n @Input() options?: Object = {};\n @Output() ready = new EventEmitter<Formio>();\n @Output() submit = new EventEmitter<object>();\n @Output() error = new EventEmitter<any>();\n @ViewChild('formio') element: ElementRef;\n ngAfterViewInit(): void {\n Formio.createForm(this.element.nativeElement, this.src || this.form, this.options).then((form) => {\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 }).catch((err) => this.error.emit(err));\n }\n}","import { Component, ElementRef, Input, ViewChild, OnChanges, Output, EventEmitter, AfterViewInit } from '@angular/core';\nimport { Formio } from '@formio/js/sdk';\n\n@Component({\n selector: 'formio-builder',\n template: '<div #formio></div>'\n})\nexport class FormioBuilder implements AfterViewInit {\n @ViewChild('formio') element: ElementRef;\n @Input() form?: Object | null;\n @Input() options?: Object = {};\n @Output() ready = new EventEmitter<Formio>();\n @Output() error = new EventEmitter<any>();\n ngAfterViewInit(): void {\n Formio.builder(this.element.nativeElement, this.form, this.options).then((builder) => {\n this.ready.emit(builder);\n }).catch((err) => this.error.emit(err));\n }\n}","import { Inject, Injectable, InjectionToken, EventEmitter } from '@angular/core';\nexport const FormioAppConfig = new InjectionToken('formio-config');\nimport { Formio } from '@formio/js/sdk';\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":[],"mappings":";;;;;;MAOa,eAAe,CAAA;AACf,IAAA,GAAG,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AA,OAAO,EAAE;wBACL,YAAY;AACf,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,eAAe;wBACf,aAAa;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,eAAe;wBACf,aAAa;AAChB,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACP,gBAAgB;AACnB,qBAAA;AACJ,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -9,10 +9,11 @@ import { RouterModule } from '@angular/router';
|
|
|
9
9
|
import * as i1$1 from '@formio/angular';
|
|
10
10
|
import { FormioPromiseService, FormioModule, FormioAlerts } from '@formio/angular';
|
|
11
11
|
import { clone, each, get } from 'lodash';
|
|
12
|
-
import {
|
|
12
|
+
import { Formio } from '@formio/js/sdk';
|
|
13
13
|
import { Tooltip } from 'bootstrap';
|
|
14
14
|
import * as i3 from 'ngx-bootstrap/pagination';
|
|
15
15
|
import { PaginationModule } from 'ngx-bootstrap/pagination';
|
|
16
|
+
import { Components, Utils } from '@formio/js';
|
|
16
17
|
|
|
17
18
|
var GridFooterPositions;
|
|
18
19
|
(function (GridFooterPositions) {
|