@ng-formworks/core 16.6.2 → 16.6.3

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.
@@ -1,7 +1,7 @@
1
1
  import * as i2 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Injectable, ViewContainerRef, Component, Input, ViewChild, Directive, ChangeDetectionStrategy, NgModule, Inject, forwardRef, EventEmitter, Output } from '@angular/core';
4
+ import { Injectable, ViewContainerRef, Component, Input, ViewChild, Directive, ChangeDetectionStrategy, Inject, inject, NgModule, forwardRef, EventEmitter, Output } from '@angular/core';
5
5
  import * as i3 from '@angular/forms';
6
6
  import { UntypedFormControl, UntypedFormArray, UntypedFormGroup, FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
7
7
  import addFormats from 'ajv-formats';
@@ -4586,8 +4586,32 @@ function fixRequiredArrayProperties(schema) {
4586
4586
  * @param schema:any
4587
4587
  * @param negate:boolean=false
4588
4588
  * @returns
4589
-
4590
4589
  */
4590
+ //TODO also handle ifs with mixed conditional such as allOf/oneOf etc
4591
+ /*
4592
+
4593
+ "if": {
4594
+ "allOf": [
4595
+ {
4596
+ "properties": {
4597
+ "animalType": {
4598
+ "enum": ["Cat", "Fish"]
4599
+ }
4600
+ }
4601
+ },
4602
+ {
4603
+ "properties": {
4604
+ "color": {
4605
+ "const": "orange"
4606
+ }
4607
+ }
4608
+ }
4609
+ ]
4610
+ }
4611
+
4612
+
4613
+
4614
+ */
4591
4615
  function convertJSONSchemaIfToCondition(schema, layoutNode, negate = false) {
4592
4616
  let conditionFun = "";
4593
4617
  let condition = {};
@@ -4612,17 +4636,26 @@ function convertJSONSchemaIfToCondition(schema, layoutNode, negate = false) {
4612
4636
  .join("")
4613
4637
  : "";
4614
4638
  let modelPath = parentPath ? `model.${parentPath}` : "model";
4615
- let checkPath = modelPath.split(".")
4616
- .reduce((accumulator, currentPart, index) => {
4617
- const currentExpression = index === 0 ? currentPart : `${accumulator}.${currentPart}`;
4618
- return index === 0 ? currentExpression : `${accumulator} && ${currentExpression}`;
4619
- }, '');
4639
+ let checkPath = modelPath.split('.')
4640
+ .map((_, index, array) => {
4641
+ return array.slice(0, index + 1).join('.'); // Build each part of the path dynamically
4642
+ }).join(' && '); // Join the parts with '&&'
4643
+ // .reduce((accumulator, currentPart, index) => {
4644
+ // const currentExpression = index === 0 ? currentPart : `${accumulator}.${currentPart}`;
4645
+ // return index === 0 ? currentExpression : `${accumulator} && ${currentExpression}`;
4646
+ // }, '');
4620
4647
  if (schema.if) {
4621
4648
  Object.keys(schema.if.properties).forEach((ifProp, ind) => {
4622
4649
  let amper = ind > 0 ? "&" : "";
4623
4650
  //Note the model value is first converted to string and so is the condition
4624
4651
  //so that booleans and numbers can also be compared
4625
- conditionFun += `${amper} ${checkPath} && ${modelPath}.${ifProp}+""=='${schema.if.properties[ifProp].const}'`;
4652
+ //changed to an includesList to handle cases such as
4653
+ const includesList = hasOwn(schema.if.properties[ifProp], "const") ? [schema.if.properties[ifProp].const]
4654
+ : hasOwn(schema.if.properties[ifProp], "enum") ? schema.if.properties[ifProp].enum
4655
+ : [];
4656
+ const includesListAsStr = includesList.map(val => { return `"${val}"`; });
4657
+ conditionFun += `${amper} ${checkPath} && [${includesListAsStr}].includes(${modelPath}.${ifProp}+"")`;
4658
+ //conditionFun+=`${amper} ${checkPath} && ${modelPath}.${ifProp}+""=='${schema.if.properties[ifProp].const}'`
4626
4659
  });
4627
4660
  }
4628
4661
  condition["functionBody"] = `return ${notOp}(${conditionFun})`;
@@ -5052,7 +5085,7 @@ function buildFormGroupTemplate(jsf, nodeValue = null, setValues = true, schemaP
5052
5085
  ["then", "else"].forEach(con => {
5053
5086
  if (hasOwn(schema, con)) {
5054
5087
  const keySchemaPointer = `/${con}`;
5055
- let thenFGTemplate = buildFormGroupTemplate(jsf, nodeValue, false, //JsonPointer.get(nodeValue, keySchemaPointer), setValues,
5088
+ let thenFGTemplate = buildFormGroupTemplate(jsf, nodeValue, setValues, //false,//JsonPointer.get(nodeValue, keySchemaPointer), setValues,
5056
5089
  schemaPointer + keySchemaPointer, dataPointer, templatePointer + `/controls/${con}`);
5057
5090
  Object.assign(controls, thenFGTemplate.controls);
5058
5091
  }
@@ -5113,7 +5146,8 @@ function buildFormGroupTemplate(jsf, nodeValue = null, setValues = true, schemaP
5113
5146
  if (foundKeys && foundKeys.length > 0) {
5114
5147
  const keySchemaPointer = `/${ofType}/${ind}`;
5115
5148
  //console.log(`found:${keySchemaPointer}`);
5116
- let newNodeValue = JsonPointer.get(nodeValue, dataPointer);
5149
+ let newNodeValue = nodeValue;
5150
+ //JsonPointer.get(nodeValue, dataPointer);
5117
5151
  //JsonPointer.get(nodeValue, keySchemaPointer);
5118
5152
  if (ofType == "oneOf") {
5119
5153
  newNodeValue = nodeValue;
@@ -5144,9 +5178,16 @@ function buildFormGroupTemplate(jsf, nodeValue = null, setValues = true, schemaP
5144
5178
  let oneOfItemSchema = JsonPointer.get(jsf.schema, controlItem.schemaPointer);
5145
5179
  //JsonPointer.get(schema,pointerPath);
5146
5180
  let dPointer = controlItem.schemaPointer.replace(/(anyOf|allOf|oneOf|none)\/[\d]+\//g, '')
5147
- .replace(/(if|then|else|properties)\//g, '');
5181
+ .replace(/(if|then|else|properties)\//g, '').replace(/\/items\//g, '/-/');
5182
+ dPointer = dPointer.indexOf(dataPointer) == 0
5183
+ ? dPointer.substring(dataPointer.length) : dPointer;
5184
+ //dataPointer+"/"+controlItem.schemaPointer.split("/").slice(-1)[0];
5185
+ ////controlItem.schemaPointer.replace(/(anyOf|allOf|oneOf|none)\/[\d]+\//g, '')
5186
+ ////.replace(/(if|then|else|properties)\//g, '').replace(/\/items\//g,'/-/');
5148
5187
  //JsonPointer.toDataPointer(controlItem.schemaPointer,jsf.schema);
5149
- let dVal = JsonPointer.get(nodeValue, dPointer);
5188
+ //console.log(`dataPointer:${dataPointer}\ndPointer:${dPointer}`)
5189
+ let dVal = //JsonPointer.get(jsf.formValues,dPointer);
5190
+ JsonPointer.get(nodeValue, dPointer);
5150
5191
  let fkey = key;
5151
5192
  let oneOfItemValue = dVal;
5152
5193
  /*
@@ -5289,43 +5330,22 @@ function buildFormGroupTemplate(jsf, nodeValue = null, setValues = true, schemaP
5289
5330
  ["then", "else"].forEach(con => {
5290
5331
  if (hasOwn(schema, con)) {
5291
5332
  const keySchemaPointer = `/${con}`;
5292
- let thenTFGTemplate = buildFormGroupTemplate(jsf, nodeValue, false, schemaPointer + keySchemaPointer, dataPointer, templatePointer + `/controls/${con}`);
5333
+ let thenTFGTemplate = buildFormGroupTemplate(jsf, nodeValue, setValues, //false,
5334
+ schemaPointer + keySchemaPointer, dataPointer, templatePointer + `/controls/${con}`);
5293
5335
  //NB same property can be in both then and else
5294
5336
  //so key must be the unique path to control
5295
5337
  //let ifItemSchema=JsonPointer.get(schema,keySchemaPointer);
5296
5338
  //let ifItemValue;
5297
- Object.keys(thenTFGTemplate.controls).forEach(key => {
5298
- let controlKey = thenTFGTemplate.controls[key].schemaPointer;
5299
- ////let controlItem=cloneDeep(thenTFGTemplate.controls[key]);
5300
- ////thenTFGTemplate.controls[key].schemaPointer || `${schemaPointer}${keySchemaPointer}/${key}`;
5301
- controlKey = path2ControlKey(controlKey);
5302
- let cItem = Object.assign({}, thenTFGTemplate.controls[key]);
5303
- ////cItem.schemaPointer = `${schemaPointer}${keySchemaPointer}/${key}`;
5304
- /*
5305
- if(ifItemSchema.properties && jsf.formValues===undefined){
5306
- //check if no form data values were supplied
5307
- //then set it to default otherwise to its nodevalue
5308
- ifItemValue=ifItemSchema.default
5309
- ifItemValue[key]=ifItemSchema.properties[key]?.default;
5310
- }
5311
- if(ifItemSchema.properties && jsf.formValues!=undefined){
5312
- ifItemValue ={};
5313
- //nodeValue||{};
5314
- ifItemValue[key]=nodeValue&&nodeValue[key];
5315
- }
5316
- if(!ifItemSchema.properties && jsf.formValues==undefined){
5317
- ifItemValue=ifItemSchema.default;
5318
- }
5319
- if(hasOwn(cItem,"value")){
5320
- if(!jsf.ajv.validate(ifItemSchema,ifItemValue)){
5321
- cItem.value.value=null;
5322
- }else{
5323
- cItem.value.value=ifItemValue[key];
5324
- }
5325
- }
5326
- */
5327
- controls[controlKey] = cItem;
5328
- });
5339
+ if (hasOwn(thenTFGTemplate, 'controls')) {
5340
+ Object.keys(thenTFGTemplate.controls).forEach(key => {
5341
+ let controlKey = thenTFGTemplate.controls[key].schemaPointer;
5342
+ if (controlKey) {
5343
+ controlKey = path2ControlKey(controlKey);
5344
+ let cItem = Object.assign({}, thenTFGTemplate.controls[key]);
5345
+ controls[controlKey] = cItem;
5346
+ }
5347
+ });
5348
+ }
5329
5349
  }
5330
5350
  });
5331
5351
  }
@@ -5562,7 +5582,8 @@ function getControl(formGroup, dataPointer, returnGroup = false, schemaPointer)
5562
5582
  // If dataPointer input is not a valid JSON pointer, check to
5563
5583
  // see if it is instead a valid object path, using dot notaion
5564
5584
  if (typeof dataPointer === 'string') {
5565
- const formControl = formGroup.get(path2ControlKey(schemaPointer || "")) || formGroup.get(dataPointer);
5585
+ const controlPath = !!schemaPointer ? path2ControlKey(schemaPointer) : dataPointer;
5586
+ const formControl = formGroup.get(controlPath);
5566
5587
  if (formControl) {
5567
5588
  return formControl;
5568
5589
  }
@@ -5582,7 +5603,8 @@ function getControl(formGroup, dataPointer, returnGroup = false, schemaPointer)
5582
5603
  // try using formGroup.get() to return the control
5583
5604
  if (typeof formGroup.get === 'function' &&
5584
5605
  dataPointerArray.every(key => key.indexOf('.') === -1)) {
5585
- const formControl = formGroup.get(path2ControlKey(schemaPointer || "")) || formGroup.get(dataPointerArray.join('.'));
5606
+ const controlPath = !!schemaPointer ? path2ControlKey(schemaPointer) : dataPointerArray.join('.');
5607
+ const formControl = formGroup.get(controlPath);
5586
5608
  if (formControl) {
5587
5609
  return formControl;
5588
5610
  }
@@ -5595,15 +5617,16 @@ function getControl(formGroup, dataPointer, returnGroup = false, schemaPointer)
5595
5617
  if (hasOwn(subGroup, 'controls')) {
5596
5618
  subGroup = subGroup.controls;
5597
5619
  }
5598
- if (isArray(subGroup) && (key === '-')) {
5620
+ if (schemaPointer && hasOwn(subGroup, path2ControlKey(schemaPointer))) {
5621
+ subGroup = subGroup[path2ControlKey(schemaPointer)];
5622
+ return subGroup;
5623
+ }
5624
+ else if (isArray(subGroup) && (key === '-')) {
5599
5625
  subGroup = subGroup[subGroup.length - 1];
5600
5626
  }
5601
5627
  else if (hasOwn(subGroup, key)) {
5602
5628
  subGroup = subGroup[key];
5603
5629
  }
5604
- else if (schemaPointer && hasOwn(subGroup, path2ControlKey(schemaPointer))) {
5605
- subGroup = subGroup[path2ControlKey(schemaPointer)];
5606
- }
5607
5630
  else {
5608
5631
  console.error(`getControl error: Unable to find "${key}" item in FormGroup.`);
5609
5632
  console.error(dataPointer);
@@ -6477,7 +6500,7 @@ function buildLayoutFromSchema(jsf, widgetLibrary, nodeValue = null, schemaPoint
6477
6500
  if (hasOwn(schema, con)) {
6478
6501
  const keySchemaPointer = `/${con}`;
6479
6502
  const negateClause = con == "else";
6480
- const innerItem = buildLayoutFromSchema(jsf, widgetLibrary, nodeValue.then, schemaPointer + keySchemaPointer, dataPointer, false, null, null, forRefLibrary, dataPointerPrefix);
6503
+ const innerItem = buildLayoutFromSchema(jsf, widgetLibrary, nodeValue[con], schemaPointer + keySchemaPointer, dataPointer, false, null, null, forRefLibrary, dataPointerPrefix);
6481
6504
  if (innerItem) {
6482
6505
  applyITEConditions(innerItem, schemaPointer, keySchemaPointer, negateClause);
6483
6506
  if (isArray(innerItem)) {
@@ -6704,7 +6727,7 @@ function buildLayoutFromSchema(jsf, widgetLibrary, nodeValue = null, schemaPoint
6704
6727
  if (hasOwn(schema, con)) {
6705
6728
  const keySchemaPointer = `/${con}`;
6706
6729
  const negateClause = con == "else";
6707
- const innerItem = buildLayoutFromSchema(jsf, widgetLibrary, nodeValue.then, schemaPointer + keySchemaPointer, dataPointer, false, null, null, forRefLibrary, dataPointerPrefix);
6730
+ const innerItem = buildLayoutFromSchema(jsf, widgetLibrary, nodeValue[con], schemaPointer + keySchemaPointer, dataPointer, false, null, null, forRefLibrary, dataPointerPrefix);
6708
6731
  if (innerItem) {
6709
6732
  applyITEConditions(innerItem, schemaPointer, keySchemaPointer, negateClause);
6710
6733
  if (isArray(innerItem)) {
@@ -6712,17 +6735,19 @@ function buildLayoutFromSchema(jsf, widgetLibrary, nodeValue = null, schemaPoint
6712
6735
  //item.schemaPointer = schemaPointer + keySchemaPointer + item.dataPointer;
6713
6736
  //item.options.condition = convertJSONSchemaIfToCondition(schema, negateClause);
6714
6737
  newSection.push(item);
6715
- newNode = newSection;
6738
+ /////// newNode = newSection
6716
6739
  });
6717
6740
  }
6718
6741
  else {
6719
6742
  //innerItem.schemaPointer = schemaPointer + keySchemaPointer + innerItem.dataPointer;
6720
6743
  //innerItem.options.condition = convertJSONSchemaIfToCondition(schema, negateClause);
6721
- newNode = innerItem;
6744
+ ///////newNode = innerItem
6745
+ newSection.push(innerItem);
6722
6746
  }
6723
6747
  }
6724
6748
  }
6725
6749
  });
6750
+ newNode = newSection;
6726
6751
  }
6727
6752
  return newNode;
6728
6753
  }
@@ -8926,7 +8951,7 @@ class OneOfComponent {
8926
8951
  let controlSchema = JsonPointer.get(this.jsf.schema, parts.join("/"));
8927
8952
  let schemaPointer = parts.join("/");
8928
8953
  let dPointer = schemaPointer.replace(/(anyOf|allOf|oneOf|none)\/[\d]+\//g, '')
8929
- .replace(/(if|then|else|properties)\//g, '');
8954
+ .replace(/(if|then|else|properties)\//g, '').replace(/\/items\//g, '/-/');
8930
8955
  //JsonPointer.toDataPointer(parts.join("/"),this.jsf.schema);
8931
8956
  let dVal = JsonPointer.get(this.jsf.formValues, dPointer);
8932
8957
  let compareVal = dVal; //formValue;
@@ -9304,6 +9329,7 @@ class RootComponent {
9304
9329
  }
9305
9330
  sortableInit(sortable) {
9306
9331
  this.sortableObj = sortable;
9332
+ //Sortable.utils.on(this.sortableObj.el,"nulling",(s)=>{console.log("event nulling sortablejs")})
9307
9333
  ///NB issue caused by sortablejs when it its destroyed
9308
9334
  //this mainly affects checkboxes coupled with conditions
9309
9335
  //-the value is rechecked
@@ -9986,43 +10012,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
9986
10012
  type: Input
9987
10013
  }] } });
9988
10014
 
9989
- class TabComponent {
9990
- constructor(jsf) {
9991
- this.jsf = jsf;
9992
- }
9993
- ngOnInit() {
9994
- this.options = this.layoutNode.options || {};
9995
- }
9996
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
9997
- 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: `
9998
- <div [class]="options?.htmlClass || ''">
9999
- <root-widget
10000
- [dataIndex]="dataIndex"
10001
- [layoutIndex]="layoutIndex"
10002
- [layout]="layoutNode.items"></root-widget>
10003
- </div>`, isInline: true, dependencies: [{ kind: "component", type: RootComponent, selector: "root-widget", inputs: ["dataIndex", "layoutIndex", "layout", "isOrderable", "isFlexItem"] }] }); }
10004
- }
10005
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabComponent, decorators: [{
10006
- type: Component,
10007
- args: [{
10008
- // tslint:disable-next-line:component-selector
10009
- selector: 'tab-widget',
10010
- template: `
10011
- <div [class]="options?.htmlClass || ''">
10012
- <root-widget
10013
- [dataIndex]="dataIndex"
10014
- [layoutIndex]="layoutIndex"
10015
- [layout]="layoutNode.items"></root-widget>
10016
- </div>`,
10017
- }]
10018
- }], ctorParameters: function () { return [{ type: JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
10019
- type: Input
10020
- }], layoutIndex: [{
10021
- type: Input
10022
- }], dataIndex: [{
10023
- type: Input
10024
- }] } });
10025
-
10026
10015
  class TemplateComponent {
10027
10016
  constructor(jsf) {
10028
10017
  this.jsf = jsf;
@@ -10256,6 +10245,7 @@ class WidgetLibraryService {
10256
10245
  'wizard': 'section',
10257
10246
  // Widgets included for compatibility with other libraries
10258
10247
  'textline': 'text',
10248
+ 'selectcheckbox': SelectCheckboxComponent,
10259
10249
  // Recommended 3rd-party add-on widgets (TODO: create wrappers for these...)
10260
10250
  // 'ng2-select': Select control replacement - http://valor-software.com/ng2-select/
10261
10251
  // 'flatpickr': Flatpickr date picker - https://github.com/chmln/flatpickr
@@ -10372,73 +10362,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
10372
10362
  }]
10373
10363
  }], ctorParameters: function () { return []; } });
10374
10364
 
10375
- const BASIC_WIDGETS = [
10376
- AddReferenceComponent, OneOfComponent, ButtonComponent, CheckboxComponent,
10377
- CheckboxesComponent, FileComponent, HiddenComponent, InputComponent,
10378
- MessageComponent, NoneComponent, NumberComponent, RadiosComponent,
10379
- RootComponent, SectionComponent, SelectComponent, SelectFrameworkComponent,
10380
- SelectWidgetComponent, SubmitComponent, TabComponent, TabsComponent,
10381
- TemplateComponent, TextareaComponent
10382
- ];
10383
-
10384
- class WidgetLibraryModule {
10385
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
10386
- 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] }); }
10387
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, imports: [CommonModule, FormsModule, ReactiveFormsModule,
10388
- SortablejsModule.forRoot({
10389
- //disabled:false,
10390
- //draggable:".draggableitem",//">:not(.nonsort)",//">.draggable-item",//":not(.nonsort)",//">*",//":not(.nonsort)",//":not(.non-draggable)",
10391
- filter: ".sortable-filter",
10392
- preventOnFilter: false,
10393
- onMove: function (/**Event*/ evt, /**Event*/ originalEvent) {
10394
- if (evt.related.classList.contains("sortable-fixed")) {
10395
- //console.log(evt.related);
10396
- return false;
10397
- }
10398
- }
10399
- })] }); }
10400
- }
10401
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, decorators: [{
10402
- type: NgModule,
10403
- args: [{
10404
- imports: [CommonModule, FormsModule, ReactiveFormsModule,
10405
- SortablejsModule.forRoot({
10406
- //disabled:false,
10407
- //draggable:".draggableitem",//">:not(.nonsort)",//">.draggable-item",//":not(.nonsort)",//">*",//":not(.nonsort)",//":not(.non-draggable)",
10408
- filter: ".sortable-filter",
10409
- preventOnFilter: false,
10410
- onMove: function (/**Event*/ evt, /**Event*/ originalEvent) {
10411
- if (evt.related.classList.contains("sortable-fixed")) {
10412
- //console.log(evt.related);
10413
- return false;
10414
- }
10415
- }
10416
- })],
10417
- declarations: [...BASIC_WIDGETS, OrderableDirective, ElementAttributeDirective],
10418
- exports: [...BASIC_WIDGETS, OrderableDirective, ElementAttributeDirective]
10419
- }]
10420
- }] });
10421
-
10422
- // No framework - plain HTML controls (styles from form layout only)
10423
- class NoFrameworkModule {
10424
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
10425
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, declarations: [NoFrameworkComponent], imports: [CommonModule, WidgetLibraryModule], exports: [NoFrameworkComponent] }); }
10426
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, providers: [
10427
- { provide: Framework, useClass: NoFramework, multi: true }
10428
- ], imports: [CommonModule, WidgetLibraryModule] }); }
10429
- }
10430
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, decorators: [{
10431
- type: NgModule,
10432
- args: [{
10433
- imports: [CommonModule, WidgetLibraryModule],
10434
- declarations: [NoFrameworkComponent],
10435
- exports: [NoFrameworkComponent],
10436
- providers: [
10437
- { provide: Framework, useClass: NoFramework, multi: true }
10438
- ]
10439
- }]
10440
- }] });
10441
-
10442
10365
  // Possible future frameworks:
10443
10366
  // - Foundation 6:
10444
10367
  // http://justindavis.co/2017/06/15/using-foundation-6-in-angular-4/
@@ -10606,6 +10529,289 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
10606
10529
  args: [WidgetLibraryService]
10607
10530
  }] }, { type: i1.HttpClient }]; } });
10608
10531
 
10532
+ //component created as a fallback for the checkbox/sortabljs issue
10533
+ //its meant to display a select as a checkbox
10534
+ class SelectCheckboxComponent {
10535
+ constructor() {
10536
+ this.jsf = inject(JsonSchemaFormService);
10537
+ this.jsfFLService = inject(FrameworkLibraryService);
10538
+ this.controlDisabled = false;
10539
+ this.boundControl = false;
10540
+ this.selectList = [];
10541
+ this.selectListFlatGroup = [];
10542
+ this.isArray = isArray;
10543
+ this.frameworkStyles = {
10544
+ daisyui: { selectClass: "select-box", optionClass: "checkbox tw:dui-checkbox", optionChecked: "active", optionUnchecked: "" },
10545
+ "bootstrap-3": { selectClass: "select-box", optionClass: "bs3-option checkbox display-inline-block", optionChecked: "active", optionUnchecked: "" },
10546
+ "bootstrap-4": { selectClass: "select-box", optionClass: "bs4-option checkbox display-inline-block", optionChecked: "active", optionUnchecked: "" },
10547
+ "bootstrap-5": { selectClass: " select-box", optionClass: "form-check-input display-inline-block", optionChecked: "active", optionUnchecked: "" },
10548
+ //"material-design":{selectClass:" ",optionClass:" "}
10549
+ };
10550
+ }
10551
+ ngOnInit() {
10552
+ this.options = this.layoutNode.options || {};
10553
+ this.activeFramework = this.jsfFLService.activeFramework.name;
10554
+ this.selectList = buildTitleMap(
10555
+ //this.options.titleMap || this.options.enumNames,
10556
+ //TODO review-title is set to null in the setTitle() method of CssFrameworkComponent
10557
+ this.options.enumNames || (this.options?.title && [this.options?.title])
10558
+ || [this.layoutNode.name],
10559
+ //this.options.enum,
10560
+ [true],
10561
+ //make required true to avoid creating 'none' select option
10562
+ true, !!this.options.flatList);
10563
+ //the selectListFlatGroup array will be used to update the formArray values
10564
+ //while the selectList array will be bound to the form select
10565
+ //as either a grouped select or a flat select
10566
+ /*
10567
+ this.selectListFlatGroup = buildTitleMap(
10568
+ this.options.titleMap || this.options.enumNames,
10569
+ this.options.enum, !!this.options.required, true
10570
+ )
10571
+ */
10572
+ this.jsf.initializeControl(this);
10573
+ this.selectValue = [this.controlValue];
10574
+ }
10575
+ deselectAll() {
10576
+ this.selectListFlatGroup.forEach(selItem => {
10577
+ selItem.checked = false;
10578
+ });
10579
+ }
10580
+ updateValue(event) {
10581
+ this.options.showErrors = true;
10582
+ this.controlValue = this.selectValue[0];
10583
+ this.jsf.updateValue(this, this.controlValue);
10584
+ }
10585
+ onSelectClicked($event) {
10586
+ this.selectValue = this.selectValue && this.selectValue[0] ? [false] : [true];
10587
+ this.controlValue = this.selectValue[0];
10588
+ this.jsf.updateValue(this, this.controlValue);
10589
+ }
10590
+ ngOnDestroy() {
10591
+ let nullVal = this.options.multiple ? [null] : null;
10592
+ this.formControl.reset(nullVal);
10593
+ this.controlValue = null;
10594
+ }
10595
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10596
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SelectCheckboxComponent, selector: "selectcheckbox-widget", inputs: { layoutNode: "layoutNode", layoutIndex: "layoutIndex", dataIndex: "dataIndex" }, ngImport: i0, template: `
10597
+ <div
10598
+ [class]="options?.htmlClass || ''">
10599
+ <select *ngIf="boundControl"
10600
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
10601
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
10602
+ [attr.required]="options?.required"
10603
+ [class]=" frameworkStyles[activeFramework].selectClass"
10604
+ [multiple]="true"
10605
+ [id]="'control' + layoutNode?._id"
10606
+ [name]="controlName"
10607
+ [ngModel]="selectValue"
10608
+ >
10609
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
10610
+ <option *ngIf="!isArray(selectItem?.items)"
10611
+ [class]="frameworkStyles[activeFramework].optionClass"
10612
+ [class.active]="selectItem?.value === controlValue"
10613
+ [class.unchecked-notusing]="selectItem?.value != controlValue"
10614
+ [value]="selectItem?.value"
10615
+ (click)="onSelectClicked($event)"
10616
+ type="checkbox"
10617
+ >
10618
+ </option>
10619
+ <!--NB the text is out of the option element to display besides the checkbox-->
10620
+ <span [innerHTML]="selectItem?.name"></span>
10621
+ </ng-template>
10622
+ </select>
10623
+ <select *ngIf="!boundControl"
10624
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
10625
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
10626
+ [attr.required]="options?.required"
10627
+ [class]="frameworkStyles[activeFramework].selectClass +' select-box'"
10628
+ [multiple]="true"
10629
+ [disabled]="controlDisabled"
10630
+ [id]="'control' + layoutNode?._id"
10631
+ [name]="controlName"
10632
+ (change)="updateValue($event)">
10633
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
10634
+ <option *ngIf="!isArray(selectItem?.items)"
10635
+ [selected]="selectItem?.value === controlValue"
10636
+ [class]="frameworkStyles[activeFramework].optionClass"
10637
+ [class.checked-notusing]="selectItem?.value === controlValue"
10638
+ [class.unchecked-notusing]]="selectItem?.value != controlValue"
10639
+ [value]="selectItem?.value"
10640
+ type="checkbox">
10641
+ </option>
10642
+ <!--NB the text is out of the option element to display besides the checkbox-->
10643
+ <span [innerHTML]="selectItem?.name"></span>
10644
+ </ng-template>
10645
+ </select>
10646
+
10647
+ </div>`, isInline: true, styles: [".select-box{font-size:16px;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none;height:25px;overflow:hidden;text-overflow:ellipsis;background-color:#fff;color:#000;background-color:transparent}.select-box:focus{outline:none}.select-option{font-size:20px;color:#000;background-color:#fff;display:inline-block}.unchecked:before{content:\"\\2610\";left:5px;top:50%;transform:translateY(-50%);font-size:30px}.checked:before{content:\"\\2611\";left:5px;top:50%;transform:translateY(-50%);font-size:30px}.select-option:checked{background-image:linear-gradient(0deg,#fff 0% 100%);color:#000}.select-box[multiple]:focus{background-color:transparent;color:#00f;-webkit-text-fill-color:black}.display-inline-block{display:inline-block}.bs4-option,.bs3-option{width:14px;height:14px;border:solid 1px;color:#a9a9a9;min-block-size:auto;border-radius:3px}.bs4-option:checked[type=checkbox],.bs3-option:checked[type=checkbox]{background-image:url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!--%20License%3A%20MIT.%20Made%20by%20jaynewey%3A%20https%3A%2F%2Fgithub.com%2Fjaynewey%2Fcharm-icons%20--%3E%3Csvg%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20fill%3D%22none%22%20stroke%3D%22%23000000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222.5%22%3E%3Cpolyline%20points%3D%224%208.75%2C6.25%2012.25%2C13.25%203.5%22%2F%3E%3C%2Fsvg%3E);background-color:#00ced1}\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.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
10648
+ }
10649
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectCheckboxComponent, decorators: [{
10650
+ type: Component,
10651
+ args: [{ selector: 'selectcheckbox-widget', template: `
10652
+ <div
10653
+ [class]="options?.htmlClass || ''">
10654
+ <select *ngIf="boundControl"
10655
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
10656
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
10657
+ [attr.required]="options?.required"
10658
+ [class]=" frameworkStyles[activeFramework].selectClass"
10659
+ [multiple]="true"
10660
+ [id]="'control' + layoutNode?._id"
10661
+ [name]="controlName"
10662
+ [ngModel]="selectValue"
10663
+ >
10664
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
10665
+ <option *ngIf="!isArray(selectItem?.items)"
10666
+ [class]="frameworkStyles[activeFramework].optionClass"
10667
+ [class.active]="selectItem?.value === controlValue"
10668
+ [class.unchecked-notusing]="selectItem?.value != controlValue"
10669
+ [value]="selectItem?.value"
10670
+ (click)="onSelectClicked($event)"
10671
+ type="checkbox"
10672
+ >
10673
+ </option>
10674
+ <!--NB the text is out of the option element to display besides the checkbox-->
10675
+ <span [innerHTML]="selectItem?.name"></span>
10676
+ </ng-template>
10677
+ </select>
10678
+ <select *ngIf="!boundControl"
10679
+ [attr.aria-describedby]="'control' + layoutNode?._id + 'Status'"
10680
+ [attr.readonly]="options?.readonly ? 'readonly' : null"
10681
+ [attr.required]="options?.required"
10682
+ [class]="frameworkStyles[activeFramework].selectClass +' select-box'"
10683
+ [multiple]="true"
10684
+ [disabled]="controlDisabled"
10685
+ [id]="'control' + layoutNode?._id"
10686
+ [name]="controlName"
10687
+ (change)="updateValue($event)">
10688
+ <ng-template ngFor let-selectItem [ngForOf]="selectList">
10689
+ <option *ngIf="!isArray(selectItem?.items)"
10690
+ [selected]="selectItem?.value === controlValue"
10691
+ [class]="frameworkStyles[activeFramework].optionClass"
10692
+ [class.checked-notusing]="selectItem?.value === controlValue"
10693
+ [class.unchecked-notusing]]="selectItem?.value != controlValue"
10694
+ [value]="selectItem?.value"
10695
+ type="checkbox">
10696
+ </option>
10697
+ <!--NB the text is out of the option element to display besides the checkbox-->
10698
+ <span [innerHTML]="selectItem?.name"></span>
10699
+ </ng-template>
10700
+ </select>
10701
+
10702
+ </div>`, standalone: false, styles: [".select-box{font-size:16px;border:none;appearance:none;-webkit-appearance:none;-moz-appearance:none;height:25px;overflow:hidden;text-overflow:ellipsis;background-color:#fff;color:#000;background-color:transparent}.select-box:focus{outline:none}.select-option{font-size:20px;color:#000;background-color:#fff;display:inline-block}.unchecked:before{content:\"\\2610\";left:5px;top:50%;transform:translateY(-50%);font-size:30px}.checked:before{content:\"\\2611\";left:5px;top:50%;transform:translateY(-50%);font-size:30px}.select-option:checked{background-image:linear-gradient(0deg,#fff 0% 100%);color:#000}.select-box[multiple]:focus{background-color:transparent;color:#00f;-webkit-text-fill-color:black}.display-inline-block{display:inline-block}.bs4-option,.bs3-option{width:14px;height:14px;border:solid 1px;color:#a9a9a9;min-block-size:auto;border-radius:3px}.bs4-option:checked[type=checkbox],.bs3-option:checked[type=checkbox]{background-image:url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!--%20License%3A%20MIT.%20Made%20by%20jaynewey%3A%20https%3A%2F%2Fgithub.com%2Fjaynewey%2Fcharm-icons%20--%3E%3Csvg%20viewBox%3D%220%200%2016%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20fill%3D%22none%22%20stroke%3D%22%23000000%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222.5%22%3E%3Cpolyline%20points%3D%224%208.75%2C6.25%2012.25%2C13.25%203.5%22%2F%3E%3C%2Fsvg%3E);background-color:#00ced1}\n"] }]
10703
+ }], propDecorators: { layoutNode: [{
10704
+ type: Input
10705
+ }], layoutIndex: [{
10706
+ type: Input
10707
+ }], dataIndex: [{
10708
+ type: Input
10709
+ }] } });
10710
+
10711
+ class TabComponent {
10712
+ constructor(jsf) {
10713
+ this.jsf = jsf;
10714
+ }
10715
+ ngOnInit() {
10716
+ this.options = this.layoutNode.options || {};
10717
+ }
10718
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabComponent, deps: [{ token: JsonSchemaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
10719
+ 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: `
10720
+ <div [class]="options?.htmlClass || ''">
10721
+ <root-widget
10722
+ [dataIndex]="dataIndex"
10723
+ [layoutIndex]="layoutIndex"
10724
+ [layout]="layoutNode.items"></root-widget>
10725
+ </div>`, isInline: true, dependencies: [{ kind: "component", type: RootComponent, selector: "root-widget", inputs: ["dataIndex", "layoutIndex", "layout", "isOrderable", "isFlexItem"] }] }); }
10726
+ }
10727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabComponent, decorators: [{
10728
+ type: Component,
10729
+ args: [{
10730
+ // tslint:disable-next-line:component-selector
10731
+ selector: 'tab-widget',
10732
+ template: `
10733
+ <div [class]="options?.htmlClass || ''">
10734
+ <root-widget
10735
+ [dataIndex]="dataIndex"
10736
+ [layoutIndex]="layoutIndex"
10737
+ [layout]="layoutNode.items"></root-widget>
10738
+ </div>`,
10739
+ }]
10740
+ }], ctorParameters: function () { return [{ type: JsonSchemaFormService }]; }, propDecorators: { layoutNode: [{
10741
+ type: Input
10742
+ }], layoutIndex: [{
10743
+ type: Input
10744
+ }], dataIndex: [{
10745
+ type: Input
10746
+ }] } });
10747
+
10748
+ const BASIC_WIDGETS = [
10749
+ AddReferenceComponent, OneOfComponent, ButtonComponent, CheckboxComponent,
10750
+ CheckboxesComponent, FileComponent, HiddenComponent, InputComponent,
10751
+ MessageComponent, NoneComponent, NumberComponent, RadiosComponent,
10752
+ RootComponent, SectionComponent, SelectComponent, SelectFrameworkComponent,
10753
+ SelectWidgetComponent, SubmitComponent, TabComponent, TabsComponent,
10754
+ TemplateComponent, TextareaComponent, SelectCheckboxComponent
10755
+ ];
10756
+
10757
+ class WidgetLibraryModule {
10758
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
10759
+ 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, SelectCheckboxComponent, 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, SelectCheckboxComponent, OrderableDirective, ElementAttributeDirective] }); }
10760
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, imports: [CommonModule, FormsModule, ReactiveFormsModule,
10761
+ SortablejsModule.forRoot({
10762
+ //disabled:false,
10763
+ //draggable:".draggableitem",//">:not(.nonsort)",//">.draggable-item",//":not(.nonsort)",//">*",//":not(.nonsort)",//":not(.non-draggable)",
10764
+ filter: ".sortable-filter",
10765
+ preventOnFilter: false,
10766
+ onMove: function (/**Event*/ evt, /**Event*/ originalEvent) {
10767
+ if (evt.related.classList.contains("sortable-fixed")) {
10768
+ //console.log(evt.related);
10769
+ return false;
10770
+ }
10771
+ }
10772
+ })] }); }
10773
+ }
10774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetLibraryModule, decorators: [{
10775
+ type: NgModule,
10776
+ args: [{
10777
+ imports: [CommonModule, FormsModule, ReactiveFormsModule,
10778
+ SortablejsModule.forRoot({
10779
+ //disabled:false,
10780
+ //draggable:".draggableitem",//">:not(.nonsort)",//">.draggable-item",//":not(.nonsort)",//">*",//":not(.nonsort)",//":not(.non-draggable)",
10781
+ filter: ".sortable-filter",
10782
+ preventOnFilter: false,
10783
+ onMove: function (/**Event*/ evt, /**Event*/ originalEvent) {
10784
+ if (evt.related.classList.contains("sortable-fixed")) {
10785
+ //console.log(evt.related);
10786
+ return false;
10787
+ }
10788
+ }
10789
+ })],
10790
+ declarations: [...BASIC_WIDGETS, OrderableDirective, ElementAttributeDirective],
10791
+ exports: [...BASIC_WIDGETS, OrderableDirective, ElementAttributeDirective]
10792
+ }]
10793
+ }] });
10794
+
10795
+ // No framework - plain HTML controls (styles from form layout only)
10796
+ class NoFrameworkModule {
10797
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
10798
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, declarations: [NoFrameworkComponent], imports: [CommonModule, WidgetLibraryModule], exports: [NoFrameworkComponent] }); }
10799
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, providers: [
10800
+ { provide: Framework, useClass: NoFramework, multi: true }
10801
+ ], imports: [CommonModule, WidgetLibraryModule] }); }
10802
+ }
10803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NoFrameworkModule, decorators: [{
10804
+ type: NgModule,
10805
+ args: [{
10806
+ imports: [CommonModule, WidgetLibraryModule],
10807
+ declarations: [NoFrameworkComponent],
10808
+ exports: [NoFrameworkComponent],
10809
+ providers: [
10810
+ { provide: Framework, useClass: NoFramework, multi: true }
10811
+ ]
10812
+ }]
10813
+ }] });
10814
+
10609
10815
  const JSON_SCHEMA_FORM_VALUE_ACCESSOR = {
10610
10816
  provide: NG_VALUE_ACCESSOR,
10611
10817
  useExisting: forwardRef(() => JsonSchemaFormComponent),
@@ -11398,5 +11604,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
11398
11604
  * Generated bundle index. Do not edit.
11399
11605
  */
11400
11606
 
11401
- export { AddReferenceComponent, BASIC_WIDGETS, ButtonComponent, CheckboxComponent, CheckboxesComponent, ElementAttributeDirective, FileComponent, Framework, FrameworkLibraryService, HiddenComponent, InputComponent, JsonPointer, JsonSchemaFormComponent, JsonSchemaFormModule, JsonSchemaFormService, JsonValidators, MessageComponent, NoneComponent, NumberComponent, OneOfComponent, OrderableDirective, RadiosComponent, RootComponent, SectionComponent, SelectComponent, SelectFrameworkComponent, SelectWidgetComponent, SubmitComponent, TabComponent, TabsComponent, TemplateComponent, TextareaComponent, WidgetLibraryModule, WidgetLibraryService, _executeAsyncValidators, _executeValidators, _mergeErrors, _mergeObjects, _toPromise, addClasses, buildFormGroup, buildFormGroupTemplate, buildLayout, buildLayoutFromSchema, buildSchemaFromData, buildSchemaFromLayout, buildTitleMap, checkInlineType, combineAllOf, commonItems, convertSchemaToDraft6, copy, deValidationMessages, enValidationMessages, esValidationMessages, fixRequiredArrayProperties, fixTitle, forEach, forEachCopy, formatFormData, frValidationMessages, getControl, getControlValidators, getFromSchema, getInputType, getLayoutNode, getSubSchema, getTitleMapFromOneOf, getType, hasNonNullValue, hasOwn, hasValue, inArray, isArray, isBoolean, isDate, isDefined, isEmpty, isFunction, isInputRequired, isInteger, isMap, isNumber, isObject, isObservable, isPrimitive, isPromise, isSet, isString, isType, itValidationMessages, mapLayout, mergeFilteredObject, mergeSchemas, path2ControlKey, ptValidationMessages, removeRecursiveReferences, resolveSchemaReferences, setControl, setRequiredFields, toJavaScriptType, toObservable, toSchemaType, toTitleCase, uniqueItems, updateInputOptions, xor, zhValidationMessages };
11607
+ export { AddReferenceComponent, BASIC_WIDGETS, ButtonComponent, CheckboxComponent, CheckboxesComponent, ElementAttributeDirective, FileComponent, Framework, FrameworkLibraryService, HiddenComponent, InputComponent, JsonPointer, JsonSchemaFormComponent, JsonSchemaFormModule, JsonSchemaFormService, JsonValidators, MessageComponent, NoneComponent, NumberComponent, OneOfComponent, OrderableDirective, RadiosComponent, RootComponent, SectionComponent, SelectCheckboxComponent, SelectComponent, SelectFrameworkComponent, SelectWidgetComponent, SubmitComponent, TabComponent, TabsComponent, TemplateComponent, TextareaComponent, WidgetLibraryModule, WidgetLibraryService, _executeAsyncValidators, _executeValidators, _mergeErrors, _mergeObjects, _toPromise, addClasses, buildFormGroup, buildFormGroupTemplate, buildLayout, buildLayoutFromSchema, buildSchemaFromData, buildSchemaFromLayout, buildTitleMap, checkInlineType, combineAllOf, commonItems, convertSchemaToDraft6, copy, deValidationMessages, enValidationMessages, esValidationMessages, fixRequiredArrayProperties, fixTitle, forEach, forEachCopy, formatFormData, frValidationMessages, getControl, getControlValidators, getFromSchema, getInputType, getLayoutNode, getSubSchema, getTitleMapFromOneOf, getType, hasNonNullValue, hasOwn, hasValue, inArray, isArray, isBoolean, isDate, isDefined, isEmpty, isFunction, isInputRequired, isInteger, isMap, isNumber, isObject, isObservable, isPrimitive, isPromise, isSet, isString, isType, itValidationMessages, mapLayout, mergeFilteredObject, mergeSchemas, path2ControlKey, ptValidationMessages, removeRecursiveReferences, resolveSchemaReferences, setControl, setRequiredFields, toJavaScriptType, toObservable, toSchemaType, toTitleCase, uniqueItems, updateInputOptions, xor, zhValidationMessages };
11402
11608
  //# sourceMappingURL=ng-formworks-core.mjs.map