@ng-formworks/core 16.5.6 → 16.5.8
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/esm2022/lib/json-schema-form.module.mjs +3 -3
- package/esm2022/lib/json-schema-form.service.mjs +25 -5
- package/esm2022/lib/widget-library/input.component.mjs +3 -3
- package/esm2022/lib/widget-library/number.component.mjs +28 -12
- package/esm2022/lib/widget-library/orderable.directive.mjs +10 -1
- package/esm2022/lib/widget-library/root.component.mjs +103 -34
- package/esm2022/lib/widget-library/section.component.mjs +9 -9
- package/esm2022/lib/widget-library/widget-library.module.mjs +18 -4
- package/fesm2022/ng-formworks-core.mjs +429 -303
- package/fesm2022/ng-formworks-core.mjs.map +1 -1
- package/lib/json-schema-form.service.d.ts +7 -1
- package/lib/shared/validator.functions.d.ts +1 -1
- package/lib/widget-library/index.d.ts +1 -1
- package/lib/widget-library/number.component.d.ts +1 -0
- package/lib/widget-library/orderable.directive.d.ts +2 -0
- package/lib/widget-library/root.component.d.ts +8 -1
- package/lib/widget-library/widget-library.module.d.ts +2 -1
- package/package.json +4 -2
|
@@ -1,23 +1,38 @@
|
|
|
1
1
|
import * as i2 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import * as i3 from '@angular/forms';
|
|
4
|
-
import { UntypedFormControl, UntypedFormArray, UntypedFormGroup, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
3
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Injectable,
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { from, Observable, forkJoin, Subject, lastValueFrom } from 'rxjs';
|
|
10
|
-
import { map, takeUntil } from 'rxjs/operators';
|
|
4
|
+
import { Injectable, ViewContainerRef, Component, Input, ViewChild, Directive, ChangeDetectionStrategy, NgModule, Inject, forwardRef, EventEmitter, Output } from '@angular/core';
|
|
5
|
+
import * as i3 from '@angular/forms';
|
|
6
|
+
import { UntypedFormControl, UntypedFormArray, UntypedFormGroup, FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
11
7
|
import Ajv2019 from 'ajv/dist/2019';
|
|
12
8
|
import jsonDraft6 from 'ajv/lib/refs/json-schema-draft-06.json';
|
|
13
9
|
import jsonDraft7 from 'ajv/lib/refs/json-schema-draft-07.json';
|
|
10
|
+
import cloneDeep from 'lodash/cloneDeep';
|
|
11
|
+
import { from, Observable, forkJoin, Subject, BehaviorSubject, lastValueFrom } from 'rxjs';
|
|
12
|
+
import isEqual$1 from 'lodash/isEqual';
|
|
13
|
+
import { map, takeUntil } from 'rxjs/operators';
|
|
14
14
|
import filter from 'lodash/filter';
|
|
15
15
|
import map$1 from 'lodash/map';
|
|
16
16
|
import _isArray from 'lodash/isArray';
|
|
17
17
|
import _isPlainObject from 'lodash/isPlainObject';
|
|
18
18
|
import uniqueId from 'lodash/uniqueId';
|
|
19
|
+
import * as i3$1 from 'nxt-sortablejs';
|
|
20
|
+
import { SortablejsModule } from 'nxt-sortablejs';
|
|
19
21
|
import * as i1 from '@angular/common/http';
|
|
20
22
|
|
|
23
|
+
class Framework {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.widgets = {};
|
|
26
|
+
this.stylesheets = [];
|
|
27
|
+
this.scripts = [];
|
|
28
|
+
}
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Framework, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
30
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Framework }); }
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Framework, decorators: [{
|
|
33
|
+
type: Injectable
|
|
34
|
+
}] });
|
|
35
|
+
|
|
21
36
|
const deValidationMessages = {
|
|
22
37
|
required: 'Darf nicht leer sein',
|
|
23
38
|
minLength: 'Mindestens {{minimumLength}} Zeichen benötigt (aktuell: {{currentLength}})',
|
|
@@ -6357,6 +6372,12 @@ function buildTitleMap(titleMap, enumList, fieldRequired = true, flatList = true
|
|
|
6357
6372
|
// causes a library to be imported before another library it depends on.
|
|
6358
6373
|
|
|
6359
6374
|
class JsonSchemaFormService {
|
|
6375
|
+
setDraggableState(value) {
|
|
6376
|
+
this.draggableStateSubject.next(value); // Update the draggable value
|
|
6377
|
+
}
|
|
6378
|
+
setSortableOptions(value) {
|
|
6379
|
+
this.sortableOptionsSubject.next(value); // Update the sortable options value
|
|
6380
|
+
}
|
|
6360
6381
|
constructor() {
|
|
6361
6382
|
this.JsonFormCompatibility = false;
|
|
6362
6383
|
this.ReactJsonSchemaFormCompatibility = false;
|
|
@@ -6441,6 +6462,18 @@ class JsonSchemaFormService {
|
|
|
6441
6462
|
validationMessages: {} // set by setLanguage()
|
|
6442
6463
|
}
|
|
6443
6464
|
};
|
|
6465
|
+
//this has been added to enable or disable the dragabble state of a component
|
|
6466
|
+
//using the OrderableDirective, mainly when an <input type="range">
|
|
6467
|
+
//elements are present, as the draggable attribute makes it difficult to
|
|
6468
|
+
//slide the range sliders and end up dragging
|
|
6469
|
+
//NB this will be set globally for all OrderableDirective instances
|
|
6470
|
+
//and will only be enabled when/if the caller sets the value back to true
|
|
6471
|
+
this.draggableStateSubject = new BehaviorSubject(true); // Default value true
|
|
6472
|
+
this.draggableState$ = this.draggableStateSubject.asObservable();
|
|
6473
|
+
//this is introduced to look at replacing the orderable directive with
|
|
6474
|
+
//nxt-sortablejs and sortablejs
|
|
6475
|
+
this.sortableOptionsSubject = new BehaviorSubject({ disabled: false }); // Default value true
|
|
6476
|
+
this.sortableOptions$ = this.sortableOptionsSubject.asObservable();
|
|
6444
6477
|
this.setLanguage(this.language);
|
|
6445
6478
|
this.ajv.addMetaSchema(jsonDraft6);
|
|
6446
6479
|
this.ajv.addMetaSchema(jsonDraft7);
|
|
@@ -6976,7 +7009,7 @@ class JsonSchemaFormService {
|
|
|
6976
7009
|
JsonPointer.insert(this.layout, this.getLayoutPointer(ctx), newLayoutNode);
|
|
6977
7010
|
return true;
|
|
6978
7011
|
}
|
|
6979
|
-
moveArrayItem(ctx, oldIndex, newIndex) {
|
|
7012
|
+
moveArrayItem(ctx, oldIndex, newIndex, moveLayout = true) {
|
|
6980
7013
|
if (!ctx.layoutNode ||
|
|
6981
7014
|
!isDefined(ctx.layoutNode.dataPointer) ||
|
|
6982
7015
|
!hasValue(ctx.dataIndex) ||
|
|
@@ -6993,8 +7026,10 @@ class JsonSchemaFormService {
|
|
|
6993
7026
|
formArray.insert(newIndex, arrayItem);
|
|
6994
7027
|
formArray.updateValueAndValidity();
|
|
6995
7028
|
// Move layout item
|
|
6996
|
-
|
|
6997
|
-
|
|
7029
|
+
if (moveLayout) {
|
|
7030
|
+
const layoutArray = this.getLayoutArray(ctx);
|
|
7031
|
+
layoutArray.splice(newIndex, 0, layoutArray.splice(oldIndex, 1)[0]);
|
|
7032
|
+
}
|
|
6998
7033
|
return true;
|
|
6999
7034
|
}
|
|
7000
7035
|
removeItem(ctx) {
|
|
@@ -7024,6 +7059,110 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
7024
7059
|
type: Injectable
|
|
7025
7060
|
}], ctorParameters: function () { return []; } });
|
|
7026
7061
|
|
|
7062
|
+
class SelectWidgetComponent {
|
|
7063
|
+
constructor(jsf) {
|
|
7064
|
+
this.jsf = jsf;
|
|
7065
|
+
this.newComponent = null;
|
|
7066
|
+
}
|
|
7067
|
+
ngOnInit() {
|
|
7068
|
+
this.updateComponent();
|
|
7069
|
+
}
|
|
7070
|
+
ngOnChanges() {
|
|
7071
|
+
this.updateComponent();
|
|
7072
|
+
}
|
|
7073
|
+
updateComponent() {
|
|
7074
|
+
const widgetContainer = this.widgetContainer;
|
|
7075
|
+
if (widgetContainer && !this.newComponent && (this.layoutNode || {}).widget) {
|
|
7076
|
+
this.newComponent = widgetContainer.createComponent((this.layoutNode.widget));
|
|
7077
|
+
}
|
|
7078
|
+
if (this.newComponent) {
|
|
7079
|
+
for (const input of ['layoutNode', 'layoutIndex', 'dataIndex']) {
|
|
7080
|
+
this.newComponent.instance[input] = this[input];
|
|
7081
|
+
}
|
|
7082
|
+
}
|
|
7083
|
+
}
|
|
7084
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectWidgetComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7085
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SelectWidgetComponent, selector: "select-widget-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, viewQueries: [{ propertyName: "widgetContainer", first: true, predicate: ["widgetContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `<div #widgetContainer></div>`, isInline: true }); }
|
|
7086
|
+
}
|
|
7087
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectWidgetComponent, decorators: [{
|
|
7088
|
+
type: Component,
|
|
7089
|
+
args: [{
|
|
7090
|
+
// tslint:disable-next-line:component-selector
|
|
7091
|
+
selector: 'select-widget-widget',
|
|
7092
|
+
template: `<div #widgetContainer></div>`,
|
|
7093
|
+
}]
|
|
7094
|
+
}], ctorParameters: function () { return [{ type: JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
|
|
7095
|
+
type: Input
|
|
7096
|
+
}], layoutIndex: [{
|
|
7097
|
+
type: Input
|
|
7098
|
+
}], dataIndex: [{
|
|
7099
|
+
type: Input
|
|
7100
|
+
}], widgetContainer: [{
|
|
7101
|
+
type: ViewChild,
|
|
7102
|
+
args: ['widgetContainer', { read: ViewContainerRef, static: true }]
|
|
7103
|
+
}] } });
|
|
7104
|
+
|
|
7105
|
+
class NoFrameworkComponent {
|
|
7106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7107
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NoFrameworkComponent, selector: "no-framework", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: "<select-widget-widget [dataIndex]=\"dataIndex\" [layoutIndex]=\"layoutIndex\" [layoutNode]=\"layoutNode\">\r\n</select-widget-widget>", dependencies: [{ kind: "component", type: SelectWidgetComponent, selector: "select-widget-widget", inputs: ["layoutNode", "layoutIndex", "dataIndex"] }] }); }
|
|
7108
|
+
}
|
|
7109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkComponent, decorators: [{
|
|
7110
|
+
type: Component,
|
|
7111
|
+
args: [{ selector: 'no-framework', template: "<select-widget-widget [dataIndex]=\"dataIndex\" [layoutIndex]=\"layoutIndex\" [layoutNode]=\"layoutNode\">\r\n</select-widget-widget>" }]
|
|
7112
|
+
}], propDecorators: { layoutNode: [{
|
|
7113
|
+
type: Input
|
|
7114
|
+
}], layoutIndex: [{
|
|
7115
|
+
type: Input
|
|
7116
|
+
}], dataIndex: [{
|
|
7117
|
+
type: Input
|
|
7118
|
+
}] } });
|
|
7119
|
+
|
|
7120
|
+
// No framework - plain HTML controls (styles from form layout only)
|
|
7121
|
+
class NoFramework extends Framework {
|
|
7122
|
+
constructor() {
|
|
7123
|
+
super(...arguments);
|
|
7124
|
+
this.name = 'no-framework';
|
|
7125
|
+
this.text = 'None (plain HTML)';
|
|
7126
|
+
this.framework = NoFrameworkComponent;
|
|
7127
|
+
}
|
|
7128
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFramework, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7129
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFramework }); }
|
|
7130
|
+
}
|
|
7131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFramework, decorators: [{
|
|
7132
|
+
type: Injectable
|
|
7133
|
+
}] });
|
|
7134
|
+
|
|
7135
|
+
class ElementAttributeDirective {
|
|
7136
|
+
constructor(renderer, elementRef) {
|
|
7137
|
+
this.renderer = renderer;
|
|
7138
|
+
this.elementRef = elementRef;
|
|
7139
|
+
}
|
|
7140
|
+
ngOnChanges(changes) {
|
|
7141
|
+
if (changes.attributes) {
|
|
7142
|
+
for (let attributeName in this.attributes) {
|
|
7143
|
+
const attributeValue = this.attributes[attributeName];
|
|
7144
|
+
if (attributeValue) {
|
|
7145
|
+
this.renderer.setAttribute(this.elementRef.nativeElement, attributeName, attributeValue);
|
|
7146
|
+
}
|
|
7147
|
+
else {
|
|
7148
|
+
this.renderer.removeAttribute(this.elementRef.nativeElement, attributeName);
|
|
7149
|
+
}
|
|
7150
|
+
}
|
|
7151
|
+
}
|
|
7152
|
+
}
|
|
7153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ElementAttributeDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7154
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ElementAttributeDirective, selector: "[attributes]", inputs: { attributes: "attributes" }, usesOnChanges: true, ngImport: i0 }); }
|
|
7155
|
+
}
|
|
7156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ElementAttributeDirective, decorators: [{
|
|
7157
|
+
type: Directive,
|
|
7158
|
+
args: [{
|
|
7159
|
+
selector: '[attributes]',
|
|
7160
|
+
standalone: false
|
|
7161
|
+
}]
|
|
7162
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { attributes: [{
|
|
7163
|
+
type: Input
|
|
7164
|
+
}] } });
|
|
7165
|
+
|
|
7027
7166
|
class AddReferenceComponent {
|
|
7028
7167
|
constructor(jsf) {
|
|
7029
7168
|
this.jsf = jsf;
|
|
@@ -7423,34 +7562,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
7423
7562
|
type: Input
|
|
7424
7563
|
}] } });
|
|
7425
7564
|
|
|
7426
|
-
class
|
|
7427
|
-
constructor(
|
|
7428
|
-
this.
|
|
7429
|
-
this.
|
|
7565
|
+
class HiddenComponent {
|
|
7566
|
+
constructor(jsf) {
|
|
7567
|
+
this.jsf = jsf;
|
|
7568
|
+
this.controlDisabled = false;
|
|
7569
|
+
this.boundControl = false;
|
|
7430
7570
|
}
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
for (let attributeName in this.attributes) {
|
|
7434
|
-
const attributeValue = this.attributes[attributeName];
|
|
7435
|
-
if (attributeValue) {
|
|
7436
|
-
this.renderer.setAttribute(this.elementRef.nativeElement, attributeName, attributeValue);
|
|
7437
|
-
}
|
|
7438
|
-
else {
|
|
7439
|
-
this.renderer.removeAttribute(this.elementRef.nativeElement, attributeName);
|
|
7440
|
-
}
|
|
7441
|
-
}
|
|
7442
|
-
}
|
|
7571
|
+
ngOnInit() {
|
|
7572
|
+
this.jsf.initializeControl(this);
|
|
7443
7573
|
}
|
|
7444
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type:
|
|
7445
|
-
static { this.ɵ
|
|
7574
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HiddenComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7575
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: HiddenComponent, selector: "hidden-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
|
|
7576
|
+
<input *ngIf="boundControl"
|
|
7577
|
+
[formControl]="formControl"
|
|
7578
|
+
[id]="'control' + layoutNode?._id"
|
|
7579
|
+
[name]="controlName"
|
|
7580
|
+
type="hidden">
|
|
7581
|
+
<input *ngIf="!boundControl"
|
|
7582
|
+
[disabled]="controlDisabled"
|
|
7583
|
+
[name]="controlName"
|
|
7584
|
+
[id]="'control' + layoutNode?._id"
|
|
7585
|
+
type="hidden"
|
|
7586
|
+
[value]="controlValue">`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
7446
7587
|
}
|
|
7447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type:
|
|
7448
|
-
type:
|
|
7588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HiddenComponent, decorators: [{
|
|
7589
|
+
type: Component,
|
|
7449
7590
|
args: [{
|
|
7450
|
-
selector
|
|
7451
|
-
|
|
7591
|
+
// tslint:disable-next-line:component-selector
|
|
7592
|
+
selector: 'hidden-widget',
|
|
7593
|
+
template: `
|
|
7594
|
+
<input *ngIf="boundControl"
|
|
7595
|
+
[formControl]="formControl"
|
|
7596
|
+
[id]="'control' + layoutNode?._id"
|
|
7597
|
+
[name]="controlName"
|
|
7598
|
+
type="hidden">
|
|
7599
|
+
<input *ngIf="!boundControl"
|
|
7600
|
+
[disabled]="controlDisabled"
|
|
7601
|
+
[name]="controlName"
|
|
7602
|
+
[id]="'control' + layoutNode?._id"
|
|
7603
|
+
type="hidden"
|
|
7604
|
+
[value]="controlValue">`,
|
|
7452
7605
|
}]
|
|
7453
|
-
}], ctorParameters: function () { return [{ type:
|
|
7606
|
+
}], ctorParameters: function () { return [{ type: JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
|
|
7607
|
+
type: Input
|
|
7608
|
+
}], layoutIndex: [{
|
|
7609
|
+
type: Input
|
|
7610
|
+
}], dataIndex: [{
|
|
7454
7611
|
type: Input
|
|
7455
7612
|
}] } });
|
|
7456
7613
|
|
|
@@ -7474,7 +7631,7 @@ class InputComponent {
|
|
|
7474
7631
|
}
|
|
7475
7632
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7476
7633
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InputComponent, selector: "input-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
|
|
7477
|
-
<div [class]="options?.htmlClass || ''">
|
|
7634
|
+
<div [class]="options?.htmlClass || ''" class="sortable-filter" >
|
|
7478
7635
|
<label *ngIf="options?.title"
|
|
7479
7636
|
[attr.for]="'control' + layoutNode?._id"
|
|
7480
7637
|
[class]="options?.labelHtmlClass || ''"
|
|
@@ -7526,7 +7683,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
7526
7683
|
// tslint:disable-next-line:component-selector
|
|
7527
7684
|
selector: 'input-widget',
|
|
7528
7685
|
template: `
|
|
7529
|
-
<div [class]="options?.htmlClass || ''">
|
|
7686
|
+
<div [class]="options?.htmlClass || ''" class="sortable-filter" >
|
|
7530
7687
|
<label *ngIf="options?.title"
|
|
7531
7688
|
[attr.for]="'control' + layoutNode?._id"
|
|
7532
7689
|
[class]="options?.labelHtmlClass || ''"
|
|
@@ -7633,6 +7790,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
7633
7790
|
type: Input
|
|
7634
7791
|
}] } });
|
|
7635
7792
|
|
|
7793
|
+
//TODO look at reusing InputComponent
|
|
7636
7794
|
class NumberComponent {
|
|
7637
7795
|
constructor(jsf) {
|
|
7638
7796
|
this.jsf = jsf;
|
|
@@ -7643,6 +7801,10 @@ class NumberComponent {
|
|
|
7643
7801
|
this.allowExponents = false;
|
|
7644
7802
|
this.lastValidNumber = '';
|
|
7645
7803
|
}
|
|
7804
|
+
//needed as templates don't accept something like [attributes]="options?.['x-inputAttributes']"
|
|
7805
|
+
get inputAttributes() {
|
|
7806
|
+
return this.options?.['x-inputAttributes'];
|
|
7807
|
+
}
|
|
7646
7808
|
ngOnInit() {
|
|
7647
7809
|
this.options = this.layoutNode.options || {};
|
|
7648
7810
|
this.jsf.initializeControl(this);
|
|
@@ -7655,13 +7817,13 @@ class NumberComponent {
|
|
|
7655
7817
|
}
|
|
7656
7818
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NumberComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7657
7819
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NumberComponent, selector: "number-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
|
|
7658
|
-
<div [class]="options?.htmlClass || ''">
|
|
7820
|
+
<div #divElt [class]="options?.htmlClass || ''" class="sortable-filter" >
|
|
7659
7821
|
<label *ngIf="options?.title"
|
|
7660
7822
|
[attr.for]="'control' + layoutNode?._id"
|
|
7661
7823
|
[class]="options?.labelHtmlClass || ''"
|
|
7662
7824
|
[style.display]="options?.notitle ? 'none' : ''"
|
|
7663
7825
|
[innerHTML]="options?.title"></label>
|
|
7664
|
-
<input *ngIf="boundControl"
|
|
7826
|
+
<input #inputControl *ngIf="boundControl"
|
|
7665
7827
|
[formControl]="formControl"
|
|
7666
7828
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
7667
7829
|
[attr.max]="options?.maximum"
|
|
@@ -7675,8 +7837,11 @@ class NumberComponent {
|
|
|
7675
7837
|
[name]="controlName"
|
|
7676
7838
|
[readonly]="options?.readonly ? 'readonly' : null"
|
|
7677
7839
|
[title]="lastValidNumber"
|
|
7678
|
-
[type]="layoutNode?.type === 'range' ? 'range' : 'number'"
|
|
7679
|
-
|
|
7840
|
+
[type]="layoutNode?.type === 'range' ? 'range' : 'number'"
|
|
7841
|
+
[attributes]="inputAttributes"
|
|
7842
|
+
|
|
7843
|
+
>
|
|
7844
|
+
<input #inputControl *ngIf="!boundControl"
|
|
7680
7845
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
7681
7846
|
[attr.max]="options?.maximum"
|
|
7682
7847
|
[attr.min]="options?.minimum"
|
|
@@ -7692,9 +7857,11 @@ class NumberComponent {
|
|
|
7692
7857
|
[title]="lastValidNumber"
|
|
7693
7858
|
[type]="layoutNode?.type === 'range' ? 'range' : 'number'"
|
|
7694
7859
|
[value]="controlValue"
|
|
7695
|
-
(input)="updateValue($event)"
|
|
7860
|
+
(input)="updateValue($event)"
|
|
7861
|
+
[attributes]="inputAttributes"
|
|
7862
|
+
>
|
|
7696
7863
|
<span *ngIf="layoutNode?.type === 'range'" [innerHTML]="controlValue"></span>
|
|
7697
|
-
</div>`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
7864
|
+
</div>`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: ElementAttributeDirective, selector: "[attributes]", inputs: ["attributes"] }] }); }
|
|
7698
7865
|
}
|
|
7699
7866
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NumberComponent, decorators: [{
|
|
7700
7867
|
type: Component,
|
|
@@ -7702,13 +7869,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
7702
7869
|
// tslint:disable-next-line:component-selector
|
|
7703
7870
|
selector: 'number-widget',
|
|
7704
7871
|
template: `
|
|
7705
|
-
<div [class]="options?.htmlClass || ''">
|
|
7872
|
+
<div #divElt [class]="options?.htmlClass || ''" class="sortable-filter" >
|
|
7706
7873
|
<label *ngIf="options?.title"
|
|
7707
7874
|
[attr.for]="'control' + layoutNode?._id"
|
|
7708
7875
|
[class]="options?.labelHtmlClass || ''"
|
|
7709
7876
|
[style.display]="options?.notitle ? 'none' : ''"
|
|
7710
7877
|
[innerHTML]="options?.title"></label>
|
|
7711
|
-
<input *ngIf="boundControl"
|
|
7878
|
+
<input #inputControl *ngIf="boundControl"
|
|
7712
7879
|
[formControl]="formControl"
|
|
7713
7880
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
7714
7881
|
[attr.max]="options?.maximum"
|
|
@@ -7722,8 +7889,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
7722
7889
|
[name]="controlName"
|
|
7723
7890
|
[readonly]="options?.readonly ? 'readonly' : null"
|
|
7724
7891
|
[title]="lastValidNumber"
|
|
7725
|
-
[type]="layoutNode?.type === 'range' ? 'range' : 'number'"
|
|
7726
|
-
|
|
7892
|
+
[type]="layoutNode?.type === 'range' ? 'range' : 'number'"
|
|
7893
|
+
[attributes]="inputAttributes"
|
|
7894
|
+
|
|
7895
|
+
>
|
|
7896
|
+
<input #inputControl *ngIf="!boundControl"
|
|
7727
7897
|
[attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
|
|
7728
7898
|
[attr.max]="options?.maximum"
|
|
7729
7899
|
[attr.min]="options?.minimum"
|
|
@@ -7739,7 +7909,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
7739
7909
|
[title]="lastValidNumber"
|
|
7740
7910
|
[type]="layoutNode?.type === 'range' ? 'range' : 'number'"
|
|
7741
7911
|
[value]="controlValue"
|
|
7742
|
-
(input)="updateValue($event)"
|
|
7912
|
+
(input)="updateValue($event)"
|
|
7913
|
+
[attributes]="inputAttributes"
|
|
7914
|
+
>
|
|
7743
7915
|
<span *ngIf="layoutNode?.type === 'range'" [innerHTML]="controlValue"></span>
|
|
7744
7916
|
</div>`,
|
|
7745
7917
|
}]
|
|
@@ -8078,6 +8250,15 @@ class OrderableDirective {
|
|
|
8078
8250
|
return false;
|
|
8079
8251
|
});
|
|
8080
8252
|
});
|
|
8253
|
+
// Subscribe to the draggable state
|
|
8254
|
+
this.draggableStateSubscription = this.jsf.draggableState$.subscribe((value) => {
|
|
8255
|
+
this.element.draggable = value;
|
|
8256
|
+
});
|
|
8257
|
+
}
|
|
8258
|
+
}
|
|
8259
|
+
ngOnDestroy() {
|
|
8260
|
+
if (this.draggableStateSubscription) {
|
|
8261
|
+
this.draggableStateSubscription.unsubscribe();
|
|
8081
8262
|
}
|
|
8082
8263
|
}
|
|
8083
8264
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OrderableDirective, deps: [{ token: i0.ElementRef }, { token: JsonSchemaFormService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -8103,10 +8284,40 @@ class RootComponent {
|
|
|
8103
8284
|
constructor(jsf) {
|
|
8104
8285
|
this.jsf = jsf;
|
|
8105
8286
|
this.isFlexItem = false;
|
|
8287
|
+
this.sortableConfig = {
|
|
8288
|
+
filter: ".sortable-filter",
|
|
8289
|
+
preventOnFilter: false,
|
|
8290
|
+
onEnd: (/**Event*/ evt) => {
|
|
8291
|
+
evt.newIndex; // most likely why this event is used is to get the dragging element's current index
|
|
8292
|
+
// same properties as onEnd
|
|
8293
|
+
//console.log(`sortablejs event:${evt}`);
|
|
8294
|
+
let srcInd = evt.oldIndex;
|
|
8295
|
+
let trgInd = evt.newIndex;
|
|
8296
|
+
let layoutItem = this.layout[trgInd];
|
|
8297
|
+
let dataInd = layoutItem?.arrayItem ? (this.dataIndex || []).concat(trgInd) : (this.dataIndex || []);
|
|
8298
|
+
let layoutInd = (this.layoutIndex || []).concat(trgInd);
|
|
8299
|
+
let itemCtx = {
|
|
8300
|
+
dataIndex: dataInd,
|
|
8301
|
+
layoutIndex: layoutInd,
|
|
8302
|
+
layoutNode: layoutItem,
|
|
8303
|
+
};
|
|
8304
|
+
//must set moveLayout to false as nxtSortable already moves it
|
|
8305
|
+
this.jsf.moveArrayItem(itemCtx, evt.oldIndex, evt.newIndex, false);
|
|
8306
|
+
}
|
|
8307
|
+
};
|
|
8308
|
+
}
|
|
8309
|
+
sortableInit(sortable) {
|
|
8310
|
+
this.sortableObj = sortable;
|
|
8106
8311
|
}
|
|
8107
8312
|
isDraggable(node) {
|
|
8108
|
-
|
|
8313
|
+
let result = node.arrayItem && node.type !== '$ref' &&
|
|
8109
8314
|
node.arrayItemType === 'list' && this.isOrderable !== false;
|
|
8315
|
+
if (this.sortableObj) {
|
|
8316
|
+
//this.sortableObj.option("disabled",true);
|
|
8317
|
+
//this.sortableObj.option("sort",false);
|
|
8318
|
+
//this.sortableObj.option("disabled",!result);
|
|
8319
|
+
}
|
|
8320
|
+
return result;
|
|
8110
8321
|
}
|
|
8111
8322
|
// Set attributes for flexbox child
|
|
8112
8323
|
// (container attributes are set in section.component)
|
|
@@ -8118,48 +8329,86 @@ class RootComponent {
|
|
|
8118
8329
|
showWidget(layoutNode) {
|
|
8119
8330
|
return this.jsf.evaluateCondition(layoutNode, this.dataIndex);
|
|
8120
8331
|
}
|
|
8332
|
+
ngOnInit() {
|
|
8333
|
+
// Subscribe to the draggable state
|
|
8334
|
+
this.sortableOptionsSubscription = this.jsf.sortableOptions$.subscribe((optsValue) => {
|
|
8335
|
+
if (this.sortableObj) {
|
|
8336
|
+
Object.keys(optsValue).forEach(opt => {
|
|
8337
|
+
let optVal = optsValue[opt];
|
|
8338
|
+
this.sortableObj.option(opt, optVal);
|
|
8339
|
+
});
|
|
8340
|
+
//this.sortableObj.option("disabled",true);
|
|
8341
|
+
//this.sortableObj.option("sort",false);
|
|
8342
|
+
}
|
|
8343
|
+
});
|
|
8344
|
+
}
|
|
8345
|
+
ngOnDestroy() {
|
|
8346
|
+
if (this.sortableOptionsSubscription) {
|
|
8347
|
+
this.sortableOptionsSubscription.unsubscribe();
|
|
8348
|
+
}
|
|
8349
|
+
}
|
|
8121
8350
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RootComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8122
8351
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RootComponent, selector: "root-widget", inputs: { dataIndex: "dataIndex", layoutIndex: "layoutIndex", layout: "layout", isOrderable: "isOrderable", isFlexItem: "isFlexItem" }, ngImport: i0, template: `
|
|
8123
|
-
<div
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
[
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8352
|
+
<div [class.flex-inherit]="true" #sortableContainter [nxtSortablejs]="layout" [config]="sortableConfig" (init)="sortableInit($event)">
|
|
8353
|
+
<div *ngFor="let layoutItem of layout; let i = index"
|
|
8354
|
+
[class.form-flex-item]="isFlexItem"
|
|
8355
|
+
[style.align-self]="(layoutItem.options || {})['align-self']"
|
|
8356
|
+
[style.flex-basis]="getFlexAttribute(layoutItem, 'flex-basis')"
|
|
8357
|
+
[style.flex-grow]="getFlexAttribute(layoutItem, 'flex-grow')"
|
|
8358
|
+
[style.flex-shrink]="getFlexAttribute(layoutItem, 'flex-shrink')"
|
|
8359
|
+
[style.order]="(layoutItem.options || {}).order"
|
|
8360
|
+
[class.sortable-filter]="!isDraggable(layoutItem)"
|
|
8361
|
+
>
|
|
8362
|
+
<!--NB orderable directive is not used but has been left in for now and set to false
|
|
8363
|
+
otherwise the compiler won't recognize dataIndex and other dependent attributes
|
|
8364
|
+
-->
|
|
8365
|
+
<div
|
|
8136
8366
|
[dataIndex]="layoutItem?.arrayItem ? (dataIndex || []).concat(i) : (dataIndex || [])"
|
|
8137
8367
|
[layoutIndex]="(layoutIndex || []).concat(i)"
|
|
8138
|
-
[layoutNode]="layoutItem"
|
|
8368
|
+
[layoutNode]="layoutItem"
|
|
8369
|
+
[orderable]="false"
|
|
8370
|
+
[class.sortable-filter]="!isDraggable(layoutItem)"
|
|
8371
|
+
>
|
|
8372
|
+
<select-framework-widget *ngIf="showWidget(layoutItem)"
|
|
8373
|
+
[dataIndex]="layoutItem?.arrayItem ? (dataIndex || []).concat(i) : (dataIndex || [])"
|
|
8374
|
+
[layoutIndex]="(layoutIndex || []).concat(i)"
|
|
8375
|
+
[layoutNode]="layoutItem"></select-framework-widget>
|
|
8376
|
+
</div>
|
|
8139
8377
|
</div>
|
|
8140
|
-
</div
|
|
8378
|
+
</div>
|
|
8379
|
+
`, isInline: true, styles: ["[draggable=true]{transition:all .15s cubic-bezier(.4,0,.2,1)}[draggable=true]:hover{cursor:move;box-shadow:2px 2px 4px #0003;position:relative;z-index:10;margin:-1px 1px 1px -1px}[draggable=true].drag-target-top{box-shadow:0 -2px #000;position:relative;z-index:20}[draggable=true].drag-target-bottom{box-shadow:0 2px #000;position:relative;z-index:20}.flex-inherit{display:inherit;flex-flow:inherit;flex-wrap:inherit;flex-direction:inherit;width:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.SortablejsDirective, selector: "[nxtSortablejs]", inputs: ["nxtSortablejs", "sortablejsContainer", "config", "cloneFunction"], outputs: ["init"] }, { kind: "component", type: SelectFrameworkComponent, selector: "select-framework-widget", inputs: ["layoutNode", "layoutIndex", "dataIndex"] }, { kind: "directive", type: OrderableDirective, selector: "[orderable]", inputs: ["orderable", "layoutNode", "layoutIndex", "dataIndex"] }] }); }
|
|
8141
8380
|
}
|
|
8142
8381
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RootComponent, decorators: [{
|
|
8143
8382
|
type: Component,
|
|
8144
8383
|
args: [{ selector: 'root-widget', template: `
|
|
8145
|
-
<div
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
[
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
8157
|
-
|
|
8384
|
+
<div [class.flex-inherit]="true" #sortableContainter [nxtSortablejs]="layout" [config]="sortableConfig" (init)="sortableInit($event)">
|
|
8385
|
+
<div *ngFor="let layoutItem of layout; let i = index"
|
|
8386
|
+
[class.form-flex-item]="isFlexItem"
|
|
8387
|
+
[style.align-self]="(layoutItem.options || {})['align-self']"
|
|
8388
|
+
[style.flex-basis]="getFlexAttribute(layoutItem, 'flex-basis')"
|
|
8389
|
+
[style.flex-grow]="getFlexAttribute(layoutItem, 'flex-grow')"
|
|
8390
|
+
[style.flex-shrink]="getFlexAttribute(layoutItem, 'flex-shrink')"
|
|
8391
|
+
[style.order]="(layoutItem.options || {}).order"
|
|
8392
|
+
[class.sortable-filter]="!isDraggable(layoutItem)"
|
|
8393
|
+
>
|
|
8394
|
+
<!--NB orderable directive is not used but has been left in for now and set to false
|
|
8395
|
+
otherwise the compiler won't recognize dataIndex and other dependent attributes
|
|
8396
|
+
-->
|
|
8397
|
+
<div
|
|
8158
8398
|
[dataIndex]="layoutItem?.arrayItem ? (dataIndex || []).concat(i) : (dataIndex || [])"
|
|
8159
8399
|
[layoutIndex]="(layoutIndex || []).concat(i)"
|
|
8160
|
-
[layoutNode]="layoutItem"
|
|
8400
|
+
[layoutNode]="layoutItem"
|
|
8401
|
+
[orderable]="false"
|
|
8402
|
+
[class.sortable-filter]="!isDraggable(layoutItem)"
|
|
8403
|
+
>
|
|
8404
|
+
<select-framework-widget *ngIf="showWidget(layoutItem)"
|
|
8405
|
+
[dataIndex]="layoutItem?.arrayItem ? (dataIndex || []).concat(i) : (dataIndex || [])"
|
|
8406
|
+
[layoutIndex]="(layoutIndex || []).concat(i)"
|
|
8407
|
+
[layoutNode]="layoutItem"></select-framework-widget>
|
|
8408
|
+
</div>
|
|
8161
8409
|
</div>
|
|
8162
|
-
</div
|
|
8410
|
+
</div>
|
|
8411
|
+
`, standalone: false, styles: ["[draggable=true]{transition:all .15s cubic-bezier(.4,0,.2,1)}[draggable=true]:hover{cursor:move;box-shadow:2px 2px 4px #0003;position:relative;z-index:10;margin:-1px 1px 1px -1px}[draggable=true].drag-target-top{box-shadow:0 -2px #000;position:relative;z-index:20}[draggable=true].drag-target-bottom{box-shadow:0 2px #000;position:relative;z-index:20}.flex-inherit{display:inherit;flex-flow:inherit;flex-wrap:inherit;flex-direction:inherit;width:100%}\n"] }]
|
|
8163
8412
|
}], ctorParameters: function () { return [{ type: JsonSchemaFormService }]; }, propDecorators: { dataIndex: [{
|
|
8164
8413
|
type: Input
|
|
8165
8414
|
}], layoutIndex: [{
|
|
@@ -8241,7 +8490,7 @@ class SectionComponent {
|
|
|
8241
8490
|
[class]="options?.labelHtmlClass || ''"
|
|
8242
8491
|
[innerHTML]="sectionTitle"
|
|
8243
8492
|
(click)="toggleExpanded()"></label>
|
|
8244
|
-
<root-widget
|
|
8493
|
+
<root-widget
|
|
8245
8494
|
[dataIndex]="dataIndex"
|
|
8246
8495
|
[layout]="layoutNode.items"
|
|
8247
8496
|
[layoutIndex]="layoutIndex"
|
|
@@ -8251,7 +8500,7 @@ class SectionComponent {
|
|
|
8251
8500
|
[class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
|
|
8252
8501
|
[style.align-content]="getFlexAttribute('align-content')"
|
|
8253
8502
|
[style.align-items]="getFlexAttribute('align-items')"
|
|
8254
|
-
[style.display]="getFlexAttribute('display')"
|
|
8503
|
+
[style.display]="!expanded?'none':getFlexAttribute('display')"
|
|
8255
8504
|
[style.flex-direction]="getFlexAttribute('flex-direction')"
|
|
8256
8505
|
[style.flex-wrap]="getFlexAttribute('flex-wrap')"
|
|
8257
8506
|
[style.justify-content]="getFlexAttribute('justify-content')"></root-widget>
|
|
@@ -8272,7 +8521,7 @@ class SectionComponent {
|
|
|
8272
8521
|
[class]="options?.labelHelpBlockClass || ''"
|
|
8273
8522
|
[innerHTML]="options?.description"></p>
|
|
8274
8523
|
</div>
|
|
8275
|
-
<root-widget
|
|
8524
|
+
<root-widget
|
|
8276
8525
|
[dataIndex]="dataIndex"
|
|
8277
8526
|
[layout]="layoutNode.items"
|
|
8278
8527
|
[layoutIndex]="layoutIndex"
|
|
@@ -8282,7 +8531,7 @@ class SectionComponent {
|
|
|
8282
8531
|
[class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
|
|
8283
8532
|
[style.align-content]="getFlexAttribute('align-content')"
|
|
8284
8533
|
[style.align-items]="getFlexAttribute('align-items')"
|
|
8285
|
-
[style.display]="getFlexAttribute('display')"
|
|
8534
|
+
[style.display]="!expanded?'none':getFlexAttribute('display')"
|
|
8286
8535
|
[style.flex-direction]="getFlexAttribute('flex-direction')"
|
|
8287
8536
|
[style.flex-wrap]="getFlexAttribute('flex-wrap')"
|
|
8288
8537
|
[style.justify-content]="getFlexAttribute('justify-content')"></root-widget>
|
|
@@ -8306,7 +8555,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8306
8555
|
[class]="options?.labelHtmlClass || ''"
|
|
8307
8556
|
[innerHTML]="sectionTitle"
|
|
8308
8557
|
(click)="toggleExpanded()"></label>
|
|
8309
|
-
<root-widget
|
|
8558
|
+
<root-widget
|
|
8310
8559
|
[dataIndex]="dataIndex"
|
|
8311
8560
|
[layout]="layoutNode.items"
|
|
8312
8561
|
[layoutIndex]="layoutIndex"
|
|
@@ -8316,7 +8565,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8316
8565
|
[class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
|
|
8317
8566
|
[style.align-content]="getFlexAttribute('align-content')"
|
|
8318
8567
|
[style.align-items]="getFlexAttribute('align-items')"
|
|
8319
|
-
[style.display]="getFlexAttribute('display')"
|
|
8568
|
+
[style.display]="!expanded?'none':getFlexAttribute('display')"
|
|
8320
8569
|
[style.flex-direction]="getFlexAttribute('flex-direction')"
|
|
8321
8570
|
[style.flex-wrap]="getFlexAttribute('flex-wrap')"
|
|
8322
8571
|
[style.justify-content]="getFlexAttribute('justify-content')"></root-widget>
|
|
@@ -8337,7 +8586,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8337
8586
|
[class]="options?.labelHelpBlockClass || ''"
|
|
8338
8587
|
[innerHTML]="options?.description"></p>
|
|
8339
8588
|
</div>
|
|
8340
|
-
<root-widget
|
|
8589
|
+
<root-widget
|
|
8341
8590
|
[dataIndex]="dataIndex"
|
|
8342
8591
|
[layout]="layoutNode.items"
|
|
8343
8592
|
[layoutIndex]="layoutIndex"
|
|
@@ -8347,7 +8596,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8347
8596
|
[class.form-flex-row]="getFlexAttribute('flex-direction') === 'row'"
|
|
8348
8597
|
[style.align-content]="getFlexAttribute('align-content')"
|
|
8349
8598
|
[style.align-items]="getFlexAttribute('align-items')"
|
|
8350
|
-
[style.display]="getFlexAttribute('display')"
|
|
8599
|
+
[style.display]="!expanded?'none':getFlexAttribute('display')"
|
|
8351
8600
|
[style.flex-direction]="getFlexAttribute('flex-direction')"
|
|
8352
8601
|
[style.flex-wrap]="getFlexAttribute('flex-wrap')"
|
|
8353
8602
|
[style.justify-content]="getFlexAttribute('justify-content')"></root-widget>
|
|
@@ -8510,58 +8759,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8510
8759
|
type: Input
|
|
8511
8760
|
}] } });
|
|
8512
8761
|
|
|
8513
|
-
class
|
|
8762
|
+
class SubmitComponent {
|
|
8514
8763
|
constructor(jsf) {
|
|
8515
8764
|
this.jsf = jsf;
|
|
8516
|
-
this.
|
|
8517
|
-
|
|
8518
|
-
ngOnInit() {
|
|
8519
|
-
this.updateComponent();
|
|
8765
|
+
this.controlDisabled = false;
|
|
8766
|
+
this.boundControl = false;
|
|
8520
8767
|
}
|
|
8521
|
-
|
|
8522
|
-
this.
|
|
8523
|
-
|
|
8524
|
-
updateComponent() {
|
|
8525
|
-
const widgetContainer = this.widgetContainer;
|
|
8526
|
-
if (widgetContainer && !this.newComponent && (this.layoutNode || {}).widget) {
|
|
8527
|
-
this.newComponent = widgetContainer.createComponent((this.layoutNode.widget));
|
|
8528
|
-
}
|
|
8529
|
-
if (this.newComponent) {
|
|
8530
|
-
for (const input of ['layoutNode', 'layoutIndex', 'dataIndex']) {
|
|
8531
|
-
this.newComponent.instance[input] = this[input];
|
|
8532
|
-
}
|
|
8533
|
-
}
|
|
8534
|
-
}
|
|
8535
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectWidgetComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8536
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SelectWidgetComponent, selector: "select-widget-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, viewQueries: [{ propertyName: "widgetContainer", first: true, predicate: ["widgetContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `<div #widgetContainer></div>`, isInline: true }); }
|
|
8537
|
-
}
|
|
8538
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectWidgetComponent, decorators: [{
|
|
8539
|
-
type: Component,
|
|
8540
|
-
args: [{
|
|
8541
|
-
// tslint:disable-next-line:component-selector
|
|
8542
|
-
selector: 'select-widget-widget',
|
|
8543
|
-
template: `<div #widgetContainer></div>`,
|
|
8544
|
-
}]
|
|
8545
|
-
}], ctorParameters: function () { return [{ type: JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
|
|
8546
|
-
type: Input
|
|
8547
|
-
}], layoutIndex: [{
|
|
8548
|
-
type: Input
|
|
8549
|
-
}], dataIndex: [{
|
|
8550
|
-
type: Input
|
|
8551
|
-
}], widgetContainer: [{
|
|
8552
|
-
type: ViewChild,
|
|
8553
|
-
args: ['widgetContainer', { read: ViewContainerRef, static: true }]
|
|
8554
|
-
}] } });
|
|
8555
|
-
|
|
8556
|
-
class SubmitComponent {
|
|
8557
|
-
constructor(jsf) {
|
|
8558
|
-
this.jsf = jsf;
|
|
8559
|
-
this.controlDisabled = false;
|
|
8560
|
-
this.boundControl = false;
|
|
8561
|
-
}
|
|
8562
|
-
ngOnDestroy() {
|
|
8563
|
-
this.isValidChangesSubs?.unsubscribe();
|
|
8564
|
-
this.isValidChangesSubs = null;
|
|
8768
|
+
ngOnDestroy() {
|
|
8769
|
+
this.isValidChangesSubs?.unsubscribe();
|
|
8770
|
+
this.isValidChangesSubs = null;
|
|
8565
8771
|
}
|
|
8566
8772
|
ngOnInit() {
|
|
8567
8773
|
this.options = this.layoutNode.options || {};
|
|
@@ -8631,6 +8837,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8631
8837
|
type: Input
|
|
8632
8838
|
}] } });
|
|
8633
8839
|
|
|
8840
|
+
class TabComponent {
|
|
8841
|
+
constructor(jsf) {
|
|
8842
|
+
this.jsf = jsf;
|
|
8843
|
+
}
|
|
8844
|
+
ngOnInit() {
|
|
8845
|
+
this.options = this.layoutNode.options || {};
|
|
8846
|
+
}
|
|
8847
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8848
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TabComponent, selector: "tab-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
|
|
8849
|
+
<div [class]="options?.htmlClass || ''">
|
|
8850
|
+
<root-widget
|
|
8851
|
+
[dataIndex]="dataIndex"
|
|
8852
|
+
[layoutIndex]="layoutIndex"
|
|
8853
|
+
[layout]="layoutNode.items"></root-widget>
|
|
8854
|
+
</div>`, isInline: true, dependencies: [{ kind: "component", type: RootComponent, selector: "root-widget", inputs: ["dataIndex", "layoutIndex", "layout", "isOrderable", "isFlexItem"] }] }); }
|
|
8855
|
+
}
|
|
8856
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabComponent, decorators: [{
|
|
8857
|
+
type: Component,
|
|
8858
|
+
args: [{
|
|
8859
|
+
// tslint:disable-next-line:component-selector
|
|
8860
|
+
selector: 'tab-widget',
|
|
8861
|
+
template: `
|
|
8862
|
+
<div [class]="options?.htmlClass || ''">
|
|
8863
|
+
<root-widget
|
|
8864
|
+
[dataIndex]="dataIndex"
|
|
8865
|
+
[layoutIndex]="layoutIndex"
|
|
8866
|
+
[layout]="layoutNode.items"></root-widget>
|
|
8867
|
+
</div>`,
|
|
8868
|
+
}]
|
|
8869
|
+
}], ctorParameters: function () { return [{ type: JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
|
|
8870
|
+
type: Input
|
|
8871
|
+
}], layoutIndex: [{
|
|
8872
|
+
type: Input
|
|
8873
|
+
}], dataIndex: [{
|
|
8874
|
+
type: Input
|
|
8875
|
+
}] } });
|
|
8876
|
+
|
|
8634
8877
|
class TabsComponent {
|
|
8635
8878
|
constructor(jsf) {
|
|
8636
8879
|
this.jsf = jsf;
|
|
@@ -9080,17 +9323,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
9080
9323
|
}]
|
|
9081
9324
|
}], ctorParameters: function () { return []; } });
|
|
9082
9325
|
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9326
|
+
const BASIC_WIDGETS = [
|
|
9327
|
+
AddReferenceComponent, OneOfComponent, ButtonComponent, CheckboxComponent,
|
|
9328
|
+
CheckboxesComponent, FileComponent, HiddenComponent, InputComponent,
|
|
9329
|
+
MessageComponent, NoneComponent, NumberComponent, RadiosComponent,
|
|
9330
|
+
RootComponent, SectionComponent, SelectComponent, SelectFrameworkComponent,
|
|
9331
|
+
SelectWidgetComponent, SubmitComponent, TabComponent, TabsComponent,
|
|
9332
|
+
TemplateComponent, TextareaComponent
|
|
9333
|
+
];
|
|
9334
|
+
|
|
9335
|
+
class WidgetLibraryModule {
|
|
9336
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9337
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, declarations: [AddReferenceComponent, OneOfComponent, ButtonComponent, CheckboxComponent, CheckboxesComponent, FileComponent, HiddenComponent, InputComponent, MessageComponent, NoneComponent, NumberComponent, RadiosComponent, RootComponent, SectionComponent, SelectComponent, SelectFrameworkComponent, SelectWidgetComponent, SubmitComponent, TabComponent, TabsComponent, TemplateComponent, TextareaComponent, OrderableDirective, ElementAttributeDirective], imports: [CommonModule, FormsModule, ReactiveFormsModule, i3$1.SortablejsModule], exports: [AddReferenceComponent, OneOfComponent, ButtonComponent, CheckboxComponent, CheckboxesComponent, FileComponent, HiddenComponent, InputComponent, MessageComponent, NoneComponent, NumberComponent, RadiosComponent, RootComponent, SectionComponent, SelectComponent, SelectFrameworkComponent, SelectWidgetComponent, SubmitComponent, TabComponent, TabsComponent, TemplateComponent, TextareaComponent, OrderableDirective, ElementAttributeDirective] }); }
|
|
9338
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, imports: [CommonModule, FormsModule, ReactiveFormsModule,
|
|
9339
|
+
SortablejsModule.forRoot({
|
|
9340
|
+
//disabled:false,
|
|
9341
|
+
//draggable:".draggableitem",//">:not(.nonsort)",//">.draggable-item",//":not(.nonsort)",//">*",//":not(.nonsort)",//":not(.non-draggable)",
|
|
9342
|
+
filter: ".sortable-filter",
|
|
9343
|
+
preventOnFilter: false //needed for input range elements slider do still work
|
|
9344
|
+
})] }); }
|
|
9091
9345
|
}
|
|
9092
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type:
|
|
9093
|
-
type:
|
|
9346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, decorators: [{
|
|
9347
|
+
type: NgModule,
|
|
9348
|
+
args: [{
|
|
9349
|
+
imports: [CommonModule, FormsModule, ReactiveFormsModule,
|
|
9350
|
+
SortablejsModule.forRoot({
|
|
9351
|
+
//disabled:false,
|
|
9352
|
+
//draggable:".draggableitem",//">:not(.nonsort)",//">.draggable-item",//":not(.nonsort)",//">*",//":not(.nonsort)",//":not(.non-draggable)",
|
|
9353
|
+
filter: ".sortable-filter",
|
|
9354
|
+
preventOnFilter: false //needed for input range elements slider do still work
|
|
9355
|
+
})],
|
|
9356
|
+
declarations: [...BASIC_WIDGETS, OrderableDirective, ElementAttributeDirective],
|
|
9357
|
+
exports: [...BASIC_WIDGETS, OrderableDirective, ElementAttributeDirective]
|
|
9358
|
+
}]
|
|
9359
|
+
}] });
|
|
9360
|
+
|
|
9361
|
+
// No framework - plain HTML controls (styles from form layout only)
|
|
9362
|
+
class NoFrameworkModule {
|
|
9363
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9364
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, declarations: [NoFrameworkComponent], imports: [CommonModule, WidgetLibraryModule], exports: [NoFrameworkComponent] }); }
|
|
9365
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, providers: [
|
|
9366
|
+
{ provide: Framework, useClass: NoFramework, multi: true }
|
|
9367
|
+
], imports: [CommonModule, WidgetLibraryModule] }); }
|
|
9368
|
+
}
|
|
9369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, decorators: [{
|
|
9370
|
+
type: NgModule,
|
|
9371
|
+
args: [{
|
|
9372
|
+
imports: [CommonModule, WidgetLibraryModule],
|
|
9373
|
+
declarations: [NoFrameworkComponent],
|
|
9374
|
+
exports: [NoFrameworkComponent],
|
|
9375
|
+
providers: [
|
|
9376
|
+
{ provide: Framework, useClass: NoFramework, multi: true }
|
|
9377
|
+
]
|
|
9378
|
+
}]
|
|
9094
9379
|
}] });
|
|
9095
9380
|
|
|
9096
9381
|
// Possible future frameworks:
|
|
@@ -10006,165 +10291,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
10006
10291
|
type: Output
|
|
10007
10292
|
}] } });
|
|
10008
10293
|
|
|
10009
|
-
class NoFrameworkComponent {
|
|
10010
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10011
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NoFrameworkComponent, selector: "no-framework", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: "<select-widget-widget [dataIndex]=\"dataIndex\" [layoutIndex]=\"layoutIndex\" [layoutNode]=\"layoutNode\">\r\n</select-widget-widget>", dependencies: [{ kind: "component", type: SelectWidgetComponent, selector: "select-widget-widget", inputs: ["layoutNode", "layoutIndex", "dataIndex"] }] }); }
|
|
10012
|
-
}
|
|
10013
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkComponent, decorators: [{
|
|
10014
|
-
type: Component,
|
|
10015
|
-
args: [{ selector: 'no-framework', template: "<select-widget-widget [dataIndex]=\"dataIndex\" [layoutIndex]=\"layoutIndex\" [layoutNode]=\"layoutNode\">\r\n</select-widget-widget>" }]
|
|
10016
|
-
}], propDecorators: { layoutNode: [{
|
|
10017
|
-
type: Input
|
|
10018
|
-
}], layoutIndex: [{
|
|
10019
|
-
type: Input
|
|
10020
|
-
}], dataIndex: [{
|
|
10021
|
-
type: Input
|
|
10022
|
-
}] } });
|
|
10023
|
-
|
|
10024
|
-
// No framework - plain HTML controls (styles from form layout only)
|
|
10025
|
-
class NoFramework extends Framework {
|
|
10026
|
-
constructor() {
|
|
10027
|
-
super(...arguments);
|
|
10028
|
-
this.name = 'no-framework';
|
|
10029
|
-
this.text = 'None (plain HTML)';
|
|
10030
|
-
this.framework = NoFrameworkComponent;
|
|
10031
|
-
}
|
|
10032
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFramework, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10033
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFramework }); }
|
|
10034
|
-
}
|
|
10035
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFramework, decorators: [{
|
|
10036
|
-
type: Injectable
|
|
10037
|
-
}] });
|
|
10038
|
-
|
|
10039
|
-
class HiddenComponent {
|
|
10040
|
-
constructor(jsf) {
|
|
10041
|
-
this.jsf = jsf;
|
|
10042
|
-
this.controlDisabled = false;
|
|
10043
|
-
this.boundControl = false;
|
|
10044
|
-
}
|
|
10045
|
-
ngOnInit() {
|
|
10046
|
-
this.jsf.initializeControl(this);
|
|
10047
|
-
}
|
|
10048
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HiddenComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10049
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: HiddenComponent, selector: "hidden-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
|
|
10050
|
-
<input *ngIf="boundControl"
|
|
10051
|
-
[formControl]="formControl"
|
|
10052
|
-
[id]="'control' + layoutNode?._id"
|
|
10053
|
-
[name]="controlName"
|
|
10054
|
-
type="hidden">
|
|
10055
|
-
<input *ngIf="!boundControl"
|
|
10056
|
-
[disabled]="controlDisabled"
|
|
10057
|
-
[name]="controlName"
|
|
10058
|
-
[id]="'control' + layoutNode?._id"
|
|
10059
|
-
type="hidden"
|
|
10060
|
-
[value]="controlValue">`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
10061
|
-
}
|
|
10062
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HiddenComponent, decorators: [{
|
|
10063
|
-
type: Component,
|
|
10064
|
-
args: [{
|
|
10065
|
-
// tslint:disable-next-line:component-selector
|
|
10066
|
-
selector: 'hidden-widget',
|
|
10067
|
-
template: `
|
|
10068
|
-
<input *ngIf="boundControl"
|
|
10069
|
-
[formControl]="formControl"
|
|
10070
|
-
[id]="'control' + layoutNode?._id"
|
|
10071
|
-
[name]="controlName"
|
|
10072
|
-
type="hidden">
|
|
10073
|
-
<input *ngIf="!boundControl"
|
|
10074
|
-
[disabled]="controlDisabled"
|
|
10075
|
-
[name]="controlName"
|
|
10076
|
-
[id]="'control' + layoutNode?._id"
|
|
10077
|
-
type="hidden"
|
|
10078
|
-
[value]="controlValue">`,
|
|
10079
|
-
}]
|
|
10080
|
-
}], ctorParameters: function () { return [{ type: JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
|
|
10081
|
-
type: Input
|
|
10082
|
-
}], layoutIndex: [{
|
|
10083
|
-
type: Input
|
|
10084
|
-
}], dataIndex: [{
|
|
10085
|
-
type: Input
|
|
10086
|
-
}] } });
|
|
10087
|
-
|
|
10088
|
-
class TabComponent {
|
|
10089
|
-
constructor(jsf) {
|
|
10090
|
-
this.jsf = jsf;
|
|
10091
|
-
}
|
|
10092
|
-
ngOnInit() {
|
|
10093
|
-
this.options = this.layoutNode.options || {};
|
|
10094
|
-
}
|
|
10095
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10096
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TabComponent, selector: "tab-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
|
|
10097
|
-
<div [class]="options?.htmlClass || ''">
|
|
10098
|
-
<root-widget
|
|
10099
|
-
[dataIndex]="dataIndex"
|
|
10100
|
-
[layoutIndex]="layoutIndex"
|
|
10101
|
-
[layout]="layoutNode.items"></root-widget>
|
|
10102
|
-
</div>`, isInline: true, dependencies: [{ kind: "component", type: RootComponent, selector: "root-widget", inputs: ["dataIndex", "layoutIndex", "layout", "isOrderable", "isFlexItem"] }] }); }
|
|
10103
|
-
}
|
|
10104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabComponent, decorators: [{
|
|
10105
|
-
type: Component,
|
|
10106
|
-
args: [{
|
|
10107
|
-
// tslint:disable-next-line:component-selector
|
|
10108
|
-
selector: 'tab-widget',
|
|
10109
|
-
template: `
|
|
10110
|
-
<div [class]="options?.htmlClass || ''">
|
|
10111
|
-
<root-widget
|
|
10112
|
-
[dataIndex]="dataIndex"
|
|
10113
|
-
[layoutIndex]="layoutIndex"
|
|
10114
|
-
[layout]="layoutNode.items"></root-widget>
|
|
10115
|
-
</div>`,
|
|
10116
|
-
}]
|
|
10117
|
-
}], ctorParameters: function () { return [{ type: JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
|
|
10118
|
-
type: Input
|
|
10119
|
-
}], layoutIndex: [{
|
|
10120
|
-
type: Input
|
|
10121
|
-
}], dataIndex: [{
|
|
10122
|
-
type: Input
|
|
10123
|
-
}] } });
|
|
10124
|
-
|
|
10125
|
-
const BASIC_WIDGETS = [
|
|
10126
|
-
AddReferenceComponent, OneOfComponent, ButtonComponent, CheckboxComponent,
|
|
10127
|
-
CheckboxesComponent, FileComponent, HiddenComponent, InputComponent,
|
|
10128
|
-
MessageComponent, NoneComponent, NumberComponent, RadiosComponent,
|
|
10129
|
-
RootComponent, SectionComponent, SelectComponent, SelectFrameworkComponent,
|
|
10130
|
-
SelectWidgetComponent, SubmitComponent, TabComponent, TabsComponent,
|
|
10131
|
-
TemplateComponent, TextareaComponent
|
|
10132
|
-
];
|
|
10133
|
-
|
|
10134
|
-
class WidgetLibraryModule {
|
|
10135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10136
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, declarations: [AddReferenceComponent, OneOfComponent, ButtonComponent, CheckboxComponent, CheckboxesComponent, FileComponent, HiddenComponent, InputComponent, MessageComponent, NoneComponent, NumberComponent, RadiosComponent, RootComponent, SectionComponent, SelectComponent, SelectFrameworkComponent, SelectWidgetComponent, SubmitComponent, TabComponent, TabsComponent, TemplateComponent, TextareaComponent, OrderableDirective, ElementAttributeDirective], imports: [CommonModule, FormsModule, ReactiveFormsModule], exports: [AddReferenceComponent, OneOfComponent, ButtonComponent, CheckboxComponent, CheckboxesComponent, FileComponent, HiddenComponent, InputComponent, MessageComponent, NoneComponent, NumberComponent, RadiosComponent, RootComponent, SectionComponent, SelectComponent, SelectFrameworkComponent, SelectWidgetComponent, SubmitComponent, TabComponent, TabsComponent, TemplateComponent, TextareaComponent, OrderableDirective, ElementAttributeDirective] }); }
|
|
10137
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, imports: [CommonModule, FormsModule, ReactiveFormsModule] }); }
|
|
10138
|
-
}
|
|
10139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, decorators: [{
|
|
10140
|
-
type: NgModule,
|
|
10141
|
-
args: [{
|
|
10142
|
-
imports: [CommonModule, FormsModule, ReactiveFormsModule],
|
|
10143
|
-
declarations: [...BASIC_WIDGETS, OrderableDirective, ElementAttributeDirective],
|
|
10144
|
-
exports: [...BASIC_WIDGETS, OrderableDirective, ElementAttributeDirective]
|
|
10145
|
-
}]
|
|
10146
|
-
}] });
|
|
10147
|
-
|
|
10148
|
-
// No framework - plain HTML controls (styles from form layout only)
|
|
10149
|
-
class NoFrameworkModule {
|
|
10150
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10151
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, declarations: [NoFrameworkComponent], imports: [CommonModule, WidgetLibraryModule], exports: [NoFrameworkComponent] }); }
|
|
10152
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, providers: [
|
|
10153
|
-
{ provide: Framework, useClass: NoFramework, multi: true }
|
|
10154
|
-
], imports: [CommonModule, WidgetLibraryModule] }); }
|
|
10155
|
-
}
|
|
10156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, decorators: [{
|
|
10157
|
-
type: NgModule,
|
|
10158
|
-
args: [{
|
|
10159
|
-
imports: [CommonModule, WidgetLibraryModule],
|
|
10160
|
-
declarations: [NoFrameworkComponent],
|
|
10161
|
-
exports: [NoFrameworkComponent],
|
|
10162
|
-
providers: [
|
|
10163
|
-
{ provide: Framework, useClass: NoFramework, multi: true }
|
|
10164
|
-
]
|
|
10165
|
-
}]
|
|
10166
|
-
}] });
|
|
10167
|
-
|
|
10168
10294
|
class JsonSchemaFormModule {
|
|
10169
10295
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: JsonSchemaFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10170
10296
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: JsonSchemaFormModule, declarations: [JsonSchemaFormComponent], imports: [CommonModule, FormsModule, ReactiveFormsModule,
|