@koalarx/ui 12.7.15 → 12.7.19
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/core/package.json +2 -1
- package/dialog/bundles/koalarx-ui-dialog.umd.js +5 -5
- package/dialog/bundles/koalarx-ui-dialog.umd.js.map +1 -1
- package/dialog/esm2015/lib/koala.dialog.service.js +1 -1
- package/dialog/fesm2015/koalarx-ui-dialog.js +1 -1
- package/dialog/package.json +2 -1
- package/form/bundles/koalarx-ui-form.umd.js +32 -7
- package/form/bundles/koalarx-ui-form.umd.js.map +1 -1
- package/form/esm2015/lib/dynamic-form/builder/dynamic-form.builder.js +2 -2
- package/form/esm2015/lib/dynamic-form/builder/fields/field.base.js +2 -1
- package/form/esm2015/lib/dynamic-form/dynamic-form.component.js +15 -2
- package/form/esm2015/lib/dynamic-form/koala.dynamic-form.service.js +1 -1
- package/form/esm2015/lib/dynamic-form/validators/autocomplete-selected.validator.js +1 -1
- package/form/fesm2015/koalarx-ui-form.js +17 -3
- package/form/fesm2015/koalarx-ui-form.js.map +1 -1
- package/form/koalarx-ui-form.metadata.json +1 -1
- package/form/lib/dynamic-form/builder/fields/field.base.d.ts +1 -1
- package/form/lib/dynamic-form/dynamic-form.component.d.ts +1 -0
- package/form/package.json +2 -1
- package/list/package.json +2 -1
- package/package.json +3 -4
package/core/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/dialog'), require('@angular/material/button'), require('@angular/material/icon'), require('ngx-device-detector'), require('@koalarx/utils/operators/string')
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@koalarx/ui/dialog', ['exports', '@angular/core', '@angular/common', '@angular/material/dialog', '@angular/material/button', '@angular/material/icon', 'ngx-device-detector', '@koalarx/utils/operators/string'
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.koalarx = global.koalarx || {}, global.koalarx.ui = global.koalarx.ui || {}, global.koalarx.ui.dialog = {}), global.ng.core, global.ng.common, global.ng.material.dialog, global.ng.material.button, global.ng.material.icon, global.i2, global.string
|
|
5
|
-
})(this, (function (exports, i0, common, i1, button, icon,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/dialog'), require('@angular/material/button'), require('@angular/material/icon'), require('ngx-device-detector'), require('@koalarx/utils/operators/string')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@koalarx/ui/dialog', ['exports', '@angular/core', '@angular/common', '@angular/material/dialog', '@angular/material/button', '@angular/material/icon', 'ngx-device-detector', '@koalarx/utils/operators/string'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.koalarx = global.koalarx || {}, global.koalarx.ui = global.koalarx.ui || {}, global.koalarx.ui.dialog = {}), global.ng.core, global.ng.common, global.ng.material.dialog, global.ng.material.button, global.ng.material.icon, global.i2, global.string));
|
|
5
|
+
})(this, (function (exports, i0, common, i1, button, icon, i2, string) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
];
|
|
123
123
|
KoalaDialogService.ctorParameters = function () { return [
|
|
124
124
|
{ type: i1.MatDialog },
|
|
125
|
-
{ type:
|
|
125
|
+
{ type: i2.DeviceDetectorService }
|
|
126
126
|
]; };
|
|
127
127
|
|
|
128
128
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-dialog.umd.js","sources":["../../../projects/dialog/src/lib/dialog.component.ts","../../../projects/dialog/src/lib/koala.dialog.module.ts","../../../projects/dialog/src/lib/koala.dialog.service.ts","../../../projects/dialog/src/koalarx-ui-dialog.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\n\n@Component({\n selector: 'koala-dialog',\n templateUrl: 'dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DialogComponent {\n @Input() titleDialog?: string;\n @Input() iconTitleDialog?: string;\n @Input() triggerDialogClose?: string;\n @Input() btnCloseLabel?: string;\n @Input() btnCloseColor: ThemePalette;\n}\n","import { NgModule } from '@angular/core';\nimport { DialogComponent } from './dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\n\n@NgModule({\n declarations: [\n DialogComponent\n ],\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatDialogModule\n ],\n exports: [\n DialogComponent\n ]\n})\nexport class KoalaDialogModule {\n}\n","import { Injectable } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { KoalaDialogTemplateInterface } from './koala.dialog-template.interface';\nimport { ComponentType } from '@angular/cdk/overlay';\nimport { DeviceDetectorService } from \"ngx-device-detector\";\nimport { randomString } from \"@koalarx/utils/operators/string\";\n\nexport type KoalaDialogSizeType = 'auto' | 'small' | 'normal' | 'big' | 'mobile';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaDialogService {\n\n constructor(\n private dialog: MatDialog,\n private deviceService: DeviceDetectorService) {\n }\n\n public open<T>(\n dialogComponent: ComponentType<T>,\n size: KoalaDialogSizeType,\n data?: any,\n triggerBeforeClosed: string | boolean | object = false,\n beforeClosed?: (event?: any) => void\n ) {\n const dialogRef = this.dialog.open(dialogComponent, this.dialogTemplate(data)[this.deviceService.isMobile() ? 'mobile' : size])\n dialogRef.afterOpened().subscribe(() => {\n history.pushState(null, '', location.href);\n return false;\n });\n dialogRef.beforeClosed().subscribe(event => {\n if ((triggerBeforeClosed && event === triggerBeforeClosed) ||\n (typeof triggerBeforeClosed == 'object' && typeof event == 'object')\n ) {\n if (beforeClosed) {\n beforeClosed(event);\n }\n }\n });\n dialogRef.keydownEvents().subscribe(event => {\n if (event.key === 'Escape') {\n dialogRef.close({closeOnNavigation: true})\n }\n });\n }\n\n private dialogTemplate(data: any = null): KoalaDialogTemplateInterface {\n let dialogElementId = \"dialog-\" + randomString(10);\n\n return {\n auto: {id: dialogElementId, panelClass: ['koala-dialog', 'auto'], disableClose: true, data},\n small: {id: dialogElementId, panelClass: ['koala-dialog', 'small'], disableClose: true, data},\n normal: {id: dialogElementId, panelClass: ['koala-dialog', 'normal'], disableClose: true, data},\n big: {id: dialogElementId, panelClass: ['koala-dialog', 'big'], disableClose: true, data},\n fullScreen: {id: dialogElementId, panelClass: ['koala-dialog'], disableClose: true, data},\n mobile: {\n id: dialogElementId,\n autoFocus: false,\n panelClass: [\"koala-dialog\", 'mobile'],\n width: '100vw',\n maxWidth: '100vw',\n maxHeight: '90vh',\n data\n }\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Component","ChangeDetectionStrategy","Input","NgModule","CommonModule","MatIconModule","MatButtonModule","MatDialogModule","randomString","Injectable","MatDialog","DeviceDetectorService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAQA;;;;;gBALCA,YAAS,SAAC;oBACT,QAAQ,EAAE,cAAc;oBACxB,2gBAAoC;oBACpC,eAAe,EAAEC,0BAAuB,CAAC,MAAM;iBAChD;;;8BAEEC,QAAK;kCACLA,QAAK;qCACLA,QAAK;gCACLA,QAAK;gCACLA,QAAK;;;;QCQR;;;;;gBAdCC,WAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,eAAe;qBAChB;oBACD,OAAO,EAAE;wBACPC,mBAAY;wBACZC,kBAAa;wBACbC,sBAAe;wBACfC,kBAAe;qBAChB;oBACD,OAAO,EAAE;wBACP,eAAe;qBAChB;iBACF;;;;QCRC,4BACU,MAAiB,EACjB,aAAoC;YADpC,WAAM,GAAN,MAAM,CAAW;YACjB,kBA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EAAE,MAAM,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,MAAA,EAAC;gBAC3F,KAAK,EAAE,EAAC,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,cAAc,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,MAAA,EAAC;gBAC7F,MAAM,EAAE,EAAC,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,cAAc,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,MAAA,EAAC;gBAC/F,GAAG,EAAE,EAAC,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,MAAA,EAAC;gBACzF,UAAU,EAAE,EAAC,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,cAAc,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,MAAA,EAAC;gBACzF,MAAM,EAAE;oBACN,EAAE,EAAE,eAAe;oBACnB,SAAS,EAAE,KAAK;oBAChB,UAAU,EAAE,CAAC,cAAc,EAAE,QAAQ,CAAC;oBACtC,KAAK,EAAE,OAAO;oBACd,QAAQ,EAAE,OAAO;oBACjB,SAAS,EAAE,MAAM;oBACjB,IAAI,MAAA;iBACL;aACF,CAAC;SACH;;;;;gBAvDFC,aAAU,SAAC,EAAC,UAAU,EAAE,KAAK,EAAC;;;gBARtBC,YAAS;gBAGTC,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-dialog.umd.js","sources":["../../../projects/dialog/src/lib/dialog.component.ts","../../../projects/dialog/src/lib/koala.dialog.module.ts","../../../projects/dialog/src/lib/koala.dialog.service.ts","../../../projects/dialog/src/koalarx-ui-dialog.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\n\n@Component({\n selector: 'koala-dialog',\n templateUrl: 'dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DialogComponent {\n @Input() titleDialog?: string;\n @Input() iconTitleDialog?: string;\n @Input() triggerDialogClose?: string;\n @Input() btnCloseLabel?: string;\n @Input() btnCloseColor: ThemePalette;\n}\n","import { NgModule } from '@angular/core';\nimport { DialogComponent } from './dialog.component';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\n\n@NgModule({\n declarations: [\n DialogComponent\n ],\n imports: [\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatDialogModule\n ],\n exports: [\n DialogComponent\n ]\n})\nexport class KoalaDialogModule {\n}\n","import { Injectable } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { KoalaDialogTemplateInterface } from './koala.dialog-template.interface';\nimport { ComponentType } from '@angular/cdk/overlay';\nimport { DeviceDetectorService } from \"ngx-device-detector\";\nimport { randomString } from \"@koalarx/utils/operators/string\";\n\nexport type KoalaDialogSizeType = 'auto' | 'small' | 'normal' | 'big' | 'mobile';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaDialogService {\n\n constructor(\n private dialog: MatDialog,\n private deviceService: DeviceDetectorService) {\n }\n\n public open<T>(\n dialogComponent: ComponentType<T>,\n size: KoalaDialogSizeType,\n data?: any,\n triggerBeforeClosed: string | boolean | object = false,\n beforeClosed?: (event?: any) => void\n ) {\n const dialogRef = this.dialog.open(dialogComponent, this.dialogTemplate(data)[this.deviceService.isMobile() ? 'mobile' : size])\n dialogRef.afterOpened().subscribe(() => {\n history.pushState(null, '', location.href);\n return false;\n });\n dialogRef.beforeClosed().subscribe(event => {\n if ((triggerBeforeClosed && event === triggerBeforeClosed) ||\n (typeof triggerBeforeClosed == 'object' && typeof event == 'object')\n ) {\n if (beforeClosed) {\n beforeClosed(event);\n }\n }\n });\n dialogRef.keydownEvents().subscribe(event => {\n if (event.key === 'Escape') {\n dialogRef.close({closeOnNavigation: true})\n }\n });\n }\n\n private dialogTemplate(data: any = null): KoalaDialogTemplateInterface {\n let dialogElementId = \"dialog-\" + randomString(10);\n\n return {\n auto: {id: dialogElementId, panelClass: ['koala-dialog', 'auto'], disableClose: true, data},\n small: {id: dialogElementId, panelClass: ['koala-dialog', 'small'], disableClose: true, data},\n normal: {id: dialogElementId, panelClass: ['koala-dialog', 'normal'], disableClose: true, data},\n big: {id: dialogElementId, panelClass: ['koala-dialog', 'big'], disableClose: true, data},\n fullScreen: {id: dialogElementId, panelClass: ['koala-dialog'], disableClose: true, data},\n mobile: {\n id: dialogElementId,\n autoFocus: false,\n panelClass: [\"koala-dialog\", 'mobile'],\n width: '100vw',\n maxWidth: '100vw',\n maxHeight: '90vh',\n data\n }\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Component","ChangeDetectionStrategy","Input","NgModule","CommonModule","MatIconModule","MatButtonModule","MatDialogModule","randomString","Injectable","MatDialog","DeviceDetectorService"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAQA;;;;;gBALCA,YAAS,SAAC;oBACT,QAAQ,EAAE,cAAc;oBACxB,2gBAAoC;oBACpC,eAAe,EAAEC,0BAAuB,CAAC,MAAM;iBAChD;;;8BAEEC,QAAK;kCACLA,QAAK;qCACLA,QAAK;gCACLA,QAAK;gCACLA,QAAK;;;;QCQR;;;;;gBAdCC,WAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,eAAe;qBAChB;oBACD,OAAO,EAAE;wBACPC,mBAAY;wBACZC,kBAAa;wBACbC,sBAAe;wBACfC,kBAAe;qBAChB;oBACD,OAAO,EAAE;wBACP,eAAe;qBAChB;iBACF;;;;QCRC,4BACU,MAAiB,EACjB,aAAoC;YADpC,WAAM,GAAN,MAAM,CAAW;YACjB,kBAAa,GAAb,aAAa,CAAuB;SAC7C;QAEM,iCAAI,GAAJ,UACL,eAAiC,EACjC,IAAyB,EACzB,IAAU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EAAC,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,cAAc,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,MAAA,EAAC;gBAC7F,MAAM,EAAE,EAAC,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,cAAc,EAAE,QAAQ,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,MAAA,EAAC;gBAC/F,GAAG,EAAE,EAAC,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,cAAc,EAAE,KAAK,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,MAAA,EAAC;gBACzF,UAAU,EAAE,EAAC,EAAE,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,cAAc,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,MAAA,EAAC;gBACzF,MAAM,EAAE;oBACN,EAAE,EAAE,eAAe;oBACnB,SAAS,EAAE,KAAK;oBAChB,UAAU,EAAE,CAAC,cAAc,EAAE,QAAQ,CAAC;oBACtC,KAAK,EAAE,OAAO;oBACd,QAAQ,EAAE,OAAO;oBACjB,SAAS,EAAE,MAAM;oBACjB,IAAI,MAAA;iBACL;aACF,CAAC;SACH;;;;;gBAvDFC,aAAU,SAAC,EAAC,UAAU,EAAE,KAAK,EAAC;;;gBARtBC,YAAS;gBAGTC,wBAAqB;;;ICJ9B;;;;;;;;;;;;;;"}
|
|
@@ -4,7 +4,7 @@ import { DeviceDetectorService } from "ngx-device-detector";
|
|
|
4
4
|
import { randomString } from "@koalarx/utils/operators/string";
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
import * as i1 from "@angular/material/dialog";
|
|
7
|
-
import * as i2 from "ngx-device-detector
|
|
7
|
+
import * as i2 from "ngx-device-detector";
|
|
8
8
|
export class KoalaDialogService {
|
|
9
9
|
constructor(dialog, deviceService) {
|
|
10
10
|
this.dialog = dialog;
|
|
@@ -5,9 +5,9 @@ import * as i1 from '@angular/material/dialog';
|
|
|
5
5
|
import { MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
6
6
|
import { MatButtonModule } from '@angular/material/button';
|
|
7
7
|
import { MatIconModule } from '@angular/material/icon';
|
|
8
|
+
import * as i2 from 'ngx-device-detector';
|
|
8
9
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
9
10
|
import { randomString } from '@koalarx/utils/operators/string';
|
|
10
|
-
import * as i2 from 'ngx-device-detector/lib/device-detector.service';
|
|
11
11
|
|
|
12
12
|
class DialogComponent {
|
|
13
13
|
}
|
package/dialog/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@koalarx/ui/core'), require('@angular/forms'), require('@koalarx/utils'), require('ngx-device-detector'), require('@koalarx/utils/operators/string'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@koalarx/ui/form', ['exports', '@angular/core', 'rxjs', '@koalarx/ui/core', '@angular/forms', '@koalarx/utils', 'ngx-device-detector', '@koalarx/utils/operators/string', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.koalarx = global.koalarx || {}, global.koalarx.ui = global.koalarx.ui || {}, global.koalarx.ui.form = {}), global.ng.core, global.rxjs, global.core, global.ng.forms, global.utils, global.
|
|
5
|
-
})(this, (function (exports, i0, rxjs, core, i1, utils,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@koalarx/ui/core'), require('@angular/forms'), require('@koalarx/utils'), require('ngx-device-detector'), require('@koalarx/utils/operators/string'), require('rxjs/operators'), require('@koalarx/utils/operators/delay'), require('@angular/common'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/radio'), require('@angular/material/checkbox'), require('@angular/material/autocomplete'), require('@angular/material/button'), require('@angular/material/icon'), require('@angular/material/progress-spinner'), require('ngx-mask'), require('@koalarx/ui/common'), require('ng2-currency-mask'), require('@koalarx/ui/button'), require('@angular/material/expansion'), require('@koalarx/ui/file-button'), require('@angular/material/chips')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@koalarx/ui/form', ['exports', '@angular/core', 'rxjs', '@koalarx/ui/core', '@angular/forms', '@koalarx/utils', 'ngx-device-detector', '@koalarx/utils/operators/string', 'rxjs/operators', '@koalarx/utils/operators/delay', '@angular/common', '@angular/material/input', '@angular/material/select', '@angular/material/radio', '@angular/material/checkbox', '@angular/material/autocomplete', '@angular/material/button', '@angular/material/icon', '@angular/material/progress-spinner', 'ngx-mask', '@koalarx/ui/common', 'ng2-currency-mask', '@koalarx/ui/button', '@angular/material/expansion', '@koalarx/ui/file-button', '@angular/material/chips'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.koalarx = global.koalarx || {}, global.koalarx.ui = global.koalarx.ui || {}, global.koalarx.ui.form = {}), global.ng.core, global.rxjs, global.core, global.ng.forms, global.utils, global.i2, global.string, global.rxjs.operators, global.delay, global.ng.common, global.ng.material.input, global.ng.material.select, global.ng.material.radio, global.ng.material.checkbox, global.ng.material.autocomplete, global.ng.material.button, global.ng.material.icon, global.ng.material.progressSpinner, global["ngx-mask"], global.common$1, global.ng2CurrencyMask, global.button, global.ng.material.expansion, global.fileButton, global.ng.material.chips));
|
|
5
|
+
})(this, (function (exports, i0, rxjs, core, i1, utils, i2, string, operators, delay, common, input, select, radio, checkbox, autocomplete, button, icon, progressSpinner, ngxMask, common$1, ng2CurrencyMask, button$1, expansion, fileButton, chips) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -478,6 +478,7 @@
|
|
|
478
478
|
FieldBase.prototype.multiple = function (multiple) {
|
|
479
479
|
if (multiple === void 0) { multiple = true; }
|
|
480
480
|
this.fieldConfig.multiple = multiple;
|
|
481
|
+
return this;
|
|
481
482
|
};
|
|
482
483
|
FieldBase.prototype.valueChanges = function (fn) {
|
|
483
484
|
this.fieldConfig.valueChanges = fn;
|
|
@@ -724,7 +725,7 @@
|
|
|
724
725
|
var setValues_1 = [];
|
|
725
726
|
Object.keys(object).forEach(function (indexName) {
|
|
726
727
|
var _a, _b, _c, _d, _e;
|
|
727
|
-
var arrField = utils.koala(_this.config.formConfig).array().filter(indexName, 'name').getValue();
|
|
728
|
+
var arrField = utils.koala(_this.config.formConfig).array().filter(indexName, 'name', { comparator: "=" }).getValue();
|
|
728
729
|
if (arrField.length === 1) {
|
|
729
730
|
var field_1 = (_a = arrField[0]) !== null && _a !== void 0 ? _a : null;
|
|
730
731
|
if (typeof object[indexName] !== "object" ||
|
|
@@ -1019,7 +1020,7 @@
|
|
|
1019
1020
|
];
|
|
1020
1021
|
KoalaDynamicFormService.ctorParameters = function () { return [
|
|
1021
1022
|
{ type: i1.FormBuilder },
|
|
1022
|
-
{ type:
|
|
1023
|
+
{ type: i2.DeviceDetectorService }
|
|
1023
1024
|
]; };
|
|
1024
1025
|
|
|
1025
1026
|
var ValidationHelper = /** @class */ (function () {
|
|
@@ -1270,9 +1271,12 @@
|
|
|
1270
1271
|
if (newFormGroup.get('multiple').value) {
|
|
1271
1272
|
if (Array.isArray(value)) {
|
|
1272
1273
|
newFormGroup.get('autocompleteSelectedValue').setValue(value);
|
|
1274
|
+
newFormGroup.get('value').setValue(value[value.length - 1], { emitEvent: false });
|
|
1273
1275
|
}
|
|
1274
1276
|
else {
|
|
1275
|
-
newFormGroup.get('autocompleteSelectedValue').value
|
|
1277
|
+
if (this.validateAutocompleteSelect(newFormGroup.get('autocompleteSelectedValue').value, value)) {
|
|
1278
|
+
newFormGroup.get('autocompleteSelectedValue').value.push(value);
|
|
1279
|
+
}
|
|
1276
1280
|
}
|
|
1277
1281
|
if ((_a = this.autocompleteInput) === null || _a === void 0 ? void 0 : _a.nativeElement) {
|
|
1278
1282
|
this.autocompleteInput.nativeElement.value = '';
|
|
@@ -1820,6 +1824,27 @@
|
|
|
1820
1824
|
});
|
|
1821
1825
|
});
|
|
1822
1826
|
};
|
|
1827
|
+
DynamicFormComponent.prototype.validateAutocompleteSelect = function (selectedValues, value) {
|
|
1828
|
+
var e_6, _5;
|
|
1829
|
+
var isValid = true;
|
|
1830
|
+
try {
|
|
1831
|
+
for (var _6 = __values(selectedValues.values()), _7 = _6.next(); !_7.done; _7 = _6.next()) {
|
|
1832
|
+
var selectedItem = _7.value;
|
|
1833
|
+
if (selectedItem.name === value.name) {
|
|
1834
|
+
isValid = false;
|
|
1835
|
+
break;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
1840
|
+
finally {
|
|
1841
|
+
try {
|
|
1842
|
+
if (_7 && !_7.done && (_5 = _6.return)) _5.call(_6);
|
|
1843
|
+
}
|
|
1844
|
+
finally { if (e_6) throw e_6.error; }
|
|
1845
|
+
}
|
|
1846
|
+
return isValid;
|
|
1847
|
+
};
|
|
1823
1848
|
return DynamicFormComponent;
|
|
1824
1849
|
}(FormAbstract));
|
|
1825
1850
|
DynamicFormComponent.decorators = [
|