Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to include 5x renderer #1063

Merged
merged 10 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formio/angular",
"version": "7.5.0-rc.1",
"version": "7.5.0-rc.5",
"scripts": {
"ng": "ng",
"build": "ng build angular-formio",
Expand Down Expand Up @@ -35,40 +35,41 @@
"node": ">=6.0.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.0.9",
"@angular/animations": "^17.0.8",
"@angular/cli": "^17.0.9",
"@angular/common": "^17.0.8",
"@angular/compiler": "^17.0.8",
"@angular/compiler-cli": "^17.0.8",
"@angular/core": "^17.0.8",
"@angular/forms": "^17.0.8",
"@angular/platform-browser": "^17.0.8",
"@angular/platform-browser-dynamic": "^17.0.8",
"@angular/router": "^17.0.8",
"@compodoc/compodoc": "^1.1.23",
"@formio/js": "^5.0.0-rc.38",
"@angular-devkit/build-angular": "^17.3.5",
"@angular/animations": "^17.3.5",
"@angular/cli": "^17.3.5",
"@angular/common": "^17.3.5",
"@angular/compiler": "^17.3.5",
"@angular/compiler-cli": "^17.3.5",
"@angular/core": "^17.3.5",
"@angular/forms": "^17.3.5",
"@angular/platform-browser": "^17.3.5",
"@angular/platform-browser-dynamic": "^17.3.5",
"@angular/router": "^17.3.5",
"@compodoc/compodoc": "^1.1.24",
"@formio/deprecated-types": "^0.1.0",
"@formio/js": "^5.0.0-rc.54",
"@types/jasmine": "^5.1.4",
"@types/jasminewd2": "^2.0.13",
"@types/node": "^20.10.8",
"bootstrap": "5.3.2",
"@types/node": "^20.12.7",
"bootstrap": "5.3.3",
"codelyzer": "^6.0.2",
"jasmine-core": "^5.0.0",
"jasmine-core": "^5.1.2",
"jasmine-spec-reporter": "^7.0.0",
"karma": "^6.4.0",
"karma": "^6.4.3",
"karma-chrome-launcher": "^3.1.1",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"ng-packagr": "^17.0.3",
"ng-packagr": "^17.3.0",
"ngx-bootstrap": "^12.0.0",
"protractor": "~7.0.0",
"replace-in-file": "^7.1.0",
"rxjs": "^7.8.1",
"ts-node": "^10.9.2",
"tslib": "^2.5.3",
"tslint": "~6.1.0",
"typescript": "~5.2.0",
"zone.js": "^0.14.3"
"typescript": "~5.4.5",
"zone.js": "^0.14.4"
}
}
2 changes: 1 addition & 1 deletion projects/angular-formio/embed/src/app.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Inject, Injectable, InjectionToken, EventEmitter } from '@angular/core';
export const FormioAppConfig = new InjectionToken('formio-config');
import { Formio } from '@formio/js/sdk';
import { FormioCore as Formio } from '@formio/js';
@Injectable()
export class FormioAppService {
baseUrl;
Expand Down
4 changes: 2 additions & 2 deletions projects/angular-formio/embed/src/builder.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ElementRef, Input, ViewChild, OnChanges, Output, EventEmitter, AfterViewInit } from '@angular/core';
import { Formio } from '@formio/js/sdk';
import { Component, ElementRef, Input, ViewChild, Output, EventEmitter, AfterViewInit } from '@angular/core';
import { FormioCore as Formio } from '@formio/js';

@Component({
selector: 'formio-builder',
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-formio/embed/src/formio.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild, ElementRef, Input, Output, EventEmitter, OnChanges, AfterViewInit } from '@angular/core';
import { Formio } from '@formio/js/sdk';
import { FormioCore as Formio } from '@formio/js';

@Component({
selector: 'formio',
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-formio/embed/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Formio } from '@formio/js/sdk';
import { FormioCore as Formio } from '@formio/js';
export { FormioComponent } from './formio.component';
export { FormioBuilder } from './builder.component';
export { FormioEmbedModule } from './embed.module';
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-formio/grid/src/grid.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from '@angular/core';
import {FormioAlerts} from '@formio/angular';
import {each} from 'lodash';
import {Formio} from '@formio/js/sdk';
import {FormioCore as Formio} from '@formio/js';
import {GridHeaderComponent} from './GridHeaderComponent';
import {GridBodyComponent} from './GridBodyComponent';
import {GridFooterComponent} from './GridFooterComponent';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Component} from '@angular/core';
import {Utils, Components, ExtendedComponentSchema} from '@formio/js';
import {Utils, Components} from '@formio/js';
import {ExtendedComponentSchema} from '@formio/deprecated-types';
import {GridHeaderComponent} from '../GridHeaderComponent';
import {FormioPromiseService} from '@formio/angular';
import {ComponentInstance, FormioForm} from '@formio/angular';
Expand Down Expand Up @@ -37,7 +38,7 @@ export class SubmissionGridHeaderComponent extends GridHeaderComponent {
label: column.label,
key: column.path,
sort: sort,
component: component ? Components.create(component, null, null, true) as ComponentInstance : undefined,
component: component ? Components.create(component, null, null) as ComponentInstance : undefined,
renderCell: column ? column.renderCell : undefined
};
}
Expand All @@ -47,7 +48,7 @@ export class SubmissionGridHeaderComponent extends GridHeaderComponent {
label: component.label,
key: path,
sort: sort,
component: component ? Components.create(component, null, null, true) as ComponentInstance : undefined,
component: component ? Components.create(component, null, null) as ComponentInstance : undefined,
};
}
// Set headers from components in case if columns are not provided
Expand Down
4 changes: 2 additions & 2 deletions projects/angular-formio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@formio/angular",
"version": "7.5.0-rc.1",
"version": "7.5.0-rc.5",
"repository": {
"type": "git",
"url": "https://github.com/formio/angular-formio"
Expand Down Expand Up @@ -28,7 +28,7 @@
"@angular/core": "^16.0.0 || ^17.0.0",
"@angular/common": "^16.0.0 || ^17.0.0",
"@angular/elements": "^16.0.0 || ^17.0.0",
"@formio/js": "^5.0.0-rc.38",
"@formio/js": "^5.0.0-rc.54",
"zone.js": "~0.13.0 || ~0.14.0",
"lodash": "^4.17.20",
"ngx-bootstrap": "^10.0.0 || ^11.0.0 || ^12.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div role="form" [attr.aria-label]="label">
<div *ngIf="isLoading && !hideLoading" style="position:relative;height:200px">
<formio-loader [isLoading]="isLoading"></formio-loader>
<div *ngIf="isReportLoading && !hideLoading" style="position:relative;height:200px">
<formio-loader [isLoading]="isReportLoading"></formio-loader>
</div>
<formio-alerts *ngIf="this.options.alertsPosition === AlertsPosition.top || this.options.alertsPosition === AlertsPosition.both" (focusComponent)="focusOnComponet($event)" [alerts]="alerts"></formio-alerts>
<div #report></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ export class FormioReportComponent extends FormioComponent implements OnInit, On
@Output() fetchDataError = new EventEmitter<any>();
@ViewChild('report', { static: true }) declare formioElement?: ElementRef<any>;

public isReportLoading: boolean;

setFormFromSrc() {
this.service.loadSubmission({ params: { live: 1 } }).subscribe(
(report: FormioReport) => {
this.report = report;
if (report && report.data) {
this.ngZone.runOutsideAngular(() => {
this.setForm({ components: [], report });
this.isLoading = false;
this.isReportLoading = false;
});
}
},
Expand All @@ -42,7 +44,7 @@ export class FormioReportComponent extends FormioComponent implements OnInit, On
if (changes.report && changes.report.currentValue) {
this.ngZone.runOutsideAngular(() => {
this.setForm({ report: changes.report.currentValue, components: [] });
this.isLoading = false;
this.isReportLoading = false;
});
}
}
Expand Down
12 changes: 3 additions & 9 deletions projects/angular-formio/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ export * from './components/loader/formio.loader.component';
export * from './components/alerts/formio.alerts';
export * from './components/alerts/formio.alerts.component';
export { FormioModule } from './formio.module';
export {
Formio,
Utils as FormioUtils,
Templates,
Components,
ComponentSchema,
ExtendedComponentSchema,
ElementInfo
} from '@formio/js';
export { ComponentSchema, ExtendedComponentSchema, ElementInfo } from '@formio/deprecated-types';
export { Utils as FormioUtils } from '@formio/js';
export { Formio } from '@formio/js';
3 changes: 1 addition & 2 deletions projects/angular-formio/src/formio.common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ExtendedComponentSchema, ValidateOptions } from '@formio/js';
import { ExtendedComponentSchema, ValidateOptions } from '@formio/deprecated-types';
import { AlertsPosition } from './types/alerts-position';
export { ConditionalOptions, ValidateOptions } from '@formio/js/sdk';

export interface ComponentOptions<T = any, V extends ValidateOptions = ValidateOptions> extends ExtendedComponentSchema<T> {
validate?: V;
Expand Down
1 change: 1 addition & 0 deletions projects/angular-formio/src/formio.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Formio } from '@formio/js';

@Injectable()
export class FormioAppConfig {
[x: string]: any;
appUrl = '';
apiUrl = '';
icons?: string;
Expand Down
2 changes: 1 addition & 1 deletion projects/angular-formio/src/formio.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Observable, Observer } from 'rxjs';
import { FormioForm } from './formio.common';
import { Formio } from '@formio/js/sdk';
import { FormioCore as Formio } from '@formio/js';

export class FormioService {
public formio: any;
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"importHelpers": true,
"target": "es2020",
"module": "es2020",
"skipLibCheck": true,
"lib": [
"es2018",
"dom"
Expand Down
Loading
Loading