@stemy/ngx-dynamic-form 13.0.1 → 13.1.1
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/esm2020/ngx-dynamic-form/common-types.mjs +1 -1
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-form-array.component.mjs +4 -1
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-form-control.component.mjs +37 -0
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-form.component.mjs +6 -2
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-select.component.mjs +63 -0
- package/esm2020/ngx-dynamic-form/ngx-dynamic-form.imports.mjs +6 -2
- package/esm2020/ngx-dynamic-form/ngx-dynamic-form.module.mjs +8 -6
- package/esm2020/ngx-dynamic-form/services/dynamic-form.service.mjs +35 -24
- package/esm2020/ngx-dynamic-form/utils/dynamic-form-array.model.mjs +4 -1
- package/esm2020/ngx-dynamic-form/utils/dynamic-select.model.mjs +57 -0
- package/esm2020/ngx-dynamic-form/utils/form-select-subject.mjs +1 -1
- package/esm2020/ngx-dynamic-form/utils/form-subject.mjs +1 -1
- package/esm2020/ngx-dynamic-form/utils/misc.mjs +26 -1
- package/esm2020/public_api.mjs +6 -1
- package/fesm2015/stemy-ngx-dynamic-form.mjs +238 -47
- package/fesm2015/stemy-ngx-dynamic-form.mjs.map +1 -1
- package/fesm2020/stemy-ngx-dynamic-form.mjs +238 -45
- package/fesm2020/stemy-ngx-dynamic-form.mjs.map +1 -1
- package/ngx-dynamic-form/common-types.d.ts +1 -2
- package/ngx-dynamic-form/components/base/dynamic-base-form-array.component.d.ts +1 -0
- package/ngx-dynamic-form/components/base/dynamic-base-form-control.component.d.ts +16 -0
- package/ngx-dynamic-form/components/base/dynamic-base-form.component.d.ts +3 -1
- package/ngx-dynamic-form/components/base/dynamic-base-select.component.d.ts +15 -0
- package/ngx-dynamic-form/ngx-dynamic-form.imports.d.ts +4 -2
- package/ngx-dynamic-form/ngx-dynamic-form.module.d.ts +9 -7
- package/ngx-dynamic-form/services/dynamic-form.service.d.ts +7 -6
- package/ngx-dynamic-form/utils/dynamic-form-array.model.d.ts +4 -0
- package/ngx-dynamic-form/utils/dynamic-select.model.d.ts +37 -0
- package/ngx-dynamic-form/utils/form-select-subject.d.ts +2 -2
- package/ngx-dynamic-form/utils/form-subject.d.ts +6 -6
- package/ngx-dynamic-form/utils/misc.d.ts +7 -1
- package/package.json +3 -3
- package/public_api.d.ts +6 -1
package/esm2020/public_api.mjs
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
export { defaultSerializer, FormSerializable, FormInput, FormSelect, FormStatic, FormModel, FormFile, defineFormControl, getFormControl, getFormSerializer, createFormInput, createFormSelect, createFormStatic, createFormModel, createFormControl } from "./ngx-dynamic-form/common-types";
|
|
2
|
+
export { replaceSpecialChars, mergeFormModels, MIN_INPUT_NUM, MAX_INPUT_NUM } from "./ngx-dynamic-form/utils/misc";
|
|
2
3
|
export { validateJSON, validateRequiredTranslation, validatePhone, validateItemsMinLength, validateItemsMaxLength, validateItemsMinValue, validateItemsMaxValue } from "./ngx-dynamic-form/utils/validators";
|
|
3
4
|
export { DynamicFormArrayModel } from "./ngx-dynamic-form/utils/dynamic-form-array.model";
|
|
5
|
+
export { DynamicFormOption, DynamicSelectModel } from "./ngx-dynamic-form/utils/dynamic-select.model";
|
|
4
6
|
export { FormSelectSubject } from "./ngx-dynamic-form/utils/form-select-subject";
|
|
5
7
|
export { FormSubject } from "./ngx-dynamic-form/utils/form-subject";
|
|
6
8
|
export { DynamicFormService } from "./ngx-dynamic-form/services/dynamic-form.service";
|
|
7
9
|
export { AsyncSubmitDirective } from "./ngx-dynamic-form/directives/async-submit.directive";
|
|
8
10
|
export { DynamicBaseFormComponent } from "./ngx-dynamic-form/components/base/dynamic-base-form.component";
|
|
9
11
|
export { DynamicBaseFormArrayComponent } from "./ngx-dynamic-form/components/base/dynamic-base-form-array.component";
|
|
12
|
+
export { DynamicBaseFormControlComponent } from "./ngx-dynamic-form/components/base/dynamic-base-form-control.component";
|
|
10
13
|
export { DynamicBaseFormControlContainerComponent } from "./ngx-dynamic-form/components/base/dynamic-base-form-control-container.component";
|
|
11
14
|
export { DynamicBaseFormGroupComponent } from "./ngx-dynamic-form/components/base/dynamic-base-form-group.component";
|
|
15
|
+
export { DynamicBaseSelectComponent } from "./ngx-dynamic-form/components/base/dynamic-base-select.component";
|
|
12
16
|
export { NgxDynamicFormModule } from "./ngx-dynamic-form/ngx-dynamic-form.module";
|
|
13
|
-
|
|
17
|
+
export { DYNAMIC_FORM_CONTROL_TYPE_ARRAY, DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX, DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX_GROUP, DYNAMIC_FORM_CONTROL_TYPE_FILE_UPLOAD, DYNAMIC_FORM_CONTROL_TYPE_GROUP, DYNAMIC_FORM_CONTROL_TYPE_INPUT, DYNAMIC_FORM_CONTROL_TYPE_RADIO_GROUP, DYNAMIC_FORM_CONTROL_TYPE_SELECT, DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA, DynamicTemplateDirective, DynamicListDirective, DynamicFormsCoreModule, DynamicCheckboxModel, DynamicCheckboxGroupModel, DynamicFileUploadModel, DynamicFormGroupModel, DynamicInputModel, DynamicRadioGroupModel, DynamicTextAreaModel } from "@ng-dynamic-forms/core";
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFpQkgsaUJBQWlCLEVBQ2pCLGdCQUFnQixFQUNoQixTQUFTLEVBQ1QsVUFBVSxFQUNWLFVBQVUsRUFDVixTQUFTLEVBQ1QsUUFBUSxFQUNSLGlCQUFpQixFQUNqQixjQUFjL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VsLFxyXG4gICAgRHluYW1pY1RleHRBcmVhTW9kZWxcclxufSBmcm9tIFwiQG5nLWR5bmFtaWMtZm9ybXMvY29yZVwiO1xyXG4iXX0=
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as i2 from '@stemy/ngx-utils';
|
|
2
2
|
import { ReflectUtils, ObjectUtils, StringUtils, OpenApiService, TOASTER_SERVICE, ObservableUtils, EventsService, NgxUtilsModule } from '@stemy/ngx-utils';
|
|
3
3
|
import * as i1 from '@ng-dynamic-forms/core';
|
|
4
|
-
import { DynamicFormArrayModel as DynamicFormArrayModel$1,
|
|
5
|
-
|
|
4
|
+
import { DynamicFormArrayModel as DynamicFormArrayModel$1, DynamicFormOption as DynamicFormOption$1, DynamicSelectModel as DynamicSelectModel$1, DynamicFormService as DynamicFormService$1, DynamicFormGroupModel, DynamicInputModel, DynamicFileUploadModel, DynamicCheckboxModel, DynamicTextAreaModel, DynamicFormComponent, DynamicTemplateDirective, DynamicFormArrayComponent, DynamicFormValueControlModel, DynamicFormControlContainerComponent, DynamicFormControlComponent, DYNAMIC_FORM_CONTROL_TYPE_ARRAY, DynamicFormGroupComponent, DYNAMIC_FORM_CONTROL_MAP_FN, DYNAMIC_VALIDATORS } from '@ng-dynamic-forms/core';
|
|
5
|
+
export { DYNAMIC_FORM_CONTROL_TYPE_ARRAY, DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX, DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX_GROUP, DYNAMIC_FORM_CONTROL_TYPE_FILE_UPLOAD, DYNAMIC_FORM_CONTROL_TYPE_GROUP, DYNAMIC_FORM_CONTROL_TYPE_INPUT, DYNAMIC_FORM_CONTROL_TYPE_RADIO_GROUP, DYNAMIC_FORM_CONTROL_TYPE_SELECT, DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA, DynamicCheckboxGroupModel, DynamicCheckboxModel, DynamicFileUploadModel, DynamicFormGroupModel, DynamicFormsCoreModule, DynamicInputModel, DynamicListDirective, DynamicRadioGroupModel, DynamicTemplateDirective, DynamicTextAreaModel } from '@ng-dynamic-forms/core';
|
|
6
|
+
import { of, isObservable, map, Subject, Subscription, BehaviorSubject } from 'rxjs';
|
|
6
7
|
import { __awaiter } from 'tslib';
|
|
7
8
|
import * as i0 from '@angular/core';
|
|
8
9
|
import { EventEmitter, Injector, Injectable, Inject, Directive, Input, Output, HostBinding, HostListener, QueryList, Component, ChangeDetectionStrategy, ContentChildren, ViewChildren, ViewChild, forwardRef, ViewContainerRef, NgModule } from '@angular/core';
|
|
@@ -106,6 +107,50 @@ function createFormFile(id, data) {
|
|
|
106
107
|
return control;
|
|
107
108
|
}
|
|
108
109
|
|
|
110
|
+
function isStringWithVal(val) {
|
|
111
|
+
return typeof val == "string" && val.length > 0;
|
|
112
|
+
}
|
|
113
|
+
function findRefs(property) {
|
|
114
|
+
var _a;
|
|
115
|
+
const refs = Array.isArray(property.allOf)
|
|
116
|
+
? property.allOf.map(o => o.$ref).filter(isStringWithVal)
|
|
117
|
+
: [(_a = property.items) === null || _a === void 0 ? void 0 : _a.$ref, property.$ref].filter(isStringWithVal);
|
|
118
|
+
return refs.map(t => t.split("/").pop());
|
|
119
|
+
}
|
|
120
|
+
function replaceSpecialChars(str, to = "-") {
|
|
121
|
+
return (str || "").replace(/[&\/\\#, +()$~%.'":*?<>{}]/g, to);
|
|
122
|
+
}
|
|
123
|
+
function mergeFormModels(formModels) {
|
|
124
|
+
const res = [];
|
|
125
|
+
for (const formModel of formModels) {
|
|
126
|
+
for (const subModel of formModel) {
|
|
127
|
+
const index = res.findIndex(t => t.id == subModel.id);
|
|
128
|
+
if (index >= 0) {
|
|
129
|
+
res[index] = subModel;
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
res.push(subModel);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return res;
|
|
136
|
+
}
|
|
137
|
+
function collectPathAble(start, getter) {
|
|
138
|
+
if (!start || !getter(start))
|
|
139
|
+
return [];
|
|
140
|
+
const parts = [];
|
|
141
|
+
let currentPath = start;
|
|
142
|
+
while (currentPath) {
|
|
143
|
+
const val = getter(currentPath);
|
|
144
|
+
if (val) {
|
|
145
|
+
parts.unshift(val);
|
|
146
|
+
}
|
|
147
|
+
currentPath = currentPath.parent;
|
|
148
|
+
}
|
|
149
|
+
return parts;
|
|
150
|
+
}
|
|
151
|
+
const MIN_INPUT_NUM = -99999999999999;
|
|
152
|
+
const MAX_INPUT_NUM = 99999999999999;
|
|
153
|
+
|
|
109
154
|
function validateJSON(control) {
|
|
110
155
|
const value = control.value;
|
|
111
156
|
if (!value)
|
|
@@ -172,10 +217,67 @@ class DynamicFormArrayModel extends DynamicFormArrayModel$1 {
|
|
|
172
217
|
this.restoreTab = ObjectUtils.isFunction(config.restoreTab) ? config.restoreTab : ((model) => {
|
|
173
218
|
return model.tabIndex;
|
|
174
219
|
});
|
|
220
|
+
this.getTabLabel = ObjectUtils.isFunction(config.getTabLabel) ? config.getTabLabel : ((index) => {
|
|
221
|
+
return `${index + 1}`;
|
|
222
|
+
});
|
|
175
223
|
this.additional = config.additional || {};
|
|
176
224
|
}
|
|
177
225
|
}
|
|
178
226
|
|
|
227
|
+
const ignoredKeys = ["disabled", "label", "value", "classes"];
|
|
228
|
+
class DynamicFormOption extends DynamicFormOption$1 {
|
|
229
|
+
constructor(config) {
|
|
230
|
+
super(config);
|
|
231
|
+
this.classes = config.classes || "";
|
|
232
|
+
this.props = Object.keys(config).reduce((res, k) => {
|
|
233
|
+
if (ignoredKeys.indexOf(k) >= 0)
|
|
234
|
+
return res;
|
|
235
|
+
res[k] = config[k];
|
|
236
|
+
return res;
|
|
237
|
+
}, {});
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
class DynamicSelectModel extends DynamicSelectModel$1 {
|
|
241
|
+
constructor(config, layout) {
|
|
242
|
+
super(config, layout);
|
|
243
|
+
this.groupBy = config.groupBy || null;
|
|
244
|
+
this.inline = config.inline || false;
|
|
245
|
+
this.getClasses = ObjectUtils.isFunction(config.getClasses) ? config.getClasses : (() => "");
|
|
246
|
+
this.mOptions = this.mOptions || [];
|
|
247
|
+
}
|
|
248
|
+
updateOptions() {
|
|
249
|
+
this.options$ = of(this.mOptions);
|
|
250
|
+
}
|
|
251
|
+
set options(options) {
|
|
252
|
+
if (Array.isArray(options)) {
|
|
253
|
+
this.mOptions = options.map(optionConfig => new DynamicFormOption(optionConfig));
|
|
254
|
+
this.updateOptions();
|
|
255
|
+
}
|
|
256
|
+
else if (isObservable(options)) {
|
|
257
|
+
this.options$ = options.pipe(map(optionsConfig => {
|
|
258
|
+
this.mOptions = optionsConfig.map(optionConfig => new DynamicFormOption(optionConfig));
|
|
259
|
+
return this.mOptions;
|
|
260
|
+
}));
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
this.updateOptions();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
get options() {
|
|
267
|
+
return this.mOptions;
|
|
268
|
+
}
|
|
269
|
+
insert(index, optionConfig) {
|
|
270
|
+
const option = new DynamicFormOption(optionConfig);
|
|
271
|
+
this.mOptions.splice(index, 0, option);
|
|
272
|
+
this.updateOptions();
|
|
273
|
+
return option;
|
|
274
|
+
}
|
|
275
|
+
remove(...indices) {
|
|
276
|
+
indices.forEach(index => this.mOptions.splice(index, 1));
|
|
277
|
+
this.updateOptions();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
179
281
|
const indexLabels = ["$ix", "$pix"];
|
|
180
282
|
class FormSubject extends Subject {
|
|
181
283
|
constructor(notifyCallback) {
|
|
@@ -227,24 +329,6 @@ class FormSelectSubject extends FormSubject {
|
|
|
227
329
|
}
|
|
228
330
|
}
|
|
229
331
|
|
|
230
|
-
function isStringWithVal(val) {
|
|
231
|
-
return typeof val == "string" && val.length > 0;
|
|
232
|
-
}
|
|
233
|
-
function collectPathAble(start, getter) {
|
|
234
|
-
if (!start || !getter(start))
|
|
235
|
-
return [];
|
|
236
|
-
const parts = [];
|
|
237
|
-
let currentPath = start;
|
|
238
|
-
while (currentPath) {
|
|
239
|
-
const val = getter(currentPath);
|
|
240
|
-
if (val) {
|
|
241
|
-
parts.unshift(val);
|
|
242
|
-
}
|
|
243
|
-
currentPath = currentPath.parent;
|
|
244
|
-
}
|
|
245
|
-
return parts;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
332
|
class DynamicFormService extends DynamicFormService$1 {
|
|
249
333
|
constructor(cs, vs, openApi, injector) {
|
|
250
334
|
super(cs, vs);
|
|
@@ -435,7 +519,7 @@ class DynamicFormService extends DynamicFormService$1 {
|
|
|
435
519
|
return controls.filter(t => null !== t);
|
|
436
520
|
}
|
|
437
521
|
getFormControlModels(property, schema, customizeModels) {
|
|
438
|
-
var _a
|
|
522
|
+
var _a;
|
|
439
523
|
const $enum = ((_a = property.items) === null || _a === void 0 ? void 0 : _a.enum) || property.enum;
|
|
440
524
|
if (Array.isArray($enum) || isStringWithVal(property.optionsPath) || isStringWithVal(property.endpoint)) {
|
|
441
525
|
return customizeModels(property, schema, DynamicSelectModel, this.getFormSelectConfig(property, schema));
|
|
@@ -450,7 +534,7 @@ class DynamicFormService extends DynamicFormService$1 {
|
|
|
450
534
|
case "boolean":
|
|
451
535
|
return customizeModels(property, schema, DynamicCheckboxModel, this.getFormCheckboxConfig(property, schema));
|
|
452
536
|
case "array":
|
|
453
|
-
if ((
|
|
537
|
+
if (findRefs(property).length > 0) {
|
|
454
538
|
return customizeModels(property, schema, DynamicFormArrayModel, this.getFormArrayConfig(property, schema, customizeModels));
|
|
455
539
|
}
|
|
456
540
|
else {
|
|
@@ -496,18 +580,17 @@ class DynamicFormService extends DynamicFormService$1 {
|
|
|
496
580
|
};
|
|
497
581
|
}
|
|
498
582
|
getFormArrayConfig(property, schema, customizeModels) {
|
|
499
|
-
|
|
500
|
-
const ref = ((_a = property.items) === null || _a === void 0 ? void 0 : _a.$ref) || property.$ref || "";
|
|
501
|
-
const subSchema = this.schemas[ref.split("/").pop()];
|
|
583
|
+
const subSchemas = findRefs(property).map(ref => this.schemas[ref]);
|
|
502
584
|
return Object.assign(this.getFormControlConfig(property, schema), {
|
|
503
|
-
groupFactory: () => this.getFormModelForSchemaDef(
|
|
585
|
+
groupFactory: () => mergeFormModels(subSchemas.map(s => this.getFormModelForSchemaDef(s, customizeModels))),
|
|
504
586
|
useTabs: property.useTabs || false
|
|
505
587
|
});
|
|
506
588
|
}
|
|
507
589
|
getFormGroupConfig(property, schema, customizeModels) {
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
|
|
590
|
+
const subSchemas = findRefs(property).map(ref => this.schemas[ref]);
|
|
591
|
+
return Object.assign(this.getFormControlConfig(property, schema), {
|
|
592
|
+
group: mergeFormModels(subSchemas.map(s => this.getFormModelForSchemaDef(s, customizeModels)))
|
|
593
|
+
});
|
|
511
594
|
}
|
|
512
595
|
getFormInputConfig(property, schema) {
|
|
513
596
|
var _a;
|
|
@@ -532,10 +615,10 @@ class DynamicFormService extends DynamicFormService$1 {
|
|
|
532
615
|
mask: ObjectUtils.isString(property.mask) ? property.mask : null,
|
|
533
616
|
pattern: ObjectUtils.isString(property.pattern) ? property.pattern : null,
|
|
534
617
|
step: isNaN(sub.step) ? (isNaN(property.step) ? 1 : property.step) : sub.step,
|
|
535
|
-
min: isNaN(sub.minimum) ?
|
|
536
|
-
max: isNaN(sub.maximum) ?
|
|
537
|
-
minLength: isNaN(sub.minLength) ?
|
|
538
|
-
maxLength: isNaN(sub.maxLength) ?
|
|
618
|
+
min: isNaN(sub.minimum) ? MIN_INPUT_NUM : sub.minimum,
|
|
619
|
+
max: isNaN(sub.maximum) ? MAX_INPUT_NUM : sub.maximum,
|
|
620
|
+
minLength: isNaN(sub.minLength) ? MIN_INPUT_NUM : sub.minLength,
|
|
621
|
+
maxLength: isNaN(sub.maxLength) ? MAX_INPUT_NUM : sub.maxLength,
|
|
539
622
|
placeholder: property.placeholder || ""
|
|
540
623
|
});
|
|
541
624
|
}
|
|
@@ -551,7 +634,9 @@ class DynamicFormService extends DynamicFormService$1 {
|
|
|
551
634
|
getFormSelectConfig(property, schema) {
|
|
552
635
|
return Object.assign(this.getFormControlConfig(property, schema), {
|
|
553
636
|
options: this.getFormSelectOptions(property, schema),
|
|
554
|
-
multiple: property.type == "array"
|
|
637
|
+
multiple: property.type == "array",
|
|
638
|
+
groupBy: property.groupBy,
|
|
639
|
+
inline: property.inline
|
|
555
640
|
});
|
|
556
641
|
}
|
|
557
642
|
getFormCheckboxConfig(property, schema) {
|
|
@@ -559,11 +644,16 @@ class DynamicFormService extends DynamicFormService$1 {
|
|
|
559
644
|
indeterminate: property.indeterminate === true
|
|
560
645
|
});
|
|
561
646
|
}
|
|
562
|
-
|
|
647
|
+
cloneFormArrayGroup(index, formArray, formArrayModel) {
|
|
648
|
+
this.insertFormArrayGroup(index, formArray, formArrayModel);
|
|
649
|
+
this.patchGroup(formArray.at(index + 1).value, formArrayModel.groups[index].group, formArray.at(index));
|
|
650
|
+
}
|
|
651
|
+
fixSelectOptions(model, control, options) {
|
|
563
652
|
return __awaiter(this, void 0, void 0, function* () {
|
|
564
653
|
if (!options)
|
|
565
654
|
return [];
|
|
566
655
|
for (const option of options) {
|
|
656
|
+
option.classes = [option.classes, model.getClasses(option, model, control, this.injector)].filter(isStringWithVal).join(" ");
|
|
567
657
|
option.label = yield this.language.getTranslation(option.label);
|
|
568
658
|
}
|
|
569
659
|
return options;
|
|
@@ -573,19 +663,19 @@ class DynamicFormService extends DynamicFormService$1 {
|
|
|
573
663
|
var _a;
|
|
574
664
|
const $enum = ((_a = property.items) === null || _a === void 0 ? void 0 : _a.enum) || property.enum;
|
|
575
665
|
if (Array.isArray($enum)) {
|
|
576
|
-
return new FormSelectSubject(() => {
|
|
666
|
+
return new FormSelectSubject((selectModel, formControl) => {
|
|
577
667
|
const options = $enum.map(value => {
|
|
578
668
|
const label = property.translatable ? `${property.id}.${value}` : `${value}`;
|
|
579
669
|
return { value, label };
|
|
580
670
|
});
|
|
581
|
-
return this.
|
|
671
|
+
return this.fixSelectOptions(selectModel, formControl, options);
|
|
582
672
|
});
|
|
583
673
|
}
|
|
584
674
|
if (isStringWithVal(property.optionsPath)) {
|
|
585
|
-
return new FormSelectSubject((
|
|
675
|
+
return new FormSelectSubject((selectModel, control, root, indexes) => {
|
|
586
676
|
let path = property.optionsPath;
|
|
587
677
|
let target = control;
|
|
588
|
-
let model =
|
|
678
|
+
let model = selectModel;
|
|
589
679
|
if (path.startsWith("$root")) {
|
|
590
680
|
path = path.substr(5);
|
|
591
681
|
while (target.parent) {
|
|
@@ -610,17 +700,17 @@ class DynamicFormService extends DynamicFormService$1 {
|
|
|
610
700
|
const modelOption = modelOptions.find(t => t.value == value);
|
|
611
701
|
return { value, label: (modelOption === null || modelOption === void 0 ? void 0 : modelOption.label) || value };
|
|
612
702
|
});
|
|
613
|
-
return this.
|
|
703
|
+
return this.fixSelectOptions(selectModel, control, options);
|
|
614
704
|
});
|
|
615
705
|
}
|
|
616
|
-
return new FormSelectSubject(() => __awaiter(this, void 0, void 0, function* () {
|
|
706
|
+
return new FormSelectSubject((selectModel, control) => __awaiter(this, void 0, void 0, function* () {
|
|
617
707
|
this.api.cache[property.endpoint] = this.api.cache[property.endpoint] || this.api.list(property.endpoint, this.api.makeListParams(1, -1)).then(result => {
|
|
618
708
|
return result.items.map(i => {
|
|
619
|
-
return { value: i.id || i._id, label: i[property.labelField] || i.label || i.id || i._id };
|
|
709
|
+
return Object.assign(Object.assign({}, i), { value: i.id || i._id, label: i[property.labelField] || i.label || i.id || i._id });
|
|
620
710
|
});
|
|
621
711
|
});
|
|
622
712
|
const options = (yield this.api.cache[property.endpoint]).map(t => Object.assign({}, t));
|
|
623
|
-
return this.
|
|
713
|
+
return this.fixSelectOptions(selectModel, control, options);
|
|
624
714
|
}));
|
|
625
715
|
}
|
|
626
716
|
getFormUploadConfig(property, schema) {
|
|
@@ -860,6 +950,10 @@ class DynamicBaseFormComponent extends DynamicFormComponent {
|
|
|
860
950
|
this.formService.insertFormArrayGroup(index, formArray, formArrayModel);
|
|
861
951
|
this.changeDetectorRef.detectChanges();
|
|
862
952
|
}
|
|
953
|
+
cloneFormArrayGroup(index, formArray, formArrayModel) {
|
|
954
|
+
this.formService.cloneFormArrayGroup(index, formArray, formArrayModel);
|
|
955
|
+
this.changeDetectorRef.detectChanges();
|
|
956
|
+
}
|
|
863
957
|
removeFormArrayGroup(index, formArray, formArrayModel) {
|
|
864
958
|
this.formService.removeFormArrayGroup(index, formArray, formArrayModel);
|
|
865
959
|
this.changeDetectorRef.detectChanges();
|
|
@@ -978,6 +1072,9 @@ class DynamicBaseFormArrayComponent extends DynamicFormArrayComponent {
|
|
|
978
1072
|
restoreTab() {
|
|
979
1073
|
return this.model.restoreTab(this.model, this.injector);
|
|
980
1074
|
}
|
|
1075
|
+
getTabLabel(index) {
|
|
1076
|
+
return this.model.getTabLabel(index, this.model, this.array, this.injector);
|
|
1077
|
+
}
|
|
981
1078
|
getClass(context, place, model) {
|
|
982
1079
|
var _a;
|
|
983
1080
|
return [
|
|
@@ -1039,6 +1136,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
1039
1136
|
args: [forwardRef(() => DynamicFormControlContainerComponent)]
|
|
1040
1137
|
}] } });
|
|
1041
1138
|
|
|
1139
|
+
class DynamicBaseFormControlComponent extends DynamicFormControlComponent {
|
|
1140
|
+
constructor(layoutService, validationService) {
|
|
1141
|
+
super(layoutService, validationService);
|
|
1142
|
+
this.blur = new EventEmitter();
|
|
1143
|
+
this.change = new EventEmitter();
|
|
1144
|
+
this.focus = new EventEmitter();
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
DynamicBaseFormControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: DynamicBaseFormControlComponent, deps: [{ token: i1.DynamicFormLayoutService }, { token: i1.DynamicFormValidationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1148
|
+
DynamicBaseFormControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: DynamicBaseFormControlComponent, selector: "dynamic-base-form-control", inputs: { formLayout: "formLayout", group: "group", layout: "layout", model: "model" }, outputs: { blur: "blur", change: "change", focus: "focus" }, usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: DynamicBaseFormControlComponent, decorators: [{
|
|
1150
|
+
type: Component,
|
|
1151
|
+
args: [{
|
|
1152
|
+
selector: "dynamic-base-form-control",
|
|
1153
|
+
template: "",
|
|
1154
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1155
|
+
}]
|
|
1156
|
+
}], ctorParameters: function () { return [{ type: i1.DynamicFormLayoutService }, { type: i1.DynamicFormValidationService }]; }, propDecorators: { formLayout: [{
|
|
1157
|
+
type: Input
|
|
1158
|
+
}], group: [{
|
|
1159
|
+
type: Input
|
|
1160
|
+
}], layout: [{
|
|
1161
|
+
type: Input
|
|
1162
|
+
}], model: [{
|
|
1163
|
+
type: Input
|
|
1164
|
+
}], blur: [{
|
|
1165
|
+
type: Output
|
|
1166
|
+
}], change: [{
|
|
1167
|
+
type: Output
|
|
1168
|
+
}], focus: [{
|
|
1169
|
+
type: Output
|
|
1170
|
+
}] } });
|
|
1171
|
+
|
|
1042
1172
|
class DynamicBaseFormControlContainerComponent extends DynamicFormControlContainerComponent {
|
|
1043
1173
|
constructor(form, changeDetectorRef, componentFactoryResolver, layoutService, validationService, componentService, relationService) {
|
|
1044
1174
|
super(changeDetectorRef, componentFactoryResolver, layoutService, validationService, componentService, relationService);
|
|
@@ -1213,12 +1343,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
1213
1343
|
args: [forwardRef(() => DynamicFormControlContainerComponent)]
|
|
1214
1344
|
}] } });
|
|
1215
1345
|
|
|
1346
|
+
class DynamicBaseSelectComponent extends DynamicBaseFormControlComponent {
|
|
1347
|
+
ngOnInit() {
|
|
1348
|
+
this.groups$ = new BehaviorSubject([]);
|
|
1349
|
+
this.subscription = this.model.options$.subscribe(options => {
|
|
1350
|
+
const groupBy = this.model.inline || !this.model.multiple ? this.model.groupBy : null;
|
|
1351
|
+
const groups = options.reduce((res, option) => {
|
|
1352
|
+
const key = replaceSpecialChars(groupBy ? option.props[this.model.groupBy] || "default" : "default", "-");
|
|
1353
|
+
res[key] = res[key] || [];
|
|
1354
|
+
res[key].push(option);
|
|
1355
|
+
return res;
|
|
1356
|
+
}, {});
|
|
1357
|
+
this.groups$.next(Object.keys(groups).map(group => {
|
|
1358
|
+
return {
|
|
1359
|
+
group,
|
|
1360
|
+
options: groups[group]
|
|
1361
|
+
};
|
|
1362
|
+
}));
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
ngOnDestroy() {
|
|
1366
|
+
if (this.subscription)
|
|
1367
|
+
this.subscription.unsubscribe();
|
|
1368
|
+
}
|
|
1369
|
+
isSelected(option) {
|
|
1370
|
+
var _a;
|
|
1371
|
+
if (this.model.multiple) {
|
|
1372
|
+
return ((_a = this.control.value) === null || _a === void 0 ? void 0 : _a.indexOf(option.value)) >= 0;
|
|
1373
|
+
}
|
|
1374
|
+
return this.control.value == option.value;
|
|
1375
|
+
}
|
|
1376
|
+
selectToggle(option, state) {
|
|
1377
|
+
if (this.model.multiple) {
|
|
1378
|
+
const value = Array.from(this.control.value || []);
|
|
1379
|
+
const index = value.indexOf(option.value);
|
|
1380
|
+
if (index >= 0) {
|
|
1381
|
+
value.splice(index, 1);
|
|
1382
|
+
}
|
|
1383
|
+
if (state) {
|
|
1384
|
+
value.push(option.value);
|
|
1385
|
+
}
|
|
1386
|
+
this.control.setValue(value);
|
|
1387
|
+
this.onChange(value);
|
|
1388
|
+
return;
|
|
1389
|
+
}
|
|
1390
|
+
this.control.setValue(option.value);
|
|
1391
|
+
this.onChange(option.value);
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
DynamicBaseSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: DynamicBaseSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1395
|
+
DynamicBaseSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: DynamicBaseSelectComponent, selector: "dynamic-base-select", usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: DynamicBaseSelectComponent, decorators: [{
|
|
1397
|
+
type: Component,
|
|
1398
|
+
args: [{
|
|
1399
|
+
selector: "dynamic-base-select",
|
|
1400
|
+
template: "",
|
|
1401
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
1402
|
+
}]
|
|
1403
|
+
}] });
|
|
1404
|
+
|
|
1216
1405
|
// --- Components ---
|
|
1217
1406
|
const components = [
|
|
1218
1407
|
DynamicBaseFormComponent,
|
|
1219
1408
|
DynamicBaseFormArrayComponent,
|
|
1409
|
+
DynamicBaseFormControlComponent,
|
|
1220
1410
|
DynamicBaseFormControlContainerComponent,
|
|
1221
|
-
DynamicBaseFormGroupComponent
|
|
1411
|
+
DynamicBaseFormGroupComponent,
|
|
1412
|
+
DynamicBaseSelectComponent
|
|
1222
1413
|
];
|
|
1223
1414
|
// --- Directives ---
|
|
1224
1415
|
const directives = [
|
|
@@ -1250,10 +1441,10 @@ class NgxDynamicFormModule {
|
|
|
1250
1441
|
}
|
|
1251
1442
|
}
|
|
1252
1443
|
NgxDynamicFormModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxDynamicFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1253
|
-
NgxDynamicFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxDynamicFormModule, declarations: [DynamicBaseFormComponent, DynamicBaseFormArrayComponent, DynamicBaseFormControlContainerComponent, DynamicBaseFormGroupComponent, AsyncSubmitDirective], imports: [CommonModule,
|
|
1444
|
+
NgxDynamicFormModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxDynamicFormModule, declarations: [DynamicBaseFormComponent, DynamicBaseFormArrayComponent, DynamicBaseFormControlComponent, DynamicBaseFormControlContainerComponent, DynamicBaseFormGroupComponent, DynamicBaseSelectComponent, AsyncSubmitDirective], imports: [CommonModule,
|
|
1254
1445
|
FormsModule,
|
|
1255
1446
|
ReactiveFormsModule,
|
|
1256
|
-
NgxUtilsModule], exports: [DynamicBaseFormComponent, DynamicBaseFormArrayComponent, DynamicBaseFormControlContainerComponent, DynamicBaseFormGroupComponent, AsyncSubmitDirective, FormsModule,
|
|
1447
|
+
NgxUtilsModule], exports: [DynamicBaseFormComponent, DynamicBaseFormArrayComponent, DynamicBaseFormControlComponent, DynamicBaseFormControlContainerComponent, DynamicBaseFormGroupComponent, DynamicBaseSelectComponent, AsyncSubmitDirective, FormsModule,
|
|
1257
1448
|
ReactiveFormsModule,
|
|
1258
1449
|
NgxUtilsModule] });
|
|
1259
1450
|
NgxDynamicFormModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NgxDynamicFormModule, providers: [
|
|
@@ -1335,5 +1526,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
1335
1526
|
* Generated bundle index. Do not edit.
|
|
1336
1527
|
*/
|
|
1337
1528
|
|
|
1338
|
-
export { AsyncSubmitDirective, DynamicBaseFormArrayComponent, DynamicBaseFormComponent, DynamicBaseFormControlContainerComponent, DynamicBaseFormGroupComponent, DynamicFormArrayModel, DynamicFormService, FormFile, FormInput, FormModel, FormSelect, FormSelectSubject, FormSerializable, FormStatic, FormSubject, NgxDynamicFormModule, createFormControl, createFormInput, createFormModel, createFormSelect, createFormStatic, defaultSerializer, defineFormControl, getFormControl, getFormSerializer, validateItemsMaxLength, validateItemsMaxValue, validateItemsMinLength, validateItemsMinValue, validateJSON, validatePhone, validateRequiredTranslation };
|
|
1529
|
+
export { AsyncSubmitDirective, DynamicBaseFormArrayComponent, DynamicBaseFormComponent, DynamicBaseFormControlComponent, DynamicBaseFormControlContainerComponent, DynamicBaseFormGroupComponent, DynamicBaseSelectComponent, DynamicFormArrayModel, DynamicFormOption, DynamicFormService, DynamicSelectModel, FormFile, FormInput, FormModel, FormSelect, FormSelectSubject, FormSerializable, FormStatic, FormSubject, MAX_INPUT_NUM, MIN_INPUT_NUM, NgxDynamicFormModule, createFormControl, createFormInput, createFormModel, createFormSelect, createFormStatic, defaultSerializer, defineFormControl, getFormControl, getFormSerializer, mergeFormModels, replaceSpecialChars, validateItemsMaxLength, validateItemsMaxValue, validateItemsMinLength, validateItemsMinValue, validateJSON, validatePhone, validateRequiredTranslation };
|
|
1339
1530
|
//# sourceMappingURL=stemy-ngx-dynamic-form.mjs.map
|