@formio/angular
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.4.
243 lines (226 loc) • 10.4 kB
TypeScript
import * as i0 from '@angular/core';
import { OnInit, AfterViewInit, ElementRef, ChangeDetectorRef, TemplateRef, EventEmitter } from '@angular/core';
import * as i13 from '@formio/angular';
import { FormioAppConfig, FormioAlerts, FormBuilderComponent } from '@formio/angular';
import { Formio } from '@formio/js';
import * as i14 from '@angular/router';
import { ActivatedRoute, Routes, Router } from '@angular/router';
import { FormioAuthService } from '@formio/angular/auth';
import * as i16 from '@formio/angular/grid';
import { FormioGridComponent, GridService } from '@formio/angular/grid';
import * as i17 from 'ngx-bootstrap/modal';
import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
import * as i12 from '@angular/common';
import * as i15 from '@angular/forms';
import * as i18 from 'ngx-bootstrap/pagination';
type FormType = 'form' | 'resource';
interface FormManagerRouteConfig {
formIndex?: any;
formCreate?: any;
form?: any;
formView?: any;
formEdit?: any;
formEmbed?: any;
formDelete?: any;
submissionIndex?: any;
submission?: any;
submissionView?: any;
submissionEdit?: any;
submissionDelete?: any;
}
declare class FormManagerConfig {
tag: string;
includeSearch: boolean;
saveDraft: boolean;
type: FormType;
builder?: any;
viewer?: string;
renderer: any;
static ɵfac: i0.ɵɵFactoryDeclaration<FormManagerConfig, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<FormManagerConfig>;
}
declare class FormManagerService {
appConfig: FormioAppConfig;
config: FormManagerConfig;
auth: FormioAuthService;
formio: Formio;
access: any;
allAccessMap: any;
ownAccessMap: any;
ready: Promise<any>;
formReady: Promise<any>;
actionAllowed: any;
form: any;
formSrc: string;
perms: {
delete: boolean;
edit: boolean;
};
constructor(appConfig: FormioAppConfig, config: FormManagerConfig, auth: FormioAuthService);
isActionAllowed(action: string): any;
setAccess(): void;
reset(route?: ActivatedRoute): void;
hasAccess(roles: any): boolean;
setForm(form: any): any;
loadForm(): Promise<any>;
setSubmission(route: ActivatedRoute): Promise<unknown>;
submissionLoaded(submission: any): void;
loadForms(): any;
static ɵfac: i0.ɵɵFactoryDeclaration<FormManagerService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<FormManagerService>;
}
declare function FormManagerRoutes(config?: FormManagerRouteConfig): Routes;
declare class FormManagerIndexComponent implements OnInit, AfterViewInit {
service: FormManagerService;
route: ActivatedRoute;
router: Router;
config: FormManagerConfig;
searchElement: ElementRef;
formGrid: FormioGridComponent;
gridQuery: any;
onSearch: any;
constructor(service: FormManagerService, route: ActivatedRoute, router: Router, config: FormManagerConfig);
loadGrid(): void;
ngOnInit(): void;
ngAfterViewInit(): void;
_onSearch(): void;
clearSearch(): void;
onAction(action: any): void;
onSelect(row: any): void;
onCreateItem(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<FormManagerIndexComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<FormManagerIndexComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class FormManagerEditComponent implements AfterViewInit {
service: FormManagerService;
router: Router;
route: ActivatedRoute;
config: FormManagerConfig;
ref: ChangeDetectorRef;
alerts: FormioAlerts;
builder: FormBuilderComponent;
formTitle: ElementRef;
formType: ElementRef;
form: any;
loading: Boolean;
formReady: Boolean;
editMode: Boolean;
constructor(service: FormManagerService, router: Router, route: ActivatedRoute, config: FormManagerConfig, ref: ChangeDetectorRef, alerts: FormioAlerts);
initBuilder(editing: any): Promise<boolean | void>;
ngAfterViewInit(): void;
onDisplaySelect(event: any): void;
saveForm(): any;
onSave(): any;
static ɵfac: i0.ɵɵFactoryDeclaration<FormManagerEditComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<FormManagerEditComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class FormManagerCreateComponent extends FormManagerEditComponent implements OnInit {
ngOnInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<FormManagerCreateComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<FormManagerCreateComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class FormManagerFormComponent implements OnInit {
service: FormManagerService;
route: ActivatedRoute;
appConfig: FormioAppConfig;
options: FormManagerConfig;
private modalService;
choice: any;
embedCode: any;
shareUrl: any;
projectId: any;
pathName: any;
goTo: any;
modalRef: BsModalRef;
constructor(service: FormManagerService, route: ActivatedRoute, appConfig: FormioAppConfig, options: FormManagerConfig, modalService: BsModalService);
ngOnInit(): void;
getShareUrl(): any;
openEmbed(content: TemplateRef<any>): void;
choices(string: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<FormManagerFormComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<FormManagerFormComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class FormManagerViewComponent implements OnInit {
service: FormManagerService;
router: Router;
route: ActivatedRoute;
config: FormManagerConfig;
auth: FormioAuthService;
submission: any;
renderOptions: any;
onSuccess: EventEmitter<object>;
onError: EventEmitter<object>;
onSubmitDone: EventEmitter<object>;
constructor(service: FormManagerService, router: Router, route: ActivatedRoute, config: FormManagerConfig, auth: FormioAuthService);
ngOnInit(): void;
onSubmit(submission: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<FormManagerViewComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<FormManagerViewComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class FormManagerDeleteComponent {
managerService: FormManagerService;
router: Router;
route: ActivatedRoute;
alerts: FormioAlerts;
gridService?: GridService;
constructor(managerService: FormManagerService, router: Router, route: ActivatedRoute, alerts: FormioAlerts, gridService?: GridService);
onDelete(): void;
onCancel(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<FormManagerDeleteComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<FormManagerDeleteComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class SubmissionEditComponent {
service: FormManagerService;
router: Router;
route: ActivatedRoute;
constructor(service: FormManagerService, router: Router, route: ActivatedRoute);
onSubmit(submission: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SubmissionEditComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SubmissionEditComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class SubmissionDeleteComponent {
service: FormManagerService;
router: Router;
route: ActivatedRoute;
alerts: FormioAlerts;
constructor(service: FormManagerService, router: Router, route: ActivatedRoute, alerts: FormioAlerts);
onDelete(): void;
onCancel(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SubmissionDeleteComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SubmissionDeleteComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class SubmissionViewComponent {
service: FormManagerService;
constructor(service: FormManagerService);
static ɵfac: i0.ɵɵFactoryDeclaration<SubmissionViewComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SubmissionViewComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class SubmissionIndexComponent {
service: FormManagerService;
route: ActivatedRoute;
router: Router;
constructor(service: FormManagerService, route: ActivatedRoute, router: Router);
onSelect(row: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SubmissionIndexComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SubmissionIndexComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class SubmissionComponent implements OnInit {
service: FormManagerService;
route: ActivatedRoute;
downloadUrl: string;
constructor(service: FormManagerService, route: ActivatedRoute);
setDownloadUrl(url: any): void;
ngOnInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<SubmissionComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SubmissionComponent, "ng-component", never, {}, {}, never, never, false, never>;
}
declare class FormManagerModule {
static forChild(config?: FormManagerRouteConfig): any;
static forRoot(config?: FormManagerRouteConfig): any;
static ɵfac: i0.ɵɵFactoryDeclaration<FormManagerModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<FormManagerModule, [typeof FormManagerIndexComponent, typeof FormManagerCreateComponent, typeof FormManagerFormComponent, typeof FormManagerViewComponent, typeof FormManagerEditComponent, typeof FormManagerDeleteComponent, typeof SubmissionComponent, typeof SubmissionEditComponent, typeof SubmissionDeleteComponent, typeof SubmissionViewComponent, typeof SubmissionIndexComponent], [typeof i12.CommonModule, typeof i13.FormioModule, typeof i14.RouterModule, typeof i15.FormsModule, typeof i16.FormioGrid, typeof i17.ModalModule, typeof i18.PaginationModule], never>;
static ɵinj: i0.ɵɵInjectorDeclaration<FormManagerModule>;
}
export { FormManagerConfig, FormManagerCreateComponent, FormManagerDeleteComponent, FormManagerEditComponent, FormManagerFormComponent, FormManagerIndexComponent, FormManagerModule, FormManagerRoutes, FormManagerService, FormManagerViewComponent, SubmissionComponent, SubmissionDeleteComponent, SubmissionEditComponent, SubmissionIndexComponent, SubmissionViewComponent };
export type { FormManagerRouteConfig };
//# sourceMappingURL=index.d.ts.map